@typewoo/sdk 3.2.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.
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/configs/sdk.config.d.ts +62 -2
- package/dist/lib/configs/sdk.config.d.ts.map +1 -1
- package/dist/lib/configs/sdk.config.js +47 -23
- package/dist/lib/configs/sdk.config.js.map +1 -1
- package/dist/lib/http/http.client.d.ts +5 -0
- package/dist/lib/http/http.client.d.ts.map +1 -0
- package/dist/lib/http/http.client.js +22 -0
- package/dist/lib/http/http.client.js.map +1 -0
- package/dist/lib/http/http.d.ts +9 -0
- package/dist/lib/http/http.d.ts.map +1 -0
- package/dist/lib/http/http.helper.d.ts +27 -0
- package/dist/lib/http/http.helper.d.ts.map +1 -0
- package/dist/lib/http/http.helper.js +66 -0
- package/dist/lib/http/http.helper.js.map +1 -0
- package/dist/lib/http/http.js +28 -0
- package/dist/lib/http/http.js.map +1 -0
- package/dist/lib/http/http.request.d.ts +5 -0
- package/dist/lib/http/http.request.d.ts.map +1 -0
- package/dist/lib/http/http.request.js +143 -0
- package/dist/lib/http/http.request.js.map +1 -0
- package/dist/lib/http/index.d.ts +5 -0
- package/dist/lib/http/index.d.ts.map +1 -0
- package/dist/lib/http/index.js +5 -0
- package/dist/lib/http/index.js.map +1 -0
- package/dist/lib/interceptors/admin-auth.interceptor.d.ts.map +1 -1
- package/dist/lib/interceptors/admin-auth.interceptor.js +1 -1
- package/dist/lib/interceptors/admin-auth.interceptor.js.map +1 -1
- package/dist/lib/interceptors/cart.token.interceptor.js +1 -1
- package/dist/lib/interceptors/cart.token.interceptor.js.map +1 -1
- package/dist/lib/interceptors/nonce.interceptor.js +1 -1
- package/dist/lib/interceptors/nonce.interceptor.js.map +1 -1
- package/dist/lib/interceptors/refresh.token.interceptor.d.ts.map +1 -1
- package/dist/lib/interceptors/refresh.token.interceptor.js +4 -2
- package/dist/lib/interceptors/refresh.token.interceptor.js.map +1 -1
- package/dist/lib/interceptors/token.interceptor.js +1 -1
- package/dist/lib/interceptors/token.interceptor.js.map +1 -1
- package/dist/lib/sdk.d.ts.map +1 -1
- package/dist/lib/sdk.js +4 -2
- package/dist/lib/sdk.js.map +1 -1
- package/dist/lib/services/admin/coupon.service.d.ts +7 -6
- package/dist/lib/services/admin/coupon.service.d.ts.map +1 -1
- package/dist/lib/services/admin/coupon.service.js +13 -13
- package/dist/lib/services/admin/coupon.service.js.map +1 -1
- package/dist/lib/services/admin/customer.service.d.ts +7 -6
- package/dist/lib/services/admin/customer.service.d.ts.map +1 -1
- package/dist/lib/services/admin/customer.service.js +13 -13
- package/dist/lib/services/admin/customer.service.js.map +1 -1
- package/dist/lib/services/admin/data.service.d.ts +7 -6
- package/dist/lib/services/admin/data.service.d.ts.map +1 -1
- package/dist/lib/services/admin/data.service.js +13 -13
- package/dist/lib/services/admin/data.service.js.map +1 -1
- package/dist/lib/services/admin/order.service.d.ts +21 -20
- package/dist/lib/services/admin/order.service.d.ts.map +1 -1
- package/dist/lib/services/admin/order.service.js +41 -41
- package/dist/lib/services/admin/order.service.js.map +1 -1
- package/dist/lib/services/admin/payment-gateway.service.d.ts +4 -3
- package/dist/lib/services/admin/payment-gateway.service.d.ts.map +1 -1
- package/dist/lib/services/admin/payment-gateway.service.js +7 -7
- package/dist/lib/services/admin/payment-gateway.service.js.map +1 -1
- package/dist/lib/services/admin/product-attribute-term.service.d.ts +7 -6
- package/dist/lib/services/admin/product-attribute-term.service.d.ts.map +1 -1
- package/dist/lib/services/admin/product-attribute-term.service.js +13 -13
- package/dist/lib/services/admin/product-attribute-term.service.js.map +1 -1
- package/dist/lib/services/admin/product-attribute.service.d.ts +7 -6
- package/dist/lib/services/admin/product-attribute.service.d.ts.map +1 -1
- package/dist/lib/services/admin/product-attribute.service.js +13 -13
- package/dist/lib/services/admin/product-attribute.service.js.map +1 -1
- package/dist/lib/services/admin/product-brand.service.d.ts +7 -6
- package/dist/lib/services/admin/product-brand.service.d.ts.map +1 -1
- package/dist/lib/services/admin/product-brand.service.js +13 -13
- package/dist/lib/services/admin/product-brand.service.js.map +1 -1
- package/dist/lib/services/admin/product-category.service.d.ts +7 -6
- package/dist/lib/services/admin/product-category.service.d.ts.map +1 -1
- package/dist/lib/services/admin/product-category.service.js +13 -13
- package/dist/lib/services/admin/product-category.service.js.map +1 -1
- package/dist/lib/services/admin/product-review.service.d.ts +7 -6
- package/dist/lib/services/admin/product-review.service.d.ts.map +1 -1
- package/dist/lib/services/admin/product-review.service.js +13 -13
- package/dist/lib/services/admin/product-review.service.js.map +1 -1
- package/dist/lib/services/admin/product-tag.service.d.ts +7 -6
- package/dist/lib/services/admin/product-tag.service.d.ts.map +1 -1
- package/dist/lib/services/admin/product-tag.service.js +13 -13
- package/dist/lib/services/admin/product-tag.service.js.map +1 -1
- package/dist/lib/services/admin/product.service.d.ts +15 -14
- package/dist/lib/services/admin/product.service.d.ts.map +1 -1
- package/dist/lib/services/admin/product.service.js +29 -29
- package/dist/lib/services/admin/product.service.js.map +1 -1
- package/dist/lib/services/admin/refund.service.d.ts +2 -1
- package/dist/lib/services/admin/refund.service.d.ts.map +1 -1
- package/dist/lib/services/admin/refund.service.js +3 -3
- package/dist/lib/services/admin/refund.service.js.map +1 -1
- package/dist/lib/services/admin/report.service.d.ts +11 -10
- package/dist/lib/services/admin/report.service.d.ts.map +1 -1
- package/dist/lib/services/admin/report.service.js +21 -21
- package/dist/lib/services/admin/report.service.js.map +1 -1
- package/dist/lib/services/admin/setting.service.d.ts +7 -6
- package/dist/lib/services/admin/setting.service.d.ts.map +1 -1
- package/dist/lib/services/admin/setting.service.js +13 -13
- package/dist/lib/services/admin/setting.service.js.map +1 -1
- package/dist/lib/services/admin/shipping-class.service.d.ts +7 -6
- package/dist/lib/services/admin/shipping-class.service.d.ts.map +1 -1
- package/dist/lib/services/admin/shipping-class.service.js +13 -13
- package/dist/lib/services/admin/shipping-class.service.js.map +1 -1
- package/dist/lib/services/admin/shipping-method.service.d.ts +3 -2
- package/dist/lib/services/admin/shipping-method.service.d.ts.map +1 -1
- package/dist/lib/services/admin/shipping-method.service.js +5 -5
- package/dist/lib/services/admin/shipping-method.service.js.map +1 -1
- package/dist/lib/services/admin/shipping-zone.service.d.ts +13 -12
- package/dist/lib/services/admin/shipping-zone.service.d.ts.map +1 -1
- package/dist/lib/services/admin/shipping-zone.service.js +25 -25
- package/dist/lib/services/admin/shipping-zone.service.js.map +1 -1
- package/dist/lib/services/admin/system-status.service.d.ts +2 -1
- package/dist/lib/services/admin/system-status.service.d.ts.map +1 -1
- package/dist/lib/services/admin/system-status.service.js +3 -3
- package/dist/lib/services/admin/system-status.service.js.map +1 -1
- package/dist/lib/services/admin/tax.service.d.ts +11 -10
- package/dist/lib/services/admin/tax.service.d.ts.map +1 -1
- package/dist/lib/services/admin/tax.service.js +21 -21
- package/dist/lib/services/admin/tax.service.js.map +1 -1
- package/dist/lib/services/admin/webhook.service.d.ts +7 -6
- package/dist/lib/services/admin/webhook.service.d.ts.map +1 -1
- package/dist/lib/services/admin/webhook.service.js +13 -13
- package/dist/lib/services/admin/webhook.service.js.map +1 -1
- package/dist/lib/services/api.d.ts +3 -4
- package/dist/lib/services/api.d.ts.map +1 -1
- package/dist/lib/services/api.js +5 -19
- package/dist/lib/services/api.js.map +1 -1
- package/dist/lib/services/auth/auth.service.d.ts +7 -7
- package/dist/lib/services/auth/auth.service.d.ts.map +1 -1
- package/dist/lib/services/auth/auth.service.js +1 -1
- package/dist/lib/services/auth/auth.service.js.map +1 -1
- package/dist/lib/services/store/batch.service.d.ts +2 -1
- package/dist/lib/services/store/batch.service.d.ts.map +1 -1
- package/dist/lib/services/store/batch.service.js +2 -3
- package/dist/lib/services/store/batch.service.js.map +1 -1
- package/dist/lib/services/store/cart.coupon.service.d.ts +6 -5
- package/dist/lib/services/store/cart.coupon.service.d.ts.map +1 -1
- package/dist/lib/services/store/cart.coupon.service.js +11 -11
- package/dist/lib/services/store/cart.coupon.service.js.map +1 -1
- package/dist/lib/services/store/cart.extensions.service.d.ts +2 -1
- package/dist/lib/services/store/cart.extensions.service.d.ts.map +1 -1
- package/dist/lib/services/store/cart.extensions.service.js +2 -3
- package/dist/lib/services/store/cart.extensions.service.js.map +1 -1
- package/dist/lib/services/store/cart.item.service.d.ts +7 -6
- package/dist/lib/services/store/cart.item.service.d.ts.map +1 -1
- package/dist/lib/services/store/cart.item.service.js +7 -13
- package/dist/lib/services/store/cart.item.service.js.map +1 -1
- package/dist/lib/services/store/cart.service.d.ts +9 -8
- package/dist/lib/services/store/cart.service.d.ts.map +1 -1
- package/dist/lib/services/store/cart.service.js +9 -17
- package/dist/lib/services/store/cart.service.js.map +1 -1
- package/dist/lib/services/store/checkout.order.service.d.ts +2 -1
- package/dist/lib/services/store/checkout.order.service.d.ts.map +1 -1
- package/dist/lib/services/store/checkout.order.service.js +2 -3
- package/dist/lib/services/store/checkout.order.service.js.map +1 -1
- package/dist/lib/services/store/checkout.service.d.ts +4 -3
- package/dist/lib/services/store/checkout.service.d.ts.map +1 -1
- package/dist/lib/services/store/checkout.service.js +4 -7
- package/dist/lib/services/store/checkout.service.js.map +1 -1
- package/dist/lib/services/store/order.service.d.ts +2 -1
- package/dist/lib/services/store/order.service.d.ts.map +1 -1
- package/dist/lib/services/store/order.service.js +2 -3
- package/dist/lib/services/store/order.service.js.map +1 -1
- package/dist/lib/services/store/product.attribute.service.d.ts +3 -2
- package/dist/lib/services/store/product.attribute.service.d.ts.map +1 -1
- package/dist/lib/services/store/product.attribute.service.js +5 -5
- package/dist/lib/services/store/product.attribute.service.js.map +1 -1
- package/dist/lib/services/store/product.attribute.term.service.d.ts +2 -1
- package/dist/lib/services/store/product.attribute.term.service.d.ts.map +1 -1
- package/dist/lib/services/store/product.attribute.term.service.js +3 -3
- package/dist/lib/services/store/product.attribute.term.service.js.map +1 -1
- package/dist/lib/services/store/product.brand.service.d.ts +3 -2
- package/dist/lib/services/store/product.brand.service.d.ts.map +1 -1
- package/dist/lib/services/store/product.brand.service.js +5 -5
- package/dist/lib/services/store/product.brand.service.js.map +1 -1
- package/dist/lib/services/store/product.category.service.d.ts +3 -2
- package/dist/lib/services/store/product.category.service.d.ts.map +1 -1
- package/dist/lib/services/store/product.category.service.js +5 -5
- package/dist/lib/services/store/product.category.service.js.map +1 -1
- package/dist/lib/services/store/product.collection.data.service.d.ts +2 -1
- package/dist/lib/services/store/product.collection.data.service.d.ts.map +1 -1
- package/dist/lib/services/store/product.collection.data.service.js +3 -3
- package/dist/lib/services/store/product.collection.data.service.js.map +1 -1
- package/dist/lib/services/store/product.review.service.d.ts +2 -1
- package/dist/lib/services/store/product.review.service.d.ts.map +1 -1
- package/dist/lib/services/store/product.review.service.js +3 -3
- package/dist/lib/services/store/product.review.service.js.map +1 -1
- package/dist/lib/services/store/product.service.d.ts +3 -2
- package/dist/lib/services/store/product.service.d.ts.map +1 -1
- package/dist/lib/services/store/product.service.js +5 -5
- package/dist/lib/services/store/product.service.js.map +1 -1
- package/dist/lib/services/store/product.tag.service.d.ts +2 -1
- package/dist/lib/services/store/product.tag.service.d.ts.map +1 -1
- package/dist/lib/services/store/product.tag.service.js +3 -3
- package/dist/lib/services/store/product.tag.service.js.map +1 -1
- package/dist/lib/storage/auth.storage.d.ts +27 -0
- package/dist/lib/storage/auth.storage.d.ts.map +1 -0
- package/dist/lib/storage/auth.storage.js +113 -0
- package/dist/lib/storage/auth.storage.js.map +1 -0
- package/dist/lib/types/admin/attribute.types.d.ts +9 -6
- package/dist/lib/types/admin/attribute.types.d.ts.map +1 -1
- package/dist/lib/types/admin/attribute.types.js +6 -6
- package/dist/lib/types/admin/attribute.types.js.map +1 -1
- package/dist/lib/types/admin/coupon.types.d.ts +127 -4
- package/dist/lib/types/admin/coupon.types.d.ts.map +1 -1
- package/dist/lib/types/admin/coupon.types.js +3 -3
- package/dist/lib/types/admin/coupon.types.js.map +1 -1
- package/dist/lib/types/admin/customer.types.d.ts +37 -5
- package/dist/lib/types/admin/customer.types.d.ts.map +1 -1
- package/dist/lib/types/admin/customer.types.js +7 -5
- package/dist/lib/types/admin/customer.types.js.map +1 -1
- package/dist/lib/types/admin/data.types.d.ts +4 -4
- package/dist/lib/types/admin/data.types.js +4 -4
- package/dist/lib/types/admin/data.types.js.map +1 -1
- package/dist/lib/types/admin/order.types.d.ts +31 -31
- package/dist/lib/types/admin/order.types.js +17 -17
- package/dist/lib/types/admin/order.types.js.map +1 -1
- package/dist/lib/types/admin/payment-gateway.types.d.ts +3 -3
- package/dist/lib/types/admin/payment-gateway.types.js +3 -3
- package/dist/lib/types/admin/payment-gateway.types.js.map +1 -1
- package/dist/lib/types/admin/product-brand.types.d.ts +6 -3
- package/dist/lib/types/admin/product-brand.types.d.ts.map +1 -1
- package/dist/lib/types/admin/product-brand.types.js +3 -3
- package/dist/lib/types/admin/product-brand.types.js.map +1 -1
- package/dist/lib/types/admin/product-review.types.d.ts +4 -4
- package/dist/lib/types/admin/product-review.types.js +3 -3
- package/dist/lib/types/admin/product-review.types.js.map +1 -1
- package/dist/lib/types/admin/product.types.d.ts +24 -23
- package/dist/lib/types/admin/product.types.d.ts.map +1 -1
- package/dist/lib/types/admin/product.types.js +12 -11
- package/dist/lib/types/admin/product.types.js.map +1 -1
- package/dist/lib/types/admin/refund.types.d.ts +12 -12
- package/dist/lib/types/admin/refund.types.js +7 -7
- package/dist/lib/types/admin/refund.types.js.map +1 -1
- package/dist/lib/types/admin/report.types.d.ts +11 -11
- package/dist/lib/types/admin/report.types.js +7 -7
- package/dist/lib/types/admin/report.types.js.map +1 -1
- package/dist/lib/types/admin/setting.types.d.ts +3 -3
- package/dist/lib/types/admin/setting.types.js +3 -3
- package/dist/lib/types/admin/setting.types.js.map +1 -1
- package/dist/lib/types/admin/shipping-method.types.d.ts +2 -2
- package/dist/lib/types/admin/shipping-method.types.js +2 -2
- package/dist/lib/types/admin/shipping-method.types.js.map +1 -1
- package/dist/lib/types/admin/shipping-zone.types.d.ts +8 -8
- package/dist/lib/types/admin/shipping-zone.types.js +8 -8
- package/dist/lib/types/admin/shipping-zone.types.js.map +1 -1
- package/dist/lib/types/admin/system-status.types.d.ts +2 -2
- package/dist/lib/types/admin/system-status.types.js +2 -2
- package/dist/lib/types/admin/system-status.types.js.map +1 -1
- package/dist/lib/types/admin/tax.types.d.ts +7 -7
- package/dist/lib/types/admin/tax.types.js +6 -6
- package/dist/lib/types/admin/tax.types.js.map +1 -1
- package/dist/lib/types/admin/taxonomy.types.d.ts +9 -9
- package/dist/lib/types/admin/taxonomy.types.js +9 -9
- package/dist/lib/types/admin/taxonomy.types.js.map +1 -1
- package/dist/lib/types/admin/webhook.types.d.ts +4 -4
- package/dist/lib/types/admin/webhook.types.js +3 -3
- package/dist/lib/types/admin/webhook.types.js.map +1 -1
- package/dist/lib/types/auth/one-time-token/auth.one.time.token.request.d.ts +1 -1
- package/dist/lib/types/auth/one-time-token/auth.one.time.token.request.js +1 -1
- package/dist/lib/types/auth/one-time-token/auth.one.time.token.request.js.map +1 -1
- package/dist/lib/types/auth/one-time-token/auth.one.time.token.response.d.ts +1 -1
- package/dist/lib/types/auth/one-time-token/auth.one.time.token.response.js +1 -1
- package/dist/lib/types/auth/one-time-token/auth.one.time.token.response.js.map +1 -1
- package/dist/lib/types/auth/refresh/auth.refresh.request.d.ts +1 -1
- package/dist/lib/types/auth/refresh/auth.refresh.request.js +1 -1
- package/dist/lib/types/auth/refresh/auth.refresh.request.js.map +1 -1
- package/dist/lib/types/auth/revoke/auth.revoke.request.d.ts +1 -1
- package/dist/lib/types/auth/revoke/auth.revoke.request.js +1 -1
- package/dist/lib/types/auth/revoke/auth.revoke.request.js.map +1 -1
- package/dist/lib/types/auth/revoke/auth.revoke.response.d.ts +1 -1
- package/dist/lib/types/auth/revoke/auth.revoke.response.js +1 -1
- package/dist/lib/types/auth/revoke/auth.revoke.response.js.map +1 -1
- package/dist/lib/types/auth/status/auth.status.response.d.ts +1 -1
- package/dist/lib/types/auth/status/auth.status.response.js +1 -1
- package/dist/lib/types/auth/status/auth.status.response.js.map +1 -1
- package/dist/lib/types/auth/token/auth.token.request.d.ts +1 -1
- package/dist/lib/types/auth/token/auth.token.request.js +1 -1
- package/dist/lib/types/auth/token/auth.token.request.js.map +1 -1
- package/dist/lib/types/auth/token/auth.token.response.d.ts +2 -2
- package/dist/lib/types/auth/token/auth.token.response.js +2 -2
- package/dist/lib/types/auth/token/auth.token.response.js.map +1 -1
- package/dist/lib/types/auth/validate/auth.validate.response.d.ts +2 -2
- package/dist/lib/types/auth/validate/auth.validate.response.js +2 -2
- package/dist/lib/types/auth/validate/auth.validate.response.js.map +1 -1
- package/dist/lib/types/request.d.ts +18 -0
- package/dist/lib/types/request.d.ts.map +1 -0
- package/dist/lib/types/request.js +2 -0
- package/dist/lib/types/request.js.map +1 -0
- package/dist/lib/types/sdk.state.d.ts +19 -19
- package/dist/lib/types/store/batch/batch.request.d.ts +38 -5
- package/dist/lib/types/store/batch/batch.request.d.ts.map +1 -1
- package/dist/lib/types/store/batch/batch.request.js +2 -2
- package/dist/lib/types/store/batch/batch.request.js.map +1 -1
- package/dist/lib/types/store/batch/batch.response.d.ts +24 -3
- package/dist/lib/types/store/batch/batch.response.d.ts.map +1 -1
- package/dist/lib/types/store/batch/batch.response.js +2 -2
- package/dist/lib/types/store/batch/batch.response.js.map +1 -1
- package/dist/lib/types/store/cart/cart.billing.response.d.ts +1 -1
- package/dist/lib/types/store/cart/cart.billing.response.js +1 -1
- package/dist/lib/types/store/cart/cart.billing.response.js.map +1 -1
- package/dist/lib/types/store/cart/cart.customer.request.d.ts +3 -3
- package/dist/lib/types/store/cart/cart.customer.request.js +3 -3
- package/dist/lib/types/store/cart/cart.customer.request.js.map +1 -1
- package/dist/lib/types/store/cart/cart.response.d.ts +19 -19
- package/dist/lib/types/store/cart/cart.response.js +1 -1
- package/dist/lib/types/store/cart/cart.response.js.map +1 -1
- package/dist/lib/types/store/cart/cart.shipping.rate.response.d.ts +5 -5
- package/dist/lib/types/store/cart/cart.shipping.rate.response.js +5 -5
- package/dist/lib/types/store/cart/cart.shipping.rate.response.js.map +1 -1
- package/dist/lib/types/store/cart/cart.shipping.response.d.ts +1 -1
- package/dist/lib/types/store/cart/cart.shipping.response.js +1 -1
- package/dist/lib/types/store/cart/cart.shipping.response.js.map +1 -1
- package/dist/lib/types/store/cart/cart.total.response.d.ts +2 -2
- package/dist/lib/types/store/cart/cart.total.response.js +2 -2
- package/dist/lib/types/store/cart/cart.total.response.js.map +1 -1
- package/dist/lib/types/store/cart-coupon/cart.coupon.response.d.ts +2 -2
- package/dist/lib/types/store/cart-coupon/cart.coupon.response.js +1 -1
- package/dist/lib/types/store/cart-coupon/cart.coupon.response.js.map +1 -1
- package/dist/lib/types/store/cart-coupon/cart.coupon.total.response.d.ts +1 -1
- package/dist/lib/types/store/cart-coupon/cart.coupon.total.response.js +1 -1
- package/dist/lib/types/store/cart-coupon/cart.coupon.total.response.js.map +1 -1
- package/dist/lib/types/store/cart-extensions/cart.extensions.request.d.ts +7 -1
- package/dist/lib/types/store/cart-extensions/cart.extensions.request.d.ts.map +1 -1
- package/dist/lib/types/store/cart-extensions/cart.extensions.request.js +1 -1
- package/dist/lib/types/store/cart-extensions/cart.extensions.request.js.map +1 -1
- package/dist/lib/types/store/cart-extensions/cart.extensions.response.d.ts +13 -1
- package/dist/lib/types/store/cart-extensions/cart.extensions.response.d.ts.map +1 -1
- package/dist/lib/types/store/cart-extensions/cart.extensions.response.js +1 -1
- package/dist/lib/types/store/cart-extensions/cart.extensions.response.js.map +1 -1
- package/dist/lib/types/store/cart-item/cart.item.add.request.d.ts +10 -1
- package/dist/lib/types/store/cart-item/cart.item.add.request.d.ts.map +1 -1
- package/dist/lib/types/store/cart-item/cart.item.add.request.js +1 -1
- package/dist/lib/types/store/cart-item/cart.item.add.request.js.map +1 -1
- package/dist/lib/types/store/cart-item/cart.item.edit.request.d.ts +7 -1
- package/dist/lib/types/store/cart-item/cart.item.edit.request.d.ts.map +1 -1
- package/dist/lib/types/store/cart-item/cart.item.edit.request.js +1 -1
- package/dist/lib/types/store/cart-item/cart.item.edit.request.js.map +1 -1
- package/dist/lib/types/store/cart-item/cart.item.price.response.d.ts +2 -2
- package/dist/lib/types/store/cart-item/cart.item.price.response.js +2 -2
- package/dist/lib/types/store/cart-item/cart.item.price.response.js.map +1 -1
- package/dist/lib/types/store/cart-item/cart.item.quantity.limits.response.d.ts +1 -1
- package/dist/lib/types/store/cart-item/cart.item.quantity.limits.response.js +1 -1
- package/dist/lib/types/store/cart-item/cart.item.quantity.limits.response.js.map +1 -1
- package/dist/lib/types/store/cart-item/cart.item.response.d.ts +7 -7
- package/dist/lib/types/store/cart-item/cart.item.response.js +1 -1
- package/dist/lib/types/store/cart-item/cart.item.response.js.map +1 -1
- package/dist/lib/types/store/cart-item/cart.item.total.response.d.ts +1 -1
- package/dist/lib/types/store/cart-item/cart.item.total.response.js +1 -1
- package/dist/lib/types/store/cart-item/cart.item.total.response.js.map +1 -1
- package/dist/lib/types/store/cart-item/cart.item.variation.response.d.ts +1 -1
- package/dist/lib/types/store/cart-item/cart.item.variation.response.js +1 -1
- package/dist/lib/types/store/cart-item/cart.item.variation.response.js.map +1 -1
- package/dist/lib/types/store/checkout/checkout.billing.response.d.ts +1 -1
- package/dist/lib/types/store/checkout/checkout.billing.response.js +1 -1
- package/dist/lib/types/store/checkout/checkout.billing.response.js.map +1 -1
- package/dist/lib/types/store/checkout/checkout.create.request.d.ts +22 -4
- package/dist/lib/types/store/checkout/checkout.create.request.d.ts.map +1 -1
- package/dist/lib/types/store/checkout/checkout.create.request.js +2 -2
- package/dist/lib/types/store/checkout/checkout.create.request.js.map +1 -1
- package/dist/lib/types/store/checkout/checkout.response.d.ts +4 -4
- package/dist/lib/types/store/checkout/checkout.response.js +2 -2
- package/dist/lib/types/store/checkout/checkout.response.js.map +1 -1
- package/dist/lib/types/store/checkout/checkout.shipping.d.ts +1 -1
- package/dist/lib/types/store/checkout/checkout.shipping.js +1 -1
- package/dist/lib/types/store/checkout/checkout.shipping.js.map +1 -1
- package/dist/lib/types/store/checkout/checkout.update.request.d.ts +10 -1
- package/dist/lib/types/store/checkout/checkout.update.request.d.ts.map +1 -1
- package/dist/lib/types/store/checkout/checkout.update.request.js +1 -1
- package/dist/lib/types/store/checkout/checkout.update.request.js.map +1 -1
- package/dist/lib/types/store/image.response.d.ts +1 -1
- package/dist/lib/types/store/image.response.js +1 -1
- package/dist/lib/types/store/image.response.js.map +1 -1
- package/dist/lib/types/store/order/order.billing.response.d.ts +1 -1
- package/dist/lib/types/store/order/order.billing.response.js +1 -1
- package/dist/lib/types/store/order/order.billing.response.js.map +1 -1
- package/dist/lib/types/store/order/order.coupon.response.d.ts +2 -2
- package/dist/lib/types/store/order/order.coupon.response.js +2 -2
- package/dist/lib/types/store/order/order.coupon.response.js.map +1 -1
- package/dist/lib/types/store/order/order.request.d.ts +22 -4
- package/dist/lib/types/store/order/order.request.d.ts.map +1 -1
- package/dist/lib/types/store/order/order.request.js +2 -2
- package/dist/lib/types/store/order/order.request.js.map +1 -1
- package/dist/lib/types/store/order/order.response.d.ts +13 -13
- package/dist/lib/types/store/order/order.response.js +1 -1
- package/dist/lib/types/store/order/order.response.js.map +1 -1
- package/dist/lib/types/store/order/order.shipping.response.d.ts +1 -1
- package/dist/lib/types/store/order/order.shipping.response.js +1 -1
- package/dist/lib/types/store/order/order.shipping.response.js.map +1 -1
- package/dist/lib/types/store/order/order.total.response.d.ts +1 -1
- package/dist/lib/types/store/order/order.total.response.js +1 -1
- package/dist/lib/types/store/order/order.total.response.js.map +1 -1
- package/dist/lib/types/store/product/product.price.response.d.ts +1 -1
- package/dist/lib/types/store/product/product.price.response.js +1 -1
- package/dist/lib/types/store/product/product.price.response.js.map +1 -1
- package/dist/lib/types/store/product/product.request.d.ts +1 -1
- package/dist/lib/types/store/product/product.request.js +1 -1
- package/dist/lib/types/store/product/product.response.d.ts +8 -8
- package/dist/lib/types/store/product/product.response.js +6 -6
- package/dist/lib/types/store/product/product.response.js.map +1 -1
- package/dist/lib/types/store/product-attribute/product.attribute.response.d.ts +1 -1
- package/dist/lib/types/store/product-attribute/product.attribute.response.js +1 -1
- package/dist/lib/types/store/product-attribute/product.attribute.response.js.map +1 -1
- package/dist/lib/types/store/product-attribute-term/product.attribute.term.request.d.ts +12 -1
- package/dist/lib/types/store/product-attribute-term/product.attribute.term.request.d.ts.map +1 -1
- package/dist/lib/types/store/product-attribute-term/product.attribute.term.request.js +2 -2
- package/dist/lib/types/store/product-attribute-term/product.attribute.term.request.js.map +1 -1
- package/dist/lib/types/store/product-attribute-term/product.attribute.term.response.d.ts +1 -1
- package/dist/lib/types/store/product-attribute-term/product.attribute.term.response.js +1 -1
- package/dist/lib/types/store/product-attribute-term/product.attribute.term.response.js.map +1 -1
- package/dist/lib/types/store/product-brand/product.brand.response.d.ts +2 -2
- package/dist/lib/types/store/product-brand/product.brand.response.js +1 -1
- package/dist/lib/types/store/product-brand/product.brand.response.js.map +1 -1
- package/dist/lib/types/store/product-category/product.category.response.d.ts +2 -2
- package/dist/lib/types/store/product-category/product.category.response.js +1 -1
- package/dist/lib/types/store/product-category/product.category.response.js.map +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.attribute.counts.response.d.ts +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.attribute.counts.response.d.ts.map +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.attribute.counts.response.js +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.attribute.counts.response.js.map +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.price.range.response.d.ts +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.price.range.response.js +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.price.range.response.js.map +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.rating.counts.response.d.ts +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.rating.counts.response.js +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.rating.counts.response.js.map +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.request.d.ts +24 -2
- package/dist/lib/types/store/product-collection-data/product.collection.data.request.d.ts.map +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.request.js +2 -2
- package/dist/lib/types/store/product-collection-data/product.collection.data.request.js.map +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.response.d.ts +5 -5
- package/dist/lib/types/store/product-collection-data/product.collection.data.response.js +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.response.js.map +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.taxonomy.counts.response.d.ts +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.taxonomy.counts.response.js +1 -1
- package/dist/lib/types/store/product-collection-data/product.collection.data.taxonomy.counts.response.js.map +1 -1
- package/dist/lib/types/store/product-review/product.review.response.d.ts +2 -2
- package/dist/lib/types/store/product-review/product.review.response.js +1 -1
- package/dist/lib/types/store/product-review/product.review.response.js.map +1 -1
- package/dist/lib/types/store/product-tag/product.tag.response.d.ts +1 -1
- package/dist/lib/types/store/product-tag/product.tag.response.js +1 -1
- package/dist/lib/types/store/product-tag/product.tag.response.js.map +1 -1
- package/dist/lib/utilities/axios.utility.d.ts +9 -7
- package/dist/lib/utilities/axios.utility.d.ts.map +1 -1
- package/dist/lib/utilities/axios.utility.js +155 -24
- package/dist/lib/utilities/axios.utility.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
2
|
import { BaseService } from '../base.service.js';
|
|
3
|
-
import { doDelete, doGet, doPost, doPut
|
|
3
|
+
import { doDelete, doGet, doPost, doPut } from '../../http/http.js';
|
|
4
4
|
import { extractPagination } from '../../utilities/common.js';
|
|
5
5
|
import * as qs from 'qs';
|
|
6
6
|
/**
|
|
@@ -15,10 +15,9 @@ export class CartItemService extends BaseService {
|
|
|
15
15
|
* List Cart Items
|
|
16
16
|
* @returns {CartItemResponse[]}
|
|
17
17
|
*/
|
|
18
|
-
list() {
|
|
18
|
+
list(options) {
|
|
19
19
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20
20
|
const url = `/${this.endpoint}`;
|
|
21
|
-
const options = {};
|
|
22
21
|
const { data, error, headers } = yield doGet(url, options);
|
|
23
22
|
const pagination = extractPagination(headers);
|
|
24
23
|
return { data, error, pagination };
|
|
@@ -29,10 +28,9 @@ export class CartItemService extends BaseService {
|
|
|
29
28
|
* @param key The key of the cart item to retrieve.
|
|
30
29
|
* @returns {CartItemResponse}
|
|
31
30
|
*/
|
|
32
|
-
single(key) {
|
|
31
|
+
single(key, options) {
|
|
33
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
33
|
const url = `/${this.endpoint}/${key}`;
|
|
35
|
-
const options = {};
|
|
36
34
|
const { data, error } = yield doGet(url, options);
|
|
37
35
|
return { data, error };
|
|
38
36
|
});
|
|
@@ -42,11 +40,10 @@ export class CartItemService extends BaseService {
|
|
|
42
40
|
* @param params
|
|
43
41
|
* @returns {CartItemResponse}
|
|
44
42
|
*/
|
|
45
|
-
add(params) {
|
|
43
|
+
add(params, options) {
|
|
46
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
47
45
|
const query = qs.stringify(params, { encode: true });
|
|
48
46
|
const url = `/${this.endpoint}?${query}`;
|
|
49
|
-
const options = {};
|
|
50
47
|
this.events.emit('cart:loading', true);
|
|
51
48
|
this.events.emit('cart:request:start');
|
|
52
49
|
const { data, error } = yield doPost(url, undefined, options);
|
|
@@ -62,11 +59,10 @@ export class CartItemService extends BaseService {
|
|
|
62
59
|
* @param quantity Quantity of this item in the cart.
|
|
63
60
|
* @returns {CartItemResponse}
|
|
64
61
|
*/
|
|
65
|
-
update(key, quantity) {
|
|
62
|
+
update(key, quantity, options) {
|
|
66
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
67
64
|
const query = qs.stringify({ quantity: quantity }, { encode: true });
|
|
68
65
|
const url = `/${this.endpoint}/${key}?${query}`;
|
|
69
|
-
const options = {};
|
|
70
66
|
this.events.emit('cart:loading', true);
|
|
71
67
|
this.events.emit('cart:request:start');
|
|
72
68
|
const { data, error } = yield doPut(url, undefined, options);
|
|
@@ -81,10 +77,9 @@ export class CartItemService extends BaseService {
|
|
|
81
77
|
* @param key The key of the cart item to edit.
|
|
82
78
|
* @returns {unknown}
|
|
83
79
|
*/
|
|
84
|
-
remove(key) {
|
|
80
|
+
remove(key, options) {
|
|
85
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
86
82
|
const url = `/${this.endpoint}/${key}`;
|
|
87
|
-
const options = {};
|
|
88
83
|
this.events.emit('cart:loading', true);
|
|
89
84
|
this.events.emit('cart:request:start');
|
|
90
85
|
const { data, error } = yield doDelete(url, options);
|
|
@@ -98,10 +93,9 @@ export class CartItemService extends BaseService {
|
|
|
98
93
|
* Delete All Cart Items
|
|
99
94
|
* @returns {CartItemResponse[]}
|
|
100
95
|
*/
|
|
101
|
-
clear() {
|
|
96
|
+
clear(options) {
|
|
102
97
|
return __awaiter(this, void 0, void 0, function* () {
|
|
103
98
|
const url = `/${this.endpoint}`;
|
|
104
|
-
const options = {};
|
|
105
99
|
this.events.emit('cart:loading', true);
|
|
106
100
|
this.events.emit('cart:request:start');
|
|
107
101
|
const { data, error } = yield doDelete(url, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart.item.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/cart.item.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"cart.item.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/cart.item.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE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AAC;YACzD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;YAExC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACzB,CAAC;KAAA;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseService } from '../base.service.js';
|
|
2
2
|
import { ApiResult } from '../../types/api.js';
|
|
3
3
|
import { CartResponse, CartItemAddRequest, CartCustomerRequest } from '../../types/index.js';
|
|
4
|
+
import { RequestOptions } from '../../types/request.js';
|
|
4
5
|
/**
|
|
5
6
|
* Cart API
|
|
6
7
|
*
|
|
@@ -12,50 +13,50 @@ export declare class CartService extends BaseService {
|
|
|
12
13
|
* Get Cart
|
|
13
14
|
* @returns {CartResponse}
|
|
14
15
|
*/
|
|
15
|
-
get(): Promise<ApiResult<CartResponse>>;
|
|
16
|
+
get(options?: RequestOptions): Promise<ApiResult<CartResponse>>;
|
|
16
17
|
/**
|
|
17
18
|
* Add Item
|
|
18
19
|
* @param params
|
|
19
20
|
* @returns {CartResponse}
|
|
20
21
|
*/
|
|
21
|
-
add(params: CartItemAddRequest): Promise<ApiResult<CartResponse>>;
|
|
22
|
+
add(params: CartItemAddRequest, options?: RequestOptions): Promise<ApiResult<CartResponse>>;
|
|
22
23
|
/**
|
|
23
24
|
* Update Item
|
|
24
25
|
* @param key The key of the cart item to edit.
|
|
25
26
|
* @param quantity Quantity of this item in the cart.
|
|
26
27
|
* @returns {CartResponse}
|
|
27
28
|
*/
|
|
28
|
-
update(key: string, quantity: number): Promise<ApiResult<CartResponse>>;
|
|
29
|
+
update(key: string, quantity: number, options?: RequestOptions): Promise<ApiResult<CartResponse>>;
|
|
29
30
|
/**
|
|
30
31
|
* Remove Item
|
|
31
32
|
* @param key
|
|
32
33
|
* @returns {CartResponse}
|
|
33
34
|
*/
|
|
34
|
-
remove(key: string): Promise<ApiResult<CartResponse>>;
|
|
35
|
+
remove(key: string, options?: RequestOptions): Promise<ApiResult<CartResponse>>;
|
|
35
36
|
/**
|
|
36
37
|
* Apply Coupon
|
|
37
38
|
* @param code The coupon code you wish to apply to the cart.
|
|
38
39
|
* @returns {CartResponse}
|
|
39
40
|
*/
|
|
40
|
-
applyCoupon(code: string): Promise<ApiResult<CartResponse>>;
|
|
41
|
+
applyCoupon(code: string, options?: RequestOptions): Promise<ApiResult<CartResponse>>;
|
|
41
42
|
/**
|
|
42
43
|
* Remove Coupon
|
|
43
44
|
* @param code The coupon code you wish to remove from the cart.
|
|
44
45
|
* @returns {CartResponse}
|
|
45
46
|
*/
|
|
46
|
-
removeCoupon(code: string): Promise<ApiResult<CartResponse>>;
|
|
47
|
+
removeCoupon(code: string, options?: RequestOptions): Promise<ApiResult<CartResponse>>;
|
|
47
48
|
/**
|
|
48
49
|
* Update Customer
|
|
49
50
|
* @param body
|
|
50
51
|
* @returns {CartResponse}
|
|
51
52
|
*/
|
|
52
|
-
updateCustomer(body: CartCustomerRequest): Promise<ApiResult<CartResponse>>;
|
|
53
|
+
updateCustomer(body: CartCustomerRequest, options?: RequestOptions): Promise<ApiResult<CartResponse>>;
|
|
53
54
|
/**
|
|
54
55
|
* Select Shipping Rate
|
|
55
56
|
* @param packageId The ID of the shipping package within the cart.
|
|
56
57
|
* @param rateId The chosen rate ID for the package.
|
|
57
58
|
* @returns {CartResponse}s
|
|
58
59
|
*/
|
|
59
|
-
selectShippingRate(packageId: number, rateId: string): Promise<ApiResult<CartResponse>>;
|
|
60
|
+
selectShippingRate(packageId: number, rateId: string, options?: RequestOptions): Promise<ApiResult<CartResponse>>;
|
|
60
61
|
}
|
|
61
62
|
//# sourceMappingURL=cart.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/store/cart.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"cart.service.d.ts","sourceR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,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IAoBnC;;;;;OAKG;IACG,kBAAkB,CACtB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;CAoBpC"}
|
|
@@ -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, doPost } from '../../
|
|
4
|
+
import { doGet, doPost } from '../../http/http.js';
|
|
5
5
|
/**
|
|
6
6
|
* Cart API
|
|
7
7
|
*
|
|
@@ -16,10 +16,9 @@ export class CartService extends BaseService {
|
|
|
16
16
|
* Get Cart
|
|
17
17
|
* @returns {CartResponse}
|
|
18
18
|
*/
|
|
19
|
-
get() {
|
|
19
|
+
get(options) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
21
|
const url = `/${this.endpoint}`;
|
|
22
|
-
const options = {};
|
|
23
22
|
this.events.emit('cart:loading', true);
|
|
24
23
|
this.events.emit('cart:request:start');
|
|
25
24
|
const { data, error } = yield doGet(url, options);
|
|
@@ -35,11 +34,10 @@ export class CartService extends BaseService {
|
|
|
35
34
|
* @param params
|
|
36
35
|
* @returns {CartResponse}
|
|
37
36
|
*/
|
|
38
|
-
add(params) {
|
|
37
|
+
add(params, options) {
|
|
39
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
39
|
const query = qs.stringify(params, { encode: true });
|
|
41
40
|
const url = `/${this.endpoint}/add-item?${query}`;
|
|
42
|
-
const options = {};
|
|
43
41
|
this.events.emit('cart:loading', true);
|
|
44
42
|
this.events.emit('cart:request:start');
|
|
45
43
|
const { data, error } = yield doPost(url, undefined, options);
|
|
@@ -56,11 +54,10 @@ export class CartService extends BaseService {
|
|
|
56
54
|
* @param quantity Quantity of this item in the cart.
|
|
57
55
|
* @returns {CartResponse}
|
|
58
56
|
*/
|
|
59
|
-
update(key, quantity) {
|
|
57
|
+
update(key, quantity, options) {
|
|
60
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
59
|
const query = qs.stringify({ key, quantity }, { encode: true });
|
|
62
60
|
const url = `/${this.endpoint}/update-item?${query}`;
|
|
63
|
-
const options = {};
|
|
64
61
|
this.events.emit('cart:loading', true);
|
|
65
62
|
this.events.emit('cart:request:start');
|
|
66
63
|
const { data, error } = yield doPost(url, undefined, options);
|
|
@@ -76,10 +73,9 @@ export class CartService extends BaseService {
|
|
|
76
73
|
* @param key
|
|
77
74
|
* @returns {CartResponse}
|
|
78
75
|
*/
|
|
79
|
-
remove(key) {
|
|
76
|
+
remove(key, options) {
|
|
80
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
78
|
const url = `/${this.endpoint}/remove-item?key=${key}`;
|
|
82
|
-
const options = {};
|
|
83
79
|
this.events.emit('cart:loading', true);
|
|
84
80
|
this.events.emit('cart:request:start');
|
|
85
81
|
const { data, error } = yield doPost(url, undefined, options);
|
|
@@ -95,10 +91,9 @@ export class CartService extends BaseService {
|
|
|
95
91
|
* @param code The coupon code you wish to apply to the cart.
|
|
96
92
|
* @returns {CartResponse}
|
|
97
93
|
*/
|
|
98
|
-
applyCoupon(code) {
|
|
94
|
+
applyCoupon(code, options) {
|
|
99
95
|
return __awaiter(this, void 0, void 0, function* () {
|
|
100
96
|
const url = `/${this.endpoint}/apply-coupon?code=${code}`;
|
|
101
|
-
const options = {};
|
|
102
97
|
this.events.emit('cart:loading', true);
|
|
103
98
|
this.events.emit('cart:request:start');
|
|
104
99
|
const { data, error } = yield doPost(url, undefined, options);
|
|
@@ -114,10 +109,9 @@ export class CartService extends BaseService {
|
|
|
114
109
|
* @param code The coupon code you wish to remove from the cart.
|
|
115
110
|
* @returns {CartResponse}
|
|
116
111
|
*/
|
|
117
|
-
removeCoupon(code) {
|
|
112
|
+
removeCoupon(code, options) {
|
|
118
113
|
return __awaiter(this, void 0, void 0, function* () {
|
|
119
114
|
const url = `/${this.endpoint}/remove-coupon?code=${code}`;
|
|
120
|
-
const options = {};
|
|
121
115
|
this.events.emit('cart:loading', true);
|
|
122
116
|
this.events.emit('cart:request:start');
|
|
123
117
|
const { data, error } = yield doPost(url, undefined, options);
|
|
@@ -133,10 +127,9 @@ export class CartService extends BaseService {
|
|
|
133
127
|
* @param body
|
|
134
128
|
* @returns {CartResponse}
|
|
135
129
|
*/
|
|
136
|
-
updateCustomer(body) {
|
|
130
|
+
updateCustomer(body, options) {
|
|
137
131
|
return __awaiter(this, void 0, void 0, function* () {
|
|
138
132
|
const url = `/${this.endpoint}/update-customer`;
|
|
139
|
-
const options = {};
|
|
140
133
|
this.events.emit('cart:loading', true);
|
|
141
134
|
this.events.emit('cart:request:start');
|
|
142
135
|
const { data, error } = yield doPost(url, body, options);
|
|
@@ -153,11 +146,10 @@ export class CartService extends BaseService {
|
|
|
153
146
|
* @param rateId The chosen rate ID for the package.
|
|
154
147
|
* @returns {CartResponse}s
|
|
155
148
|
*/
|
|
156
|
-
selectShippingRate(packageId, rateId) {
|
|
149
|
+
selectShippingRate(packageId, rateId, options) {
|
|
157
150
|
return __awaiter(this, void 0, void 0, function* () {
|
|
158
151
|
// Fixed: use query string form. Path segment form caused rest_no_route errors.
|
|
159
152
|
const url = `/${this.endpoint}/select-shipping-rate?package_id=${packageId}&rate_id=${rateId}`;
|
|
160
|
-
const options = {};
|
|
161
153
|
this.events.emit('cart:loading', true);
|
|
162
154
|
this.events.emit('cart:request:start');
|
|
163
155
|
const { data, error } = yield doPost(url, undefined, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/cart.service.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
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;;;;;OAKG;IACG,kBAAkB,CACtB,SAAiB,EACjB,MAAc,EACd,OAAwB;;YAExB,+EAA+E;YAC/E,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,oCAAoC,SAAS,YAAY,MAAM,EAAE,CAAC;YAE/F,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;YACvC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;YAEvC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAClC,GAAG,EACH,SAAS,EACT,OAAO,CACR,CAAC;YAEF,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,sBAAsB,CAAC,CAAC;YACnD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE,oBAAoB,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;YAC7D,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;YACjD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;YAExC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACzB,CAAC;KAAA;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseService } from '../base.service.js';
|
|
2
2
|
import { ApiResult } from '../../types/api.js';
|
|
3
3
|
import { OrderRequest, CheckoutResponse } from '../../types/index.js';
|
|
4
|
+
import { RequestOptions } from '../../types/request.js';
|
|
4
5
|
/**
|
|
5
6
|
* Checkout order API
|
|
6
7
|
*
|
|
@@ -14,6 +15,6 @@ export declare class CheckoutOrderService extends BaseService {
|
|
|
14
15
|
* @param params
|
|
15
16
|
* @returns
|
|
16
17
|
*/
|
|
17
|
-
order(orderId: number, params: OrderRequest): Promise<ApiResult<CheckoutResponse>>;
|
|
18
|
+
order(orderId: number, params: OrderRequest, options?: RequestOptions): Promise<ApiResult<CheckoutResponse>>;
|
|
18
19
|
}
|
|
19
20
|
//# sourceMappingURL=checkout.order.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.order.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/store/checkout.order.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkout.order.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/store/checkout.order.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,WAAW;IACnD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkC;IAE3D;;;;;OAKG;IACG,KAAK,CACT,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;CAWxC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
2
|
import { BaseService } from '../base.service.js';
|
|
3
|
-
import { doPost } from '../../
|
|
3
|
+
import { doPost } from '../../http/http.js';
|
|
4
4
|
/**
|
|
5
5
|
* Checkout order API
|
|
6
6
|
*
|
|
@@ -17,10 +17,9 @@ export class CheckoutOrderService extends BaseService {
|
|
|
17
17
|
* @param params
|
|
18
18
|
* @returns
|
|
19
19
|
*/
|
|
20
|
-
order(orderId, params) {
|
|
20
|
+
order(orderId, params, options) {
|
|
21
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
22
|
const url = `/${this.endpoint}/${orderId}`;
|
|
23
|
-
const options = {};
|
|
24
23
|
const { data, error } = yield doPost(url, params, options);
|
|
25
24
|
return { data, error };
|
|
26
25
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.order.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/checkout.order.service.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"checkout.order.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/checkout.order.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAK5C;;;;GAIG;AACH,MAAM,OAAO,oBAAqB,SAAQ,WAAW;IAArD;;QACmB,aAAQ,GAAG,8BAA8B,CAAC;IAuB7D,CAAC;IArBC;;;;;OAKG;IACG,KAAK,CACT,OAAe,EACf,MAAoB,EACpB,OAAwB;;YAExB,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,IAAI,OAAO,EAAE,CAAC;YAE3C,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAClC,GAAG,EACH,MAAM,EACN,OAAO,CACR,CAAC;YAEF,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACzB,CAAC;KAAA;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseService } from '../base.service.js';
|
|
2
2
|
import { ApiResult } from '../../types/api.js';
|
|
3
3
|
import { CheckoutResponse, CheckoutUpdateRequest, CheckoutCreateRequest } from '../../types/index.js';
|
|
4
|
+
import { RequestOptions } from '../../types/request.js';
|
|
4
5
|
/**
|
|
5
6
|
* Checkout API
|
|
6
7
|
*
|
|
@@ -12,19 +13,19 @@ export declare class CheckoutService extends BaseService {
|
|
|
12
13
|
* Get Checkout Data
|
|
13
14
|
* @returns {CheckoutResponse}
|
|
14
15
|
*/
|
|
15
|
-
get(): Promise<ApiResult<CheckoutResponse>>;
|
|
16
|
+
get(options?: RequestOptions): Promise<ApiResult<CheckoutResponse>>;
|
|
16
17
|
/**
|
|
17
18
|
* Update checkout data
|
|
18
19
|
* @param params
|
|
19
20
|
* @param experimental_calc_totals This is used to determine if the cart totals should be recalculated. This should be set to true if the cart totals are being updated in response to a PUT request, false otherwise.
|
|
20
21
|
* @returns {CheckoutResponse}
|
|
21
22
|
*/
|
|
22
|
-
update(params?: CheckoutUpdateRequest, experimental_calc_totals?: boolean): Promise<ApiResult<CheckoutResponse>>;
|
|
23
|
+
update(params?: CheckoutUpdateRequest, experimental_calc_totals?: boolean, options?: RequestOptions): Promise<ApiResult<CheckoutResponse>>;
|
|
23
24
|
/**
|
|
24
25
|
* Process Order and Payment
|
|
25
26
|
* @param params
|
|
26
27
|
* @returns {CheckoutResponse}
|
|
27
28
|
*/
|
|
28
|
-
processOrderAndPayment(params: CheckoutCreateRequest): Promise<ApiResult<CheckoutResponse>>;
|
|
29
|
+
processOrderAndPayment(params: CheckoutCreateRequest, options?: RequestOptions): Promise<ApiResult<CheckoutResponse>>;
|
|
29
30
|
}
|
|
30
31
|
//# sourceMappingURL=checkout.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/store/checkout.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"checkout.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/store/checkout.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,WAAW;IAC9C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkC;IAE3D;;;OAGG;IACG,GAAG,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAQzE;;;;;OAKG;IACG,MAAM,CACV,MAAM,CAAC,EAAE,qBAAqB,EAC9B,wBAAwB,UAAQ,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAevC;;;;OAIG;IACG,sBAAsB,CAC1B,MAAM,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;CAWxC"}
|
|
@@ -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, doPut, doPost } from '../../
|
|
4
|
+
import { doGet, doPut, doPost } from '../../http/http.js';
|
|
5
5
|
/**
|
|
6
6
|
* Checkout API
|
|
7
7
|
*
|
|
@@ -16,10 +16,9 @@ export class CheckoutService extends BaseService {
|
|
|
16
16
|
* Get Checkout Data
|
|
17
17
|
* @returns {CheckoutResponse}
|
|
18
18
|
*/
|
|
19
|
-
get() {
|
|
19
|
+
get(options) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
21
|
const url = `/${this.endpoint}/`;
|
|
22
|
-
const options = {};
|
|
23
22
|
const { data, error } = yield doGet(url, options);
|
|
24
23
|
return { data, error };
|
|
25
24
|
});
|
|
@@ -31,9 +30,8 @@ export class CheckoutService extends BaseService {
|
|
|
31
30
|
* @returns {CheckoutResponse}
|
|
32
31
|
*/
|
|
33
32
|
update(params_1) {
|
|
34
|
-
return __awaiter(this, arguments, void 0, function* (params, experimental_calc_totals = false) {
|
|
33
|
+
return __awaiter(this, arguments, void 0, function* (params, experimental_calc_totals = false, options) {
|
|
35
34
|
const query = qs.stringify(params, { encode: true });
|
|
36
|
-
const options = {};
|
|
37
35
|
const url = `/${this.endpoint}/?__experimental_calc_totals=${experimental_calc_totals || false}&${query}`;
|
|
38
36
|
const { data, error } = yield doPut(url, undefined, options);
|
|
39
37
|
return { data, error };
|
|
@@ -44,11 +42,10 @@ export class CheckoutService extends BaseService {
|
|
|
44
42
|
* @param params
|
|
45
43
|
* @returns {CheckoutResponse}
|
|
46
44
|
*/
|
|
47
|
-
processOrderAndPayment(params) {
|
|
45
|
+
processOrderAndPayment(params, options) {
|
|
48
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49
47
|
// Store API expects POST body with checkout payload at the base endpoint
|
|
50
48
|
const url = `/${this.endpoint}/`;
|
|
51
|
-
const options = {};
|
|
52
49
|
const { data, error } = yield doPost(url, params, options);
|
|
53
50
|
return { data, error };
|
|
54
51
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/checkout.service.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"checkout.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/checkout.service.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAS1D;;;;GAIG;AACH,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAAhD;;QACmB,aAAQ,GAAG,8BAA8B,CAAC;IA0D7D,CAAC;IAxDC;;;OAGG;IACG,GAAG,CAAC,OAAwB;;YAChC,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,GAAG,CAAC;YAEjC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,KAAK,CAAmB,GAAG,EAAE,OAAO,CAAC,CAAC;YAEpE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACzB,CAAC;KAAA;IAED;;;;;OAKG;IACG,MAAM;6DACV,MAA8B,EAC9B,wBAAwB,GAAG,KAAK,EAChC,OAAwB;YAExB,MAAM,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;YAErD,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,gCAC3B,wBAAwB,IAAI,KAC9B,IAAI,KAAK,EAAE,CAAC;YACZ,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,KAAK,CACjC,GAAG,EACH,SAAS,EACT,OAAO,CACR,CAAC;YAEF,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACzB,CAAC;KAAA;IAED;;;;OAIG;IACG,sBAAsB,CAC1B,MAA6B,EAC7B,OAAwB;;YAExB,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,GAAG,CAAC;YAEjC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAGlC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;YAExB,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACzB,CAAC;KAAA;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseService } from '../base.service.js';
|
|
2
2
|
import { ApiResult } from '../../types/api.js';
|
|
3
3
|
import { OrderResponse } from '../../types/index.js';
|
|
4
|
+
import { RequestOptions } from '../../types/request.js';
|
|
4
5
|
/**
|
|
5
6
|
* Order API
|
|
6
7
|
*
|
|
@@ -15,6 +16,6 @@ export declare class OrderService extends BaseService {
|
|
|
15
16
|
* @param billingEmail
|
|
16
17
|
* @returns {OrderResponse}
|
|
17
18
|
*/
|
|
18
|
-
get(key: string, orderId: string, billingEmail?: string): Promise<ApiResult<OrderResponse>>;
|
|
19
|
+
get(key: string, orderId: string, billingEmail?: string, options?: RequestOptions): Promise<ApiResult<OrderResponse>>;
|
|
19
20
|
}
|
|
20
21
|
//# sourceMappingURL=order.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/store/order.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"order.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/store/order.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;GAIG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+B;IAExD;;;;;;OAMG;IACG,GAAG,CACP,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;CASrC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
2
|
import { BaseService } from '../base.service.js';
|
|
3
|
-
import { doGet } from '../../
|
|
3
|
+
import { doGet } from '../../http/http.js';
|
|
4
4
|
/**
|
|
5
5
|
* Order API
|
|
6
6
|
*
|
|
@@ -18,13 +18,12 @@ export class OrderService extends BaseService {
|
|
|
18
18
|
* @param billingEmail
|
|
19
19
|
* @returns {OrderResponse}
|
|
20
20
|
*/
|
|
21
|
-
get(key, orderId, billingEmail) {
|
|
21
|
+
get(key, orderId, billingEmail, options) {
|
|
22
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
23
23
|
let url = `/${this.endpoint}/${orderId}?key=${key}`;
|
|
24
24
|
if (billingEmail) {
|
|
25
25
|
url += `&billing_email=${billingEmail}`;
|
|
26
26
|
}
|
|
27
|
-
const options = {};
|
|
28
27
|
const { data, error } = yield doGet(url, options);
|
|
29
28
|
return { data, error };
|
|
30
29
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/order.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"order.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/order.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAK3C;;;;GAIG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAA7C;;QACmB,aAAQ,GAAG,2BAA2B,CAAC;IAuB1D,CAAC;IArBC;;;;;;OAMG;IACG,GAAG,CACP,GAAW,EACX,OAAe,EACf,YAAqB,EACrB,OAAwB;;YAExB,IAAI,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,GAAG,EAAE,CAAC;YACpD,IAAI,YAAY,EAAE,CAAC;gBACjB,GAAG,IAAI,kBAAkB,YAAY,EAAE,CAAC;YAC1C,CAAC;YAED,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,KAAK,CAAgB,GAAG,EAAE,OAAO,CAAC,CAAC;YACjE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACzB,CAAC;KAAA;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseService } from '../base.service.js';
|
|
2
2
|
import { ApiPaginationResult, ApiResult } from '../../types/api.js';
|
|
3
3
|
import { ProductAttributeResponse } from '../../types/index.js';
|
|
4
|
+
import { RequestOptions } from '../../types/request.js';
|
|
4
5
|
/**
|
|
5
6
|
* Product Attributes API
|
|
6
7
|
*/
|
|
@@ -10,12 +11,12 @@ export declare class ProductAttributeService extends BaseService {
|
|
|
10
11
|
* List Product Attributes
|
|
11
12
|
* @returns {ProductAttributeResponse[]}
|
|
12
13
|
*/
|
|
13
|
-
list(): Promise<ApiPaginationResult<ProductAttributeResponse[]>>;
|
|
14
|
+
list(options?: RequestOptions): Promise<ApiPaginationResult<ProductAttributeResponse[]>>;
|
|
14
15
|
/**
|
|
15
16
|
* Single Product Attribute
|
|
16
17
|
* @param id The ID of the attribute to retrieve.
|
|
17
18
|
* @returns {ProductAttributeResponse}
|
|
18
19
|
*/
|
|
19
|
-
single(id: number): Promise<ApiResult<ProductAttributeResponse>>;
|
|
20
|
+
single(id: number, options?: RequestOptions): Promise<ApiResult<ProductAttributeResponse>>;
|
|
20
21
|
}
|
|
21
22
|
//# sourceMappingURL=product.attribute.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.attribute.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/store/product.attribute.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"product.attribute.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/store/product.attribute.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,WAAW;IACtD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6C;IAEtE;;;OAGG;IACG,IAAI,CACR,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,mBAAmB,CAAC,wBAAwB,EAAE,CAAC,CAAC;IAW3D;;;;OAIG;IACG,MAAM,CACV,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;CAKhD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from "tslib";
|
|
2
2
|
import { BaseService } from '../base.service.js';
|
|
3
|
-
import { doGet } from '../../
|
|
3
|
+
import { doGet } from '../../http/http.js';
|
|
4
4
|
import { extractPagination } from '../../utilities/common.js';
|
|
5
5
|
/**
|
|
6
6
|
* Product Attributes API
|
|
@@ -14,10 +14,10 @@ export class ProductAttributeService extends BaseService {
|
|
|
14
14
|
* List Product Attributes
|
|
15
15
|
* @returns {ProductAttributeResponse[]}
|
|
16
16
|
*/
|
|
17
|
-
list() {
|
|
17
|
+
list(options) {
|
|
18
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
19
19
|
const url = `/${this.endpoint}`;
|
|
20
|
-
const { data, error, headers } = yield doGet(url);
|
|
20
|
+
const { data, error, headers } = yield doGet(url, options);
|
|
21
21
|
const pagination = extractPagination(headers);
|
|
22
22
|
return { data, error, pagination };
|
|
23
23
|
});
|
|
@@ -27,10 +27,10 @@ export class ProductAttributeService extends BaseService {
|
|
|
27
27
|
* @param id The ID of the attribute to retrieve.
|
|
28
28
|
* @returns {ProductAttributeResponse}
|
|
29
29
|
*/
|
|
30
|
-
single(id) {
|
|
30
|
+
single(id, options) {
|
|
31
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
32
|
const url = `/${this.endpoint}/${id}`;
|
|
33
|
-
const { data, error } = yield doGet(url);
|
|
33
|
+
const { data, error } = yield doGet(url, options);
|
|
34
34
|
return { data, error };
|
|
35
35
|
});
|
|
36
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.attribute.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/product.attribute.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"product.attribute.service.js","sourceRoot":"","sources":["../../../../src/lib/services/store/product.attribute.service.ts"],"names":[],"mappings":";AAAA,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,uBAAwB,SAAQ,WAAW;IAAxD;;QACmB,aAAQ,GAAG,yCAAyC,CAAC;IAgCxE,CAAC;IA9BC;;;OAGG;IACG,IAAI,CACR,OAAwB;;YAExB,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChC,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;IAED;;;;OAIG;IACG,MAAM,CACV,EAAU,EACV,OAAwB;;YAExB,MAAM,GAAG,GAAG,IAAI,IAAI,CAAC,QAAQ,IAAI,EAAE,EAAE,CAAC;YACtC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,KAAK,CAA2B,GAAG,EAAE,OAAO,CAAC,CAAC;YAC5E,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACzB,CAAC;KAAA;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseService } from '../base.service.js';
|
|
2
2
|
import { ApiPaginationResult } from '../../types/api.js';
|
|
3
3
|
import { ProductAttributeTermRequest, ProductAttributeResponse } from '../../types/index.js';
|
|
4
|
+
import { RequestOptions } from '../../types/request.js';
|
|
4
5
|
/**
|
|
5
6
|
* Product Attribute Terms API
|
|
6
7
|
*/
|
|
@@ -12,6 +13,6 @@ export declare class ProductAttributeTermService extends BaseService {
|
|
|
12
13
|
* @param params
|
|
13
14
|
* @returns
|
|
14
15
|
*/
|
|
15
|
-
list(attributeId: number, params?: ProductAttributeTermRequest): Promise<ApiPaginationResult<ProductAttributeResponse[]>>;
|
|
16
|
+
list(attributeId: number, params?: ProductAttributeTermRequest, options?: RequestOptions): Promise<ApiPaginationResult<ProductAttributeResponse[]>>;
|
|
16
17
|
}
|
|
17
18
|
//# sourceMappingURL=product.attribute.term.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.attribute.term.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/store/product.attribute.term.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"product.attribute.term.service.d.ts","sourceRoot":"","sources":["../../../../src/lib/services/store/product.attribute.term.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,WAAW;IAC1D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6C;IAEtE;;;;;OAKG;IACG,IAAI,CACR,WAAW,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,2BAA2B,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,mBAAmB,CAAC,wBAAwB,EAAE,CAAC,CAAC;CAW5D"}
|