@5ss/ai-tools 2.11.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 (342) hide show
  1. package/CHANGELOG.md +112 -0
  2. package/LICENSE +21 -0
  3. package/README.md +221 -0
  4. package/dist/ai-sdk/index.d.ts +15 -0
  5. package/dist/ai-sdk/index.d.ts.map +1 -0
  6. package/dist/ai-sdk/index.js +24 -0
  7. package/dist/ai-sdk/index.js.map +1 -0
  8. package/dist/artifact-D064mHfK.js +44 -0
  9. package/dist/artifact-D064mHfK.js.map +1 -0
  10. package/dist/artifacts-O8g-40Pw.js +404 -0
  11. package/dist/artifacts-O8g-40Pw.js.map +1 -0
  12. package/dist/aws-json-CecFqzqX.js +23 -0
  13. package/dist/aws-json-CecFqzqX.js.map +1 -0
  14. package/dist/aws-service-msttbPrz.js +58 -0
  15. package/dist/aws-service-msttbPrz.js.map +1 -0
  16. package/dist/batch-BMM5dXqL.d.ts +22 -0
  17. package/dist/batch-BMM5dXqL.d.ts.map +1 -0
  18. package/dist/batch-Co1ujeAW.js +67 -0
  19. package/dist/batch-Co1ujeAW.js.map +1 -0
  20. package/dist/bedrock-agentcore-browser-a_qOs-NR.js +182 -0
  21. package/dist/bedrock-agentcore-browser-a_qOs-NR.js.map +1 -0
  22. package/dist/bedrock-agentcore-code-interpreter-MWK-8RhA.js +357 -0
  23. package/dist/bedrock-agentcore-code-interpreter-MWK-8RhA.js.map +1 -0
  24. package/dist/bytes-BxpimpQx.js +45 -0
  25. package/dist/bytes-BxpimpQx.js.map +1 -0
  26. package/dist/client-CCKGsTeI.js +743 -0
  27. package/dist/client-CCKGsTeI.js.map +1 -0
  28. package/dist/cloudflare/index.d.ts +37 -0
  29. package/dist/cloudflare/index.d.ts.map +1 -0
  30. package/dist/cloudflare/index.js +41 -0
  31. package/dist/cloudflare/index.js.map +1 -0
  32. package/dist/cloudflare-browser-B6Yolpin.js +428 -0
  33. package/dist/cloudflare-browser-B6Yolpin.js.map +1 -0
  34. package/dist/cloudflare-email-Dy0KHeDf.js +197 -0
  35. package/dist/cloudflare-email-Dy0KHeDf.js.map +1 -0
  36. package/dist/cloudflare-sandbox-Dp_uNaqW.js +982 -0
  37. package/dist/cloudflare-sandbox-Dp_uNaqW.js.map +1 -0
  38. package/dist/content-type-CORxaxcv.js +49 -0
  39. package/dist/content-type-CORxaxcv.js.map +1 -0
  40. package/dist/core/index.d.ts +4 -0
  41. package/dist/core/index.js +204 -0
  42. package/dist/core/index.js.map +1 -0
  43. package/dist/define-CvpJ_pNP.js +115 -0
  44. package/dist/define-CvpJ_pNP.js.map +1 -0
  45. package/dist/errors-DoSpNHvs.js +20 -0
  46. package/dist/errors-DoSpNHvs.js.map +1 -0
  47. package/dist/errors-aKhko9T1.d.ts +18 -0
  48. package/dist/errors-aKhko9T1.d.ts.map +1 -0
  49. package/dist/eventbridge-scheduler-Bh6GqZY2.js +349 -0
  50. package/dist/eventbridge-scheduler-Bh6GqZY2.js.map +1 -0
  51. package/dist/framework-context-DVIIY8ZO.js +24 -0
  52. package/dist/framework-context-DVIIY8ZO.js.map +1 -0
  53. package/dist/gotenberg-NuJjxyln.js +291 -0
  54. package/dist/gotenberg-NuJjxyln.js.map +1 -0
  55. package/dist/http/index.d.ts +47 -0
  56. package/dist/http/index.d.ts.map +1 -0
  57. package/dist/http/index.js +3 -0
  58. package/dist/http-service-DDNCO1s4.js +254 -0
  59. package/dist/http-service-DDNCO1s4.js.map +1 -0
  60. package/dist/http-service-T7E5UjP8.d.ts +80 -0
  61. package/dist/http-service-T7E5UjP8.d.ts.map +1 -0
  62. package/dist/imessage-BSAFOI8Z.js +154 -0
  63. package/dist/imessage-BSAFOI8Z.js.map +1 -0
  64. package/dist/index-BU4gmYO8.d.ts +254 -0
  65. package/dist/index-BU4gmYO8.d.ts.map +1 -0
  66. package/dist/index-CCivzmxO.d.ts +188 -0
  67. package/dist/index-CCivzmxO.d.ts.map +1 -0
  68. package/dist/index-CLmTrcu5.d.ts +22 -0
  69. package/dist/index-CLmTrcu5.d.ts.map +1 -0
  70. package/dist/index-CZX5OeOF.d.ts +235 -0
  71. package/dist/index-CZX5OeOF.d.ts.map +1 -0
  72. package/dist/index-CdFmEfZO.d.ts +359 -0
  73. package/dist/index-CdFmEfZO.d.ts.map +1 -0
  74. package/dist/index-Cuh6eMWc.d.ts +285 -0
  75. package/dist/index-Cuh6eMWc.d.ts.map +1 -0
  76. package/dist/index-DuOGj7vc.d.ts +107 -0
  77. package/dist/index-DuOGj7vc.d.ts.map +1 -0
  78. package/dist/index-ccZ1XOHw.d.ts +69 -0
  79. package/dist/index-ccZ1XOHw.d.ts.map +1 -0
  80. package/dist/index-n8JTpNf1.d.ts +247 -0
  81. package/dist/index-n8JTpNf1.d.ts.map +1 -0
  82. package/dist/index-pwW1OsOx.d.ts +134 -0
  83. package/dist/index-pwW1OsOx.d.ts.map +1 -0
  84. package/dist/index-zK1ZwS4m.d.ts +347 -0
  85. package/dist/index-zK1ZwS4m.d.ts.map +1 -0
  86. package/dist/limits-hjrO8zUG.js +80 -0
  87. package/dist/limits-hjrO8zUG.js.map +1 -0
  88. package/dist/mastra/index.d.ts +14 -0
  89. package/dist/mastra/index.d.ts.map +1 -0
  90. package/dist/mastra/index.js +26 -0
  91. package/dist/mastra/index.js.map +1 -0
  92. package/dist/mastra-vector-Dhc6XZ8l.js +234 -0
  93. package/dist/mastra-vector-Dhc6XZ8l.js.map +1 -0
  94. package/dist/mcp/index.d.ts +80 -0
  95. package/dist/mcp/index.d.ts.map +1 -0
  96. package/dist/mcp/index.js +97 -0
  97. package/dist/mcp/index.js.map +1 -0
  98. package/dist/modules/artifacts/index.d.ts +337 -0
  99. package/dist/modules/artifacts/index.d.ts.map +1 -0
  100. package/dist/modules/artifacts/index.js +348 -0
  101. package/dist/modules/artifacts/index.js.map +1 -0
  102. package/dist/modules/browser/index.d.ts +516 -0
  103. package/dist/modules/browser/index.d.ts.map +1 -0
  104. package/dist/modules/browser/index.js +475 -0
  105. package/dist/modules/browser/index.js.map +1 -0
  106. package/dist/modules/calendar/index.d.ts +93 -0
  107. package/dist/modules/calendar/index.d.ts.map +1 -0
  108. package/dist/modules/calendar/index.js +131 -0
  109. package/dist/modules/calendar/index.js.map +1 -0
  110. package/dist/modules/code-sandbox/index.d.ts +317 -0
  111. package/dist/modules/code-sandbox/index.d.ts.map +1 -0
  112. package/dist/modules/code-sandbox/index.js +537 -0
  113. package/dist/modules/code-sandbox/index.js.map +1 -0
  114. package/dist/modules/content-type/index.d.ts +22 -0
  115. package/dist/modules/content-type/index.d.ts.map +1 -0
  116. package/dist/modules/content-type/index.js +66 -0
  117. package/dist/modules/content-type/index.js.map +1 -0
  118. package/dist/modules/crypto/index.d.ts +115 -0
  119. package/dist/modules/crypto/index.d.ts.map +1 -0
  120. package/dist/modules/crypto/index.js +139 -0
  121. package/dist/modules/crypto/index.js.map +1 -0
  122. package/dist/modules/document/index.d.ts +575 -0
  123. package/dist/modules/document/index.d.ts.map +1 -0
  124. package/dist/modules/document/index.js +444 -0
  125. package/dist/modules/document/index.js.map +1 -0
  126. package/dist/modules/document-extract/index.d.ts +438 -0
  127. package/dist/modules/document-extract/index.d.ts.map +1 -0
  128. package/dist/modules/document-extract/index.js +127 -0
  129. package/dist/modules/document-extract/index.js.map +1 -0
  130. package/dist/modules/document-render/index.d.ts +336 -0
  131. package/dist/modules/document-render/index.d.ts.map +1 -0
  132. package/dist/modules/document-render/index.js +155 -0
  133. package/dist/modules/document-render/index.js.map +1 -0
  134. package/dist/modules/email/index.d.ts +311 -0
  135. package/dist/modules/email/index.d.ts.map +1 -0
  136. package/dist/modules/email/index.js +167 -0
  137. package/dist/modules/email/index.js.map +1 -0
  138. package/dist/modules/email-message/index.d.ts +95 -0
  139. package/dist/modules/email-message/index.d.ts.map +1 -0
  140. package/dist/modules/email-message/index.js +264 -0
  141. package/dist/modules/email-message/index.js.map +1 -0
  142. package/dist/modules/file-convert/index.d.ts +273 -0
  143. package/dist/modules/file-convert/index.d.ts.map +1 -0
  144. package/dist/modules/file-convert/index.js +103 -0
  145. package/dist/modules/file-convert/index.js.map +1 -0
  146. package/dist/modules/files/index.d.ts +452 -0
  147. package/dist/modules/files/index.d.ts.map +1 -0
  148. package/dist/modules/files/index.js +733 -0
  149. package/dist/modules/files/index.js.map +1 -0
  150. package/dist/modules/image/index.d.ts +342 -0
  151. package/dist/modules/image/index.d.ts.map +1 -0
  152. package/dist/modules/image/index.js +281 -0
  153. package/dist/modules/image/index.js.map +1 -0
  154. package/dist/modules/messaging/index.d.ts +608 -0
  155. package/dist/modules/messaging/index.d.ts.map +1 -0
  156. package/dist/modules/messaging/index.js +1067 -0
  157. package/dist/modules/messaging/index.js.map +1 -0
  158. package/dist/modules/pdf/index.d.ts +287 -0
  159. package/dist/modules/pdf/index.d.ts.map +1 -0
  160. package/dist/modules/pdf/index.js +259 -0
  161. package/dist/modules/pdf/index.js.map +1 -0
  162. package/dist/modules/presentation/index.d.ts +247 -0
  163. package/dist/modules/presentation/index.d.ts.map +1 -0
  164. package/dist/modules/presentation/index.js +12657 -0
  165. package/dist/modules/presentation/index.js.map +1 -0
  166. package/dist/modules/queue/index.d.ts +129 -0
  167. package/dist/modules/queue/index.d.ts.map +1 -0
  168. package/dist/modules/queue/index.js +131 -0
  169. package/dist/modules/queue/index.js.map +1 -0
  170. package/dist/modules/rag/index.d.ts +250 -0
  171. package/dist/modules/rag/index.d.ts.map +1 -0
  172. package/dist/modules/rag/index.js +366 -0
  173. package/dist/modules/rag/index.js.map +1 -0
  174. package/dist/modules/scheduler/index.d.ts +216 -0
  175. package/dist/modules/scheduler/index.d.ts.map +1 -0
  176. package/dist/modules/scheduler/index.js +153 -0
  177. package/dist/modules/scheduler/index.js.map +1 -0
  178. package/dist/modules/skills/index.d.ts +205 -0
  179. package/dist/modules/skills/index.d.ts.map +1 -0
  180. package/dist/modules/skills/index.js +203 -0
  181. package/dist/modules/skills/index.js.map +1 -0
  182. package/dist/modules/tasks/index.d.ts +287 -0
  183. package/dist/modules/tasks/index.d.ts.map +1 -0
  184. package/dist/modules/tasks/index.js +207 -0
  185. package/dist/modules/tasks/index.js.map +1 -0
  186. package/dist/modules/vector-store/index.d.ts +3 -0
  187. package/dist/modules/vector-store/index.js +3 -0
  188. package/dist/modules/web-fetch/index.d.ts +99 -0
  189. package/dist/modules/web-fetch/index.d.ts.map +1 -0
  190. package/dist/modules/web-fetch/index.js +242 -0
  191. package/dist/modules/web-fetch/index.js.map +1 -0
  192. package/dist/object-artifact-store-CMTzCm_G.d.ts +7 -0
  193. package/dist/object-artifact-store-CMTzCm_G.d.ts.map +1 -0
  194. package/dist/object-artifact-store-wZ2j9cto.js +28 -0
  195. package/dist/object-artifact-store-wZ2j9cto.js.map +1 -0
  196. package/dist/pinecone-umY4t6OF.js +190 -0
  197. package/dist/pinecone-umY4t6OF.js.map +1 -0
  198. package/dist/provider-CgDAlg6K.js +34 -0
  199. package/dist/provider-CgDAlg6K.js.map +1 -0
  200. package/dist/qdrant-DMp4NhKR.js +253 -0
  201. package/dist/qdrant-DMp4NhKR.js.map +1 -0
  202. package/dist/resend-BAC38_dA.js +155 -0
  203. package/dist/resend-BAC38_dA.js.map +1 -0
  204. package/dist/s3-CsOaPWMP.js +955 -0
  205. package/dist/s3-CsOaPWMP.js.map +1 -0
  206. package/dist/schemas-ChOAhdo9.js +192 -0
  207. package/dist/schemas-ChOAhdo9.js.map +1 -0
  208. package/dist/slack-Di5BBNpt.js +1455 -0
  209. package/dist/slack-Di5BBNpt.js.map +1 -0
  210. package/dist/sqs-DCwS1i2N.js +225 -0
  211. package/dist/sqs-DCwS1i2N.js.map +1 -0
  212. package/dist/supabase-vector-Dpp9mmJR.js +218 -0
  213. package/dist/supabase-vector-Dpp9mmJR.js.map +1 -0
  214. package/dist/tanstack/index.d.ts +15 -0
  215. package/dist/tanstack/index.d.ts.map +1 -0
  216. package/dist/tanstack/index.js +28 -0
  217. package/dist/tanstack/index.js.map +1 -0
  218. package/dist/teams-DYAHNb39.js +835 -0
  219. package/dist/teams-DYAHNb39.js.map +1 -0
  220. package/dist/telegram-DDXWzkfL.js +734 -0
  221. package/dist/telegram-DDXWzkfL.js.map +1 -0
  222. package/dist/textract-CPLiB22H.js +554 -0
  223. package/dist/textract-CPLiB22H.js.map +1 -0
  224. package/dist/transport-B4vn-XiQ.js +157 -0
  225. package/dist/transport-B4vn-XiQ.js.map +1 -0
  226. package/dist/transport-i96ACAI_.d.ts +46 -0
  227. package/dist/transport-i96ACAI_.d.ts.map +1 -0
  228. package/dist/types-Ccb0DXY9.d.ts +150 -0
  229. package/dist/types-Ccb0DXY9.d.ts.map +1 -0
  230. package/dist/unique-EwBH1JPB.js +19 -0
  231. package/dist/unique-EwBH1JPB.js.map +1 -0
  232. package/dist/vector-store-C3nEO80e.js +193 -0
  233. package/dist/vector-store-C3nEO80e.js.map +1 -0
  234. package/dist/vendors/amazon-sp-api/index.d.ts +526 -0
  235. package/dist/vendors/amazon-sp-api/index.d.ts.map +1 -0
  236. package/dist/vendors/amazon-sp-api/index.js +975 -0
  237. package/dist/vendors/amazon-sp-api/index.js.map +1 -0
  238. package/dist/vendors/bedrock-agentcore-browser/index.d.ts +2 -0
  239. package/dist/vendors/bedrock-agentcore-browser/index.js +2 -0
  240. package/dist/vendors/bedrock-agentcore-code-interpreter/index.d.ts +228 -0
  241. package/dist/vendors/bedrock-agentcore-code-interpreter/index.d.ts.map +1 -0
  242. package/dist/vendors/bedrock-agentcore-code-interpreter/index.js +2 -0
  243. package/dist/vendors/cloudflare-browser/index.d.ts +2 -0
  244. package/dist/vendors/cloudflare-browser/index.js +2 -0
  245. package/dist/vendors/cloudflare-email/index.d.ts +260 -0
  246. package/dist/vendors/cloudflare-email/index.d.ts.map +1 -0
  247. package/dist/vendors/cloudflare-email/index.js +3 -0
  248. package/dist/vendors/cloudflare-sandbox/index.d.ts +565 -0
  249. package/dist/vendors/cloudflare-sandbox/index.d.ts.map +1 -0
  250. package/dist/vendors/cloudflare-sandbox/index.js +2 -0
  251. package/dist/vendors/eventbridge-scheduler/index.d.ts +2 -0
  252. package/dist/vendors/eventbridge-scheduler/index.js +2 -0
  253. package/dist/vendors/gotenberg/index.d.ts +306 -0
  254. package/dist/vendors/gotenberg/index.d.ts.map +1 -0
  255. package/dist/vendors/gotenberg/index.js +2 -0
  256. package/dist/vendors/imessage/index.d.ts +420 -0
  257. package/dist/vendors/imessage/index.d.ts.map +1 -0
  258. package/dist/vendors/imessage/index.js +4 -0
  259. package/dist/vendors/katana/index.d.ts +1570 -0
  260. package/dist/vendors/katana/index.d.ts.map +1 -0
  261. package/dist/vendors/katana/index.js +1639 -0
  262. package/dist/vendors/katana/index.js.map +1 -0
  263. package/dist/vendors/mastra-vector/index.d.ts +120 -0
  264. package/dist/vendors/mastra-vector/index.d.ts.map +1 -0
  265. package/dist/vendors/mastra-vector/index.js +3 -0
  266. package/dist/vendors/pinecone/index.d.ts +75 -0
  267. package/dist/vendors/pinecone/index.d.ts.map +1 -0
  268. package/dist/vendors/pinecone/index.js +3 -0
  269. package/dist/vendors/qdrant/index.d.ts +75 -0
  270. package/dist/vendors/qdrant/index.d.ts.map +1 -0
  271. package/dist/vendors/qdrant/index.js +3 -0
  272. package/dist/vendors/resend/index.d.ts +3 -0
  273. package/dist/vendors/resend/index.js +3 -0
  274. package/dist/vendors/s3/index.d.ts +2 -0
  275. package/dist/vendors/s3/index.js +2 -0
  276. package/dist/vendors/slack/index.d.ts +576 -0
  277. package/dist/vendors/slack/index.d.ts.map +1 -0
  278. package/dist/vendors/slack/index.js +3 -0
  279. package/dist/vendors/sqs/index.d.ts +2 -0
  280. package/dist/vendors/sqs/index.js +2 -0
  281. package/dist/vendors/supabase-vector/index.d.ts +89 -0
  282. package/dist/vendors/supabase-vector/index.d.ts.map +1 -0
  283. package/dist/vendors/supabase-vector/index.js +3 -0
  284. package/dist/vendors/teams/index.d.ts +303 -0
  285. package/dist/vendors/teams/index.d.ts.map +1 -0
  286. package/dist/vendors/teams/index.js +3 -0
  287. package/dist/vendors/telegram/index.d.ts +319 -0
  288. package/dist/vendors/telegram/index.d.ts.map +1 -0
  289. package/dist/vendors/telegram/index.js +3 -0
  290. package/dist/vendors/textract/index.d.ts +2 -0
  291. package/dist/vendors/textract/index.js +2 -0
  292. package/dist/vendors/woocommerce/index.d.ts +1700 -0
  293. package/dist/vendors/woocommerce/index.d.ts.map +1 -0
  294. package/dist/vendors/woocommerce/index.js +1427 -0
  295. package/dist/vendors/woocommerce/index.js.map +1 -0
  296. package/dist/with-auth-CpKqTrGK.js +240 -0
  297. package/dist/with-auth-CpKqTrGK.js.map +1 -0
  298. package/logos/LUCIDE-ATTRIBUTION.txt +4 -0
  299. package/logos/README.md +89 -0
  300. package/logos/amazon.svg +6 -0
  301. package/logos/artifacts.svg +9 -0
  302. package/logos/browser.svg +9 -0
  303. package/logos/calendar.svg +15 -0
  304. package/logos/cloudflare-browser.svg +5 -0
  305. package/logos/cloudflare-email.svg +5 -0
  306. package/logos/cloudflare.svg +4 -0
  307. package/logos/code-sandbox.svg +8 -0
  308. package/logos/content-type.svg +10 -0
  309. package/logos/crypto.svg +7 -0
  310. package/logos/document-extract.svg +12 -0
  311. package/logos/document-render.svg +8 -0
  312. package/logos/document.svg +10 -0
  313. package/logos/email-message.svg +8 -0
  314. package/logos/email.svg +7 -0
  315. package/logos/file-convert.svg +9 -0
  316. package/logos/files.svg +6 -0
  317. package/logos/gotenberg.svg +340 -0
  318. package/logos/image.svg +8 -0
  319. package/logos/imessage.svg +7 -0
  320. package/logos/katana.svg +13 -0
  321. package/logos/mastra.svg +7 -0
  322. package/logos/messaging.svg +7 -0
  323. package/logos/pack-logos.json +48 -0
  324. package/logos/pdf.svg +10 -0
  325. package/logos/pinecone.svg +25 -0
  326. package/logos/presentation.svg +8 -0
  327. package/logos/qdrant.svg +4 -0
  328. package/logos/queue.svg +11 -0
  329. package/logos/rag.svg +18 -0
  330. package/logos/resend.svg +5 -0
  331. package/logos/scheduler.svg +7 -0
  332. package/logos/skills.svg +10 -0
  333. package/logos/slack.svg +14 -0
  334. package/logos/supabase.svg +4 -0
  335. package/logos/tasks.svg +10 -0
  336. package/logos/teams.svg +6 -0
  337. package/logos/telegram.svg +10 -0
  338. package/logos/textract.svg +5 -0
  339. package/logos/vector-store.svg +8 -0
  340. package/logos/web-fetch.svg +8 -0
  341. package/logos/woocommerce.svg +4 -0
  342. package/package.json +373 -0
