@pikku/addon-woocommerce 0.0.2

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 (263) hide show
  1. package/README.md +12 -0
  2. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +67 -0
  3. package/dist/.pikku/addon/pikku-addon-types.gen.d.ts.map +1 -0
  4. package/dist/.pikku/addon/pikku-addon-types.gen.js +78 -0
  5. package/dist/.pikku/addon/pikku-addon-types.gen.js.map +1 -0
  6. package/dist/.pikku/addon/pikku-addon-types.gen.ts +106 -0
  7. package/dist/.pikku/addon/pikku-package.gen.d.ts +2 -0
  8. package/dist/.pikku/addon/pikku-package.gen.d.ts.map +1 -0
  9. package/dist/.pikku/addon/pikku-package.gen.js +10 -0
  10. package/dist/.pikku/addon/pikku-package.gen.js.map +1 -0
  11. package/dist/.pikku/addon/pikku-package.gen.ts +11 -0
  12. package/dist/.pikku/agent/pikku-agent-map.gen.d.ts +4 -0
  13. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +47 -0
  14. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts.map +1 -0
  15. package/dist/.pikku/agent/pikku-agent-types.gen.js +18 -0
  16. package/dist/.pikku/agent/pikku-agent-types.gen.js.map +1 -0
  17. package/dist/.pikku/agent/pikku-agent-types.gen.ts +82 -0
  18. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +112 -0
  19. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts.map +1 -0
  20. package/dist/.pikku/channel/pikku-channel-types.gen.js +60 -0
  21. package/dist/.pikku/channel/pikku-channel-types.gen.js.map +1 -0
  22. package/dist/.pikku/channel/pikku-channel-types.gen.ts +177 -0
  23. package/dist/.pikku/console/pikku-node-types.gen.d.ts +7 -0
  24. package/dist/.pikku/console/pikku-node-types.gen.d.ts.map +1 -0
  25. package/dist/.pikku/console/pikku-node-types.gen.js +2 -0
  26. package/dist/.pikku/console/pikku-node-types.gen.js.map +1 -0
  27. package/dist/.pikku/console/pikku-node-types.gen.ts +8 -0
  28. package/dist/.pikku/credentials/pikku-credentials-meta.gen.json +10 -0
  29. package/dist/.pikku/credentials/pikku-credentials.gen.d.ts +15 -0
  30. package/dist/.pikku/credentials/pikku-credentials.gen.d.ts.map +1 -0
  31. package/dist/.pikku/credentials/pikku-credentials.gen.js +13 -0
  32. package/dist/.pikku/credentials/pikku-credentials.gen.js.map +1 -0
  33. package/dist/.pikku/credentials/pikku-credentials.gen.ts +23 -0
  34. package/dist/.pikku/function/pikku-function-types.gen.d.ts +490 -0
  35. package/dist/.pikku/function/pikku-function-types.gen.d.ts.map +1 -0
  36. package/dist/.pikku/function/pikku-function-types.gen.js +334 -0
  37. package/dist/.pikku/function/pikku-function-types.gen.js.map +1 -0
  38. package/dist/.pikku/function/pikku-function-types.gen.ts +754 -0
  39. package/dist/.pikku/function/pikku-functions-meta-verbose.gen.json +437 -0
  40. package/dist/.pikku/function/pikku-functions-meta.gen.d.ts +2 -0
  41. package/dist/.pikku/function/pikku-functions-meta.gen.d.ts.map +1 -0
  42. package/dist/.pikku/function/pikku-functions-meta.gen.js +7 -0
  43. package/dist/.pikku/function/pikku-functions-meta.gen.js.map +1 -0
  44. package/dist/.pikku/function/pikku-functions-meta.gen.json +287 -0
  45. package/dist/.pikku/function/pikku-functions-meta.gen.ts +7 -0
  46. package/dist/.pikku/function/pikku-functions.gen.d.ts +2 -0
  47. package/dist/.pikku/function/pikku-functions.gen.d.ts.map +1 -0
  48. package/dist/.pikku/function/pikku-functions.gen.js +36 -0
  49. package/dist/.pikku/function/pikku-functions.gen.js.map +1 -0
  50. package/dist/.pikku/function/pikku-functions.gen.ts +36 -0
  51. package/dist/.pikku/http/pikku-http-types.gen.d.ts +120 -0
  52. package/dist/.pikku/http/pikku-http-types.gen.d.ts.map +1 -0
  53. package/dist/.pikku/http/pikku-http-types.gen.js +72 -0
  54. package/dist/.pikku/http/pikku-http-types.gen.js.map +1 -0
  55. package/dist/.pikku/http/pikku-http-types.gen.ts +147 -0
  56. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +131 -0
  57. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts.map +1 -0
  58. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +38 -0
  59. package/dist/.pikku/mcp/pikku-mcp-types.gen.js.map +1 -0
  60. package/dist/.pikku/mcp/pikku-mcp-types.gen.ts +183 -0
  61. package/dist/.pikku/pikku-bootstrap.gen.d.ts +9 -0
  62. package/dist/.pikku/pikku-bootstrap.gen.d.ts.map +1 -0
  63. package/dist/.pikku/pikku-bootstrap.gen.js +9 -0
  64. package/dist/.pikku/pikku-bootstrap.gen.js.map +1 -0
  65. package/dist/.pikku/pikku-bootstrap.gen.ts +8 -0
  66. package/dist/.pikku/pikku-meta-service.gen.d.ts +8 -0
  67. package/dist/.pikku/pikku-meta-service.gen.d.ts.map +1 -0
  68. package/dist/.pikku/pikku-meta-service.gen.js +10 -0
  69. package/dist/.pikku/pikku-meta-service.gen.js.map +1 -0
  70. package/dist/.pikku/pikku-meta-service.gen.ts +10 -0
  71. package/dist/.pikku/pikku-services.gen.d.ts +35 -0
  72. package/dist/.pikku/pikku-services.gen.d.ts.map +1 -0
  73. package/dist/.pikku/pikku-services.gen.js +30 -0
  74. package/dist/.pikku/pikku-services.gen.js.map +1 -0
  75. package/dist/.pikku/pikku-services.gen.ts +42 -0
  76. package/dist/.pikku/pikku-types.gen.d.ts +12 -0
  77. package/dist/.pikku/pikku-types.gen.d.ts.map +1 -0
  78. package/dist/.pikku/pikku-types.gen.js +17 -0
  79. package/dist/.pikku/pikku-types.gen.js.map +1 -0
  80. package/dist/.pikku/pikku-types.gen.ts +21 -0
  81. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +24 -0
  82. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts.map +1 -0
  83. package/dist/.pikku/queue/pikku-queue-types.gen.js +17 -0
  84. package/dist/.pikku/queue/pikku-queue-types.gen.js.map +1 -0
  85. package/dist/.pikku/queue/pikku-queue-types.gen.ts +27 -0
  86. package/dist/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +209 -0
  87. package/dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +224 -0
  88. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts +2 -0
  89. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts.map +1 -0
  90. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +7 -0
  91. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js.map +1 -0
  92. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +17 -0
  93. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +6 -0
  94. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +22 -0
  95. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts.map +1 -0
  96. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +17 -0
  97. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js.map +1 -0
  98. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.ts +25 -0
  99. package/dist/.pikku/schemas/register.gen.d.ts +2 -0
  100. package/dist/.pikku/schemas/register.gen.d.ts.map +1 -0
  101. package/dist/.pikku/schemas/register.gen.js +69 -0
  102. package/dist/.pikku/schemas/register.gen.js.map +1 -0
  103. package/dist/.pikku/schemas/register.gen.ts +131 -0
  104. package/dist/.pikku/schemas/schemas/CredentialSchema_woocommerce.schema.json +1 -0
  105. package/dist/.pikku/schemas/schemas/CustomerCreateInput.schema.json +1 -0
  106. package/dist/.pikku/schemas/schemas/CustomerCreateOutput.schema.json +1 -0
  107. package/dist/.pikku/schemas/schemas/CustomerDeleteInput.schema.json +1 -0
  108. package/dist/.pikku/schemas/schemas/CustomerDeleteOutput.schema.json +1 -0
  109. package/dist/.pikku/schemas/schemas/CustomerGetAllInput.schema.json +1 -0
  110. package/dist/.pikku/schemas/schemas/CustomerGetAllOutput.schema.json +1 -0
  111. package/dist/.pikku/schemas/schemas/CustomerGetInput.schema.json +1 -0
  112. package/dist/.pikku/schemas/schemas/CustomerGetOutput.schema.json +1 -0
  113. package/dist/.pikku/schemas/schemas/CustomerUpdateInput.schema.json +1 -0
  114. package/dist/.pikku/schemas/schemas/CustomerUpdateOutput.schema.json +1 -0
  115. package/dist/.pikku/schemas/schemas/OrderCreateInput.schema.json +1 -0
  116. package/dist/.pikku/schemas/schemas/OrderCreateOutput.schema.json +1 -0
  117. package/dist/.pikku/schemas/schemas/OrderDeleteInput.schema.json +1 -0
  118. package/dist/.pikku/schemas/schemas/OrderDeleteOutput.schema.json +1 -0
  119. package/dist/.pikku/schemas/schemas/OrderGetAllInput.schema.json +1 -0
  120. package/dist/.pikku/schemas/schemas/OrderGetAllOutput.schema.json +1 -0
  121. package/dist/.pikku/schemas/schemas/OrderGetInput.schema.json +1 -0
  122. package/dist/.pikku/schemas/schemas/OrderGetOutput.schema.json +1 -0
  123. package/dist/.pikku/schemas/schemas/OrderUpdateInput.schema.json +1 -0
  124. package/dist/.pikku/schemas/schemas/OrderUpdateOutput.schema.json +1 -0
  125. package/dist/.pikku/schemas/schemas/ProductCreateInput.schema.json +1 -0
  126. package/dist/.pikku/schemas/schemas/ProductCreateOutput.schema.json +1 -0
  127. package/dist/.pikku/schemas/schemas/ProductDeleteInput.schema.json +1 -0
  128. package/dist/.pikku/schemas/schemas/ProductDeleteOutput.schema.json +1 -0
  129. package/dist/.pikku/schemas/schemas/ProductGetAllInput.schema.json +1 -0
  130. package/dist/.pikku/schemas/schemas/ProductGetAllOutput.schema.json +1 -0
  131. package/dist/.pikku/schemas/schemas/ProductGetInput.schema.json +1 -0
  132. package/dist/.pikku/schemas/schemas/ProductGetOutput.schema.json +1 -0
  133. package/dist/.pikku/schemas/schemas/ProductUpdateInput.schema.json +1 -0
  134. package/dist/.pikku/schemas/schemas/ProductUpdateOutput.schema.json +1 -0
  135. package/dist/.pikku/schemas/schemas/VariableSchema_WOOCOMMERCE_BASE_URL.schema.json +1 -0
  136. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +6 -0
  137. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts.map +1 -0
  138. package/dist/.pikku/secrets/pikku-secret-types.gen.js +5 -0
  139. package/dist/.pikku/secrets/pikku-secret-types.gen.js.map +1 -0
  140. package/dist/.pikku/secrets/pikku-secret-types.gen.ts +5 -0
  141. package/dist/.pikku/secrets/pikku-secrets-meta.gen.json +1 -0
  142. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +12 -0
  143. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts.map +1 -0
  144. package/dist/.pikku/secrets/pikku-secrets.gen.js +11 -0
  145. package/dist/.pikku/secrets/pikku-secrets.gen.js.map +1 -0
  146. package/dist/.pikku/secrets/pikku-secrets.gen.ts +21 -0
  147. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +114 -0
  148. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts.map +1 -0
  149. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +34 -0
  150. package/dist/.pikku/trigger/pikku-trigger-types.gen.js.map +1 -0
  151. package/dist/.pikku/trigger/pikku-trigger-types.gen.ts +160 -0
  152. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +6 -0
  153. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts.map +1 -0
  154. package/dist/.pikku/variables/pikku-variable-types.gen.js +5 -0
  155. package/dist/.pikku/variables/pikku-variable-types.gen.js.map +1 -0
  156. package/dist/.pikku/variables/pikku-variable-types.gen.ts +5 -0
  157. package/dist/.pikku/variables/pikku-variables-meta.gen.json +10 -0
  158. package/dist/.pikku/variables/pikku-variables.gen.d.ts +15 -0
  159. package/dist/.pikku/variables/pikku-variables.gen.d.ts.map +1 -0
  160. package/dist/.pikku/variables/pikku-variables.gen.js +13 -0
  161. package/dist/.pikku/variables/pikku-variables.gen.js.map +1 -0
  162. package/dist/.pikku/variables/pikku-variables.gen.ts +23 -0
  163. package/dist/.pikku/workflow/pikku-workflow-map.gen.d.ts +38 -0
  164. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +90 -0
  165. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts.map +1 -0
  166. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +18 -0
  167. package/dist/.pikku/workflow/pikku-workflow-types.gen.js.map +1 -0
  168. package/dist/.pikku/workflow/pikku-workflow-types.gen.ts +167 -0
  169. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.d.ts +2 -0
  170. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.d.ts.map +1 -0
  171. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +7 -0
  172. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js.map +1 -0
  173. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +9 -0
  174. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +5 -0
  175. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts.map +1 -0
  176. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +5 -0
  177. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js.map +1 -0
  178. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.ts +3 -0
  179. package/dist/src/functions/customerCreate.function.d.ts +37 -0
  180. package/dist/src/functions/customerCreate.function.d.ts.map +1 -0
  181. package/dist/src/functions/customerCreate.function.js +21 -0
  182. package/dist/src/functions/customerCreate.function.js.map +1 -0
  183. package/dist/src/functions/customerDelete.function.d.ts +21 -0
  184. package/dist/src/functions/customerDelete.function.d.ts.map +1 -0
  185. package/dist/src/functions/customerDelete.function.js +17 -0
  186. package/dist/src/functions/customerDelete.function.js.map +1 -0
  187. package/dist/src/functions/customerGet.function.d.ts +25 -0
  188. package/dist/src/functions/customerGet.function.d.ts.map +1 -0
  189. package/dist/src/functions/customerGet.function.js +18 -0
  190. package/dist/src/functions/customerGet.function.js.map +1 -0
  191. package/dist/src/functions/customerGetAll.function.d.ts +17 -0
  192. package/dist/src/functions/customerGetAll.function.d.ts.map +1 -0
  193. package/dist/src/functions/customerGetAll.function.js +16 -0
  194. package/dist/src/functions/customerGetAll.function.js.map +1 -0
  195. package/dist/src/functions/customerUpdate.function.d.ts +29 -0
  196. package/dist/src/functions/customerUpdate.function.d.ts.map +1 -0
  197. package/dist/src/functions/customerUpdate.function.js +19 -0
  198. package/dist/src/functions/customerUpdate.function.js.map +1 -0
  199. package/dist/src/functions/orderCreate.function.d.ts +29 -0
  200. package/dist/src/functions/orderCreate.function.d.ts.map +1 -0
  201. package/dist/src/functions/orderCreate.function.js +19 -0
  202. package/dist/src/functions/orderCreate.function.js.map +1 -0
  203. package/dist/src/functions/orderDelete.function.d.ts +21 -0
  204. package/dist/src/functions/orderDelete.function.d.ts.map +1 -0
  205. package/dist/src/functions/orderDelete.function.js +17 -0
  206. package/dist/src/functions/orderDelete.function.js.map +1 -0
  207. package/dist/src/functions/orderGet.function.d.ts +21 -0
  208. package/dist/src/functions/orderGet.function.d.ts.map +1 -0
  209. package/dist/src/functions/orderGet.function.js +17 -0
  210. package/dist/src/functions/orderGet.function.js.map +1 -0
  211. package/dist/src/functions/orderGetAll.function.d.ts +17 -0
  212. package/dist/src/functions/orderGetAll.function.d.ts.map +1 -0
  213. package/dist/src/functions/orderGetAll.function.js +16 -0
  214. package/dist/src/functions/orderGetAll.function.js.map +1 -0
  215. package/dist/src/functions/orderUpdate.function.d.ts +25 -0
  216. package/dist/src/functions/orderUpdate.function.d.ts.map +1 -0
  217. package/dist/src/functions/orderUpdate.function.js +18 -0
  218. package/dist/src/functions/orderUpdate.function.js.map +1 -0
  219. package/dist/src/functions/productCreate.function.d.ts +37 -0
  220. package/dist/src/functions/productCreate.function.d.ts.map +1 -0
  221. package/dist/src/functions/productCreate.function.js +21 -0
  222. package/dist/src/functions/productCreate.function.js.map +1 -0
  223. package/dist/src/functions/productDelete.function.d.ts +21 -0
  224. package/dist/src/functions/productDelete.function.d.ts.map +1 -0
  225. package/dist/src/functions/productDelete.function.js +17 -0
  226. package/dist/src/functions/productDelete.function.js.map +1 -0
  227. package/dist/src/functions/productGet.function.d.ts +25 -0
  228. package/dist/src/functions/productGet.function.d.ts.map +1 -0
  229. package/dist/src/functions/productGet.function.js +18 -0
  230. package/dist/src/functions/productGet.function.js.map +1 -0
  231. package/dist/src/functions/productGetAll.function.d.ts +17 -0
  232. package/dist/src/functions/productGetAll.function.d.ts.map +1 -0
  233. package/dist/src/functions/productGetAll.function.js +16 -0
  234. package/dist/src/functions/productGetAll.function.js.map +1 -0
  235. package/dist/src/functions/productUpdate.function.d.ts +29 -0
  236. package/dist/src/functions/productUpdate.function.d.ts.map +1 -0
  237. package/dist/src/functions/productUpdate.function.js +19 -0
  238. package/dist/src/functions/productUpdate.function.js.map +1 -0
  239. package/dist/src/index.d.ts +16 -0
  240. package/dist/src/index.d.ts.map +1 -0
  241. package/dist/src/index.js +16 -0
  242. package/dist/src/index.js.map +1 -0
  243. package/dist/src/services.d.ts +2 -0
  244. package/dist/src/services.d.ts.map +1 -0
  245. package/dist/src/services.js +14 -0
  246. package/dist/src/services.js.map +1 -0
  247. package/dist/src/woocommerce-api.service.d.ts +10 -0
  248. package/dist/src/woocommerce-api.service.d.ts.map +1 -0
  249. package/dist/src/woocommerce-api.service.js +177 -0
  250. package/dist/src/woocommerce-api.service.js.map +1 -0
  251. package/dist/src/woocommerce.credential.d.ts +5 -0
  252. package/dist/src/woocommerce.credential.d.ts.map +1 -0
  253. package/dist/src/woocommerce.credential.js +13 -0
  254. package/dist/src/woocommerce.credential.js.map +1 -0
  255. package/dist/src/woocommerce.types.d.ts +7 -0
  256. package/dist/src/woocommerce.types.d.ts.map +1 -0
  257. package/dist/src/woocommerce.types.js +8 -0
  258. package/dist/src/woocommerce.types.js.map +1 -0
  259. package/dist/src/woocommerce.variable.d.ts +5 -0
  260. package/dist/src/woocommerce.variable.d.ts.map +1 -0
  261. package/dist/src/woocommerce.variable.js +11 -0
  262. package/dist/src/woocommerce.variable.js.map +1 -0
  263. package/package.json +39 -0
