@typewoo/sdk 3.1.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (457) hide show
  1. package/dist/index.d.ts +1 -2
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -2
  4. package/dist/index.js.map +1 -1
  5. package/dist/lib/configs/sdk.config.d.ts +64 -1
  6. package/dist/lib/configs/sdk.config.d.ts.map +1 -1
  7. package/dist/lib/configs/sdk.config.js +48 -23
  8. package/dist/lib/configs/sdk.config.js.map +1 -1
  9. package/dist/lib/http/http.client.d.ts +5 -0
  10. package/dist/lib/http/http.client.d.ts.map +1 -0
  11. package/dist/lib/http/http.client.js +22 -0
  12. package/dist/lib/http/http.client.js.map +1 -0
  13. package/dist/lib/http/http.d.ts +9 -0
  14. package/dist/lib/http/http.d.ts.map +1 -0
  15. package/dist/lib/http/http.helper.d.ts +27 -0
  16. package/dist/lib/http/http.helper.d.ts.map +1 -0
  17. package/dist/lib/http/http.helper.js +66 -0
  18. package/dist/lib/http/http.helper.js.map +1 -0
  19. package/dist/lib/http/http.js +28 -0
  20. package/dist/lib/http/http.js.map +1 -0
  21. package/dist/lib/http/http.request.d.ts +5 -0
  22. package/dist/lib/http/http.request.d.ts.map +1 -0
  23. package/dist/lib/http/http.request.js +143 -0
  24. package/dist/lib/http/http.request.js.map +1 -0
  25. package/dist/lib/http/index.d.ts +5 -0
  26. package/dist/lib/http/index.d.ts.map +1 -0
  27. package/dist/lib/http/index.js +5 -0
  28. package/dist/lib/http/index.js.map +1 -0
  29. package/dist/lib/interceptors/admin-auth.interceptor.d.ts.map +1 -1
  30. package/dist/lib/interceptors/admin-auth.interceptor.js +1 -1
  31. package/dist/lib/interceptors/admin-auth.interceptor.js.map +1 -1
  32. package/dist/lib/interceptors/cart.token.interceptor.js +1 -1
  33. package/dist/lib/interceptors/cart.token.interceptor.js.map +1 -1
  34. package/dist/lib/interceptors/nonce.interceptor.js +1 -1
  35. package/dist/lib/interceptors/nonce.interceptor.js.map +1 -1
  36. package/dist/lib/interceptors/refresh.token.interceptor.d.ts.map +1 -1
  37. package/dist/lib/interceptors/refresh.token.interceptor.js +4 -2
  38. package/dist/lib/interceptors/refresh.token.interceptor.js.map +1 -1
  39. package/dist/lib/interceptors/token.interceptor.js +1 -1
  40. package/dist/lib/interceptors/token.interceptor.js.map +1 -1
  41. package/dist/lib/sdk.d.ts.map +1 -1
  42. package/dist/lib/sdk.js +5 -5
  43. package/dist/lib/sdk.js.map +1 -1
  44. package/dist/lib/services/admin/coupon.service.d.ts +7 -6
  45. package/dist/lib/services/admin/coupon.service.d.ts.map +1 -1
  46. package/dist/lib/services/admin/coupon.service.js +15 -15
  47. package/dist/lib/services/admin/coupon.service.js.map +1 -1
  48. package/dist/lib/services/admin/customer.service.d.ts +7 -6
  49. package/dist/lib/services/admin/customer.service.d.ts.map +1 -1
  50. package/dist/lib/services/admin/customer.service.js +15 -15
  51. package/dist/lib/services/admin/customer.service.js.map +1 -1
  52. package/dist/lib/services/admin/data.service.d.ts +7 -6
  53. package/dist/lib/services/admin/data.service.d.ts.map +1 -1
  54. package/dist/lib/services/admin/data.service.js +19 -19
  55. package/dist/lib/services/admin/data.service.js.map +1 -1
  56. package/dist/lib/services/admin/order.service.d.ts +21 -20
  57. package/dist/lib/services/admin/order.service.d.ts.map +1 -1
  58. package/dist/lib/services/admin/order.service.js +43 -43
  59. package/dist/lib/services/admin/order.service.js.map +1 -1
  60. package/dist/lib/services/admin/payment-gateway.service.d.ts +4 -3
  61. package/dist/lib/services/admin/payment-gateway.service.d.ts.map +1 -1
  62. package/dist/lib/services/admin/payment-gateway.service.js +9 -9
  63. package/dist/lib/services/admin/payment-gateway.service.js.map +1 -1
  64. package/dist/lib/services/admin/product-attribute-term.service.d.ts +7 -6
  65. package/dist/lib/services/admin/product-attribute-term.service.d.ts.map +1 -1
  66. package/dist/lib/services/admin/product-attribute-term.service.js +15 -15
  67. package/dist/lib/services/admin/product-attribute-term.service.js.map +1 -1
  68. package/dist/lib/services/admin/product-attribute.service.d.ts +7 -6
  69. package/dist/lib/services/admin/product-attribute.service.d.ts.map +1 -1
  70. package/dist/lib/services/admin/product-attribute.service.js +15 -15
  71. package/dist/lib/services/admin/product-attribute.service.js.map +1 -1
  72. package/dist/lib/services/admin/product-brand.service.d.ts +7 -6
  73. package/dist/lib/services/admin/product-brand.service.d.ts.map +1 -1
  74. package/dist/lib/services/admin/product-brand.service.js +15 -15
  75. package/dist/lib/services/admin/product-brand.service.js.map +1 -1
  76. package/dist/lib/services/admin/product-category.service.d.ts +7 -6
  77. package/dist/lib/services/admin/product-category.service.d.ts.map +1 -1
  78. package/dist/lib/services/admin/product-category.service.js +15 -15
  79. package/dist/lib/services/admin/product-category.service.js.map +1 -1
  80. package/dist/lib/services/admin/product-review.service.d.ts +7 -6
  81. package/dist/lib/services/admin/product-review.service.d.ts.map +1 -1
  82. package/dist/lib/services/admin/product-review.service.js +15 -15
  83. package/dist/lib/services/admin/product-review.service.js.map +1 -1
  84. package/dist/lib/services/admin/product-tag.service.d.ts +7 -6
  85. package/dist/lib/services/admin/product-tag.service.d.ts.map +1 -1
  86. package/dist/lib/services/admin/product-tag.service.js +15 -15
  87. package/dist/lib/services/admin/product-tag.service.js.map +1 -1
  88. package/dist/lib/services/admin/product.service.d.ts +15 -14
  89. package/dist/lib/services/admin/product.service.d.ts.map +1 -1
  90. package/dist/lib/services/admin/product.service.js +33 -33
  91. package/dist/lib/services/admin/product.service.js.map +1 -1
  92. package/dist/lib/services/admin/refund.service.d.ts +2 -1
  93. package/dist/lib/services/admin/refund.service.d.ts.map +1 -1
  94. package/dist/lib/services/admin/refund.service.js +5 -5
  95. package/dist/lib/services/admin/refund.service.js.map +1 -1
  96. package/dist/lib/services/admin/report.service.d.ts +11 -10
  97. package/dist/lib/services/admin/report.service.d.ts.map +1 -1
  98. package/dist/lib/services/admin/report.service.js +37 -37
  99. package/dist/lib/services/admin/report.service.js.map +1 -1
  100. package/dist/lib/services/admin/setting.service.d.ts +7 -6
  101. package/dist/lib/services/admin/setting.service.d.ts.map +1 -1
  102. package/dist/lib/services/admin/setting.service.js +13 -13
  103. package/dist/lib/services/admin/setting.service.js.map +1 -1
  104. package/dist/lib/services/admin/shipping-class.service.d.ts +7 -6
  105. package/dist/lib/services/admin/shipping-class.service.d.ts.map +1 -1
  106. package/dist/lib/services/admin/shipping-class.service.js +15 -15
  107. package/dist/lib/services/admin/shipping-class.service.js.map +1 -1
  108. package/dist/lib/services/admin/shipping-method.service.d.ts +3 -2
  109. package/dist/lib/services/admin/shipping-method.service.d.ts.map +1 -1
  110. package/dist/lib/services/admin/shipping-method.service.js +7 -7
  111. package/dist/lib/services/admin/shipping-method.service.js.map +1 -1
  112. package/dist/lib/services/admin/shipping-zone.service.d.ts +13 -12
  113. package/dist/lib/services/admin/shipping-zone.service.d.ts.map +1 -1
  114. package/dist/lib/services/admin/shipping-zone.service.js +29 -29
  115. package/dist/lib/services/admin/shipping-zone.service.js.map +1 -1
  116. package/dist/lib/services/admin/system-status.service.d.ts +2 -1
  117. package/dist/lib/services/admin/system-status.service.d.ts.map +1 -1
  118. package/dist/lib/services/admin/system-status.service.js +3 -3
  119. package/dist/lib/services/admin/system-status.service.js.map +1 -1
  120. package/dist/lib/services/admin/tax.service.d.ts +11 -10
  121. package/dist/lib/services/admin/tax.service.d.ts.map +1 -1
  122. package/dist/lib/services/admin/tax.service.js +23 -23
  123. package/dist/lib/services/admin/tax.service.js.map +1 -1
  124. package/dist/lib/services/admin/webhook.service.d.ts +7 -6
  125. package/dist/lib/services/admin/webhook.service.d.ts.map +1 -1
  126. package/dist/lib/services/admin/webhook.service.js +15 -15
  127. package/dist/lib/services/admin/webhook.service.js.map +1 -1
  128. package/dist/lib/services/api.d.ts +3 -4
  129. package/dist/lib/services/api.d.ts.map +1 -1
  130. package/dist/lib/services/api.js +5 -19
  131. package/dist/lib/services/api.js.map +1 -1
  132. package/dist/lib/services/auth/auth.service.d.ts +7 -7
  133. package/dist/lib/services/auth/auth.service.d.ts.map +1 -1
  134. package/dist/lib/services/auth/auth.service.js +1 -1
  135. package/dist/lib/services/auth/auth.service.js.map +1 -1
  136. package/dist/lib/services/store/batch.service.d.ts +2 -1
  137. package/dist/lib/services/store/batch.service.d.ts.map +1 -1
  138. package/dist/lib/services/store/batch.service.js +2 -3
  139. package/dist/lib/services/store/batch.service.js.map +1 -1
  140. package/dist/lib/services/store/cart.coupon.service.d.ts +6 -5
  141. package/dist/lib/services/store/cart.coupon.service.d.ts.map +1 -1
  142. package/dist/lib/services/store/cart.coupon.service.js +13 -13
  143. package/dist/lib/services/store/cart.coupon.service.js.map +1 -1
  144. package/dist/lib/services/store/cart.extensions.service.d.ts +2 -1
  145. package/dist/lib/services/store/cart.extensions.service.d.ts.map +1 -1
  146. package/dist/lib/services/store/cart.extensions.service.js +2 -3
  147. package/dist/lib/services/store/cart.extensions.service.js.map +1 -1
  148. package/dist/lib/services/store/cart.item.service.d.ts +7 -6
  149. package/dist/lib/services/store/cart.item.service.d.ts.map +1 -1
  150. package/dist/lib/services/store/cart.item.service.js +9 -15
  151. package/dist/lib/services/store/cart.item.service.js.map +1 -1
  152. package/dist/lib/services/store/cart.service.d.ts +9 -8
  153. package/dist/lib/services/store/cart.service.d.ts.map +1 -1
  154. package/dist/lib/services/store/cart.service.js +9 -17
  155. package/dist/lib/services/store/cart.service.js.map +1 -1
  156. package/dist/lib/services/store/checkout.order.service.d.ts +2 -1
  157. package/dist/lib/services/store/checkout.order.service.d.ts.map +1 -1
  158. package/dist/lib/services/store/checkout.order.service.js +2 -3
  159. package/dist/lib/services/store/checkout.order.service.js.map +1 -1
  160. package/dist/lib/services/store/checkout.service.d.ts +4 -3
  161. package/dist/lib/services/store/checkout.service.d.ts.map +1 -1
  162. package/dist/lib/services/store/checkout.service.js +4 -7
  163. package/dist/lib/services/store/checkout.service.js.map +1 -1
  164. package/dist/lib/services/store/order.service.d.ts +2 -1
  165. package/dist/lib/services/store/order.service.d.ts.map +1 -1
  166. package/dist/lib/services/store/order.service.js +2 -3
  167. package/dist/lib/services/store/order.service.js.map +1 -1
  168. package/dist/lib/services/store/product.attribute.service.d.ts +3 -2
  169. package/dist/lib/services/store/product.attribute.service.d.ts.map +1 -1
  170. package/dist/lib/services/store/product.attribute.service.js +7 -7
  171. package/dist/lib/services/store/product.attribute.service.js.map +1 -1
  172. package/dist/lib/services/store/product.attribute.term.service.d.ts +2 -1
  173. package/dist/lib/services/store/product.attribute.term.service.d.ts.map +1 -1
  174. package/dist/lib/services/store/product.attribute.term.service.js +5 -5
  175. package/dist/lib/services/store/product.attribute.term.service.js.map +1 -1
  176. package/dist/lib/services/store/product.brand.service.d.ts +3 -2
  177. package/dist/lib/services/store/product.brand.service.d.ts.map +1 -1
  178. package/dist/lib/services/store/product.brand.service.js +7 -7
  179. package/dist/lib/services/store/product.brand.service.js.map +1 -1
  180. package/dist/lib/services/store/product.category.service.d.ts +3 -2
  181. package/dist/lib/services/store/product.category.service.d.ts.map +1 -1
  182. package/dist/lib/services/store/product.category.service.js +7 -7
  183. package/dist/lib/services/store/product.category.service.js.map +1 -1
  184. package/dist/lib/services/store/product.collection.data.service.d.ts +2 -1
  185. package/dist/lib/services/store/product.collection.data.service.d.ts.map +1 -1
  186. package/dist/lib/services/store/product.collection.data.service.js +3 -3
  187. package/dist/lib/services/store/product.collection.data.service.js.map +1 -1
  188. package/dist/lib/services/store/product.review.service.d.ts +2 -1
  189. package/dist/lib/services/store/product.review.service.d.ts.map +1 -1
  190. package/dist/lib/services/store/product.review.service.js +5 -5
  191. package/dist/lib/services/store/product.review.service.js.map +1 -1
  192. package/dist/lib/services/store/product.service.d.ts +3 -2
  193. package/dist/lib/services/store/product.service.d.ts.map +1 -1
  194. package/dist/lib/services/store/product.service.js +7 -7
  195. package/dist/lib/services/store/product.service.js.map +1 -1
  196. package/dist/lib/services/store/product.tag.service.d.ts +2 -1
  197. package/dist/lib/services/store/product.tag.service.d.ts.map +1 -1
  198. package/dist/lib/services/store/product.tag.service.js +5 -5
  199. package/dist/lib/services/store/product.tag.service.js.map +1 -1
  200. package/dist/lib/storage/auth.storage.d.ts +27 -0
  201. package/dist/lib/storage/auth.storage.d.ts.map +1 -0
  202. package/dist/lib/storage/auth.storage.js +113 -0
  203. package/dist/lib/storage/auth.storage.js.map +1 -0
  204. package/dist/lib/types/admin/attribute.types.d.ts +9 -6
  205. package/dist/lib/types/admin/attribute.types.d.ts.map +1 -1
  206. package/dist/lib/types/admin/attribute.types.js +6 -6
  207. package/dist/lib/types/admin/attribute.types.js.map +1 -1
  208. package/dist/lib/types/admin/coupon.types.d.ts +127 -4
  209. package/dist/lib/types/admin/coupon.types.d.ts.map +1 -1
  210. package/dist/lib/types/admin/coupon.types.js +3 -3
  211. package/dist/lib/types/admin/coupon.types.js.map +1 -1
  212. package/dist/lib/types/admin/customer.types.d.ts +37 -5
  213. package/dist/lib/types/admin/customer.types.d.ts.map +1 -1
  214. package/dist/lib/types/admin/customer.types.js +7 -5
  215. package/dist/lib/types/admin/customer.types.js.map +1 -1
  216. package/dist/lib/types/admin/data.types.d.ts +4 -4
  217. package/dist/lib/types/admin/data.types.js +4 -4
  218. package/dist/lib/types/admin/data.types.js.map +1 -1
  219. package/dist/lib/types/admin/order.types.d.ts +31 -31
  220. package/dist/lib/types/admin/order.types.js +17 -17
  221. package/dist/lib/types/admin/order.types.js.map +1 -1
  222. package/dist/lib/types/admin/payment-gateway.types.d.ts +3 -3
  223. package/dist/lib/types/admin/payment-gateway.types.js +3 -3
  224. package/dist/lib/types/admin/payment-gateway.types.js.map +1 -1
  225. package/dist/lib/types/admin/product-brand.types.d.ts +6 -3
  226. package/dist/lib/types/admin/product-brand.types.d.ts.map +1 -1
  227. package/dist/lib/types/admin/product-brand.types.js +3 -3
  228. package/dist/lib/types/admin/product-brand.types.js.map +1 -1
  229. package/dist/lib/types/admin/product-review.types.d.ts +4 -4
  230. package/dist/lib/types/admin/product-review.types.js +3 -3
  231. package/dist/lib/types/admin/product-review.types.js.map +1 -1
  232. package/dist/lib/types/admin/product.types.d.ts +24 -23
  233. package/dist/lib/types/admin/product.types.d.ts.map +1 -1
  234. package/dist/lib/types/admin/product.types.js +12 -11
  235. package/dist/lib/types/admin/product.types.js.map +1 -1
  236. package/dist/lib/types/admin/refund.types.d.ts +12 -12
  237. package/dist/lib/types/admin/refund.types.js +7 -7
  238. package/dist/lib/types/admin/refund.types.js.map +1 -1
  239. package/dist/lib/types/admin/report.types.d.ts +11 -11
  240. package/dist/lib/types/admin/report.types.js +7 -7
  241. package/dist/lib/types/admin/report.types.js.map +1 -1
  242. package/dist/lib/types/admin/setting.types.d.ts +3 -3
  243. package/dist/lib/types/admin/setting.types.js +3 -3
  244. package/dist/lib/types/admin/setting.types.js.map +1 -1
  245. package/dist/lib/types/admin/shipping-method.types.d.ts +2 -2
  246. package/dist/lib/types/admin/shipping-method.types.js +2 -2
  247. package/dist/lib/types/admin/shipping-method.types.js.map +1 -1
  248. package/dist/lib/types/admin/shipping-zone.types.d.ts +8 -8
  249. package/dist/lib/types/admin/shipping-zone.types.js +8 -8
  250. package/dist/lib/types/admin/shipping-zone.types.js.map +1 -1
  251. package/dist/lib/types/admin/system-status.types.d.ts +2 -2
  252. package/dist/lib/types/admin/system-status.types.js +2 -2
  253. package/dist/lib/types/admin/system-status.types.js.map +1 -1
  254. package/dist/lib/types/admin/tax.types.d.ts +7 -7
  255. package/dist/lib/types/admin/tax.types.js +6 -6
  256. package/dist/lib/types/admin/tax.types.js.map +1 -1
  257. package/dist/lib/types/admin/taxonomy.types.d.ts +9 -9
  258. package/dist/lib/types/admin/taxonomy.types.js +9 -9
  259. package/dist/lib/types/admin/taxonomy.types.js.map +1 -1
  260. package/dist/lib/types/admin/webhook.types.d.ts +4 -4
  261. package/dist/lib/types/admin/webhook.types.js +3 -3
  262. package/dist/lib/types/admin/webhook.types.js.map +1 -1
  263. package/dist/lib/types/api.d.ts +6 -1
  264. package/dist/lib/types/api.d.ts.map +1 -1
  265. package/dist/lib/types/auth/one-time-token/auth.one.time.token.request.d.ts +1 -1
  266. package/dist/lib/types/auth/one-time-token/auth.one.time.token.request.js +1 -1
  267. package/dist/lib/types/auth/one-time-token/auth.one.time.token.request.js.map +1 -1
  268. package/dist/lib/types/auth/one-time-token/auth.one.time.token.response.d.ts +1 -1
  269. package/dist/lib/types/auth/one-time-token/auth.one.time.token.response.js +1 -1
  270. package/dist/lib/types/auth/one-time-token/auth.one.time.token.response.js.map +1 -1
  271. package/dist/lib/types/auth/refresh/auth.refresh.request.d.ts +1 -1
  272. package/dist/lib/types/auth/refresh/auth.refresh.request.js +1 -1
  273. package/dist/lib/types/auth/refresh/auth.refresh.request.js.map +1 -1
  274. package/dist/lib/types/auth/revoke/auth.revoke.request.d.ts +1 -1
  275. package/dist/lib/types/auth/revoke/auth.revoke.request.js +1 -1
  276. package/dist/lib/types/auth/revoke/auth.revoke.request.js.map +1 -1
  277. package/dist/lib/types/auth/revoke/auth.revoke.response.d.ts +1 -1
  278. package/dist/lib/types/auth/revoke/auth.revoke.response.js +1 -1
  279. package/dist/lib/types/auth/revoke/auth.revoke.response.js.map +1 -1
  280. package/dist/lib/types/auth/status/auth.status.response.d.ts +1 -1
  281. package/dist/lib/types/auth/status/auth.status.response.js +1 -1
  282. package/dist/lib/types/auth/status/auth.status.response.js.map +1 -1
  283. package/dist/lib/types/auth/token/auth.token.request.d.ts +1 -1
  284. package/dist/lib/types/auth/token/auth.token.request.js +1 -1
  285. package/dist/lib/types/auth/token/auth.token.request.js.map +1 -1
  286. package/dist/lib/types/auth/token/auth.token.response.d.ts +2 -2
  287. package/dist/lib/types/auth/token/auth.token.response.js +2 -2
  288. package/dist/lib/types/auth/token/auth.token.response.js.map +1 -1
  289. package/dist/lib/types/auth/validate/auth.validate.response.d.ts +2 -2
  290. package/dist/lib/types/auth/validate/auth.validate.response.js +2 -2
  291. package/dist/lib/types/auth/validate/auth.validate.response.js.map +1 -1
  292. package/dist/lib/types/request.d.ts +18 -0
  293. package/dist/lib/types/request.d.ts.map +1 -0
  294. package/dist/lib/types/request.js +2 -0
  295. package/dist/lib/types/request.js.map +1 -0
  296. package/dist/lib/types/sdk.state.d.ts +19 -19
  297. package/dist/lib/types/store/batch/batch.request.d.ts +38 -5
  298. package/dist/lib/types/store/batch/batch.request.d.ts.map +1 -1
  299. package/dist/lib/types/store/batch/batch.request.js +2 -2
  300. package/dist/lib/types/store/batch/batch.request.js.map +1 -1
  301. package/dist/lib/types/store/batch/batch.response.d.ts +24 -3
  302. package/dist/lib/types/store/batch/batch.response.d.ts.map +1 -1
  303. package/dist/lib/types/store/batch/batch.response.js +2 -2
  304. package/dist/lib/types/store/batch/batch.response.js.map +1 -1
  305. package/dist/lib/types/store/cart/cart.billing.response.d.ts +1 -1
  306. package/dist/lib/types/store/cart/cart.billing.response.js +1 -1
  307. package/dist/lib/types/store/cart/cart.billing.response.js.map +1 -1
  308. package/dist/lib/types/store/cart/cart.customer.request.d.ts +3 -3
  309. package/dist/lib/types/store/cart/cart.customer.request.js +3 -3
  310. package/dist/lib/types/store/cart/cart.customer.request.js.map +1 -1
  311. package/dist/lib/types/store/cart/cart.response.d.ts +19 -19
  312. package/dist/lib/types/store/cart/cart.response.js +1 -1
  313. package/dist/lib/types/store/cart/cart.response.js.map +1 -1
  314. package/dist/lib/types/store/cart/cart.shipping.rate.response.d.ts +5 -5
  315. package/dist/lib/types/store/cart/cart.shipping.rate.response.js +5 -5
  316. package/dist/lib/types/store/cart/cart.shipping.rate.response.js.map +1 -1
  317. package/dist/lib/types/store/cart/cart.shipping.response.d.ts +1 -1
  318. package/dist/lib/types/store/cart/cart.shipping.response.js +1 -1
  319. package/dist/lib/types/store/cart/cart.shipping.response.js.map +1 -1
  320. package/dist/lib/types/store/cart/cart.total.response.d.ts +2 -2
  321. package/dist/lib/types/store/cart/cart.total.response.js +2 -2
  322. package/dist/lib/types/store/cart/cart.total.response.js.map +1 -1
  323. package/dist/lib/types/store/cart-coupon/cart.coupon.response.d.ts +2 -2
  324. package/dist/lib/types/store/cart-coupon/cart.coupon.response.js +1 -1
  325. package/dist/lib/types/store/cart-coupon/cart.coupon.response.js.map +1 -1
  326. package/dist/lib/types/store/cart-coupon/cart.coupon.total.response.d.ts +1 -1
  327. package/dist/lib/types/store/cart-coupon/cart.coupon.total.response.js +1 -1
  328. package/dist/lib/types/store/cart-coupon/cart.coupon.total.response.js.map +1 -1
  329. package/dist/lib/types/store/cart-extensions/cart.extensions.request.d.ts +7 -1
  330. package/dist/lib/types/store/cart-extensions/cart.extensions.request.d.ts.map +1 -1
  331. package/dist/lib/types/store/cart-extensions/cart.extensions.request.js +1 -1
  332. package/dist/lib/types/store/cart-extensions/cart.extensions.request.js.map +1 -1
  333. package/dist/lib/types/store/cart-extensions/cart.extensions.response.d.ts +13 -1
  334. package/dist/lib/types/store/cart-extensions/cart.extensions.response.d.ts.map +1 -1
  335. package/dist/lib/types/store/cart-extensions/cart.extensions.response.js +1 -1
  336. package/dist/lib/types/store/cart-extensions/cart.extensions.response.js.map +1 -1
  337. package/dist/lib/types/store/cart-item/cart.item.add.request.d.ts +10 -1
  338. package/dist/lib/types/store/cart-item/cart.item.add.request.d.ts.map +1 -1
  339. package/dist/lib/types/store/cart-item/cart.item.add.request.js +1 -1
  340. package/dist/lib/types/store/cart-item/cart.item.add.request.js.map +1 -1
  341. package/dist/lib/types/store/cart-item/cart.item.edit.request.d.ts +7 -1
  342. package/dist/lib/types/store/cart-item/cart.item.edit.request.d.ts.map +1 -1
  343. package/dist/lib/types/store/cart-item/cart.item.edit.request.js +1 -1
  344. package/dist/lib/types/store/cart-item/cart.item.edit.request.js.map +1 -1
  345. package/dist/lib/types/store/cart-item/cart.item.price.response.d.ts +2 -2
  346. package/dist/lib/types/store/cart-item/cart.item.price.response.js +2 -2
  347. package/dist/lib/types/store/cart-item/cart.item.price.response.js.map +1 -1
  348. package/dist/lib/types/store/cart-item/cart.item.quantity.limits.response.d.ts +1 -1
  349. package/dist/lib/types/store/cart-item/cart.item.quantity.limits.response.js +1 -1
  350. package/dist/lib/types/store/cart-item/cart.item.quantity.limits.response.js.map +1 -1
  351. package/dist/lib/types/store/cart-item/cart.item.response.d.ts +7 -7
  352. package/dist/lib/types/store/cart-item/cart.item.response.js +1 -1
  353. package/dist/lib/types/store/cart-item/cart.item.response.js.map +1 -1
  354. package/dist/lib/types/store/cart-item/cart.item.total.response.d.ts +1 -1
  355. package/dist/lib/types/store/cart-item/cart.item.total.response.js +1 -1
  356. package/dist/lib/types/store/cart-item/cart.item.total.response.js.map +1 -1
  357. package/dist/lib/types/store/cart-item/cart.item.variation.response.d.ts +1 -1
  358. package/dist/lib/types/store/cart-item/cart.item.variation.response.js +1 -1
  359. package/dist/lib/types/store/cart-item/cart.item.variation.response.js.map +1 -1
  360. package/dist/lib/types/store/checkout/checkout.billing.response.d.ts +1 -1
  361. package/dist/lib/types/store/checkout/checkout.billing.response.js +1 -1
  362. package/dist/lib/types/store/checkout/checkout.billing.response.js.map +1 -1
  363. package/dist/lib/types/store/checkout/checkout.create.request.d.ts +22 -4
  364. package/dist/lib/types/store/checkout/checkout.create.request.d.ts.map +1 -1
  365. package/dist/lib/types/store/checkout/checkout.create.request.js +2 -2
  366. package/dist/lib/types/store/checkout/checkout.create.request.js.map +1 -1
  367. package/dist/lib/types/store/checkout/checkout.response.d.ts +4 -4
  368. package/dist/lib/types/store/checkout/checkout.response.js +2 -2
  369. package/dist/lib/types/store/checkout/checkout.response.js.map +1 -1
  370. package/dist/lib/types/store/checkout/checkout.shipping.d.ts +1 -1
  371. package/dist/lib/types/store/checkout/checkout.shipping.js +1 -1
  372. package/dist/lib/types/store/checkout/checkout.shipping.js.map +1 -1
  373. package/dist/lib/types/store/checkout/checkout.update.request.d.ts +10 -1
  374. package/dist/lib/types/store/checkout/checkout.update.request.d.ts.map +1 -1
  375. package/dist/lib/types/store/checkout/checkout.update.request.js +1 -1
  376. package/dist/lib/types/store/checkout/checkout.update.request.js.map +1 -1
  377. package/dist/lib/types/store/image.response.d.ts +1 -1
  378. package/dist/lib/types/store/image.response.js +1 -1
  379. package/dist/lib/types/store/image.response.js.map +1 -1
  380. package/dist/lib/types/store/order/order.billing.response.d.ts +1 -1
  381. package/dist/lib/types/store/order/order.billing.response.js +1 -1
  382. package/dist/lib/types/store/order/order.billing.response.js.map +1 -1
  383. package/dist/lib/types/store/order/order.coupon.response.d.ts +2 -2
  384. package/dist/lib/types/store/order/order.coupon.response.js +2 -2
  385. package/dist/lib/types/store/order/order.coupon.response.js.map +1 -1
  386. package/dist/lib/types/store/order/order.request.d.ts +22 -4
  387. package/dist/lib/types/store/order/order.request.d.ts.map +1 -1
  388. package/dist/lib/types/store/order/order.request.js +2 -2
  389. package/dist/lib/types/store/order/order.request.js.map +1 -1
  390. package/dist/lib/types/store/order/order.response.d.ts +13 -13
  391. package/dist/lib/types/store/order/order.response.js +1 -1
  392. package/dist/lib/types/store/order/order.response.js.map +1 -1
  393. package/dist/lib/types/store/order/order.shipping.response.d.ts +1 -1
  394. package/dist/lib/types/store/order/order.shipping.response.js +1 -1
  395. package/dist/lib/types/store/order/order.shipping.response.js.map +1 -1
  396. package/dist/lib/types/store/order/order.total.response.d.ts +1 -1
  397. package/dist/lib/types/store/order/order.total.response.js +1 -1
  398. package/dist/lib/types/store/order/order.total.response.js.map +1 -1
  399. package/dist/lib/types/store/product/product.price.response.d.ts +1 -1
  400. package/dist/lib/types/store/product/product.price.response.js +1 -1
  401. package/dist/lib/types/store/product/product.price.response.js.map +1 -1
  402. package/dist/lib/types/store/product/product.request.d.ts +1 -1
  403. package/dist/lib/types/store/product/product.request.js +1 -1
  404. package/dist/lib/types/store/product/product.response.d.ts +8 -8
  405. package/dist/lib/types/store/product/product.response.js +6 -6
  406. package/dist/lib/types/store/product/product.response.js.map +1 -1
  407. package/dist/lib/types/store/product-attribute/product.attribute.response.d.ts +1 -1
  408. package/dist/lib/types/store/product-attribute/product.attribute.response.js +1 -1
  409. package/dist/lib/types/store/product-attribute/product.attribute.response.js.map +1 -1
  410. package/dist/lib/types/store/product-attribute-term/product.attribute.term.request.d.ts +12 -1
  411. package/dist/lib/types/store/product-attribute-term/product.attribute.term.request.d.ts.map +1 -1
  412. package/dist/lib/types/store/product-attribute-term/product.attribute.term.request.js +2 -2
  413. package/dist/lib/types/store/product-attribute-term/product.attribute.term.request.js.map +1 -1
  414. package/dist/lib/types/store/product-attribute-term/product.attribute.term.response.d.ts +1 -1
  415. package/dist/lib/types/store/product-attribute-term/product.attribute.term.response.js +1 -1
  416. package/dist/lib/types/store/product-attribute-term/product.attribute.term.response.js.map +1 -1
  417. package/dist/lib/types/store/product-brand/product.brand.response.d.ts +2 -2
  418. package/dist/lib/types/store/product-brand/product.brand.response.js +1 -1
  419. package/dist/lib/types/store/product-brand/product.brand.response.js.map +1 -1
  420. package/dist/lib/types/store/product-category/product.category.response.d.ts +2 -2
  421. package/dist/lib/types/store/product-category/product.category.response.js +1 -1
  422. package/dist/lib/types/store/product-category/product.category.response.js.map +1 -1
  423. package/dist/lib/types/store/product-collection-data/product.collection.data.attribute.counts.response.d.ts +1 -1
  424. package/dist/lib/types/store/product-collection-data/product.collection.data.attribute.counts.response.d.ts.map +1 -1
  425. package/dist/lib/types/store/product-collection-data/product.collection.data.attribute.counts.response.js +1 -1
  426. package/dist/lib/types/store/product-collection-data/product.collection.data.attribute.counts.response.js.map +1 -1
  427. package/dist/lib/types/store/product-collection-data/product.collection.data.price.range.response.d.ts +1 -1
  428. package/dist/lib/types/store/product-collection-data/product.collection.data.price.range.response.js +1 -1
  429. package/dist/lib/types/store/product-collection-data/product.collection.data.price.range.response.js.map +1 -1
  430. package/dist/lib/types/store/product-collection-data/product.collection.data.rating.counts.response.d.ts +1 -1
  431. package/dist/lib/types/store/product-collection-data/product.collection.data.rating.counts.response.js +1 -1
  432. package/dist/lib/types/store/product-collection-data/product.collection.data.rating.counts.response.js.map +1 -1
  433. package/dist/lib/types/store/product-collection-data/product.collection.data.request.d.ts +24 -2
  434. package/dist/lib/types/store/product-collection-data/product.collection.data.request.d.ts.map +1 -1
  435. package/dist/lib/types/store/product-collection-data/product.collection.data.request.js +2 -2
  436. package/dist/lib/types/store/product-collection-data/product.collection.data.request.js.map +1 -1
  437. package/dist/lib/types/store/product-collection-data/product.collection.data.response.d.ts +5 -5
  438. package/dist/lib/types/store/product-collection-data/product.collection.data.response.js +1 -1
  439. package/dist/lib/types/store/product-collection-data/product.collection.data.response.js.map +1 -1
  440. package/dist/lib/types/store/product-collection-data/product.collection.data.taxonomy.counts.response.d.ts +1 -1
  441. package/dist/lib/types/store/product-collection-data/product.collection.data.taxonomy.counts.response.js +1 -1
  442. package/dist/lib/types/store/product-collection-data/product.collection.data.taxonomy.counts.response.js.map +1 -1
  443. package/dist/lib/types/store/product-review/product.review.response.d.ts +2 -2
  444. package/dist/lib/types/store/product-review/product.review.response.js +1 -1
  445. package/dist/lib/types/store/product-review/product.review.response.js.map +1 -1
  446. package/dist/lib/types/store/product-tag/product.tag.response.d.ts +1 -1
  447. package/dist/lib/types/store/product-tag/product.tag.response.js +1 -1
  448. package/dist/lib/types/store/product-tag/product.tag.response.js.map +1 -1
  449. package/dist/lib/utilities/axios.utility.d.ts +9 -7
  450. package/dist/lib/utilities/axios.utility.d.ts.map +1 -1
  451. package/dist/lib/utilities/axios.utility.js +155 -24
  452. package/dist/lib/utilities/axios.utility.js.map +1 -1
  453. package/dist/lib/utilities/common.d.ts +3 -9
  454. package/dist/lib/utilities/common.d.ts.map +1 -1
  455. package/dist/lib/utilities/common.js +16 -4
  456. package/dist/lib/utilities/common.js.map +1 -1
  457. package/package.json +1 -1