@@ -0,0 +1,1427 @@
1
+ import { t as ToolError } from "../../errors-DoSpNHvs.js";
2
+ import { n as defineModule, r as defineTool } from "../../define-CvpJ_pNP.js";
3
+ import { n as requireAuth } from "../../provider-CgDAlg6K.js";
4
+ import { t as HttpService } from "../../http-service-DDNCO1s4.js";
5
+ import { n as bytesToBase64, o as utf8ToBytes } from "../../bytes-BxpimpQx.js";
6
+ import { isPlainObject, isString } from "es-toolkit";
7
+ import { z } from "zod";
8
+ //#region src/vendors/woocommerce/contracts.ts
9
+ const woocommerceAuthSchema = z.object({
10
+ store_url: z.url().describe("WooCommerce store origin, for example https://shop.example.com (no trailing path)"),
11
+ consumer_key: z.string().min(1).describe("WooCommerce REST API consumer key"),
12
+ consumer_secret: z.string().min(1).describe("WooCommerce REST API consumer secret")
13
+ });
14
+ const listCursorFields = {
15
+ cursor: z.string().min(1).optional().describe("Page number from a prior next_cursor"),
16
+ limit: z.int().min(1).max(100).optional().describe("Page size (1-100, default 10)")
17
+ };
18
+ const woocommerceAddressSchema = z.object({
19
+ first_name: z.string().optional().describe("First name"),
20
+ last_name: z.string().optional().describe("Last name"),
21
+ company: z.string().optional().describe("Company name"),
22
+ address_1: z.string().optional().describe("Address line 1"),
23
+ address_2: z.string().optional().describe("Address line 2"),
24
+ city: z.string().optional().describe("City"),
25
+ state: z.string().optional().describe("State / province code"),
26
+ postcode: z.string().optional().describe("Postal / ZIP code"),
27
+ country: z.string().optional().describe("ISO country code"),
28
+ email: z.string().optional().describe("Email (billing)"),
29
+ phone: z.string().optional().describe("Phone")
30
+ });
31
+ const woocommerceMetaDataSchema = z.object({
32
+ key: z.string().min(1).describe("Meta key"),
33
+ value: z.string().describe("Meta value as string")
34
+ });
35
+ const woocommerceLineItemInputSchema = z.object({
36
+ id: z.int().positive().optional().describe("Existing line item id (updates)"),
37
+ product_id: z.int().positive().optional().describe("Product id"),
38
+ variation_id: z.int().positive().optional().describe("Variation id when applicable"),
39
+ quantity: z.int().min(0).optional().describe("Quantity"),
40
+ name: z.string().min(1).optional().describe("Line item name override"),
41
+ sku: z.string().min(1).optional().describe("SKU"),
42
+ price: z.string().min(1).optional().describe("Unit price as string"),
43
+ total: z.string().min(1).optional().describe("Line total as string")
44
+ });
45
+ /** Order line item on read responses (list/get order). */
46
+ const woocommerceOrderLineItemSchema = z.object({
47
+ id: z.number().describe("Order line item id"),
48
+ product_id: z.number().optional().describe("Product id"),
49
+ variation_id: z.number().optional().describe("Variation id when applicable"),
50
+ quantity: z.number().optional().describe("Quantity"),
51
+ name: z.string().optional().describe("Line item name"),
52
+ sku: z.string().optional().describe("SKU"),
53
+ price: z.string().optional().describe("Unit price as string"),
54
+ total: z.string().optional().describe("Line total as string")
55
+ });
56
+ /** Nested category on product read responses. */
57
+ const woocommerceProductCategoryRefSchema = z.object({
58
+ id: z.number().describe("Category id"),
59
+ name: z.string().optional().describe("Category name"),
60
+ slug: z.string().optional().describe("Category slug")
61
+ });
62
+ const woocommerceOrderSchema = z.object({
63
+ id: z.number(),
64
+ number: z.string(),
65
+ status: z.string(),
66
+ currency: z.string(),
67
+ total: z.string(),
68
+ date_created: z.string().optional(),
69
+ customer_id: z.number().optional(),
70
+ payment_method: z.string().optional(),
71
+ payment_method_title: z.string().optional(),
72
+ customer_note: z.string().optional(),
73
+ line_items: z.array(woocommerceOrderLineItemSchema).optional().describe("Order line items when returned by the store")
74
+ });
75
+ const woocommerceListOrdersInputSchema = z.object({
76
+ status: z.string().min(1).optional().describe("Order status filter (e.g. processing, completed)"),
77
+ after: z.string().min(1).optional().describe("ISO 8601 datetime; orders created after this"),
78
+ before: z.string().min(1).optional().describe("ISO 8601 datetime; orders created before this"),
79
+ search: z.string().min(1).optional().describe("Search term (order number, customer, …)"),
80
+ customer_id: z.int().positive().optional().describe("Filter by customer id"),
81
+ ...listCursorFields
82
+ });
83
+ const woocommerceListOrdersOutputSchema = z.object({
84
+ items: z.array(woocommerceOrderSchema),
85
+ next_cursor: z.string().optional(),
86
+ truncated: z.boolean()
87
+ });
88
+ const woocommerceGetOrderInputSchema = z.object({ order_id: z.int().positive().describe("WooCommerce order id") });
89
+ const woocommerceGetOrderOutputSchema = z.object({ order: woocommerceOrderSchema });
90
+ const woocommerceCreateOrderInputSchema = z.object({
91
+ status: z.string().min(1).optional().describe("Order status (pending, processing, …)"),
92
+ customer_id: z.int().positive().optional().describe("Existing customer id"),
93
+ payment_method: z.string().min(1).optional().describe("Payment method id"),
94
+ payment_method_title: z.string().min(1).optional().describe("Payment method title"),
95
+ set_paid: z.boolean().optional().describe("Mark order as paid"),
96
+ customer_note: z.string().optional().describe("Customer note"),
97
+ billing: woocommerceAddressSchema.optional().describe("Billing address"),
98
+ shipping: woocommerceAddressSchema.optional().describe("Shipping address"),
99
+ line_items: z.array(woocommerceLineItemInputSchema).min(1).optional().describe("Order line items"),
100
+ meta_data: z.array(woocommerceMetaDataSchema).optional().describe("Order meta data")
101
+ });
102
+ const woocommerceCreateOrderOutputSchema = woocommerceGetOrderOutputSchema;
103
+ const woocommerceUpdateOrderInputSchema = z.object({
104
+ order_id: z.int().positive().describe("WooCommerce order id"),
105
+ status: z.string().min(1).optional().describe("Order status"),
106
+ customer_id: z.int().nonnegative().optional().describe("Customer id (0 clears guest link)"),
107
+ payment_method: z.string().min(1).optional().describe("Payment method id"),
108
+ payment_method_title: z.string().min(1).optional().describe("Payment method title"),
109
+ set_paid: z.boolean().optional().describe("Mark order as paid"),
110
+ customer_note: z.string().optional().describe("Customer note"),
111
+ billing: woocommerceAddressSchema.optional().describe("Billing address"),
112
+ shipping: woocommerceAddressSchema.optional().describe("Shipping address"),
113
+ line_items: z.array(woocommerceLineItemInputSchema).optional().describe("Line items (include id to update)"),
114
+ meta_data: z.array(woocommerceMetaDataSchema).optional().describe("Order meta data")
115
+ });
116
+ const woocommerceUpdateOrderOutputSchema = woocommerceGetOrderOutputSchema;
117
+ const woocommerceDeleteOrderInputSchema = z.object({
118
+ order_id: z.int().positive().describe("WooCommerce order id"),
119
+ force: z.boolean().optional().describe("Permanently delete when true (default true)")
120
+ });
121
+ const woocommerceDeleteOrderOutputSchema = z.object({
122
+ deleted: z.boolean(),
123
+ id: z.number()
124
+ });
125
+ const woocommerceOrderNoteSchema = z.object({
126
+ id: z.number(),
127
+ note: z.string(),
128
+ customer_note: z.boolean().optional(),
129
+ date_created: z.string().optional(),
130
+ added_by_user: z.boolean().optional()
131
+ });
132
+ const woocommerceListOrderNotesInputSchema = z.object({
133
+ order_id: z.int().positive().describe("WooCommerce order id"),
134
+ type: z.enum([
135
+ "any",
136
+ "customer",
137
+ "internal"
138
+ ]).optional().describe("Note type filter (default any)"),
139
+ ...listCursorFields
140
+ });
141
+ const woocommerceListOrderNotesOutputSchema = z.object({
142
+ items: z.array(woocommerceOrderNoteSchema),
143
+ next_cursor: z.string().optional(),
144
+ truncated: z.boolean()
145
+ });
146
+ const woocommerceCreateOrderNoteInputSchema = z.object({
147
+ order_id: z.int().positive().describe("WooCommerce order id"),
148
+ note: z.string().min(1).describe("Note text"),
149
+ customer_note: z.boolean().optional().describe("When true, note is visible to the customer"),
150
+ added_by_user: z.boolean().optional().describe("When true, note is attributed to a user")
151
+ });
152
+ const woocommerceCreateOrderNoteOutputSchema = z.object({ note: woocommerceOrderNoteSchema });
153
+ const woocommerceOrderRefundSchema = z.object({
154
+ id: z.number(),
155
+ amount: z.string().optional(),
156
+ reason: z.string().optional(),
157
+ date_created: z.string().optional(),
158
+ refunded_by: z.number().optional()
159
+ });
160
+ const woocommerceListOrderRefundsInputSchema = z.object({
161
+ order_id: z.int().positive().describe("WooCommerce order id"),
162
+ ...listCursorFields
163
+ });
164
+ const woocommerceListOrderRefundsOutputSchema = z.object({
165
+ items: z.array(woocommerceOrderRefundSchema),
166
+ next_cursor: z.string().optional(),
167
+ truncated: z.boolean()
168
+ });
169
+ const woocommerceCreateOrderRefundInputSchema = z.object({
170
+ order_id: z.int().positive().describe("WooCommerce order id"),
171
+ amount: z.string().min(1).optional().describe("Refund amount as string"),
172
+ reason: z.string().optional().describe("Refund reason"),
173
+ api_refund: z.boolean().optional().describe("When true, attempt payment gateway refund"),
174
+ line_items: z.array(z.object({
175
+ id: z.int().positive().describe("Order line item id to refund"),
176
+ quantity: z.int().min(0).optional().describe("Quantity to refund"),
177
+ refund_total: z.string().min(1).optional().describe("Amount to refund for this line")
178
+ })).optional().describe("Optional per-line refunds")
179
+ });
180
+ const woocommerceCreateOrderRefundOutputSchema = z.object({ refund: woocommerceOrderRefundSchema });
181
+ const woocommerceProductSchema = z.object({
182
+ id: z.number(),
183
+ name: z.string(),
184
+ sku: z.string().optional(),
185
+ type: z.string(),
186
+ status: z.string(),
187
+ price: z.string().optional(),
188
+ regular_price: z.string().optional(),
189
+ sale_price: z.string().optional(),
190
+ stock_status: z.string().optional(),
191
+ stock_quantity: z.number().optional(),
192
+ manage_stock: z.boolean().optional(),
193
+ categories: z.array(woocommerceProductCategoryRefSchema).optional().describe("Product categories when returned by the store")
194
+ });
195
+ const woocommerceListProductsInputSchema = z.object({
196
+ status: z.string().min(1).optional().describe("Product status (publish, draft, …)"),
197
+ search: z.string().min(1).optional().describe("Search term"),
198
+ sku: z.string().min(1).optional().describe("Exact SKU filter"),
199
+ category: z.int().positive().optional().describe("Product category id"),
200
+ type: z.string().min(1).optional().describe("Product type (simple, variable, …)"),
201
+ include: z.array(z.int().positive()).min(1).max(100).optional().describe("Limit results to these product ids (WooCommerce include parameter)"),
202
+ ...listCursorFields
203
+ });
204
+ const woocommerceListProductsOutputSchema = z.object({
205
+ items: z.array(woocommerceProductSchema),
206
+ next_cursor: z.string().optional(),
207
+ truncated: z.boolean()
208
+ });
209
+ const woocommerceGetProductInputSchema = z.object({ product_id: z.int().positive().describe("WooCommerce product id") });
210
+ const woocommerceGetProductOutputSchema = z.object({ product: woocommerceProductSchema });
211
+ const woocommerceCreateProductInputSchema = z.object({
212
+ name: z.string().min(1).describe("Product name"),
213
+ type: z.string().min(1).optional().describe("Product type (simple, variable, grouped, external)"),
214
+ status: z.string().min(1).optional().describe("Product status (draft, publish, …)"),
215
+ sku: z.string().min(1).optional().describe("SKU"),
216
+ regular_price: z.string().min(1).optional().describe("Regular price as string"),
217
+ sale_price: z.string().optional().describe("Sale price as string"),
218
+ description: z.string().optional().describe("Full HTML description"),
219
+ short_description: z.string().optional().describe("Short description"),
220
+ manage_stock: z.boolean().optional().describe("Whether stock is managed"),
221
+ stock_quantity: z.int().optional().describe("Stock quantity when manage_stock is true"),
222
+ stock_status: z.string().min(1).optional().describe("instock, outofstock, onbackorder"),
223
+ categories: z.array(z.object({ id: z.int().positive().describe("Category id") })).optional().describe("Category associations"),
224
+ meta_data: z.array(woocommerceMetaDataSchema).optional().describe("Product meta data")
225
+ });
226
+ const woocommerceCreateProductOutputSchema = woocommerceGetProductOutputSchema;
227
+ const woocommerceUpdateProductInputSchema = z.object({
228
+ product_id: z.int().positive().describe("WooCommerce product id"),
229
+ name: z.string().min(1).optional().describe("Product name"),
230
+ type: z.string().min(1).optional().describe("Product type"),
231
+ status: z.string().min(1).optional().describe("Product status"),
232
+ sku: z.string().optional().describe("SKU (empty string clears)"),
233
+ regular_price: z.string().optional().describe("Regular price as string"),
234
+ sale_price: z.string().optional().describe("Sale price as string"),
235
+ description: z.string().optional().describe("Full HTML description"),
236
+ short_description: z.string().optional().describe("Short description"),
237
+ manage_stock: z.boolean().optional().describe("Whether stock is managed"),
238
+ stock_quantity: z.int().optional().describe("Stock quantity"),
239
+ stock_status: z.string().min(1).optional().describe("instock, outofstock, onbackorder"),
240
+ categories: z.array(z.object({ id: z.int().positive().describe("Category id") })).optional().describe("Category associations"),
241
+ meta_data: z.array(woocommerceMetaDataSchema).optional().describe("Product meta data")
242
+ });
243
+ const woocommerceUpdateProductOutputSchema = woocommerceGetProductOutputSchema;
244
+ const woocommerceDeleteProductInputSchema = z.object({
245
+ product_id: z.int().positive().describe("WooCommerce product id"),
246
+ force: z.boolean().optional().describe("Permanently delete when true (default true)")
247
+ });
248
+ const woocommerceDeleteProductOutputSchema = z.object({
249
+ deleted: z.boolean(),
250
+ id: z.number()
251
+ });
252
+ const woocommerceProductVariationSchema = z.object({
253
+ id: z.number(),
254
+ sku: z.string().optional(),
255
+ price: z.string().optional(),
256
+ regular_price: z.string().optional(),
257
+ sale_price: z.string().optional(),
258
+ status: z.string().optional(),
259
+ stock_status: z.string().optional(),
260
+ stock_quantity: z.number().optional(),
261
+ manage_stock: z.boolean().optional()
262
+ });
263
+ const woocommerceListProductVariationsInputSchema = z.object({
264
+ product_id: z.int().positive().describe("Parent product id"),
265
+ status: z.string().min(1).optional().describe("Variation status filter"),
266
+ sku: z.string().min(1).optional().describe("Exact SKU filter"),
267
+ ...listCursorFields
268
+ });
269
+ const woocommerceListProductVariationsOutputSchema = z.object({
270
+ items: z.array(woocommerceProductVariationSchema),
271
+ next_cursor: z.string().optional(),
272
+ truncated: z.boolean()
273
+ });
274
+ const woocommerceGetProductVariationInputSchema = z.object({
275
+ product_id: z.int().positive().describe("Parent product id"),
276
+ variation_id: z.int().positive().describe("Variation id")
277
+ });
278
+ const woocommerceGetProductVariationOutputSchema = z.object({ variation: woocommerceProductVariationSchema });
279
+ const woocommerceCustomerSchema = z.object({
280
+ id: z.number(),
281
+ email: z.string(),
282
+ first_name: z.string().optional(),
283
+ last_name: z.string().optional(),
284
+ username: z.string().optional(),
285
+ role: z.string().optional(),
286
+ date_created: z.string().optional()
287
+ });
288
+ const woocommerceListCustomersInputSchema = z.object({
289
+ search: z.string().min(1).optional().describe("Search term (email, name, …)"),
290
+ email: z.string().min(1).optional().describe("Exact email filter"),
291
+ role: z.string().min(1).optional().describe("Customer role filter"),
292
+ ...listCursorFields
293
+ });
294
+ const woocommerceListCustomersOutputSchema = z.object({
295
+ items: z.array(woocommerceCustomerSchema),
296
+ next_cursor: z.string().optional(),
297
+ truncated: z.boolean()
298
+ });
299
+ const woocommerceGetCustomerInputSchema = z.object({ customer_id: z.int().positive().describe("WooCommerce customer id") });
300
+ const woocommerceGetCustomerOutputSchema = z.object({ customer: woocommerceCustomerSchema });
301
+ const woocommerceCreateCustomerInputSchema = z.object({
302
+ email: z.string().min(1).describe("Customer email"),
303
+ first_name: z.string().optional().describe("First name"),
304
+ last_name: z.string().optional().describe("Last name"),
305
+ username: z.string().min(1).optional().describe("Username (auto-generated when omitted)"),
306
+ password: z.string().min(1).optional().describe("Account password when creating a login"),
307
+ billing: woocommerceAddressSchema.optional().describe("Billing address"),
308
+ shipping: woocommerceAddressSchema.optional().describe("Shipping address"),
309
+ meta_data: z.array(woocommerceMetaDataSchema).optional().describe("Customer meta data")
310
+ });
311
+ const woocommerceCreateCustomerOutputSchema = woocommerceGetCustomerOutputSchema;
312
+ const woocommerceUpdateCustomerInputSchema = z.object({
313
+ customer_id: z.int().positive().describe("WooCommerce customer id"),
314
+ email: z.string().min(1).optional().describe("Customer email"),
315
+ first_name: z.string().optional().describe("First name"),
316
+ last_name: z.string().optional().describe("Last name"),
317
+ username: z.string().min(1).optional().describe("Username"),
318
+ password: z.string().min(1).optional().describe("New password"),
319
+ billing: woocommerceAddressSchema.optional().describe("Billing address"),
320
+ shipping: woocommerceAddressSchema.optional().describe("Shipping address"),
321
+ meta_data: z.array(woocommerceMetaDataSchema).optional().describe("Customer meta data")
322
+ });
323
+ const woocommerceUpdateCustomerOutputSchema = woocommerceGetCustomerOutputSchema;
324
+ const woocommerceCouponSchema = z.object({
325
+ id: z.number(),
326
+ code: z.string(),
327
+ amount: z.string().optional(),
328
+ discount_type: z.string().optional(),
329
+ description: z.string().optional(),
330
+ date_expires: z.string().optional(),
331
+ usage_count: z.number().optional(),
332
+ usage_limit: z.number().optional(),
333
+ free_shipping: z.boolean().optional()
334
+ });
335
+ const woocommerceListCouponsInputSchema = z.object({
336
+ search: z.string().min(1).optional().describe("Search term (code, description, …)"),
337
+ code: z.string().min(1).optional().describe("Exact coupon code filter"),
338
+ ...listCursorFields
339
+ });
340
+ const woocommerceListCouponsOutputSchema = z.object({
341
+ items: z.array(woocommerceCouponSchema),
342
+ next_cursor: z.string().optional(),
343
+ truncated: z.boolean()
344
+ });
345
+ const woocommerceGetCouponInputSchema = z.object({ coupon_id: z.int().positive().describe("WooCommerce coupon id") });
346
+ const woocommerceGetCouponOutputSchema = z.object({ coupon: woocommerceCouponSchema });
347
+ const woocommerceCreateCouponInputSchema = z.object({
348
+ code: z.string().min(1).describe("Coupon code"),
349
+ discount_type: z.string().min(1).optional().describe("percent, fixed_cart, or fixed_product"),
350
+ amount: z.string().min(1).optional().describe("Discount amount as string"),
351
+ description: z.string().optional().describe("Coupon description"),
352
+ individual_use: z.boolean().optional().describe("Cannot combine with other coupons"),
353
+ exclude_sale_items: z.boolean().optional().describe("Exclude sale items"),
354
+ minimum_amount: z.string().min(1).optional().describe("Minimum cart amount"),
355
+ maximum_amount: z.string().min(1).optional().describe("Maximum cart amount"),
356
+ usage_limit: z.int().positive().optional().describe("Total usage limit"),
357
+ usage_limit_per_user: z.int().positive().optional().describe("Per-user usage limit"),
358
+ free_shipping: z.boolean().optional().describe("Enable free shipping"),
359
+ date_expires: z.string().min(1).optional().describe("ISO 8601 expiry datetime"),
360
+ meta_data: z.array(woocommerceMetaDataSchema).optional().describe("Coupon meta data")
361
+ });
362
+ const woocommerceCreateCouponOutputSchema = woocommerceGetCouponOutputSchema;
363
+ const woocommerceUpdateCouponInputSchema = z.object({
364
+ coupon_id: z.int().positive().describe("WooCommerce coupon id"),
365
+ code: z.string().min(1).optional().describe("Coupon code"),
366
+ discount_type: z.string().min(1).optional().describe("percent, fixed_cart, or fixed_product"),
367
+ amount: z.string().min(1).optional().describe("Discount amount as string"),
368
+ description: z.string().optional().describe("Coupon description"),
369
+ individual_use: z.boolean().optional().describe("Cannot combine with other coupons"),
370
+ exclude_sale_items: z.boolean().optional().describe("Exclude sale items"),
371
+ minimum_amount: z.string().optional().describe("Minimum cart amount"),
372
+ maximum_amount: z.string().optional().describe("Maximum cart amount"),
373
+ usage_limit: z.int().nonnegative().optional().describe("Total usage limit (0 unlimited)"),
374
+ usage_limit_per_user: z.int().nonnegative().optional().describe("Per-user usage limit"),
375
+ free_shipping: z.boolean().optional().describe("Enable free shipping"),
376
+ date_expires: z.string().optional().describe("ISO 8601 expiry datetime"),
377
+ meta_data: z.array(woocommerceMetaDataSchema).optional().describe("Coupon meta data")
378
+ });
379
+ const woocommerceUpdateCouponOutputSchema = woocommerceGetCouponOutputSchema;
380
+ const woocommerceProductCategorySchema = z.object({
381
+ id: z.number(),
382
+ name: z.string(),
383
+ slug: z.string().optional(),
384
+ parent: z.number().optional(),
385
+ description: z.string().optional(),
386
+ count: z.number().optional()
387
+ });
388
+ const woocommerceListProductCategoriesInputSchema = z.object({
389
+ search: z.string().min(1).optional().describe("Search term"),
390
+ parent: z.int().nonnegative().optional().describe("Parent category id (0 for top-level)"),
391
+ hide_empty: z.boolean().optional().describe("Hide categories with no products"),
392
+ ...listCursorFields
393
+ });
394
+ const woocommerceListProductCategoriesOutputSchema = z.object({
395
+ items: z.array(woocommerceProductCategorySchema),
396
+ next_cursor: z.string().optional(),
397
+ truncated: z.boolean()
398
+ });
399
+ const woocommerceGetProductCategoryInputSchema = z.object({ category_id: z.int().positive().describe("Product category id") });
400
+ const woocommerceGetProductCategoryOutputSchema = z.object({ category: woocommerceProductCategorySchema });
401
+ //#endregion
402
+ //#region src/vendors/woocommerce/domain.ts
403
+ /**
404
+ * WooCommerce REST payload helpers (no HTTP).
405
+ */
406
+ function storeOrigin(auth) {
407
+ return auth.store_url.replace(/\/+$/, "");
408
+ }
409
+ function apiBaseUrl(auth) {
410
+ return `${storeOrigin(auth)}/wp-json/wc/v3`;
411
+ }
412
+ function basicAuthHeader(auth) {
413
+ return `Basic ${bytesToBase64(utf8ToBytes(`${auth.consumer_key}:${auth.consumer_secret}`))}`;
414
+ }
415
+ function pageFromCursor(cursor) {
416
+ if (!cursor) return 1;
417
+ const n = Number.parseInt(cursor, 10);
418
+ if (!Number.isFinite(n) || n < 1) throw new ToolError("Invalid list cursor", {
419
+ code: "bad_input",
420
+ details: { cursor }
421
+ });
422
+ return n;
423
+ }
424
+ function listPageMeta(page, limit, itemCount, totalPagesHeader) {
425
+ const totalPages = totalPagesHeader ? Number.parseInt(totalPagesHeader, 10) : void 0;
426
+ if (typeof totalPages === "number" && Number.isFinite(totalPages) && totalPages > page) return {
427
+ next_cursor: String(page + 1),
428
+ truncated: true
429
+ };
430
+ if (itemCount >= limit && (totalPages === void 0 || !Number.isFinite(totalPages))) return {
431
+ next_cursor: String(page + 1),
432
+ truncated: true
433
+ };
434
+ return { truncated: false };
435
+ }
436
+ function optionalString(value) {
437
+ return isString(value) ? value : void 0;
438
+ }
439
+ function optionalNonEmptyString(value) {
440
+ return isString(value) && value.length > 0 ? value : void 0;
441
+ }
442
+ function optionalNumber(value) {
443
+ return typeof value === "number" && Number.isFinite(value) ? value : void 0;
444
+ }
445
+ function optionalBoolean(value) {
446
+ return typeof value === "boolean" ? value : void 0;
447
+ }
448
+ function addressBody(address) {
449
+ return {
450
+ ...address.first_name !== void 0 && { first_name: address.first_name },
451
+ ...address.last_name !== void 0 && { last_name: address.last_name },
452
+ ...address.company !== void 0 && { company: address.company },
453
+ ...address.address_1 !== void 0 && { address_1: address.address_1 },
454
+ ...address.address_2 !== void 0 && { address_2: address.address_2 },
455
+ ...address.city !== void 0 && { city: address.city },
456
+ ...address.state !== void 0 && { state: address.state },
457
+ ...address.postcode !== void 0 && { postcode: address.postcode },
458
+ ...address.country !== void 0 && { country: address.country },
459
+ ...address.email !== void 0 && { email: address.email },
460
+ ...address.phone !== void 0 && { phone: address.phone }
461
+ };
462
+ }
463
+ function metaDataBody(meta) {
464
+ return meta.map((item) => ({
465
+ key: item.key,
466
+ value: item.value
467
+ }));
468
+ }
469
+ function lineItemBody(item) {
470
+ return {
471
+ ...item.id !== void 0 && { id: item.id },
472
+ ...item.product_id !== void 0 && { product_id: item.product_id },
473
+ ...item.variation_id !== void 0 && { variation_id: item.variation_id },
474
+ ...item.quantity !== void 0 && { quantity: item.quantity },
475
+ ...item.name && { name: item.name },
476
+ ...item.sku && { sku: item.sku },
477
+ ...item.price && { price: item.price },
478
+ ...item.total && { total: item.total }
479
+ };
480
+ }
481
+ function orderWriteBody(input) {
482
+ return {
483
+ ...input.status && { status: input.status },
484
+ ...input.customer_id !== void 0 && { customer_id: input.customer_id },
485
+ ...input.payment_method && { payment_method: input.payment_method },
486
+ ...input.payment_method_title && { payment_method_title: input.payment_method_title },
487
+ ...input.set_paid !== void 0 && { set_paid: input.set_paid },
488
+ ...input.customer_note !== void 0 && { customer_note: input.customer_note },
489
+ ...input.billing && { billing: addressBody(input.billing) },
490
+ ...input.shipping && { shipping: addressBody(input.shipping) },
491
+ ...input.line_items && input.line_items.length > 0 && { line_items: input.line_items.map(lineItemBody) },
492
+ ...input.meta_data && input.meta_data.length > 0 && { meta_data: metaDataBody(input.meta_data) }
493
+ };
494
+ }
495
+ function productWriteBody(input) {
496
+ const name = "name" in input ? input.name : void 0;
497
+ return {
498
+ ...name && { name },
499
+ ...input.type && { type: input.type },
500
+ ...input.status && { status: input.status },
501
+ ...input.sku !== void 0 && { sku: input.sku },
502
+ ...input.regular_price !== void 0 && { regular_price: input.regular_price },
503
+ ...input.sale_price !== void 0 && { sale_price: input.sale_price },
504
+ ...input.description !== void 0 && { description: input.description },
505
+ ...input.short_description !== void 0 && { short_description: input.short_description },
506
+ ...input.manage_stock !== void 0 && { manage_stock: input.manage_stock },
507
+ ...input.stock_quantity !== void 0 && { stock_quantity: input.stock_quantity },
508
+ ...input.stock_status && { stock_status: input.stock_status },
509
+ ...input.categories && input.categories.length > 0 && { categories: input.categories.map((c) => ({ id: c.id })) },
510
+ ...input.meta_data && input.meta_data.length > 0 && { meta_data: metaDataBody(input.meta_data) }
511
+ };
512
+ }
513
+ function customerWriteBody(input) {
514
+ const email = "email" in input ? input.email : void 0;
515
+ return {
516
+ ...email && { email },
517
+ ...input.first_name !== void 0 && { first_name: input.first_name },
518
+ ...input.last_name !== void 0 && { last_name: input.last_name },
519
+ ...input.username && { username: input.username },
520
+ ...input.password && { password: input.password },
521
+ ...input.billing && { billing: addressBody(input.billing) },
522
+ ...input.shipping && { shipping: addressBody(input.shipping) },
523
+ ...input.meta_data && input.meta_data.length > 0 && { meta_data: metaDataBody(input.meta_data) }
524
+ };
525
+ }
526
+ function couponWriteBody(input) {
527
+ const code = "code" in input ? input.code : void 0;
528
+ return {
529
+ ...code && { code },
530
+ ...input.discount_type && { discount_type: input.discount_type },
531
+ ...input.amount && { amount: input.amount },
532
+ ...input.description !== void 0 && { description: input.description },
533
+ ...input.individual_use !== void 0 && { individual_use: input.individual_use },
534
+ ...input.exclude_sale_items !== void 0 && { exclude_sale_items: input.exclude_sale_items },
535
+ ...input.minimum_amount !== void 0 && { minimum_amount: input.minimum_amount },
536
+ ...input.maximum_amount !== void 0 && { maximum_amount: input.maximum_amount },
537
+ ...input.usage_limit !== void 0 && { usage_limit: input.usage_limit },
538
+ ...input.usage_limit_per_user !== void 0 && { usage_limit_per_user: input.usage_limit_per_user },
539
+ ...input.free_shipping !== void 0 && { free_shipping: input.free_shipping },
540
+ ...input.date_expires !== void 0 && { date_expires: input.date_expires },
541
+ ...input.meta_data && input.meta_data.length > 0 && { meta_data: metaDataBody(input.meta_data) }
542
+ };
543
+ }
544
+ function orderNoteWriteBody(input) {
545
+ return {
546
+ note: input.note,
547
+ ...input.customer_note !== void 0 && { customer_note: input.customer_note },
548
+ ...input.added_by_user !== void 0 && { added_by_user: input.added_by_user }
549
+ };
550
+ }
551
+ function orderRefundWriteBody(input) {
552
+ return {
553
+ ...input.amount && { amount: input.amount },
554
+ ...input.reason !== void 0 && { reason: input.reason },
555
+ ...input.api_refund !== void 0 && { api_refund: input.api_refund },
556
+ ...input.line_items && input.line_items.length > 0 && { line_items: input.line_items.map((item) => ({
557
+ id: item.id,
558
+ ...item.quantity !== void 0 && { quantity: item.quantity },
559
+ ...item.refund_total && { refund_total: item.refund_total }
560
+ })) }
561
+ };
562
+ }
563
+ function parseOrderLineItem(value) {
564
+ if (!isPlainObject(value) || typeof value["id"] !== "number") throw new ToolError("WooCommerce returned an invalid order line item", { code: "upstream" });
565
+ const productId = optionalNumber(value["product_id"]);
566
+ const variationId = optionalNumber(value["variation_id"]);
567
+ const quantity = optionalNumber(value["quantity"]);
568
+ const name = optionalNonEmptyString(value["name"]);
569
+ const sku = optionalNonEmptyString(value["sku"]);
570
+ const priceRaw = value["price"];
571
+ const totalRaw = value["total"];
572
+ const price = isString(priceRaw) && priceRaw.length > 0 ? priceRaw : typeof priceRaw === "number" && Number.isFinite(priceRaw) ? String(priceRaw) : void 0;
573
+ const total = isString(totalRaw) && totalRaw.length > 0 ? totalRaw : typeof totalRaw === "number" && Number.isFinite(totalRaw) ? String(totalRaw) : void 0;
574
+ return {
575
+ id: value["id"],
576
+ ...productId !== void 0 && { product_id: productId },
577
+ ...variationId !== void 0 && { variation_id: variationId },
578
+ ...quantity !== void 0 && { quantity },
579
+ ...name && { name },
580
+ ...sku && { sku },
581
+ ...price && { price },
582
+ ...total && { total }
583
+ };
584
+ }
585
+ function parseOrderLineItems(value) {
586
+ if (!Array.isArray(value) || value.length === 0) return void 0;
587
+ return value.map(parseOrderLineItem);
588
+ }
589
+ function parseOrder(value) {
590
+ if (!isPlainObject(value) || typeof value["id"] !== "number") throw new ToolError("WooCommerce returned an invalid order", { code: "upstream" });
591
+ const number = value["number"];
592
+ const status = value["status"];
593
+ const currency = value["currency"];
594
+ const total = value["total"];
595
+ if (!isString(number) || !isString(status) || !isString(currency) || !isString(total)) throw new ToolError("WooCommerce order missing required fields", { code: "upstream" });
596
+ const dateCreated = optionalString(value["date_created"]);
597
+ const customerId = optionalNumber(value["customer_id"]);
598
+ const paymentMethod = optionalNonEmptyString(value["payment_method"]);
599
+ const paymentMethodTitle = optionalNonEmptyString(value["payment_method_title"]);
600
+ const customerNote = optionalString(value["customer_note"]);
601
+ const lineItems = parseOrderLineItems(value["line_items"]);
602
+ return {
603
+ id: value["id"],
604
+ number,
605
+ status,
606
+ currency,
607
+ total,
608
+ ...dateCreated && { date_created: dateCreated },
609
+ ...customerId !== void 0 && { customer_id: customerId },
610
+ ...paymentMethod && { payment_method: paymentMethod },
611
+ ...paymentMethodTitle && { payment_method_title: paymentMethodTitle },
612
+ ...customerNote !== void 0 && { customer_note: customerNote },
613
+ ...lineItems && { line_items: lineItems }
614
+ };
615
+ }
616
+ function parseOrders(value) {
617
+ if (!Array.isArray(value)) throw new ToolError("WooCommerce list orders returned a non-array body", { code: "upstream" });
618
+ return value.map(parseOrder);
619
+ }
620
+ function parseOrderNote(value) {
621
+ if (!isPlainObject(value) || typeof value["id"] !== "number" || !isString(value["note"])) throw new ToolError("WooCommerce returned an invalid order note", { code: "upstream" });
622
+ const customerNote = optionalBoolean(value["customer_note"]);
623
+ const dateCreated = optionalString(value["date_created"]);
624
+ const addedByUser = optionalBoolean(value["added_by_user"]);
625
+ return {
626
+ id: value["id"],
627
+ note: value["note"],
628
+ ...customerNote !== void 0 && { customer_note: customerNote },
629
+ ...dateCreated && { date_created: dateCreated },
630
+ ...addedByUser !== void 0 && { added_by_user: addedByUser }
631
+ };
632
+ }
633
+ function parseOrderNotes(value) {
634
+ if (!Array.isArray(value)) throw new ToolError("WooCommerce list order notes returned a non-array body", { code: "upstream" });
635
+ return value.map(parseOrderNote);
636
+ }
637
+ function parseOrderRefund(value) {
638
+ if (!isPlainObject(value) || typeof value["id"] !== "number") throw new ToolError("WooCommerce returned an invalid order refund", { code: "upstream" });
639
+ const amount = optionalString(value["amount"]);
640
+ const reason = optionalString(value["reason"]);
641
+ const dateCreated = optionalString(value["date_created"]);
642
+ const refundedBy = optionalNumber(value["refunded_by"]);
643
+ return {
644
+ id: value["id"],
645
+ ...amount && { amount },
646
+ ...reason !== void 0 && { reason },
647
+ ...dateCreated && { date_created: dateCreated },
648
+ ...refundedBy !== void 0 && { refunded_by: refundedBy }
649
+ };
650
+ }
651
+ function parseOrderRefunds(value) {
652
+ if (!Array.isArray(value)) throw new ToolError("WooCommerce list order refunds returned a non-array body", { code: "upstream" });
653
+ return value.map(parseOrderRefund);
654
+ }
655
+ function parseProductCategoryRef(value) {
656
+ if (!isPlainObject(value) || typeof value["id"] !== "number") throw new ToolError("WooCommerce returned an invalid product category ref", { code: "upstream" });
657
+ const name = optionalNonEmptyString(value["name"]);
658
+ const slug = optionalNonEmptyString(value["slug"]);
659
+ return {
660
+ id: value["id"],
661
+ ...name && { name },
662
+ ...slug && { slug }
663
+ };
664
+ }
665
+ function parseProductCategoryRefs(value) {
666
+ if (!Array.isArray(value) || value.length === 0) return void 0;
667
+ return value.map(parseProductCategoryRef);
668
+ }
669
+ function parseProduct(value) {
670
+ if (!isPlainObject(value) || typeof value["id"] !== "number" || !isString(value["name"]) || !isString(value["type"])) throw new ToolError("WooCommerce returned an invalid product", { code: "upstream" });
671
+ const status = value["status"];
672
+ if (!isString(status)) throw new ToolError("WooCommerce product missing status", { code: "upstream" });
673
+ const sku = optionalNonEmptyString(value["sku"]);
674
+ const price = optionalString(value["price"]);
675
+ const regularPrice = optionalString(value["regular_price"]);
676
+ const salePrice = optionalString(value["sale_price"]);
677
+ const stockStatus = optionalString(value["stock_status"]);
678
+ const stockQuantity = optionalNumber(value["stock_quantity"]);
679
+ const manageStock = optionalBoolean(value["manage_stock"]);
680
+ const categories = parseProductCategoryRefs(value["categories"]);
681
+ return {
682
+ id: value["id"],
683
+ name: value["name"],
684
+ type: value["type"],
685
+ status,
686
+ ...sku && { sku },
687
+ ...price && { price },
688
+ ...regularPrice && { regular_price: regularPrice },
689
+ ...salePrice && { sale_price: salePrice },
690
+ ...stockStatus && { stock_status: stockStatus },
691
+ ...stockQuantity !== void 0 && { stock_quantity: stockQuantity },
692
+ ...manageStock !== void 0 && { manage_stock: manageStock },
693
+ ...categories && { categories }
694
+ };
695
+ }
696
+ function parseProducts(value) {
697
+ if (!Array.isArray(value)) throw new ToolError("WooCommerce list products returned a non-array body", { code: "upstream" });
698
+ return value.map(parseProduct);
699
+ }
700
+ function parseProductVariation(value) {
701
+ if (!isPlainObject(value) || typeof value["id"] !== "number") throw new ToolError("WooCommerce returned an invalid product variation", { code: "upstream" });
702
+ const sku = optionalNonEmptyString(value["sku"]);
703
+ const price = optionalString(value["price"]);
704
+ const regularPrice = optionalString(value["regular_price"]);
705
+ const salePrice = optionalString(value["sale_price"]);
706
+ const status = optionalString(value["status"]);
707
+ const stockStatus = optionalString(value["stock_status"]);
708
+ const stockQuantity = optionalNumber(value["stock_quantity"]);
709
+ const manageStock = optionalBoolean(value["manage_stock"]);
710
+ return {
711
+ id: value["id"],
712
+ ...sku && { sku },
713
+ ...price && { price },
714
+ ...regularPrice && { regular_price: regularPrice },
715
+ ...salePrice && { sale_price: salePrice },
716
+ ...status && { status },
717
+ ...stockStatus && { stock_status: stockStatus },
718
+ ...stockQuantity !== void 0 && { stock_quantity: stockQuantity },
719
+ ...manageStock !== void 0 && { manage_stock: manageStock }
720
+ };
721
+ }
722
+ function parseProductVariations(value) {
723
+ if (!Array.isArray(value)) throw new ToolError("WooCommerce list product variations returned a non-array body", { code: "upstream" });
724
+ return value.map(parseProductVariation);
725
+ }
726
+ function parseCustomer(value) {
727
+ if (!isPlainObject(value) || typeof value["id"] !== "number" || !isString(value["email"])) throw new ToolError("WooCommerce returned an invalid customer", { code: "upstream" });
728
+ const firstName = optionalString(value["first_name"]);
729
+ const lastName = optionalString(value["last_name"]);
730
+ const username = optionalNonEmptyString(value["username"]);
731
+ const role = optionalNonEmptyString(value["role"]);
732
+ const dateCreated = optionalString(value["date_created"]);
733
+ return {
734
+ id: value["id"],
735
+ email: value["email"],
736
+ ...firstName !== void 0 && { first_name: firstName },
737
+ ...lastName !== void 0 && { last_name: lastName },
738
+ ...username && { username },
739
+ ...role && { role },
740
+ ...dateCreated && { date_created: dateCreated }
741
+ };
742
+ }
743
+ function parseCustomers(value) {
744
+ if (!Array.isArray(value)) throw new ToolError("WooCommerce list customers returned a non-array body", { code: "upstream" });
745
+ return value.map(parseCustomer);
746
+ }
747
+ function parseCoupon(value) {
748
+ if (!isPlainObject(value) || typeof value["id"] !== "number" || !isString(value["code"])) throw new ToolError("WooCommerce returned an invalid coupon", { code: "upstream" });
749
+ const amount = optionalString(value["amount"]);
750
+ const discountType = optionalNonEmptyString(value["discount_type"]);
751
+ const description = optionalString(value["description"]);
752
+ const dateExpires = optionalString(value["date_expires"]);
753
+ const usageCount = optionalNumber(value["usage_count"]);
754
+ const usageLimit = optionalNumber(value["usage_limit"]);
755
+ const freeShipping = optionalBoolean(value["free_shipping"]);
756
+ return {
757
+ id: value["id"],
758
+ code: value["code"],
759
+ ...amount && { amount },
760
+ ...discountType && { discount_type: discountType },
761
+ ...description !== void 0 && { description },
762
+ ...dateExpires && { date_expires: dateExpires },
763
+ ...usageCount !== void 0 && { usage_count: usageCount },
764
+ ...usageLimit !== void 0 && { usage_limit: usageLimit },
765
+ ...freeShipping !== void 0 && { free_shipping: freeShipping }
766
+ };
767
+ }
768
+ function parseCoupons(value) {
769
+ if (!Array.isArray(value)) throw new ToolError("WooCommerce list coupons returned a non-array body", { code: "upstream" });
770
+ return value.map(parseCoupon);
771
+ }
772
+ function parseProductCategory(value) {
773
+ if (!isPlainObject(value) || typeof value["id"] !== "number" || !isString(value["name"])) throw new ToolError("WooCommerce returned an invalid product category", { code: "upstream" });
774
+ const slug = optionalNonEmptyString(value["slug"]);
775
+ const parent = optionalNumber(value["parent"]);
776
+ const description = optionalString(value["description"]);
777
+ const count = optionalNumber(value["count"]);
778
+ return {
779
+ id: value["id"],
780
+ name: value["name"],
781
+ ...slug && { slug },
782
+ ...parent !== void 0 && { parent },
783
+ ...description !== void 0 && { description },
784
+ ...count !== void 0 && { count }
785
+ };
786
+ }
787
+ function parseProductCategories(value) {
788
+ if (!Array.isArray(value)) throw new ToolError("WooCommerce list product categories returned a non-array body", { code: "upstream" });
789
+ return value.map(parseProductCategory);
790
+ }
791
+ function parseDeleteResult(value, fallbackId) {
792
+ if (isPlainObject(value)) {
793
+ const previous = value["previous"];
794
+ if (isPlainObject(previous) && typeof previous["id"] === "number") return {
795
+ deleted: true,
796
+ id: previous["id"]
797
+ };
798
+ if (typeof value["id"] === "number") return {
799
+ deleted: true,
800
+ id: value["id"]
801
+ };
802
+ }
803
+ return {
804
+ deleted: true,
805
+ id: fallbackId
806
+ };
807
+ }
808
+ function parseProductDeleteResult(value, fallbackId) {
809
+ return parseDeleteResult(value, fallbackId);
810
+ }
811
+ //#endregion
812
+ //#region src/vendors/woocommerce/client.ts
813
+ /**
814
+ * WooCommerce REST API vendor client (wc/v3).
815
+ * Host: `new WoocommerceClient(auth)`. Agent tools: `fromContext(ctx)`.
816
+ */
817
+ var WoocommerceClient = class WoocommerceClient {
818
+ #http;
819
+ constructor(auth, options = {}) {
820
+ const parsed = woocommerceAuthSchema.safeParse(auth);
821
+ if (!parsed.success) throw new ToolError("Invalid WooCommerce auth credentials", {
822
+ code: "bad_auth",
823
+ details: { issues: parsed.error.issues.map((issue) => issue.message) }
824
+ });
825
+ this.#http = new HttpService({
826
+ ...options,
827
+ baseURL: apiBaseUrl(parsed.data),
828
+ headers: {
829
+ Authorization: basicAuthHeader(parsed.data),
830
+ "Content-Type": "application/json"
831
+ },
832
+ label: "WooCommerce"
833
+ });
834
+ }
835
+ static fromContext(ctx) {
836
+ const auth = requireAuth(ctx, woocommerceAuthSchema);
837
+ return new WoocommerceClient(auth, {
838
+ ...ctx.fetch && { fetch: ctx.fetch },
839
+ ...ctx.signal && { signal: ctx.signal }
840
+ });
841
+ }
842
+ /** GET /orders */
843
+ async listOrders(input = {}) {
844
+ const page = pageFromCursor(input.cursor);
845
+ const limit = input.limit ?? 10;
846
+ const { data, headers } = await this.#http.get("/orders", {
847
+ label: "WooCommerce listOrders",
848
+ query: {
849
+ page,
850
+ per_page: limit,
851
+ ...input.status && { status: input.status },
852
+ ...input.after && { after: input.after },
853
+ ...input.before && { before: input.before },
854
+ ...input.search && { search: input.search },
855
+ ...input.customer_id !== void 0 && { customer: input.customer_id }
856
+ }
857
+ });
858
+ const items = parseOrders(data);
859
+ const pageMeta = listPageMeta(page, limit, items.length, headers.get("x-wp-totalpages"));
860
+ return {
861
+ items,
862
+ truncated: pageMeta.truncated,
863
+ ...pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor }
864
+ };
865
+ }
866
+ /** GET /orders/{id} */
867
+ async getOrder(input) {
868
+ const { data } = await this.#http.get(`/orders/${input.order_id}`, { label: "WooCommerce getOrder" });
869
+ return { order: parseOrder(data) };
870
+ }
871
+ /** POST /orders */
872
+ async createOrder(input = {}) {
873
+ const { data } = await this.#http.post("/orders", orderWriteBody(input), { label: "WooCommerce createOrder" });
874
+ return { order: parseOrder(data) };
875
+ }
876
+ /** PUT /orders/{id} */
877
+ async updateOrder(input) {
878
+ const { order_id, ...fields } = input;
879
+ const { data } = await this.#http.put(`/orders/${order_id}`, orderWriteBody(fields), { label: "WooCommerce updateOrder" });
880
+ return { order: parseOrder(data) };
881
+ }
882
+ /** DELETE /orders/{id} */
883
+ async deleteOrder(input) {
884
+ const force = input.force !== false;
885
+ const { data } = await this.#http.delete(`/orders/${input.order_id}`, {
886
+ label: "WooCommerce deleteOrder",
887
+ query: { force }
888
+ });
889
+ return parseDeleteResult(data, input.order_id);
890
+ }
891
+ /** GET /orders/{id}/notes */
892
+ async listOrderNotes(input) {
893
+ const page = pageFromCursor(input.cursor);
894
+ const limit = input.limit ?? 10;
895
+ const { data, headers } = await this.#http.get(`/orders/${input.order_id}/notes`, {
896
+ label: "WooCommerce listOrderNotes",
897
+ query: {
898
+ page,
899
+ per_page: limit,
900
+ ...input.type && input.type !== "any" && { type: input.type }
901
+ }
902
+ });
903
+ const items = parseOrderNotes(data);
904
+ const pageMeta = listPageMeta(page, limit, items.length, headers.get("x-wp-totalpages"));
905
+ return {
906
+ items,
907
+ truncated: pageMeta.truncated,
908
+ ...pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor }
909
+ };
910
+ }
911
+ /** POST /orders/{id}/notes */
912
+ async createOrderNote(input) {
913
+ const { order_id, ...fields } = input;
914
+ const { data } = await this.#http.post(`/orders/${order_id}/notes`, orderNoteWriteBody(fields), { label: "WooCommerce createOrderNote" });
915
+ return { note: parseOrderNote(data) };
916
+ }
917
+ /** GET /orders/{id}/refunds */
918
+ async listOrderRefunds(input) {
919
+ const page = pageFromCursor(input.cursor);
920
+ const limit = input.limit ?? 10;
921
+ const { data, headers } = await this.#http.get(`/orders/${input.order_id}/refunds`, {
922
+ label: "WooCommerce listOrderRefunds",
923
+ query: {
924
+ page,
925
+ per_page: limit
926
+ }
927
+ });
928
+ const items = parseOrderRefunds(data);
929
+ const pageMeta = listPageMeta(page, limit, items.length, headers.get("x-wp-totalpages"));
930
+ return {
931
+ items,
932
+ truncated: pageMeta.truncated,
933
+ ...pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor }
934
+ };
935
+ }
936
+ /** POST /orders/{id}/refunds */
937
+ async createOrderRefund(input) {
938
+ const { order_id, ...fields } = input;
939
+ const { data } = await this.#http.post(`/orders/${order_id}/refunds`, orderRefundWriteBody(fields), { label: "WooCommerce createOrderRefund" });
940
+ return { refund: parseOrderRefund(data) };
941
+ }
942
+ /** GET /products */
943
+ async listProducts(input = {}) {
944
+ const page = pageFromCursor(input.cursor);
945
+ const limit = input.limit ?? 10;
946
+ const { data, headers } = await this.#http.get("/products", {
947
+ label: "WooCommerce listProducts",
948
+ query: {
949
+ page,
950
+ per_page: limit,
951
+ ...input.status && { status: input.status },
952
+ ...input.search && { search: input.search },
953
+ ...input.sku && { sku: input.sku },
954
+ ...input.category !== void 0 && { category: input.category },
955
+ ...input.type && { type: input.type },
956
+ ...input.include && input.include.length > 0 && { include: input.include.join(",") }
957
+ }
958
+ });
959
+ const items = parseProducts(data);
960
+ const pageMeta = listPageMeta(page, limit, items.length, headers.get("x-wp-totalpages"));
961
+ return {
962
+ items,
963
+ truncated: pageMeta.truncated,
964
+ ...pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor }
965
+ };
966
+ }
967
+ /** GET /products/{id} */
968
+ async getProduct(input) {
969
+ const { data } = await this.#http.get(`/products/${input.product_id}`, { label: "WooCommerce getProduct" });
970
+ return { product: parseProduct(data) };
971
+ }
972
+ /** POST /products */
973
+ async createProduct(input) {
974
+ const { data } = await this.#http.post("/products", productWriteBody(input), { label: "WooCommerce createProduct" });
975
+ return { product: parseProduct(data) };
976
+ }
977
+ /** PUT /products/{id} */
978
+ async updateProduct(input) {
979
+ const { product_id, ...fields } = input;
980
+ const { data } = await this.#http.put(`/products/${product_id}`, productWriteBody(fields), { label: "WooCommerce updateProduct" });
981
+ return { product: parseProduct(data) };
982
+ }
983
+ /** DELETE /products/{id} */
984
+ async deleteProduct(input) {
985
+ const force = input.force !== false;
986
+ const { data } = await this.#http.delete(`/products/${input.product_id}`, {
987
+ label: "WooCommerce deleteProduct",
988
+ query: { force }
989
+ });
990
+ return parseProductDeleteResult(data, input.product_id);
991
+ }
992
+ /** GET /products/{id}/variations */
993
+ async listProductVariations(input) {
994
+ const page = pageFromCursor(input.cursor);
995
+ const limit = input.limit ?? 10;
996
+ const { data, headers } = await this.#http.get(`/products/${input.product_id}/variations`, {
997
+ label: "WooCommerce listProductVariations",
998
+ query: {
999
+ page,
1000
+ per_page: limit,
1001
+ ...input.status && { status: input.status },
1002
+ ...input.sku && { sku: input.sku }
1003
+ }
1004
+ });
1005
+ const items = parseProductVariations(data);
1006
+ const pageMeta = listPageMeta(page, limit, items.length, headers.get("x-wp-totalpages"));
1007
+ return {
1008
+ items,
1009
+ truncated: pageMeta.truncated,
1010
+ ...pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor }
1011
+ };
1012
+ }
1013
+ /** GET /products/{product_id}/variations/{variation_id} */
1014
+ async getProductVariation(input) {
1015
+ const { data } = await this.#http.get(`/products/${input.product_id}/variations/${input.variation_id}`, { label: "WooCommerce getProductVariation" });
1016
+ return { variation: parseProductVariation(data) };
1017
+ }
1018
+ /** GET /customers */
1019
+ async listCustomers(input = {}) {
1020
+ const page = pageFromCursor(input.cursor);
1021
+ const limit = input.limit ?? 10;
1022
+ const { data, headers } = await this.#http.get("/customers", {
1023
+ label: "WooCommerce listCustomers",
1024
+ query: {
1025
+ page,
1026
+ per_page: limit,
1027
+ ...input.search && { search: input.search },
1028
+ ...input.email && { email: input.email },
1029
+ ...input.role && { role: input.role }
1030
+ }
1031
+ });
1032
+ const items = parseCustomers(data);
1033
+ const pageMeta = listPageMeta(page, limit, items.length, headers.get("x-wp-totalpages"));
1034
+ return {
1035
+ items,
1036
+ truncated: pageMeta.truncated,
1037
+ ...pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor }
1038
+ };
1039
+ }
1040
+ /** GET /customers/{id} */
1041
+ async getCustomer(input) {
1042
+ const { data } = await this.#http.get(`/customers/${input.customer_id}`, { label: "WooCommerce getCustomer" });
1043
+ return { customer: parseCustomer(data) };
1044
+ }
1045
+ /** POST /customers */
1046
+ async createCustomer(input) {
1047
+ const { data } = await this.#http.post("/customers", customerWriteBody(input), { label: "WooCommerce createCustomer" });
1048
+ return { customer: parseCustomer(data) };
1049
+ }
1050
+ /** PUT /customers/{id} */
1051
+ async updateCustomer(input) {
1052
+ const { customer_id, ...fields } = input;
1053
+ const { data } = await this.#http.put(`/customers/${customer_id}`, customerWriteBody(fields), { label: "WooCommerce updateCustomer" });
1054
+ return { customer: parseCustomer(data) };
1055
+ }
1056
+ /** GET /coupons */
1057
+ async listCoupons(input = {}) {
1058
+ const page = pageFromCursor(input.cursor);
1059
+ const limit = input.limit ?? 10;
1060
+ const { data, headers } = await this.#http.get("/coupons", {
1061
+ label: "WooCommerce listCoupons",
1062
+ query: {
1063
+ page,
1064
+ per_page: limit,
1065
+ ...input.search && { search: input.search },
1066
+ ...input.code && { code: input.code }
1067
+ }
1068
+ });
1069
+ const items = parseCoupons(data);
1070
+ const pageMeta = listPageMeta(page, limit, items.length, headers.get("x-wp-totalpages"));
1071
+ return {
1072
+ items,
1073
+ truncated: pageMeta.truncated,
1074
+ ...pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor }
1075
+ };
1076
+ }
1077
+ /** GET /coupons/{id} */
1078
+ async getCoupon(input) {
1079
+ const { data } = await this.#http.get(`/coupons/${input.coupon_id}`, { label: "WooCommerce getCoupon" });
1080
+ return { coupon: parseCoupon(data) };
1081
+ }
1082
+ /** POST /coupons */
1083
+ async createCoupon(input) {
1084
+ const { data } = await this.#http.post("/coupons", couponWriteBody(input), { label: "WooCommerce createCoupon" });
1085
+ return { coupon: parseCoupon(data) };
1086
+ }
1087
+ /** PUT /coupons/{id} */
1088
+ async updateCoupon(input) {
1089
+ const { coupon_id, ...fields } = input;
1090
+ const { data } = await this.#http.put(`/coupons/${coupon_id}`, couponWriteBody(fields), { label: "WooCommerce updateCoupon" });
1091
+ return { coupon: parseCoupon(data) };
1092
+ }
1093
+ /** GET /products/categories */
1094
+ async listProductCategories(input = {}) {
1095
+ const page = pageFromCursor(input.cursor);
1096
+ const limit = input.limit ?? 10;
1097
+ const { data, headers } = await this.#http.get("/products/categories", {
1098
+ label: "WooCommerce listProductCategories",
1099
+ query: {
1100
+ page,
1101
+ per_page: limit,
1102
+ ...input.search && { search: input.search },
1103
+ ...input.parent !== void 0 && { parent: input.parent },
1104
+ ...input.hide_empty !== void 0 && { hide_empty: input.hide_empty }
1105
+ }
1106
+ });
1107
+ const items = parseProductCategories(data);
1108
+ const pageMeta = listPageMeta(page, limit, items.length, headers.get("x-wp-totalpages"));
1109
+ return {
1110
+ items,
1111
+ truncated: pageMeta.truncated,
1112
+ ...pageMeta.next_cursor && { next_cursor: pageMeta.next_cursor }
1113
+ };
1114
+ }
1115
+ /** GET /products/categories/{id} */
1116
+ async getProductCategory(input) {
1117
+ const { data } = await this.#http.get(`/products/categories/${input.category_id}`, { label: "WooCommerce getProductCategory" });
1118
+ return { category: parseProductCategory(data) };
1119
+ }
1120
+ };
1121
+ //#endregion
1122
+ //#region src/vendors/woocommerce/module.ts
1123
+ const woocommerceListOrdersTool = defineTool({
1124
+ id: "woocommerce-list-orders",
1125
+ name: "woocommerceListOrders",
1126
+ description: "List WooCommerce orders with optional status, date, search, and customer filters. Paginate with cursor (page number).",
1127
+ inputSchema: woocommerceListOrdersInputSchema,
1128
+ outputSchema: woocommerceListOrdersOutputSchema,
1129
+ sideEffect: "read",
1130
+ runtime: "both",
1131
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listOrders(input)
1132
+ });
1133
+ const woocommerceGetOrderTool = defineTool({
1134
+ id: "woocommerce-get-order",
1135
+ name: "woocommerceGetOrder",
1136
+ description: "Get one WooCommerce order by numeric order id.",
1137
+ inputSchema: woocommerceGetOrderInputSchema,
1138
+ outputSchema: woocommerceGetOrderOutputSchema,
1139
+ sideEffect: "read",
1140
+ runtime: "both",
1141
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getOrder(input)
1142
+ });
1143
+ const woocommerceCreateOrderTool = defineTool({
1144
+ id: "woocommerce-create-order",
1145
+ name: "woocommerceCreateOrder",
1146
+ description: "Create a WooCommerce order with optional line items, billing/shipping, customer, status, and payment fields.",
1147
+ inputSchema: woocommerceCreateOrderInputSchema,
1148
+ outputSchema: woocommerceCreateOrderOutputSchema,
1149
+ sideEffect: "write",
1150
+ runtime: "both",
1151
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createOrder(input)
1152
+ });
1153
+ const woocommerceUpdateOrderTool = defineTool({
1154
+ id: "woocommerce-update-order",
1155
+ name: "woocommerceUpdateOrder",
1156
+ description: "Update a WooCommerce order by id (status, line items, addresses, payment, notes, and meta).",
1157
+ inputSchema: woocommerceUpdateOrderInputSchema,
1158
+ outputSchema: woocommerceUpdateOrderOutputSchema,
1159
+ sideEffect: "write",
1160
+ runtime: "both",
1161
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).updateOrder(input)
1162
+ });
1163
+ const woocommerceDeleteOrderTool = defineTool({
1164
+ id: "woocommerce-delete-order",
1165
+ name: "woocommerceDeleteOrder",
1166
+ description: "Delete a WooCommerce order by id. force defaults to true for permanent delete.",
1167
+ inputSchema: woocommerceDeleteOrderInputSchema,
1168
+ outputSchema: woocommerceDeleteOrderOutputSchema,
1169
+ sideEffect: "delete",
1170
+ runtime: "both",
1171
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).deleteOrder(input)
1172
+ });
1173
+ const woocommerceListOrderNotesTool = defineTool({
1174
+ id: "woocommerce-list-order-notes",
1175
+ name: "woocommerceListOrderNotes",
1176
+ description: "List notes on a WooCommerce order. Optional type filter: any, customer, or internal.",
1177
+ inputSchema: woocommerceListOrderNotesInputSchema,
1178
+ outputSchema: woocommerceListOrderNotesOutputSchema,
1179
+ sideEffect: "read",
1180
+ runtime: "both",
1181
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listOrderNotes(input)
1182
+ });
1183
+ const woocommerceCreateOrderNoteTool = defineTool({
1184
+ id: "woocommerce-create-order-note",
1185
+ name: "woocommerceCreateOrderNote",
1186
+ description: "Add a note to a WooCommerce order. Optional customer_note makes it visible to the customer.",
1187
+ inputSchema: woocommerceCreateOrderNoteInputSchema,
1188
+ outputSchema: woocommerceCreateOrderNoteOutputSchema,
1189
+ sideEffect: "write",
1190
+ runtime: "both",
1191
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createOrderNote(input)
1192
+ });
1193
+ const woocommerceListOrderRefundsTool = defineTool({
1194
+ id: "woocommerce-list-order-refunds",
1195
+ name: "woocommerceListOrderRefunds",
1196
+ description: "List refunds for a WooCommerce order. Paginate with cursor.",
1197
+ inputSchema: woocommerceListOrderRefundsInputSchema,
1198
+ outputSchema: woocommerceListOrderRefundsOutputSchema,
1199
+ sideEffect: "read",
1200
+ runtime: "both",
1201
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listOrderRefunds(input)
1202
+ });
1203
+ const woocommerceCreateOrderRefundTool = defineTool({
1204
+ id: "woocommerce-create-order-refund",
1205
+ name: "woocommerceCreateOrderRefund",
1206
+ description: "Create a refund on a WooCommerce order. Optional amount, reason, per-line items, and api_refund gateway flag.",
1207
+ inputSchema: woocommerceCreateOrderRefundInputSchema,
1208
+ outputSchema: woocommerceCreateOrderRefundOutputSchema,
1209
+ sideEffect: "write",
1210
+ runtime: "both",
1211
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createOrderRefund(input)
1212
+ });
1213
+ const woocommerceListProductsTool = defineTool({
1214
+ id: "woocommerce-list-products",
1215
+ name: "woocommerceListProducts",
1216
+ description: "List WooCommerce products with optional status, search, SKU, category, and type filters. Paginate with cursor.",
1217
+ inputSchema: woocommerceListProductsInputSchema,
1218
+ outputSchema: woocommerceListProductsOutputSchema,
1219
+ sideEffect: "read",
1220
+ runtime: "both",
1221
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listProducts(input)
1222
+ });
1223
+ const woocommerceGetProductTool = defineTool({
1224
+ id: "woocommerce-get-product",
1225
+ name: "woocommerceGetProduct",
1226
+ description: "Get one WooCommerce product by numeric product id.",
1227
+ inputSchema: woocommerceGetProductInputSchema,
1228
+ outputSchema: woocommerceGetProductOutputSchema,
1229
+ sideEffect: "read",
1230
+ runtime: "both",
1231
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getProduct(input)
1232
+ });
1233
+ const woocommerceCreateProductTool = defineTool({
1234
+ id: "woocommerce-create-product",
1235
+ name: "woocommerceCreateProduct",
1236
+ description: "Create a WooCommerce product (name required). Optional type, status, SKU, prices, stock, categories, and meta.",
1237
+ inputSchema: woocommerceCreateProductInputSchema,
1238
+ outputSchema: woocommerceCreateProductOutputSchema,
1239
+ sideEffect: "write",
1240
+ runtime: "both",
1241
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createProduct(input)
1242
+ });
1243
+ const woocommerceUpdateProductTool = defineTool({
1244
+ id: "woocommerce-update-product",
1245
+ name: "woocommerceUpdateProduct",
1246
+ description: "Update a WooCommerce product by id (name, status, SKU, prices, stock, categories, meta).",
1247
+ inputSchema: woocommerceUpdateProductInputSchema,
1248
+ outputSchema: woocommerceUpdateProductOutputSchema,
1249
+ sideEffect: "write",
1250
+ runtime: "both",
1251
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).updateProduct(input)
1252
+ });
1253
+ const woocommerceDeleteProductTool = defineTool({
1254
+ id: "woocommerce-delete-product",
1255
+ name: "woocommerceDeleteProduct",
1256
+ description: "Delete a WooCommerce product by id. force defaults to true for permanent delete.",
1257
+ inputSchema: woocommerceDeleteProductInputSchema,
1258
+ outputSchema: woocommerceDeleteProductOutputSchema,
1259
+ sideEffect: "delete",
1260
+ runtime: "both",
1261
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).deleteProduct(input)
1262
+ });
1263
+ const woocommerceListProductVariationsTool = defineTool({
1264
+ id: "woocommerce-list-product-variations",
1265
+ name: "woocommerceListProductVariations",
1266
+ description: "List variations for a variable WooCommerce product. Paginate with cursor.",
1267
+ inputSchema: woocommerceListProductVariationsInputSchema,
1268
+ outputSchema: woocommerceListProductVariationsOutputSchema,
1269
+ sideEffect: "read",
1270
+ runtime: "both",
1271
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listProductVariations(input)
1272
+ });
1273
+ const woocommerceGetProductVariationTool = defineTool({
1274
+ id: "woocommerce-get-product-variation",
1275
+ name: "woocommerceGetProductVariation",
1276
+ description: "Get one product variation by parent product id and variation id.",
1277
+ inputSchema: woocommerceGetProductVariationInputSchema,
1278
+ outputSchema: woocommerceGetProductVariationOutputSchema,
1279
+ sideEffect: "read",
1280
+ runtime: "both",
1281
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getProductVariation(input)
1282
+ });
1283
+ const woocommerceListCustomersTool = defineTool({
1284
+ id: "woocommerce-list-customers",
1285
+ name: "woocommerceListCustomers",
1286
+ description: "List WooCommerce customers with optional search, email, and role filters. Paginate with cursor.",
1287
+ inputSchema: woocommerceListCustomersInputSchema,
1288
+ outputSchema: woocommerceListCustomersOutputSchema,
1289
+ sideEffect: "read",
1290
+ runtime: "both",
1291
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listCustomers(input)
1292
+ });
1293
+ const woocommerceGetCustomerTool = defineTool({
1294
+ id: "woocommerce-get-customer",
1295
+ name: "woocommerceGetCustomer",
1296
+ description: "Get one WooCommerce customer by numeric customer id.",
1297
+ inputSchema: woocommerceGetCustomerInputSchema,
1298
+ outputSchema: woocommerceGetCustomerOutputSchema,
1299
+ sideEffect: "read",
1300
+ runtime: "both",
1301
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getCustomer(input)
1302
+ });
1303
+ const woocommerceCreateCustomerTool = defineTool({
1304
+ id: "woocommerce-create-customer",
1305
+ name: "woocommerceCreateCustomer",
1306
+ description: "Create a WooCommerce customer (email required). Optional name, username, password, and addresses.",
1307
+ inputSchema: woocommerceCreateCustomerInputSchema,
1308
+ outputSchema: woocommerceCreateCustomerOutputSchema,
1309
+ sideEffect: "write",
1310
+ runtime: "both",
1311
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createCustomer(input)
1312
+ });
1313
+ const woocommerceUpdateCustomerTool = defineTool({
1314
+ id: "woocommerce-update-customer",
1315
+ name: "woocommerceUpdateCustomer",
1316
+ description: "Update a WooCommerce customer by id (email, name, username, password, addresses, meta).",
1317
+ inputSchema: woocommerceUpdateCustomerInputSchema,
1318
+ outputSchema: woocommerceUpdateCustomerOutputSchema,
1319
+ sideEffect: "write",
1320
+ runtime: "both",
1321
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).updateCustomer(input)
1322
+ });
1323
+ const woocommerceListCouponsTool = defineTool({
1324
+ id: "woocommerce-list-coupons",
1325
+ name: "woocommerceListCoupons",
1326
+ description: "List WooCommerce coupons with optional search and code filters. Paginate with cursor.",
1327
+ inputSchema: woocommerceListCouponsInputSchema,
1328
+ outputSchema: woocommerceListCouponsOutputSchema,
1329
+ sideEffect: "read",
1330
+ runtime: "both",
1331
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listCoupons(input)
1332
+ });
1333
+ const woocommerceGetCouponTool = defineTool({
1334
+ id: "woocommerce-get-coupon",
1335
+ name: "woocommerceGetCoupon",
1336
+ description: "Get one WooCommerce coupon by numeric coupon id.",
1337
+ inputSchema: woocommerceGetCouponInputSchema,
1338
+ outputSchema: woocommerceGetCouponOutputSchema,
1339
+ sideEffect: "read",
1340
+ runtime: "both",
1341
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getCoupon(input)
1342
+ });
1343
+ const woocommerceCreateCouponTool = defineTool({
1344
+ id: "woocommerce-create-coupon",
1345
+ name: "woocommerceCreateCoupon",
1346
+ description: "Create a WooCommerce coupon (code required). Optional discount type, amount, limits, free shipping, and expiry.",
1347
+ inputSchema: woocommerceCreateCouponInputSchema,
1348
+ outputSchema: woocommerceCreateCouponOutputSchema,
1349
+ sideEffect: "write",
1350
+ runtime: "both",
1351
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).createCoupon(input)
1352
+ });
1353
+ const woocommerceUpdateCouponTool = defineTool({
1354
+ id: "woocommerce-update-coupon",
1355
+ name: "woocommerceUpdateCoupon",
1356
+ description: "Update a WooCommerce coupon by id (code, discount, amount, limits, free shipping, expiry).",
1357
+ inputSchema: woocommerceUpdateCouponInputSchema,
1358
+ outputSchema: woocommerceUpdateCouponOutputSchema,
1359
+ sideEffect: "write",
1360
+ runtime: "both",
1361
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).updateCoupon(input)
1362
+ });
1363
+ const woocommerceListProductCategoriesTool = defineTool({
1364
+ id: "woocommerce-list-product-categories",
1365
+ name: "woocommerceListProductCategories",
1366
+ description: "List WooCommerce product categories with optional search, parent, and hide_empty filters.",
1367
+ inputSchema: woocommerceListProductCategoriesInputSchema,
1368
+ outputSchema: woocommerceListProductCategoriesOutputSchema,
1369
+ sideEffect: "read",
1370
+ runtime: "both",
1371
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).listProductCategories(input)
1372
+ });
1373
+ const woocommerceGetProductCategoryTool = defineTool({
1374
+ id: "woocommerce-get-product-category",
1375
+ name: "woocommerceGetProductCategory",
1376
+ description: "Get one WooCommerce product category by numeric category id.",
1377
+ inputSchema: woocommerceGetProductCategoryInputSchema,
1378
+ outputSchema: woocommerceGetProductCategoryOutputSchema,
1379
+ sideEffect: "read",
1380
+ runtime: "both",
1381
+ execute: async (input, ctx) => WoocommerceClient.fromContext(ctx).getProductCategory(input)
1382
+ });
1383
+ const woocommerceModule = defineModule({
1384
+ id: "woocommerce",
1385
+ title: "WooCommerce",
1386
+ description: "WooCommerce REST API vendor pack (wc/v3): orders (CRUD, notes, refunds), products (CRUD, variations), customers, coupons, and product categories.",
1387
+ runtime: "both",
1388
+ auth: {
1389
+ type: "custom",
1390
+ schema: woocommerceAuthSchema
1391
+ },
1392
+ categories: ["commerce"],
1393
+ classification: "pii",
1394
+ tags: ["orders", "products"],
1395
+ tools: [
1396
+ woocommerceListOrdersTool,
1397
+ woocommerceGetOrderTool,
1398
+ woocommerceCreateOrderTool,
1399
+ woocommerceUpdateOrderTool,
1400
+ woocommerceDeleteOrderTool,
1401
+ woocommerceListOrderNotesTool,
1402
+ woocommerceCreateOrderNoteTool,
1403
+ woocommerceListOrderRefundsTool,
1404
+ woocommerceCreateOrderRefundTool,
1405
+ woocommerceListProductsTool,
1406
+ woocommerceGetProductTool,
1407
+ woocommerceCreateProductTool,
1408
+ woocommerceUpdateProductTool,
1409
+ woocommerceDeleteProductTool,
1410
+ woocommerceListProductVariationsTool,
1411
+ woocommerceGetProductVariationTool,
1412
+ woocommerceListCustomersTool,
1413
+ woocommerceGetCustomerTool,
1414
+ woocommerceCreateCustomerTool,
1415
+ woocommerceUpdateCustomerTool,
1416
+ woocommerceListCouponsTool,
1417
+ woocommerceGetCouponTool,
1418
+ woocommerceCreateCouponTool,
1419
+ woocommerceUpdateCouponTool,
1420
+ woocommerceListProductCategoriesTool,
1421
+ woocommerceGetProductCategoryTool
1422
+ ]
1423
+ });
1424
+ //#endregion
1425
+ export { WoocommerceClient, woocommerceAddressSchema, woocommerceAuthSchema, woocommerceCouponSchema, woocommerceCreateCouponInputSchema, woocommerceCreateCouponOutputSchema, woocommerceCreateCouponTool, woocommerceCreateCustomerInputSchema, woocommerceCreateCustomerOutputSchema, woocommerceCreateCustomerTool, woocommerceCreateOrderInputSchema, woocommerceCreateOrderNoteInputSchema, woocommerceCreateOrderNoteOutputSchema, woocommerceCreateOrderNoteTool, woocommerceCreateOrderOutputSchema, woocommerceCreateOrderRefundInputSchema, woocommerceCreateOrderRefundOutputSchema, woocommerceCreateOrderRefundTool, woocommerceCreateOrderTool, woocommerceCreateProductInputSchema, woocommerceCreateProductOutputSchema, woocommerceCreateProductTool, woocommerceCustomerSchema, woocommerceDeleteOrderInputSchema, woocommerceDeleteOrderOutputSchema, woocommerceDeleteOrderTool, woocommerceDeleteProductInputSchema, woocommerceDeleteProductOutputSchema, woocommerceDeleteProductTool, woocommerceGetCouponInputSchema, woocommerceGetCouponOutputSchema, woocommerceGetCouponTool, woocommerceGetCustomerInputSchema, woocommerceGetCustomerOutputSchema, woocommerceGetCustomerTool, woocommerceGetOrderInputSchema, woocommerceGetOrderOutputSchema, woocommerceGetOrderTool, woocommerceGetProductCategoryInputSchema, woocommerceGetProductCategoryOutputSchema, woocommerceGetProductCategoryTool, woocommerceGetProductInputSchema, woocommerceGetProductOutputSchema, woocommerceGetProductTool, woocommerceGetProductVariationInputSchema, woocommerceGetProductVariationOutputSchema, woocommerceGetProductVariationTool, woocommerceLineItemInputSchema, woocommerceListCouponsInputSchema, woocommerceListCouponsOutputSchema, woocommerceListCouponsTool, woocommerceListCustomersInputSchema, woocommerceListCustomersOutputSchema, woocommerceListCustomersTool, woocommerceListOrderNotesInputSchema, woocommerceListOrderNotesOutputSchema, woocommerceListOrderNotesTool, woocommerceListOrderRefundsInputSchema, woocommerceListOrderRefundsOutputSchema, woocommerceListOrderRefundsTool, woocommerceListOrdersInputSchema, woocommerceListOrdersOutputSchema, woocommerceListOrdersTool, woocommerceListProductCategoriesInputSchema, woocommerceListProductCategoriesOutputSchema, woocommerceListProductCategoriesTool, woocommerceListProductVariationsInputSchema, woocommerceListProductVariationsOutputSchema, woocommerceListProductVariationsTool, woocommerceListProductsInputSchema, woocommerceListProductsOutputSchema, woocommerceListProductsTool, woocommerceMetaDataSchema, woocommerceModule, woocommerceOrderNoteSchema, woocommerceOrderRefundSchema, woocommerceOrderSchema, woocommerceProductCategorySchema, woocommerceProductSchema, woocommerceProductVariationSchema, woocommerceUpdateCouponInputSchema, woocommerceUpdateCouponOutputSchema, woocommerceUpdateCouponTool, woocommerceUpdateCustomerInputSchema, woocommerceUpdateCustomerOutputSchema, woocommerceUpdateCustomerTool, woocommerceUpdateOrderInputSchema, woocommerceUpdateOrderOutputSchema, woocommerceUpdateOrderTool, woocommerceUpdateProductInputSchema, woocommerceUpdateProductOutputSchema, woocommerceUpdateProductTool };
1426
+
1427
+ //# sourceMappingURL=index.js.map