@@ -0,0 +1,177 @@
1
+ import { BadRequestError, ConflictError, ForbiddenError, InternalServerError, MethodNotAllowedError, NotFoundError, TooManyRequestsError, UnauthorizedError, UnprocessableContentError } from '@pikku/core/errors';
2
+ const ROUTES = {
3
+ "GET /products": {
4
+ "path": [],
5
+ "query": [
6
+ "per_page",
7
+ "page"
8
+ ],
9
+ "headers": []
10
+ },
11
+ "POST /products": {
12
+ "path": [],
13
+ "query": [],
14
+ "headers": []
15
+ },
16
+ "GET /products/{productId}": {
17
+ "path": [
18
+ "productId"
19
+ ],
20
+ "query": [],
21
+ "headers": []
22
+ },
23
+ "PUT /products/{productId}": {
24
+ "path": [
25
+ "productId"
26
+ ],
27
+ "query": [],
28
+ "headers": []
29
+ },
30
+ "DELETE /products/{productId}": {
31
+ "path": [
32
+ "productId"
33
+ ],
34
+ "query": [],
35
+ "headers": []
36
+ },
37
+ "GET /orders": {
38
+ "path": [],
39
+ "query": [
40
+ "per_page",
41
+ "page"
42
+ ],
43
+ "headers": []
44
+ },
45
+ "POST /orders": {
46
+ "path": [],
47
+ "query": [],
48
+ "headers": []
49
+ },
50
+ "GET /orders/{orderId}": {
51
+ "path": [
52
+ "orderId"
53
+ ],
54
+ "query": [],
55
+ "headers": []
56
+ },
57
+ "PUT /orders/{orderId}": {
58
+ "path": [
59
+ "orderId"
60
+ ],
61
+ "query": [],
62
+ "headers": []
63
+ },
64
+ "DELETE /orders/{orderId}": {
65
+ "path": [
66
+ "orderId"
67
+ ],
68
+ "query": [],
69
+ "headers": []
70
+ },
71
+ "GET /customers": {
72
+ "path": [],
73
+ "query": [
74
+ "per_page",
75
+ "page"
76
+ ],
77
+ "headers": []
78
+ },
79
+ "POST /customers": {
80
+ "path": [],
81
+ "query": [],
82
+ "headers": []
83
+ },
84
+ "GET /customers/{customerId}": {
85
+ "path": [
86
+ "customerId"
87
+ ],
88
+ "query": [],
89
+ "headers": []
90
+ },
91
+ "PUT /customers/{customerId}": {
92
+ "path": [
93
+ "customerId"
94
+ ],
95
+ "query": [],
96
+ "headers": []
97
+ },
98
+ "DELETE /customers/{customerId}": {
99
+ "path": [
100
+ "customerId"
101
+ ],
102
+ "query": [],
103
+ "headers": []
104
+ }
105
+ };
106
+ export class WoocommerceService {
107
+ constructor(creds, variables) {
108
+ this.creds = creds;
109
+ this.baseUrl = variables.get('WOOCOMMERCE_BASE_URL');
110
+ }
111
+ async call(method, path, data) {
112
+ const route = ROUTES[`${method} ${path}`];
113
+ let endpoint = path;
114
+ let body;
115
+ const query = {};
116
+ const headers = {
117
+ 'Content-Type': 'application/json',
118
+ };
119
+ if (data && route) {
120
+ // Interpolate path params
121
+ for (const param of route.path) {
122
+ if (data[param] !== undefined) {
123
+ endpoint = endpoint.replace(`{${param}}`, String(data[param]));
124
+ }
125
+ }
126
+ // Extract query params
127
+ for (const param of route.query) {
128
+ if (data[param] !== undefined) {
129
+ query[param] = String(data[param]);
130
+ }
131
+ }
132
+ // Extract header params
133
+ for (const param of route.headers) {
134
+ if (data[param] !== undefined) {
135
+ headers[param] = String(data[param]);
136
+ }
137
+ }
138
+ // Everything else goes into body
139
+ const pathQueryHeaders = new Set([...route.path, ...route.query, ...route.headers]);
140
+ const remaining = Object.fromEntries(Object.entries(data).filter(([k]) => !pathQueryHeaders.has(k)));
141
+ if (Object.keys(remaining).length > 0) {
142
+ body = remaining;
143
+ }
144
+ }
145
+ const url = new URL(`${this.baseUrl}${endpoint}`);
146
+ for (const [key, value] of Object.entries(query)) {
147
+ url.searchParams.set(key, value);
148
+ }
149
+ headers.Authorization = `Bearer ${this.creds.apiKey}`;
150
+ const response = await fetch(url.toString(), {
151
+ method,
152
+ headers,
153
+ body: body ? JSON.stringify(body) : undefined,
154
+ });
155
+ if (!response.ok) {
156
+ const errorText = await response.text();
157
+ const errorMessage = route?.errors?.[response.status] ?? errorText;
158
+ switch (response.status) {
159
+ case 400: throw new BadRequestError(errorMessage);
160
+ case 401: throw new UnauthorizedError(errorMessage);
161
+ case 403: throw new ForbiddenError(errorMessage);
162
+ case 404: throw new NotFoundError(errorMessage);
163
+ case 405: throw new MethodNotAllowedError(errorMessage);
164
+ case 409: throw new ConflictError(errorMessage);
165
+ case 422: throw new UnprocessableContentError(errorMessage);
166
+ case 429: throw new TooManyRequestsError(errorMessage);
167
+ case 500: throw new InternalServerError(errorMessage);
168
+ default: throw new Error(`WooCommerce API error (${response.status}): ${errorText}`);
169
+ }
170
+ }
171
+ const text = await response.text();
172
+ if (!text)
173
+ return {};
174
+ return JSON.parse(text);
175
+ }
176
+ }
177
+ //# sourceMappingURL=woocommerce-api.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"woocommerce-api.service.js","sourceRoot":"","sources":["../../src/woocommerce-api.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,aAAa,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AAGlN,MAAM,MAAM,GAA4G;IACtH,eAAe,EAAE;QACf,MAAM,EAAE,EAAE;QACV,OAAO,EAAE;YACP,UAAU;YACV,MAAM;SACP;QACD,SAAS,EAAE,EAAE;KACd;IACD,gBAAgB,EAAE;QAChB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,EAAE;QACX,SAAS,EAAE,EAAE;KACd;IACD,2BAA2B,EAAE;QAC3B,MAAM,EAAE;YACN,WAAW;SACZ;QACD,OAAO,EAAE,EAAE;QACX,SAAS,EAAE,EAAE;KACd;IACD,2BAA2B,EAAE;QAC3B,MAAM,EAAE;YACN,WAAW;SACZ;QACD,OAAO,EAAE,EAAE;QACX,SAAS,EAAE,EAAE;KACd;IACD,8BAA8B,EAAE;QAC9B,MAAM,EAAE;YACN,WAAW;SACZ;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;YAClE,QAAQ,QAAQ,CAAC,MAAM,EAAE,CAAC;gBACxB,KAAK,GAAG,CAAC,CAAC,MAAM,IAAI,eAAe,CAAC,YAAY,CAAC,CAAA;gBACjD,KAAK,GAAG,CAAC,CAAC,MAAM,IAAI,iBAAiB,CAAC,YAAY,CAAC,CAAA;gBACnD,KAAK,GAAG,CAAC,CAAC,MAAM,IAAI,cAAc,CAAC,YAAY,CAAC,CAAA;gBAChD,KAAK,GAAG,CAAC,CAAC,MAAM,IAAI,aAAa,CAAC,YAAY,CAAC,CAAA;gBAC/C,KAAK,GAAG,CAAC,CAAC,MAAM,IAAI,qBAAqB,CAAC,YAAY,CAAC,CAAA;gBACvD,KAAK,GAAG,CAAC,CAAC,MAAM,IAAI,aAAa,CAAC,YAAY,CAAC,CAAA;gBAC/C,KAAK,GAAG,CAAC,CAAC,MAAM,IAAI,yBAAyB,CAAC,YAAY,CAAC,CAAA;gBAC3D,KAAK,GAAG,CAAC,CAAC,MAAM,IAAI,oBAAoB,CAAC,YAAY,CAAC,CAAA;gBACtD,KAAK,GAAG,CAAC,CAAC,MAAM,IAAI,mBAAmB,CAAC,YAAY,CAAC,CAAA;gBACrD,OAAO,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,0BAA0B,QAAQ,CAAC,MAAM,MAAM,SAAS,EAAE,CAAC,CAAA;YACtF,CAAC;QACH,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAA;QAClC,IAAI,CAAC,IAAI;YAAE,OAAO,EAAO,CAAA;QACzB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAM,CAAA;IAC9B,CAAC;CACF"}
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export declare const woocommerceCredentialSchema: z.ZodObject<{
3
+ apiKey: z.ZodString;
4
+ }, z.core.$strip>;
5
+ //# sourceMappingURL=woocommerce.credential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"woocommerce.credential.d.ts","sourceRoot":"","sources":["../../src/woocommerce.credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,2BAA2B;;iBAEtC,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ import { wireCredential } from '@pikku/core/credential';
3
+ export const woocommerceCredentialSchema = z.object({
4
+ apiKey: z.string().describe('WooCommerce API key'),
5
+ });
6
+ wireCredential({
7
+ name: 'woocommerce',
8
+ displayName: 'WooCommerce',
9
+ description: 'Consume the WooCommerce REST API (products, orders, customers)',
10
+ type: 'wire',
11
+ schema: woocommerceCredentialSchema,
12
+ });
13
+ //# sourceMappingURL=woocommerce.credential.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"woocommerce.credential.js","sourceRoot":"","sources":["../../src/woocommerce.credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEvD,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qBAAqB,CAAC;CACnD,CAAC,CAAA;AAEF,cAAc,CAAC;IACb,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,gEAAgE;IAC7E,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,2BAA2B;CACpC,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const WoocommerceResourceSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ name: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export type WoocommerceResource = z.infer<typeof WoocommerceResourceSchema>;
7
+ //# sourceMappingURL=woocommerce.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"woocommerce.types.d.ts","sourceRoot":"","sources":["../../src/woocommerce.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,yBAAyB;;;iBAIpC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ // Define Zod schemas for API types
3
+ export const WoocommerceResourceSchema = z.object({
4
+ id: z.string(),
5
+ name: z.string(),
6
+ // Add fields based on API response
7
+ });
8
+ //# sourceMappingURL=woocommerce.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"woocommerce.types.js","sourceRoot":"","sources":["../../src/woocommerce.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,mCAAmC;AAEnC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,mCAAmC;CACpC,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export declare const woocommerceBaseUrlSchema: z.ZodDefault<z.ZodEnum<{
3
+ "https://example.com/wp-json/wc/v3": "https://example.com/wp-json/wc/v3";
4
+ }>>;
5
+ //# sourceMappingURL=woocommerce.variable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"woocommerce.variable.d.ts","sourceRoot":"","sources":["../../src/woocommerce.variable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,wBAAwB;;GAA6F,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import { wireVariable } from '@pikku/core/variable';
3
+ export const woocommerceBaseUrlSchema = z.enum(["https://example.com/wp-json/wc/v3"]).default("https://example.com/wp-json/wc/v3");
4
+ wireVariable({
5
+ name: 'WOOCOMMERCE_BASE_URL',
6
+ displayName: 'WooCommerce Base URL',
7
+ description: 'The base URL for the WooCommerce API.',
8
+ variableId: 'WOOCOMMERCE_BASE_URL',
9
+ schema: woocommerceBaseUrlSchema,
10
+ });
11
+ //# sourceMappingURL=woocommerce.variable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"woocommerce.variable.js","sourceRoot":"","sources":["../../src/woocommerce.variable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAA;AAElI,YAAY,CAAC;IACX,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,uCAAuC;IACpD,UAAU,EAAE,sBAAsB;IAClC,MAAM,EAAE,wBAAwB;CACjC,CAAC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@pikku/addon-woocommerce",
3
+ "version": "0.0.2",
4
+ "type": "module",
5
+ "imports": {
6
+ "#pikku": "./.pikku/pikku-types.gen.ts",
7
+ "#pikku/*": "./.pikku/*"
8
+ },
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/src/index.d.ts",
12
+ "import": "./dist/src/index.js"
13
+ },
14
+ "./.pikku/*": "./dist/.pikku/*",
15
+ "./.pikku/pikku-metadata.gen.json": "./dist/.pikku/pikku-metadata.gen.json",
16
+ "./.pikku/rpc/pikku-rpc-wirings-map.internal.gen.js": {
17
+ "types": "./dist/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts"
18
+ }
19
+ },
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "scripts": {
24
+ "prepublishOnly": "yarn build",
25
+ "prebuild": "pikku all",
26
+ "build": "tsc && cp -r .pikku dist/",
27
+ "pikku": "pikku all"
28
+ },
29
+ "peerDependencies": {
30
+ "@pikku/core": "*",
31
+ "zod": "^4"
32
+ },
33
+ "devDependencies": {
34
+ "@pikku/cli": "*",
35
+ "@pikku/core": "*",
36
+ "typescript": "^5.7.2",
37
+ "zod": "^4"
38
+ }
39
+ }