@@ -2,7 +2,7 @@ import { __awaiter } from "tslib";
2
2
  import { extractPagination, } from '../../utilities/common.js';
3
3
  import * as qs from 'qs';
4
4
  import { BaseService } from '../base.service.js';
5
- import { doGet } from '../../utilities/axios.utility.js';
5
+ import { doGet } from '../../http/http.js';
6
6
  /**
7
7
  * Products API
8
8
  *
@@ -18,7 +18,7 @@ export class ProductService extends BaseService {
18
18
  * @param params
19
19
  * @returns
20
20
  */
21
- list(params) {
21
+ list(params, options) {
22
22
  return __awaiter(this, void 0, void 0, function* () {
23
23
  var _a, _b;
24
24
  let unstable_tax = undefined;
@@ -41,9 +41,9 @@ export class ProductService extends BaseService {
41
41
  }
42
42
  const query = qs.stringify(Object.assign(Object.assign({}, params), { unstable_tax, unstable_tax_operator }), { encode: false });
43
43
  const url = `/${this.endpoint}?${query}`;
44
- const { data, error, headers } = yield doGet(url);
45
- const { total, totalPages, link } = extractPagination(headers);
46
- return { data, error, total, totalPages, link, headers };
44
+ const { data, error, headers } = yield doGet(url, options);
45
+ const pagination = extractPagination(headers);
46
+ return { data, error, pagination, headers };
47
47
  });
48
48
  }
49
49
  /**
@@ -51,10 +51,10 @@ export class ProductService extends BaseService {
51
51
  * @param params
52
52
  * @returns
53
53
  */
54
- single(params) {
54
+ single(params, options) {
55
55
  return __awaiter(this, void 0, void 0, function* () {
56
56
  const url = `/${this.endpoint}/${params.id || params.slug}`;
57
- const { data, error } = yield doGet(url);
57
+ const { data, error } = yield doGet(url, options);
58
58
  return { data, error };
59
59
  });
60
60
  }
@@ -1 +1 @@
1
- {"version":3,"file":"product.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/product.service.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,GAElB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAIzD;;;;GAIG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAA/C;;QACmB,aAAQ,GAAG,8BAA8B,CAAC;IAqD7D,CAAC;IAnDC;;;;OAIG;IACG,IAAI,CACR,MAAuB;;;YAEvB,IAAI,YAAY,GAAuB,SAAS,CAAC;YACjD,IAAI,qBAAqB,GAAuB,SAAS,CAAC;YAC1D,IAAI,MAAM,I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,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QAC3D,CAAC;KAAA;IAED;;;;OAIG;IACG,MAAM,CACV,MAAuD;;YAEvD,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,IAAI,MAAM,CAAC,EAAE,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YAC5D,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,KAAK,CAAkB,GAAG,CAAC,CAAC;YAC1D,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACzB,CAAC;KAAA;CACF"}
1
+ {"version":3,"file":"product.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/product.service.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,GAElB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAK3C;;;;GAIG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAA/C;;QACmB,aAAQ,GAAG,8BAA8B,CAAC;IA0D7D,CAAC;IAxDC;;;;OAIG;IACG,IAAI,CACR,MAAuB,EACvB,OAAwB;;;YAExB,IAAI,YAAY,GAAuB,SAAS,CAAC;YACjD,IAAI,qBAAqB,GAAuB,SAAS,CAAC;YAC1D,IAAI,MAAM,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;gBACpC,MAAA,MAAM,CAAC,cAAc,0CAAE,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;oBACtC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;wBAChC,YAAY,IAAI,iBAAiB,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;oBACtD,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;gBACH,MAA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A;CACF"}
@@ -1,6 +1,7 @@
1
1
  import { BaseService } from '../base.service.js';
2
2
  import { ApiPaginationResult } from '../../types/api.js';
3
3
  import { ProductTagRequest, ProductTagResponse } from '../../types/index.js';
4
+ import { RequestOptions } from '../../types/request.js';
4
5
  /**
5
6
  * Product Tags API
6
7
  */
@@ -11,6 +12,6 @@ export declare class ProductTagService extends BaseService {
11
12
  * @param params
12
13
  * @returns
13
14
  */
14
- list(params?: ProductTagRequest): Promise<ApiPaginationResult<ProductTagResponse[]>>;
15
+ list(params?: ProductTagRequest, options?: RequestOptions): Promise<ApiPaginationResult<ProductTagResponse[]>>;
15
16
  }
16
17
  //# sourceMappingURL=product.tag.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"product.tag.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/store/product.tag.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE7E;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAuC;IAEhE;;;;OAIG;IACG,IAAI,CACR,MAAM,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,CAAC,CAAC;CAQtD"}
1
+ {"version":3,"file":"product.tag.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/store/product.tag.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,WAAW;IAChD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAuC;IAEhE;;;;OAIG;IACG,IAAI,CACR,MAAM,CAAC,EAAE,iBAAiB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,CAAC,CAAC;CAWtD"}
@@ -1,7 +1,7 @@
1
1
  import { __awaiter } from "tslib";
2
2
  import * as qs from 'qs';
3
3
  import { BaseService } from '../base.service.js';
4
- import { doGet } from '../../utilities/axios.utility.js';
4
+ import { doGet } from '../../http/http.js';
5
5
  import { extractPagination } from '../../utilities/common.js';
6
6
  /**
7
7
  * Product Tags API
@@ -16,13 +16,13 @@ export class ProductTagService extends BaseService {
16
16
  * @param params
17
17
  * @returns
18
18
  */
19
- list(params) {
19
+ list(params, options) {
20
20
  return __awaiter(this, void 0, void 0, function* () {
21
21
  const query = qs.stringify(params);
22
22
  const url = `/${this.endpoint}?${query}`;
23
- const { data, error, headers } = yield doGet(url);
24
- const { total, totalPages, link } = extractPagination(headers);
25
- return { data, error, total, totalPages, link };
23
+ const { data, error, headers } = yield doGet(url, options);
24
+ const pagination = extractPagination(headers);
25
+ return { data, error, pagination };
26
26
  });
27
27
  }
28
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"product.tag.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/product.tag.service.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAI9D;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAAlD;;QACmB,aAAQ,GAAG,mCAAmC,CAAC;IAiBlE,CAAC;IAfC;;;;OAIG;IACG,IAAI,CACR,MAA0B;;YAE1B,MAAM,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACnC,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,IAAI,KAAK,EAAE,CAAC;YACzC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,KAAK,CAAuB,GAAG,CAAC,CAAC;YAExE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;YAC/D,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;QAClD,CAAC;KAAA;CACF"}
1
+ {"version":3,"file":"product.tag.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/product.tag.service.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAK9D;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAAlD;;QACmB,aAAQ,GAAG,mCAAmC,CAAC;IAqBlE,CAAC;IAnBC;;;;OAIG;IACG,IAAI,CACR,MAA0B,EAC1B,OAAwB;;YAExB,MAAM,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACnC,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,IAAI,KAAK,EAAE,CAAC;YACzC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,KAAK,CAC1C,GAAG,EACH,OAAO,CACR,CAAC;YAEF,MAAM,UAAU,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;YAC9C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;QACrC,CAAC;KAAA;CACF"}
@@ -0,0 +1,27 @@
1
+ export type StorageType = 'localstorage' | 'sessionstorage' | 'memory';
2
+ export interface StorageProvider {
3
+ type?: StorageType;
4
+ get: () => Promise<string | null>;
5
+ set: (value: string) => Promise<void>;
6
+ clear: () => Promise<void>;
7
+ }
8
+ /**
9
+ * In-memory storage provider. Useful for SSR/Node.js environments
10
+ * or when browser storage is not available.
11
+ * @param _key - Unused, but kept for API consistency with other providers.
12
+ */
13
+ export declare const memoryStorageProvider: (_key?: string) => StorageProvider;
14
+ /**
15
+ * localStorage provider with SSR fallback to in-memory storage.
16
+ */
17
+ export declare const localStorageProvider: (key: string) => StorageProvider;
18
+ /**
19
+ * sessionStorage provider with SSR fallback to in-memory storage.
20
+ */
21
+ export declare const sessionStorageProvider: (key: string) => StorageProvider;
22
+ export declare const storageProviders: {
23
+ localstorage: (key: string) => StorageProvider;
24
+ sessionstorage: (key: string) => StorageProvider;
25
+ memory: (_key?: string) => StorageProvider;
26
+ };
27
+ //# sourceMappingURL=auth.storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.storage.d.ts","sourceRoot":"","sources":["../../../src/lib/storage/auth.storage.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,gBAAgB,GAAG,QAAQ,CAAC;AACvE,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,GAAG,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAClC,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AA8BD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,MAAM,KAAG,eAcrD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,MAAM,KAAG,eA2BlD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,KAAK,MAAM,KAAG,eA2BpD,CAAC;AAEF,eAAO,MAAM,gBAAgB;wBA7Da,MAAM,KAAG,eAAe;0BAgCtB,MAAM,KAAG,eAAe;oBAnDvB,MAAM,KAAG,eAAe;CAoFpE,CAAC"}
@@ -0,0 +1,113 @@
1
+ import { __awaiter } from "tslib";
2
+ /**
3
+ * Check if we're in a browser environment with localStorage available.
4
+ */
5
+ const hasLocalStorage = () => {
6
+ try {
7
+ return (typeof window !== 'undefined' &&
8
+ typeof window.localStorage !== 'undefined');
9
+ }
10
+ catch (_a) {
11
+ return false;
12
+ }
13
+ };
14
+ /**
15
+ * Check if we're in a browser environment with sessionStorage available.
16
+ */
17
+ const hasSessionStorage = () => {
18
+ try {
19
+ return (typeof window !== 'undefined' &&
20
+ typeof window.sessionStorage !== 'undefined');
21
+ }
22
+ catch (_a) {
23
+ return false;
24
+ }
25
+ };
26
+ /**
27
+ * In-memory storage provider. Useful for SSR/Node.js environments
28
+ * or when browser storage is not available.
29
+ * @param _key - Unused, but kept for API consistency with other providers.
30
+ */
31
+ export const memoryStorageProvider = (_key) => {
32
+ let value = null;
33
+ return {
34
+ type: 'memory',
35
+ get: () => Promise.resolve(value),
36
+ set: (v) => {
37
+ value = v;
38
+ return Promise.resolve();
39
+ },
40
+ clear: () => {
41
+ value = null;
42
+ return Promise.resolve();
43
+ },
44
+ };
45
+ };
46
+ /**
47
+ * localStorage provider with SSR fallback to in-memory storage.
48
+ */
49
+ export const localStorageProvider = (key) => {
50
+ if (!hasLocalStorage()) {
51
+ console.warn(`[Typewoo] localStorage is not available (SSR/Node.js environment). Falling back to in-memory storage for key "${key}". Data will not persist across page reloads.`);
52
+ return memoryStorageProvider();
53
+ }
54
+ return {
55
+ type: 'localstorage',
56
+ get: () => Promise.resolve(localStorage.getItem(key)),
57
+ set: (value) => __awaiter(void 0, void 0, void 0, function* () {
58
+ try {
59
+ localStorage.setItem(key, value);
60
+ }
61
+ catch (error) {
62
+ console.error(`[Typewoo] Failed to save to localStorage:`, error);
63
+ throw error;
64
+ }
65
+ }),
66
+ clear: () => __awaiter(void 0, void 0, void 0, function* () {
67
+ try {
68
+ localStorage.removeItem(key);
69
+ }
70
+ catch (error) {
71
+ console.error(`[Typewoo] Failed to clear localStorage:`, error);
72
+ throw error;
73
+ }
74
+ }),
75
+ };
76
+ };
77
+ /**
78
+ * sessionStorage provider with SSR fallback to in-memory storage.
79
+ */
80
+ export const sessionStorageProvider = (key) => {
81
+ if (!hasSessionStorage()) {
82
+ console.warn(`[Typewoo] sessionStorage is not available (SSR/Node.js environment). Falling back to in-memory storage for key "${key}". Data will not persist across page reloads.`);
83
+ return memoryStorageProvider();
84
+ }
85
+ return {
86
+ type: 'sessionstorage',
87
+ get: () => Promise.resolve(sessionStorage.getItem(key)),
88
+ set: (value) => __awaiter(void 0, void 0, void 0, function* () {
89
+ try {
90
+ sessionStorage.setItem(key, value);
91
+ }
92
+ catch (error) {
93
+ console.error(`[Typewoo] Failed to save to sessionStorage:`, error);
94
+ throw error;
95
+ }
96
+ }),
97
+ clear: () => __awaiter(void 0, void 0, void 0, function* () {
98
+ try {
99
+ sessionStorage.removeItem(key);
100
+ }
101
+ catch (error) {
102
+ console.error(`[Typewoo] Failed to clear sessionStorage:`, error);
103
+ throw error;
104
+ }
105
+ }),
106
+ };
107
+ };
108
+ export const storageProviders = {
109
+ localstorage: localStorageProvider,
110
+ sessionstorage: sessionStorageProvider,
111
+ memory: memoryStorageProvider,
112
+ };
113
+ //# sourceMappingURL=auth.storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.storage.js","sourceRoot":"","sources":["../../../src/lib/storage/auth.storage.ts"],"names":[],"mappings":";AAQA;;GAEG;AACH,MAAM,eAAe,GAAG,GAAY,EAAE;IACpC,IAAI,CAAC;QACH,OAAO,CACL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;QACD,KAAK,EAAE,GAAS,EAAE;YAChB,IAAI,CAAC;gBACH,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YACjC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,2CAA2C,EAAE,KAAK,CAAC,CAAC;gBAClE,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC,CAAA;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,YAAY,EAAE,oBAAoB;IAClC,cAAc,EAAE,sBAAsB;IACtC,MAAM,EAAE,qBAAqB;CAC9B,CAAC"}
@@ -24,7 +24,7 @@ export declare const AdminProductAttributeSchema: z.ZodObject<{
24
24
  href: z.ZodString;
25
25
  }, z.core.$strip>>;
26
26
  }, z.core.$strip>>;
27
- }, z.core.$strip>;
27
+ }, z.core.$loose>;
28
28
  export type AdminProductAttribute = z.infer<typeof AdminProductAttributeSchema>;
29
29
  /**
30
30
  * Product attribute request parameters for creating/updating
@@ -42,17 +42,20 @@ export declare const AdminProductAttributeRequestSchema: z.ZodObject<{
42
42
  name_num: "name_num";
43
43
  }>>;
44
44
  has_archives: z.ZodOptional<z.ZodBoolean>;
45
- }, z.core.$strip>;
45
+ }, z.core.$loose>;
46
46
  export type AdminProductAttributeRequest = z.infer<typeof AdminProductAttributeRequestSchema>;
47
47
  /**
48
48
  * Product attribute query parameters for listing
49
49
  */
50
50
  export declare const AdminProductAttributeQueryParamsSchema: z.ZodObject<{
51
+ /**
52
+ * Scope under which the request is made; determines fields present in response. Options: `view` and `edit`. Default is `view`.
53
+ */
51
54
  context: z.ZodOptional<z.ZodEnum<{
52
55
  view: "view";
53
56
  edit: "edit";
54
57
  }>>;
55
- }, z.core.$strip>;
58
+ }, z.core.$loose>;
56
59
  export type AdminProductAttributeQueryParams = z.infer<typeof AdminProductAttributeQueryParamsSchema>;
57
60
  /**
58
61
  * WooCommerce REST API Product Attribute Term Response
@@ -75,7 +78,7 @@ export declare const AdminProductAttributeTermSchema: z.ZodObject<{
75
78
  href: z.ZodString;
76
79
  }, z.core.$strip>>;
77
80
  }, z.core.$strip>>;
78
- }, z.core.$strip>;
81
+ }, z.core.$loose>;
79
82
  export type AdminProductAttributeTerm = z.infer<typeof AdminProductAttributeTermSchema>;
80
83
  /**
81
84
  * Product attribute term request parameters for creating/updating
@@ -85,7 +88,7 @@ export declare const AdminProductAttributeTermRequestSchema: z.ZodObject<{
85
88
  slug: z.ZodOptional<z.ZodString>;
86
89
  description: z.ZodOptional<z.ZodString>;
87
90
  menu_order: z.ZodOptional<z.ZodNumber>;
88
- }, z.core.$strip>;
91
+ }, z.core.$loose>;
89
92
  export type AdminProductAttributeTermRequest = z.infer<typeof AdminProductAttributeTermRequestSchema>;
90
93
  /**
91
94
  * Product attribute term query parameters for listing
@@ -118,6 +121,6 @@ export declare const AdminProductAttributeTermQueryParamsSchema: z.ZodObject<{
118
121
  parent: z.ZodOptional<z.ZodNumber>;
119
122
  product: z.ZodOptional<z.ZodNumber>;
120
123
  slug: z.ZodOptional<z.ZodString>;
121
- }, z.core.$strip>;
124
+ }, z.core.$loose>;
122
125
  export type AdminProductAttributeTermQueryParams = z.infer<typeof AdminProductAttributeTermQueryParamsSchema>;
123
126
  //# sourceMappingURL=attribute.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attribute.types.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/admin/attribute.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;iBAatC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;iBAM7C,CAAC;AAEH,MAAM,MAAM,4BAA4B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C,KAAK,CACpD,OAAO,sCAAsC,CAC9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;iBAc1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sCAAsC;;;;;iBAKjD,CAAC;AAEH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,sCAAsC,CAC9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0CAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwBrD,CAAC;AAEH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CACxD,OAAO,0CAA0C,CAClD,CAAC"}
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  /**
3
3
  * WooCommerce REST API Product Attribute Response
4
4
  */
5
- export const AdminProductAttributeSchema = z.object({
5
+ export const AdminProductAttributeSchema = z.looseObject({
6
6
  id: z.number(),
7
7
  name: z.string(),
8
8
  slug: z.string(),
@@ -19,7 +19,7 @@ export const AdminProductAttributeSchema = z.object({
19
19
  /**
20
20
  * Product attribute request parameters for creating/updating
21
21
  */
22
- export const AdminProductAttributeRequestSchema = z.object({
22
+ export const AdminProductAttributeRequestSchema = z.looseObject({
23
23
  name: z.string().optional(),
24
24
  slug: z.string().optional(),
25
25
  type: z.enum(['select']).optional(),
@@ -29,7 +29,7 @@ export const AdminProductAttributeRequestSchema = z.object({
29
29
  /**
30
30
  * Product attribute query parameters for listing
31
31
  */
32
- export const AdminProductAttributeQueryParamsSchema = z.object({
32
+ export const AdminProductAttributeQueryParamsSchema = z.looseObject({
33
33
  /**
34
34
  * Scope under which the request is made; determines fields present in response. Options: `view` and `edit`. Default is `view`.
35
35
  */
@@ -38,7 +38,7 @@ export const AdminProductAttributeQueryParamsSchema = z.object({
38
38
  /**
39
39
  * WooCommerce REST API Product Attribute Term Response
40
40
  */
41
- export const AdminProductAttributeTermSchema = z.object({
41
+ export const AdminProductAttributeTermSchema = z.looseObject({
42
42
  id: z.number(),
43
43
  name: z.string(),
44
44
  slug: z.string(),
@@ -56,7 +56,7 @@ export const AdminProductAttributeTermSchema = z.object({
56
56
  /**
57
57
  * Product attribute term request parameters for creating/updating
58
58
  */
59
- export const AdminProductAttributeTermRequestSchema = z.object({
59
+ export const AdminProductAttributeTermRequestSchema = z.looseObject({
60
60
  name: z.string().optional(),
61
61
  slug: z.string().optional(),
62
62
  description: z.string().optional(),
@@ -65,7 +65,7 @@ export const AdminProductAttributeTermRequestSchema = z.object({
65
65
  /**
66
66
  * Product attribute term query parameters for listing
67
67
  */
68
- export const AdminProductAttributeTermQueryParamsSchema = z.object({
68
+ export const AdminProductAttributeTermQueryParamsSchema = z.looseObject({
69
69
  context: z.enum(['view', 'edit']).optional(),
70
70
  page: z.number().optional(),
71
71
  per_page: z.number().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"attribute.types.js","sourceRoot":"","sources":["../../../../src/lib/types/admin/attribute.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;IACxB,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IAC1D,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE;IACzB,MAAM,EAAE,CAAC;SACN,MAAM,CAAC;QACN,IAAI,EAAE,CAAC,CAAC,K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AQ,EAAE;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;IACzC,OAAO,EAAE,CAAC;SACP,IAAI,CAAC;QACJ,IAAI;QACJ,SAAS;QACT,MAAM;QACN,MAAM;QACN,YAAY;QACZ,aAAa;QACb,OAAO;KACR,CAAC;SACD,QAAQ,EAAE;IACb,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAClC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC"}
@@ -7,35 +7,113 @@ export type AdminCouponDiscountType = 'percent' | 'fixed_cart' | 'fixed_product'
7
7
  * WooCommerce REST API Coupon Response
8
8
  */
9
9
  export declare const AdminCouponSchema: z.ZodObject<{
10
+ /**
11
+ * Unique identifier for the object.
12
+ */
10
13
  id: z.ZodNumber;
14
+ /**
15
+ * Coupon code.
16
+ */
11
17
  code: z.ZodString;
18
+ /**
19
+ * The amount of discount. Should always be numeric, even if setting a percentage.
20
+ */
12
21
  amount: z.ZodString;
22
+ /**
23
+ * The date the coupon was created, in the site's timezone.
24
+ */
13
25
  date_created: z.ZodString;
26
+ /**
27
+ * The date the coupon was created, as GMT.
28
+ */
14
29
  date_created_gmt: z.ZodString;
30
+ /**
31
+ * The date the coupon was last modified, in the site's timezone.
32
+ */
15
33
  date_modified: z.ZodString;
34
+ /**
35
+ * The date the coupon was last modified, as GMT.
36
+ */
16
37
  date_modified_gmt: z.ZodString;
38
+ /**
39
+ * Determines the type of discount that will be applied. Options: `percent`, `fixed_cart` and `fixed_product`. Default is `fixed_cart`.
40
+ */
17
41
  discount_type: z.ZodEnum<{
18
42
  percent: "percent";
19
43
  fixed_cart: "fixed_cart";
20
44
  fixed_product: "fixed_product";
21
45
  }>;
46
+ /**
47
+ * Coupon description.
48
+ */
22
49
  description: z.ZodString;
50
+ /**
51
+ * The date the coupon expires, in the site's timezone.
52
+ */
23
53
  date_expires: z.ZodNullable<z.ZodString>;
54
+ /**
55
+ * The date the coupon expires, as GMT.
56
+ */
24
57
  date_expires_gmt: z.ZodNullable<z.ZodString>;
58
+ /**
59
+ * Number of times the coupon has been used already.
60
+ */
25
61
  usage_count: z.ZodNumber;
62
+ /**
63
+ * If `true`, the coupon can only be used individually. Other applied coupons will be removed from the cart. Default is `false`.
64
+ */
26
65
  individual_use: z.ZodBoolean;
66
+ /**
67
+ * List of product IDs the coupon can be used on.
68
+ */
27
69
  product_ids: z.ZodArray<z.ZodNumber>;
70
+ /**
71
+ * List of product IDs the coupon cannot be used on.
72
+ */
28
73
  excluded_product_ids: z.ZodArray<z.ZodNumber>;
74
+ /**
75
+ * How many times the coupon can be used in total.
76
+ */
29
77
  usage_limit: z.ZodNullable<z.ZodNumber>;
78
+ /**
79
+ * How many times the coupon can be used per customer.
80
+ */
30
81
  usage_limit_per_user: z.ZodNullable<z.ZodNumber>;
82
+ /**
83
+ * Max number of items in the cart the coupon can be applied to.
84
+ */
31
85
  limit_usage_to_x_items: z.ZodNullable<z.ZodNumber>;
86
+ /**
87
+ * If `true` and if the free shipping method requires a coupon, this coupon will enable free shipping. Default is `false`.
88
+ */
32
89
  free_shipping: z.ZodBoolean;
90
+ /**
91
+ * List of category IDs the coupon applies to.
92
+ */
33
93
  product_categories: z.ZodArray<z.ZodNumber>;
94
+ /**
95
+ * List of category IDs the coupon does not apply to.
96
+ */
34
97
  excluded_product_categories: z.ZodArray<z.ZodNumber>;
98
+ /**
99
+ * If `true`, this coupon will not be applied to items that have sale prices. Default is `false`.
100
+ */
35
101
  exclude_sale_items: z.ZodBoolean;
102
+ /**
103
+ * Minimum order amount that needs to be in the cart before coupon applies.
104
+ */
36
105
  minimum_amount: z.ZodString;
106
+ /**
107
+ * Maximum order amount allowed when using the coupon.
108
+ */
37
109
  maximum_amount: z.ZodString;
110
+ /**
111
+ * List of email addresses that can use this coupon.
112
+ */
38
113
  email_restrictions: z.ZodArray<z.ZodString>;
114
+ /**
115
+ * List of user IDs (or guest email addresses) that have used the coupon.rea
116
+ */
39
117
  used_by: z.ZodArray<z.ZodString>;
40
118
  meta_data: z.ZodArray<z.ZodObject<{
41
119
  id: z.ZodNumber;
@@ -50,7 +128,7 @@ export declare const AdminCouponSchema: z.ZodObject<{
50
128
  href: z.ZodString;
51
129
  }, z.core.$strip>>;
52
130
  }, z.core.$strip>>;
53
- }, z.core.$strip>;
131
+ }, z.core.$loose>;
54
132
  export type AdminCoupon = z.infer<typeof AdminCouponSchema>;
55
133
  /**
56
134
  * Coupon request parameters for creating/updating
@@ -84,40 +162,85 @@ export declare const AdminCouponRequestSchema: z.ZodObject<{
84
162
  key: z.ZodString;
85
163
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>, z.ZodNull]>;
86
164
  }, z.core.$strip>>>;
87
- }, z.core.$strip>;
165
+ }, z.core.$loose>;
88
166
  export type AdminCouponRequest = z.infer<typeof AdminCouponRequestSchema>;
89
167
  /**
90
168
  * Coupon query parameters for listing
91
169
  */
92
170
  export declare const AdminCouponQueryParamsSchema: z.ZodObject<{
171
+ /**
172
+ * Scope under which the request is made; determines fields present in response. Options: `view` and `edit`. Default is `view`.
173
+ */
93
174
  context: z.ZodOptional<z.ZodEnum<{
94
175
  view: "view";
95
176
  edit: "edit";
96
177
  }>>;
178
+ /**
179
+ * Current page of the collection. Default is 1.
180
+ */
97
181
  page: z.ZodOptional<z.ZodNumber>;
182
+ /**
183
+ * Maximum number of items to be returned in result set. Default is 10.
184
+ */
98
185
  per_page: z.ZodOptional<z.ZodNumber>;
186
+ /**
187
+ * Limit results to those matching a string.
188
+ */
99
189
  search: z.ZodOptional<z.ZodString>;
190
+ /**
191
+ * Limit response to resources published after a given ISO8601 compliant date.
192
+ */
100
193
  after: z.ZodOptional<z.ZodString>;
194
+ /**
195
+ * Limit response to resources published before a given ISO8601 compliant date.
196
+ */
101
197
  before: z.ZodOptional<z.ZodString>;
198
+ /**
199
+ * Limit response to resources modified after a given ISO8601 compliant date.
200
+ */
102
201
  modified_after: z.ZodOptional<z.ZodString>;
202
+ /**
203
+ * Limit response to resources modified after a given ISO8601 compliant date.
204
+ */
103
205
  modified_before: z.ZodOptional<z.ZodString>;
206
+ /**
207
+ * Whether to interpret dates as GMT when limiting response by published or modified date.
208
+ */
104
209
  dates_are_gmt: z.ZodOptional<z.ZodBoolean>;
210
+ /**
211
+ * Ensure result set excludes specific IDs.
212
+ */
105
213
  exclude: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
214
+ /**
215
+ * Limit result set to specific ids.
216
+ */
106
217
  include: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
218
+ /**
219
+ * Offset the result set by a specific number of items.
220
+ */
107
221
  offset: z.ZodOptional<z.ZodNumber>;
222
+ /**
223
+ * Order sort attribute ascending or descending. Options: `asc` and `desc`. Default is `desc`.
224
+ */
108
225
  order: z.ZodOptional<z.ZodEnum<{
109
226
  asc: "asc";
110
227
  desc: "desc";
111
228
  }>>;
229
+ /**
230
+ * Sort collection by object attribute. Options: `date`, `modified`, `id`, `include`, `title` and `slug`. Default is `date`.
231
+ */
112
232
  orderby: z.ZodOptional<z.ZodEnum<{
113
- id: "id";
114
233
  date: "date";
234
+ id: "id";
115
235
  slug: "slug";
116
236
  modified: "modified";
117
237
  include: "include";
118
238
  title: "title";
119
239
  }>>;
240
+ /**
241
+ * Limit result set to resources with a specific code.
242
+ */
120
243
  code: z.ZodOptional<z.ZodString>;
121
- }, z.core.$strip>;
244
+ }, z.core.$loose>;
122
245
  export type AdminCouponQueryParams = z.infer<typeof AdminCouponQueryParamsSchema>;
123
246
  //# sourceMappingURL=coupon.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"coupon.types.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/admin/coupon.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAC/B,SAAS,GACT,YAAY,GACZ,eAAe,CAAC;AAEpB;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgH5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+DvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC"}
1
+ {"version":3,"file":"coupon.types.d.ts","sourceRoot":"","sources":["../../../../src/lib/types/admin/coupon.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,C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/**
4
4
  * WooCommerce REST API Coupon Response
5
5
  */
6
- export const AdminCouponSchema = z.object({
6
+ export const AdminCouponSchema = z.looseObject({
7
7
  /**
8
8
  * Unique identifier for the object.
9
9
  */
@@ -119,7 +119,7 @@ export const AdminCouponSchema = z.object({
119
119
  /**
120
120
  * Coupon request parameters for creating/updating
121
121
  */
122
- export const AdminCouponRequestSchema = z.object({
122
+ export const AdminCouponRequestSchema = z.looseObject({
123
123
  code: z.string().optional(),
124
124
  amount: z.string().optional(),
125
125
  discount_type: z.enum(['percent', 'fixed_cart', 'fixed_product']).optional(),
@@ -144,7 +144,7 @@ export const AdminCouponRequestSchema = z.object({
144
144
  /**
145
145
  * Coupon query parameters for listing
146
146
  */
147
- export const AdminCouponQueryParamsSchema = z.object({
147
+ export const AdminCouponQueryParamsSchema = z.looseObject({
148
148
  /**
149
149
  * Scope under which the request is made; determines fields present in response. Options: `view` and `edit`. Default is `view`.
150
150
  */