@daffodil/cart 0.38.9 → 0.39.3
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/bundles/daffodil-cart-driver-in-memory.umd.js +111 -1202
- package/bundles/daffodil-cart-driver-in-memory.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver-in-memory.umd.min.js +1 -1
- package/bundles/daffodil-cart-driver-in-memory.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-driver-magento-testing.umd.js +12 -177
- package/bundles/daffodil-cart-driver-magento-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver-magento-testing.umd.min.js +1 -1
- package/bundles/daffodil-cart-driver-magento-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-driver-magento.umd.js +164 -1661
- package/bundles/daffodil-cart-driver-magento.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver-magento.umd.min.js +1 -1
- package/bundles/daffodil-cart-driver-magento.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-driver-testing.umd.js +23 -375
- package/bundles/daffodil-cart-driver-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver-testing.umd.min.js +1 -1
- package/bundles/daffodil-cart-driver-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-driver.umd.js +29 -466
- package/bundles/daffodil-cart-driver.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver.umd.min.js +16 -1
- package/bundles/daffodil-cart-driver.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-routing.umd.js +43 -518
- package/bundles/daffodil-cart-routing.umd.js.map +1 -1
- package/bundles/daffodil-cart-routing.umd.min.js +1 -1
- package/bundles/daffodil-cart-routing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-state-testing.umd.js +6 -241
- package/bundles/daffodil-cart-state-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-state-testing.umd.min.js +2 -2
- package/bundles/daffodil-cart-state-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-state.umd.js +656 -4198
- package/bundles/daffodil-cart-state.umd.js.map +1 -1
- package/bundles/daffodil-cart-state.umd.min.js +1 -1
- package/bundles/daffodil-cart-state.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-testing.umd.js +13 -187
- package/bundles/daffodil-cart-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-testing.umd.min.js +1 -1
- package/bundles/daffodil-cart-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart.umd.js +43 -271
- package/bundles/daffodil-cart.umd.js.map +1 -1
- package/bundles/daffodil-cart.umd.min.js +3 -2
- package/bundles/daffodil-cart.umd.min.js.map +1 -1
- package/driver/in-memory/package.json +1 -1
- package/driver/magento/package.json +1 -1
- package/driver/magento/testing/package.json +1 -1
- package/driver/package.json +1 -1
- package/driver/testing/package.json +1 -1
- package/esm2015/daffodil-cart.js +2 -7
- package/esm2015/driver/daffodil-cart-driver.js +2 -7
- package/esm2015/driver/errors/cart-not-found.js +1 -13
- package/esm2015/driver/errors/codes.enum.js +12 -18
- package/esm2015/driver/errors/expired-payment-token.js +1 -15
- package/esm2015/driver/errors/invalid-api-response.js +1 -15
- package/esm2015/driver/errors/invalid-country.js +1 -13
- package/esm2015/driver/errors/invalid-coupon-code.js +1 -16
- package/esm2015/driver/errors/invalid-region.js +1 -13
- package/esm2015/driver/errors/map.js +1 -7
- package/esm2015/driver/errors/product-not-found.js +1 -13
- package/esm2015/driver/errors/product-out-of-stock.js +1 -13
- package/esm2015/driver/errors/public_api.js +1 -6
- package/esm2015/driver/in-memory/backend/cart/cart.service.js +7 -65
- package/esm2015/driver/in-memory/backend/cart-address/cart-address.service.js +5 -39
- package/esm2015/driver/in-memory/backend/cart-billing-address/cart-billing-address.service.js +7 -53
- package/esm2015/driver/in-memory/backend/cart-coupon/cart-coupon.service.js +10 -85
- package/esm2015/driver/in-memory/backend/cart-items/cart-items.service.js +21 -169
- package/esm2015/driver/in-memory/backend/cart-order/cart-order.service.js +5 -22
- package/esm2015/driver/in-memory/backend/cart-payment/cart-payment.service.js +9 -67
- package/esm2015/driver/in-memory/backend/cart-payment-methods/cart-payment-methods.service.js +5 -27
- package/esm2015/driver/in-memory/backend/cart-root.service.js +4 -119
- package/esm2015/driver/in-memory/backend/cart-shipping-address/cart-shipping-address.service.js +7 -53
- package/esm2015/driver/in-memory/backend/cart-shipping-information/cart-shipping-information.service.js +9 -68
- package/esm2015/driver/in-memory/backend/cart-shipping-methods/cart-shipping-methods.service.js +5 -38
- package/esm2015/driver/in-memory/backend/public_api.js +1 -6
- package/esm2015/driver/in-memory/daffodil-cart-driver-in-memory.js +2 -7
- package/esm2015/driver/in-memory/drivers/cart/cart.service.js +4 -48
- package/esm2015/driver/in-memory/drivers/cart-address/cart-address.service.js +3 -28
- package/esm2015/driver/in-memory/drivers/cart-billing-address/cart-billing-address.service.js +3 -32
- package/esm2015/driver/in-memory/drivers/cart-coupon/cart-coupon.service.js +3 -41
- package/esm2015/driver/in-memory/drivers/cart-driver.module.js +1 -9
- package/esm2015/driver/in-memory/drivers/cart-item/cart-item.service.js +3 -48
- package/esm2015/driver/in-memory/drivers/cart-order/cart-order.service.js +3 -28
- package/esm2015/driver/in-memory/drivers/cart-payment/cart-payment.service.js +3 -42
- package/esm2015/driver/in-memory/drivers/cart-payment-methods/cart-payment-methods.service.js +3 -27
- package/esm2015/driver/in-memory/drivers/cart-shipping-address/cart-shipping-address.service.js +3 -32
- package/esm2015/driver/in-memory/drivers/cart-shipping-information/cart-shipping-information.service.js +3 -36
- package/esm2015/driver/in-memory/drivers/cart-shipping-methods/cart-shipping-methods.service.js +3 -27
- package/esm2015/driver/in-memory/drivers/public_api.js +1 -6
- package/esm2015/driver/in-memory/index.js +2 -7
- package/esm2015/driver/in-memory/injection-tokens/extra-attributes-hook.token.js +2 -16
- package/esm2015/driver/in-memory/injection-tokens/public_api.js +1 -6
- package/esm2015/driver/in-memory/public_api.js +4 -9
- package/esm2015/driver/index.js +2 -7
- package/esm2015/driver/interfaces/cart-address-service.interface.js +1 -22
- package/esm2015/driver/interfaces/cart-billing-address-service.interface.js +1 -28
- package/esm2015/driver/interfaces/cart-coupon-service.interface.js +1 -41
- package/esm2015/driver/interfaces/cart-item-service.interface.js +1 -50
- package/esm2015/driver/interfaces/cart-order-service.interface.js +1 -22
- package/esm2015/driver/interfaces/cart-payment-methods-service.interface.js +1 -21
- package/esm2015/driver/interfaces/cart-payment-service.interface.js +1 -42
- package/esm2015/driver/interfaces/cart-service.interface.js +1 -42
- package/esm2015/driver/interfaces/cart-shipping-address-service.interface.js +1 -28
- package/esm2015/driver/interfaces/cart-shipping-information-service.interface.js +1 -36
- package/esm2015/driver/interfaces/cart-shipping-methods-service.interface.js +1 -21
- package/esm2015/driver/interfaces/public_api.js +1 -6
- package/esm2015/driver/magento/cart-address.service.js +5 -71
- package/esm2015/driver/magento/cart-billing-address.service.js +7 -93
- package/esm2015/driver/magento/cart-coupon.service.js +6 -75
- package/esm2015/driver/magento/cart-driver.module.js +1 -9
- package/esm2015/driver/magento/cart-item.service.js +10 -126
- package/esm2015/driver/magento/cart-order.service.js +5 -33
- package/esm2015/driver/magento/cart-payment-methods.service.js +4 -43
- package/esm2015/driver/magento/cart-payment.service.js +7 -115
- package/esm2015/driver/magento/cart-shipping-address.service.js +7 -93
- package/esm2015/driver/magento/cart-shipping-information.service.js +8 -87
- package/esm2015/driver/magento/cart-shipping-methods.service.js +4 -43
- package/esm2015/driver/magento/cart.service.js +6 -84
- package/esm2015/driver/magento/daffodil-cart-driver-magento.js +2 -7
- package/esm2015/driver/magento/errors/codes.js +6 -12
- package/esm2015/driver/magento/errors/map.js +1 -8
- package/esm2015/driver/magento/errors/transform.js +2 -19
- package/esm2015/driver/magento/index.js +2 -7
- package/esm2015/driver/magento/injection-tokens/cart-mutation-queue.token.js +2 -11
- package/esm2015/driver/magento/injection-tokens/fragments/cart.js +2 -11
- package/esm2015/driver/magento/injection-tokens/public_api.js +1 -6
- package/esm2015/driver/magento/models/public_api.js +3 -8
- package/esm2015/driver/magento/models/requests/billing-address.js +2 -20
- package/esm2015/driver/magento/models/requests/cart-address.js +2 -32
- package/esm2015/driver/magento/models/requests/cart-item-update.js +2 -16
- package/esm2015/driver/magento/models/requests/cart-item.js +2 -32
- package/esm2015/driver/magento/models/requests/payment-method.js +2 -16
- package/esm2015/driver/magento/models/requests/public_api.js +2 -7
- package/esm2015/driver/magento/models/requests/shipping-address.js +2 -18
- package/esm2015/driver/magento/models/requests/shipping-method.js +2 -16
- package/esm2015/driver/magento/models/responses/cart-address.js +2 -32
- package/esm2015/driver/magento/models/responses/cart-coupon.js +2 -14
- package/esm2015/driver/magento/models/responses/cart-item.js +7 -70
- package/esm2015/driver/magento/models/responses/cart-payment-method.js +2 -20
- package/esm2015/driver/magento/models/responses/cart-shipping-method.js +2 -22
- package/esm2015/driver/magento/models/responses/cart.js +2 -31
- package/esm2015/driver/magento/models/responses/public_api.js +2 -7
- package/esm2015/driver/magento/models/responses/shipping-address.js +2 -16
- package/esm2015/driver/magento/public_api.js +5 -10
- package/esm2015/driver/magento/queries/add-cart-item.js +3 -13
- package/esm2015/driver/magento/queries/apply-coupon.js +3 -13
- package/esm2015/driver/magento/queries/create-cart.js +1 -7
- package/esm2015/driver/magento/queries/fragments/available-payment-method.js +1 -7
- package/esm2015/driver/magento/queries/fragments/available-shipping-method.js +1 -7
- package/esm2015/driver/magento/queries/fragments/cart-address.js +1 -7
- package/esm2015/driver/magento/queries/fragments/cart-coupon.js +1 -7
- package/esm2015/driver/magento/queries/fragments/cart-item.js +1 -8
- package/esm2015/driver/magento/queries/fragments/cart-totals.js +1 -7
- package/esm2015/driver/magento/queries/fragments/cart.js +1 -7
- package/esm2015/driver/magento/queries/fragments/money.js +1 -7
- package/esm2015/driver/magento/queries/fragments/prices.js +1 -7
- package/esm2015/driver/magento/queries/fragments/public_api.js +1 -6
- package/esm2015/driver/magento/queries/fragments/selected-payment-method.js +1 -7
- package/esm2015/driver/magento/queries/fragments/selected-shipping-method.js +1 -7
- package/esm2015/driver/magento/queries/get-billing-address.js +3 -13
- package/esm2015/driver/magento/queries/get-cart.js +3 -13
- package/esm2015/driver/magento/queries/get-selected-payment-method.js +3 -13
- package/esm2015/driver/magento/queries/get-selected-shipping-method.js +3 -13
- package/esm2015/driver/magento/queries/get-shipping-address.js +3 -13
- package/esm2015/driver/magento/queries/list-cart-coupons.js +3 -13
- package/esm2015/driver/magento/queries/list-cart-items.js +3 -13
- package/esm2015/driver/magento/queries/list-payment-methods.js +3 -13
- package/esm2015/driver/magento/queries/list-shipping-methods.js +3 -13
- package/esm2015/driver/magento/queries/place-order.js +1 -7
- package/esm2015/driver/magento/queries/public_api.js +3 -8
- package/esm2015/driver/magento/queries/remove-all-coupons.js +3 -13
- package/esm2015/driver/magento/queries/remove-cart-item.js +3 -13
- package/esm2015/driver/magento/queries/responses/add-cart-item.js +2 -14
- package/esm2015/driver/magento/queries/responses/apply-coupon.js +2 -14
- package/esm2015/driver/magento/queries/responses/create-cart.js +2 -14
- package/esm2015/driver/magento/queries/responses/get-billing-address.js +2 -14
- package/esm2015/driver/magento/queries/responses/get-cart.js +2 -16
- package/esm2015/driver/magento/queries/responses/get-selected-payment-method.js +2 -14
- package/esm2015/driver/magento/queries/responses/get-selected-shipping-method.js +2 -14
- package/esm2015/driver/magento/queries/responses/get-shipping-address.js +2 -14
- package/esm2015/driver/magento/queries/responses/list-cart-coupons.js +2 -14
- package/esm2015/driver/magento/queries/responses/list-cart-items.js +2 -14
- package/esm2015/driver/magento/queries/responses/list-payment-methods.js +2 -14
- package/esm2015/driver/magento/queries/responses/list-shipping-methods.js +2 -14
- package/esm2015/driver/magento/queries/responses/place-order.js +2 -14
- package/esm2015/driver/magento/queries/responses/public_api.js +2 -7
- package/esm2015/driver/magento/queries/responses/remove-all-coupons.js +2 -14
- package/esm2015/driver/magento/queries/responses/remove-cart-item.js +2 -14
- package/esm2015/driver/magento/queries/responses/set-guest-email.js +2 -14
- package/esm2015/driver/magento/queries/responses/set-selected-payment-method-with-billing-and-email.js +2 -18
- package/esm2015/driver/magento/queries/responses/set-selected-payment-method-with-billing.js +2 -16
- package/esm2015/driver/magento/queries/responses/set-selected-payment-method.js +2 -14
- package/esm2015/driver/magento/queries/responses/set-selected-shipping-method.js +2 -14
- package/esm2015/driver/magento/queries/responses/update-address-with-email.js +2 -18
- package/esm2015/driver/magento/queries/responses/update-address.js +2 -16
- package/esm2015/driver/magento/queries/responses/update-billing-address-with-email.js +2 -16
- package/esm2015/driver/magento/queries/responses/update-billing-address.js +2 -14
- package/esm2015/driver/magento/queries/responses/update-cart-item.js +2 -14
- package/esm2015/driver/magento/queries/responses/update-shipping-address-with-email.js +2 -16
- package/esm2015/driver/magento/queries/responses/update-shipping-address.js +2 -14
- package/esm2015/driver/magento/queries/set-selected-payment-method-with-billing-and-email.js +3 -13
- package/esm2015/driver/magento/queries/set-selected-payment-method-with-billing.js +3 -13
- package/esm2015/driver/magento/queries/set-selected-payment-method.js +3 -13
- package/esm2015/driver/magento/queries/set-selected-shipping-method.js +3 -13
- package/esm2015/driver/magento/queries/update-address-with-email.js +3 -13
- package/esm2015/driver/magento/queries/update-address.js +3 -13
- package/esm2015/driver/magento/queries/update-billing-address-with-email.js +3 -13
- package/esm2015/driver/magento/queries/update-billing-address.js +3 -13
- package/esm2015/driver/magento/queries/update-cart-item.js +3 -13
- package/esm2015/driver/magento/queries/update-shipping-address-with-email.js +3 -13
- package/esm2015/driver/magento/queries/update-shipping-address.js +3 -13
- package/esm2015/driver/magento/testing/daffodil-cart-driver-magento-testing.js +2 -7
- package/esm2015/driver/magento/testing/factories/cart-address-input.factory.js +2 -29
- package/esm2015/driver/magento/testing/factories/cart-address.factory.js +2 -31
- package/esm2015/driver/magento/testing/factories/cart-coupon.factory.js +2 -11
- package/esm2015/driver/magento/testing/factories/cart-item/bundle-cart-item.factory.js +2 -13
- package/esm2015/driver/magento/testing/factories/cart-item/cart-item.factory.js +2 -32
- package/esm2015/driver/magento/testing/factories/cart-item/configurable-cart-item.factory.js +2 -13
- package/esm2015/driver/magento/testing/factories/cart-payment-method.factory.js +2 -15
- package/esm2015/driver/magento/testing/factories/cart-shipping-method.factory.js +2 -23
- package/esm2015/driver/magento/testing/factories/cart.factory.js +2 -33
- package/esm2015/driver/magento/testing/factories/public_api.js +1 -6
- package/esm2015/driver/magento/testing/factories/shipping-address.factory.js +2 -15
- package/esm2015/driver/magento/testing/index.js +2 -7
- package/esm2015/driver/magento/testing/public_api.js +2 -7
- package/esm2015/driver/magento/transforms/inputs/billing-address.service.js +2 -21
- package/esm2015/driver/magento/transforms/inputs/cart-address.service.js +2 -11
- package/esm2015/driver/magento/transforms/inputs/cart-item-input-transformers.js +2 -23
- package/esm2015/driver/magento/transforms/inputs/cart-item-update.service.js +2 -11
- package/esm2015/driver/magento/transforms/inputs/payment-method.service.js +2 -11
- package/esm2015/driver/magento/transforms/inputs/shipping-address.service.js +2 -21
- package/esm2015/driver/magento/transforms/inputs/shipping-method.service.js +2 -11
- package/esm2015/driver/magento/transforms/outputs/billing-address.service.js +3 -19
- package/esm2015/driver/magento/transforms/outputs/cart-address.service.js +3 -9
- package/esm2015/driver/magento/transforms/outputs/cart-coupon-response.service.js +3 -24
- package/esm2015/driver/magento/transforms/outputs/cart-coupon.js +1 -10
- package/esm2015/driver/magento/transforms/outputs/cart-item/bundle-cart-item-transformer.js +2 -12
- package/esm2015/driver/magento/transforms/outputs/cart-item/cart-item-transformer.js +4 -10
- package/esm2015/driver/magento/transforms/outputs/cart-item/configurable-cart-item-transformer.js +2 -12
- package/esm2015/driver/magento/transforms/outputs/cart-item/simple-cart-item-transformer.js +4 -14
- package/esm2015/driver/magento/transforms/outputs/cart-payment.service.js +3 -9
- package/esm2015/driver/magento/transforms/outputs/cart-shipping-information.service.js +6 -20
- package/esm2015/driver/magento/transforms/outputs/cart-shipping-rate.service.js +3 -9
- package/esm2015/driver/magento/transforms/outputs/cart-totals-transformer.js +4 -31
- package/esm2015/driver/magento/transforms/outputs/cart.service.js +5 -98
- package/esm2015/driver/magento/transforms/outputs/shipping-address.service.js +3 -19
- package/esm2015/driver/magento/transforms/public_api.js +1 -6
- package/esm2015/driver/public_api.js +3 -8
- package/esm2015/driver/testing/daffodil-cart-driver-testing.js +2 -7
- package/esm2015/driver/testing/drivers/cart/cart.service.js +3 -34
- package/esm2015/driver/testing/drivers/cart-address/cart-address.service.js +3 -29
- package/esm2015/driver/testing/drivers/cart-billing-address/cart-billing-address.service.js +3 -33
- package/esm2015/driver/testing/drivers/cart-coupon/cart-coupon.service.js +3 -42
- package/esm2015/driver/testing/drivers/cart-driver.module.js +1 -9
- package/esm2015/driver/testing/drivers/cart-item/cart-item.service.js +3 -49
- package/esm2015/driver/testing/drivers/cart-order/cart-order.service.js +3 -13
- package/esm2015/driver/testing/drivers/cart-payment/cart-payment.service.js +3 -43
- package/esm2015/driver/testing/drivers/cart-payment-methods/cart-payment-methods.service.js +3 -22
- package/esm2015/driver/testing/drivers/cart-shipping-address/cart-shipping-address.service.js +3 -33
- package/esm2015/driver/testing/drivers/cart-shipping-information/cart-shipping-information.service.js +3 -37
- package/esm2015/driver/testing/drivers/cart-shipping-methods/cart-shipping-methods.service.js +3 -22
- package/esm2015/driver/testing/drivers/public_api.js +1 -6
- package/esm2015/driver/testing/index.js +2 -7
- package/esm2015/driver/testing/public_api.js +2 -7
- package/esm2015/errors/codes.enum.js +10 -12
- package/esm2015/errors/map.js +1 -7
- package/esm2015/errors/public_api.js +2 -7
- package/esm2015/errors/resolution/cart-not-found-or-created-resolution.js +2 -14
- package/esm2015/errors/resolution/cart-resolution.js +2 -14
- package/esm2015/errors/resolution/cart-server-side-resolution.js +2 -14
- package/esm2015/errors/resolution/cart-storage-resolution.js +2 -14
- package/esm2015/errors/resolution/public_api.js +1 -6
- package/esm2015/index.js +2 -7
- package/esm2015/injection-tokens/error-matcher.token.js +2 -11
- package/esm2015/injection-tokens/payment-method-map.js +3 -12
- package/esm2015/injection-tokens/public_api.js +1 -6
- package/esm2015/models/cart-address.js +2 -23
- package/esm2015/models/cart-coupon.js +2 -31
- package/esm2015/models/cart-item-input.js +10 -93
- package/esm2015/models/cart-item.js +2 -88
- package/esm2015/models/cart-order-result.js +2 -29
- package/esm2015/models/cart-payment.js +2 -25
- package/esm2015/models/cart-shipping-info.js +2 -14
- package/esm2015/models/cart-shipping-rate.js +2 -43
- package/esm2015/models/cart-total.js +13 -41
- package/esm2015/models/cart.js +2 -76
- package/esm2015/models/composite-cart-item.js +2 -40
- package/esm2015/models/configurable-cart-item.js +2 -35
- package/esm2015/models/public_api.js +7 -12
- package/esm2015/public_api.js +4 -9
- package/esm2015/routing/cart-routing.module.js +2 -11
- package/esm2015/routing/config/config.js +4 -23
- package/esm2015/routing/config/resolution/config.js +1 -21
- package/esm2015/routing/daffodil-cart-routing.js +2 -7
- package/esm2015/routing/guards/billing-address/billing-address-guard-redirect.token.js +1 -7
- package/esm2015/routing/guards/billing-address/billing-address.guard.js +5 -39
- package/esm2015/routing/guards/cart-items/cart-items-guard-redirect.token.js +2 -8
- package/esm2015/routing/guards/cart-items/cart-items.guard.js +6 -44
- package/esm2015/routing/guards/order-result/order-result-guard-redirect.token.js +1 -7
- package/esm2015/routing/guards/order-result/order-result.guard.js +4 -38
- package/esm2015/routing/guards/payment-method/payment-method-guard-redirect.token.js +1 -7
- package/esm2015/routing/guards/payment-method/payment-method.guard.js +5 -39
- package/esm2015/routing/guards/public_api.js +1 -6
- package/esm2015/routing/guards/resolved-cart/resolved-cart.guard.js +7 -49
- package/esm2015/routing/guards/shipping-address/shipping-address-guard-redirect.token.js +1 -7
- package/esm2015/routing/guards/shipping-address/shipping-address.guard.js +5 -39
- package/esm2015/routing/guards/shipping-method/shipping-method-guard-redirect.token.js +1 -7
- package/esm2015/routing/guards/shipping-method/shipping-method.guard.js +5 -39
- package/esm2015/routing/index.js +2 -7
- package/esm2015/routing/public_api.js +3 -8
- package/esm2015/routing/resolvers/cart-resolver.service.js +5 -49
- package/esm2015/routing/resolvers/empty-cart-resolver.service.js +4 -42
- package/esm2015/routing/resolvers/public_api.js +1 -6
- package/esm2015/routing/resolvers/tokens/cart-resolver-redirect.token.js +1 -7
- package/esm2015/routing/resolvers/tokens/empty-cart-resolver-redirect.token.js +1 -7
- package/esm2015/state/actions/cart-address.actions.js +8 -40
- package/esm2015/state/actions/cart-billing-address.actions.js +11 -66
- package/esm2015/state/actions/cart-coupon.actions.js +17 -124
- package/esm2015/state/actions/cart-item.actions.js +22 -186
- package/esm2015/state/actions/cart-order.actions.js +8 -40
- package/esm2015/state/actions/cart-payment-methods.actions.js +8 -34
- package/esm2015/state/actions/cart-payment.actions.js +19 -133
- package/esm2015/state/actions/cart-shipping-address.actions.js +11 -66
- package/esm2015/state/actions/cart-shipping-information.actions.js +14 -100
- package/esm2015/state/actions/cart-shipping-methods.actions.js +8 -36
- package/esm2015/state/actions/cart.actions.js +22 -162
- package/esm2015/state/actions/public_api.js +12 -17
- package/esm2015/state/cart-state.module.js +1 -6
- package/esm2015/state/daffodil-cart-state.js +2 -7
- package/esm2015/state/effects/cart-address.effects.js +3 -60
- package/esm2015/state/effects/cart-billing-address.effects.js +3 -67
- package/esm2015/state/effects/cart-coupon.effects.js +9 -129
- package/esm2015/state/effects/cart-item.effects.js +6 -120
- package/esm2015/state/effects/cart-order.effects.js +3 -62
- package/esm2015/state/effects/cart-payment-methods.effects.js +2 -52
- package/esm2015/state/effects/cart-payment.effects.js +5 -93
- package/esm2015/state/effects/cart-resolver.effects.js +4 -80
- package/esm2015/state/effects/cart-shipping-address.effects.js +3 -67
- package/esm2015/state/effects/cart-shipping-information.effects.js +4 -82
- package/esm2015/state/effects/cart-shipping-methods.effects.js +2 -52
- package/esm2015/state/effects/cart.effects.js +9 -128
- package/esm2015/state/facades/cart/cart-facade.interface.js +2 -355
- package/esm2015/state/facades/cart/cart.facade.js +10 -275
- package/esm2015/state/index.js +2 -7
- package/esm2015/state/injection-tokens/cart-item-state-debounce-time.js +1 -7
- package/esm2015/state/injection-tokens/public_api.js +1 -6
- package/esm2015/state/models/public_api.js +4 -9
- package/esm2015/state/models/stateful-cart-item.js +9 -27
- package/esm2015/state/models/stateful-composite-cart-item.js +2 -10
- package/esm2015/state/models/stateful-configurable-cart-item.js +2 -10
- package/esm2015/state/public_api.js +6 -11
- package/esm2015/state/reducers/action-types.type.js +2 -6
- package/esm2015/state/reducers/cart/cart.reducer.js +1 -15
- package/esm2015/state/reducers/cart-billing-address/cart-billing-address.reducer.js +1 -15
- package/esm2015/state/reducers/cart-coupon/cart-coupon.reducer.js +1 -15
- package/esm2015/state/reducers/cart-initial-state.js +1 -7
- package/esm2015/state/reducers/cart-item/cart-item.reducer.js +3 -21
- package/esm2015/state/reducers/cart-item-entities/cart-item-entities-reducer-adapter.js +4 -22
- package/esm2015/state/reducers/cart-item-entities/cart-item-entities.reducer.js +12 -58
- package/esm2015/state/reducers/cart-operation-type.enum.js +16 -17
- package/esm2015/state/reducers/cart-order/cart-order-initial-state.js +1 -7
- package/esm2015/state/reducers/cart-order/cart-order-state.interface.js +2 -19
- package/esm2015/state/reducers/cart-order/cart-order.reducer.js +1 -12
- package/esm2015/state/reducers/cart-payment/cart-payment.reducer.js +1 -15
- package/esm2015/state/reducers/cart-payment-methods/cart-payment-methods.reducer.js +1 -15
- package/esm2015/state/reducers/cart-reducers-state.interface.js +1 -28
- package/esm2015/state/reducers/cart-reducers.js +1 -7
- package/esm2015/state/reducers/cart-resolve/cart-resolve-state.enum.js +9 -15
- package/esm2015/state/reducers/cart-resolve/cart-resolve.reducer.js +1 -12
- package/esm2015/state/reducers/cart-shipping-address/cart-shipping-address.reducer.js +1 -15
- package/esm2015/state/reducers/cart-shipping-information/cart-shipping-information.reducer.js +7 -17
- package/esm2015/state/reducers/cart-shipping-methods/cart-shipping-methods.reducer.js +1 -15
- package/esm2015/state/reducers/cart-state.interface.js +2 -21
- package/esm2015/state/reducers/cart-store-feature-key.js +1 -7
- package/esm2015/state/reducers/cart.reducer.js +1 -11
- package/esm2015/state/reducers/errors/cart-errors.type.js +2 -6
- package/esm2015/state/reducers/errors/error-state-helpers.js +5 -29
- package/esm2015/state/reducers/loading/cart-loading.type.js +3 -42
- package/esm2015/state/reducers/public_api.js +3 -8
- package/esm2015/state/reducers/token/extra.token.js +5 -21
- package/esm2015/state/reducers/token/public_api.js +1 -6
- package/esm2015/state/reducers/token/reducers.token.js +4 -13
- package/esm2015/state/selectors/cart/cart.selector.js +98 -811
- package/esm2015/state/selectors/cart-feature.selector.js +5 -28
- package/esm2015/state/selectors/cart-item-entities/cart-item-entities.selectors.js +29 -229
- package/esm2015/state/selectors/cart-order/cart-order.selector.js +15 -104
- package/esm2015/state/selectors/cart.selector.js +6 -30
- package/esm2015/state/selectors/public_api.js +2 -7
- package/esm2015/state/testing/cart-testing.module.js +1 -6
- package/esm2015/state/testing/daffodil-cart-state-testing.js +2 -7
- package/esm2015/state/testing/factories/stateful-cart-item.factory.js +2 -11
- package/esm2015/state/testing/factories/stateful-composite-cart-item.factory.js +2 -11
- package/esm2015/state/testing/factories/stateful-configurable-cart-item.factory.js +2 -11
- package/esm2015/state/testing/index.js +2 -7
- package/esm2015/state/testing/mock-cart-facade.js +2 -206
- package/esm2015/state/testing/public_api.js +4 -9
- package/esm2015/storage/cart-storage.service.js +2 -36
- package/esm2015/testing/daffodil-cart-testing.js +2 -7
- package/esm2015/testing/factories/cart-address.factory.js +2 -41
- package/esm2015/testing/factories/cart-coupon.factory.js +2 -17
- package/esm2015/testing/factories/cart-item/cart-item.factory.js +5 -51
- package/esm2015/testing/factories/cart-item/composite-cart-item.factory.js +2 -23
- package/esm2015/testing/factories/cart-item/configurable-cart-item.factory.js +2 -13
- package/esm2015/testing/factories/cart-payment.factory.js +2 -11
- package/esm2015/testing/factories/cart-shipping-rate.factory.js +2 -23
- package/esm2015/testing/factories/cart.factory.js +2 -35
- package/esm2015/testing/factories/public_api.js +4 -9
- package/esm2015/testing/index.js +2 -7
- package/esm2015/testing/public_api.js +2 -7
- package/fesm2015/daffodil-cart-driver-in-memory.js +108 -1228
- package/fesm2015/daffodil-cart-driver-in-memory.js.map +1 -1
- package/fesm2015/daffodil-cart-driver-magento-testing.js +12 -227
- package/fesm2015/daffodil-cart-driver-magento-testing.js.map +1 -1
- package/fesm2015/daffodil-cart-driver-magento.js +161 -1844
- package/fesm2015/daffodil-cart-driver-magento.js.map +1 -1
- package/fesm2015/daffodil-cart-driver-testing.js +24 -376
- package/fesm2015/daffodil-cart-driver-testing.js.map +1 -1
- package/fesm2015/daffodil-cart-driver.js +13 -493
- package/fesm2015/daffodil-cart-driver.js.map +1 -1
- package/fesm2015/daffodil-cart-routing.js +44 -498
- package/fesm2015/daffodil-cart-routing.js.map +1 -1
- package/fesm2015/daffodil-cart-state-testing.js +6 -256
- package/fesm2015/daffodil-cart-state-testing.js.map +1 -1
- package/fesm2015/daffodil-cart-state.js +403 -3921
- package/fesm2015/daffodil-cart-state.js.map +1 -1
- package/fesm2015/daffodil-cart-testing.js +13 -228
- package/fesm2015/daffodil-cart-testing.js.map +1 -1
- package/fesm2015/daffodil-cart.js +39 -532
- package/fesm2015/daffodil-cart.js.map +1 -1
- package/package.json +5 -5
- package/routing/package.json +1 -1
- package/state/package.json +1 -1
- package/state/testing/package.json +1 -1
- package/testing/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ɵɵdefineInjectable, Injectable, ɵɵinject, InjectionToken, inject, Inject, NgModule } from '@angular/core';
|
|
2
2
|
import { DaffCartItemInputType, DaffCartTotalTypeEnum } from '@daffodil/cart';
|
|
3
3
|
import { MagentoProductStockStatusEnum } from '@daffodil/product/driver/magento';
|
|
4
4
|
import { daffAdd } from '@daffodil/core';
|
|
@@ -11,11 +11,6 @@ import { daffTransformMagentoError } from '@daffodil/driver/magento';
|
|
|
11
11
|
import { DaffBadInputError } from '@daffodil/driver';
|
|
12
12
|
import { CommonModule } from '@angular/common';
|
|
13
13
|
|
|
14
|
-
/**
|
|
15
|
-
* @fileoverview added by tsickle
|
|
16
|
-
* Generated from: transforms/outputs/cart-address.service.ts
|
|
17
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
18
|
-
*/
|
|
19
14
|
/**
|
|
20
15
|
* Transforms magento addresses into an object usable by daffodil.
|
|
21
16
|
*/
|
|
@@ -23,8 +18,7 @@ class DaffMagentoCartAddressTransformer {
|
|
|
23
18
|
/**
|
|
24
19
|
* Transforms the magento MagentoCart from the magento cart query into a DaffCartAddress.
|
|
25
20
|
*
|
|
26
|
-
* @param
|
|
27
|
-
* @return {?}
|
|
21
|
+
* @param address the address from a magento cart query.
|
|
28
22
|
*/
|
|
29
23
|
transform(address) {
|
|
30
24
|
return address ? {
|
|
@@ -49,38 +43,30 @@ class DaffMagentoCartAddressTransformer {
|
|
|
49
43
|
} : null;
|
|
50
44
|
}
|
|
51
45
|
}
|
|
46
|
+
/** @nocollapse */ DaffMagentoCartAddressTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartAddressTransformer_Factory() { return new DaffMagentoCartAddressTransformer(); }, token: DaffMagentoCartAddressTransformer, providedIn: "root" });
|
|
52
47
|
DaffMagentoCartAddressTransformer.decorators = [
|
|
53
48
|
{ type: Injectable, args: [{
|
|
54
49
|
providedIn: 'root',
|
|
55
50
|
},] }
|
|
56
51
|
];
|
|
57
|
-
/** @nocollapse */ DaffMagentoCartAddressTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartAddressTransformer_Factory() { return new DaffMagentoCartAddressTransformer(); }, token: DaffMagentoCartAddressTransformer, providedIn: "root" });
|
|
58
52
|
|
|
59
|
-
/**
|
|
60
|
-
* @fileoverview added by tsickle
|
|
61
|
-
* Generated from: transforms/outputs/billing-address.service.ts
|
|
62
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
63
|
-
*/
|
|
64
53
|
/**
|
|
65
54
|
* Transforms magento addresses into an object usable by daffodil.
|
|
66
55
|
*/
|
|
67
56
|
class DaffMagentoBillingAddressTransformer {
|
|
68
|
-
/**
|
|
69
|
-
* @param {?} addressTransformer
|
|
70
|
-
*/
|
|
71
57
|
constructor(addressTransformer) {
|
|
72
58
|
this.addressTransformer = addressTransformer;
|
|
73
59
|
}
|
|
74
60
|
/**
|
|
75
61
|
* Transforms the magento MagentoCart from the magento cart query into a DaffCartAddress.
|
|
76
62
|
*
|
|
77
|
-
* @param
|
|
78
|
-
* @return {?}
|
|
63
|
+
* @param address the address from a magento cart query.
|
|
79
64
|
*/
|
|
80
65
|
transform(address) {
|
|
81
66
|
return address ? Object.assign(Object.assign({}, this.addressTransformer.transform(address)), { address_type: 'billing' }) : null;
|
|
82
67
|
}
|
|
83
68
|
}
|
|
69
|
+
/** @nocollapse */ DaffMagentoBillingAddressTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoBillingAddressTransformer_Factory() { return new DaffMagentoBillingAddressTransformer(ɵɵinject(DaffMagentoCartAddressTransformer)); }, token: DaffMagentoBillingAddressTransformer, providedIn: "root" });
|
|
84
70
|
DaffMagentoBillingAddressTransformer.decorators = [
|
|
85
71
|
{ type: Injectable, args: [{
|
|
86
72
|
providedIn: 'root',
|
|
@@ -90,24 +76,7 @@ DaffMagentoBillingAddressTransformer.decorators = [
|
|
|
90
76
|
DaffMagentoBillingAddressTransformer.ctorParameters = () => [
|
|
91
77
|
{ type: DaffMagentoCartAddressTransformer }
|
|
92
78
|
];
|
|
93
|
-
/** @nocollapse */ DaffMagentoBillingAddressTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoBillingAddressTransformer_Factory() { return new DaffMagentoBillingAddressTransformer(ɵɵinject(DaffMagentoCartAddressTransformer)); }, token: DaffMagentoBillingAddressTransformer, providedIn: "root" });
|
|
94
|
-
if (false) {
|
|
95
|
-
/**
|
|
96
|
-
* @type {?}
|
|
97
|
-
* @private
|
|
98
|
-
*/
|
|
99
|
-
DaffMagentoBillingAddressTransformer.prototype.addressTransformer;
|
|
100
|
-
}
|
|
101
79
|
|
|
102
|
-
/**
|
|
103
|
-
* @fileoverview added by tsickle
|
|
104
|
-
* Generated from: transforms/outputs/cart-coupon.ts
|
|
105
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
106
|
-
*/
|
|
107
|
-
/**
|
|
108
|
-
* @param {?} coupon
|
|
109
|
-
* @return {?}
|
|
110
|
-
*/
|
|
111
80
|
function daffMagentoCouponTransform(coupon) {
|
|
112
81
|
return {
|
|
113
82
|
id: coupon.code,
|
|
@@ -115,85 +84,17 @@ function daffMagentoCouponTransform(coupon) {
|
|
|
115
84
|
};
|
|
116
85
|
}
|
|
117
86
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
const MagentoCartItemTypeEnum = {
|
|
125
|
-
Simple: "SimpleCartItem",
|
|
126
|
-
Bundle: "BundleCartItem",
|
|
127
|
-
Configurable: "ConfigurableCartItem",
|
|
128
|
-
};
|
|
129
|
-
/**
|
|
130
|
-
* @record
|
|
131
|
-
*/
|
|
132
|
-
function MagentoCartItemProduct() { }
|
|
133
|
-
if (false) {
|
|
134
|
-
/** @type {?} */
|
|
135
|
-
MagentoCartItemProduct.prototype.__typename;
|
|
136
|
-
/** @type {?} */
|
|
137
|
-
MagentoCartItemProduct.prototype.id;
|
|
138
|
-
/** @type {?} */
|
|
139
|
-
MagentoCartItemProduct.prototype.name;
|
|
140
|
-
/** @type {?} */
|
|
141
|
-
MagentoCartItemProduct.prototype.sku;
|
|
142
|
-
/** @type {?} */
|
|
143
|
-
MagentoCartItemProduct.prototype.url_key;
|
|
144
|
-
/** @type {?} */
|
|
145
|
-
MagentoCartItemProduct.prototype.url_suffix;
|
|
146
|
-
/** @type {?} */
|
|
147
|
-
MagentoCartItemProduct.prototype.thumbnail;
|
|
148
|
-
/** @type {?} */
|
|
149
|
-
MagentoCartItemProduct.prototype.stock_status;
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* An object for defining what the cart service requests and retrieves from a magento backend.
|
|
153
|
-
* @record
|
|
154
|
-
*/
|
|
155
|
-
function MagentoCartItem() { }
|
|
156
|
-
if (false) {
|
|
157
|
-
/** @type {?} */
|
|
158
|
-
MagentoCartItem.prototype.__typename;
|
|
159
|
-
/** @type {?} */
|
|
160
|
-
MagentoCartItem.prototype.id;
|
|
161
|
-
/** @type {?} */
|
|
162
|
-
MagentoCartItem.prototype.prices;
|
|
163
|
-
/** @type {?} */
|
|
164
|
-
MagentoCartItem.prototype.product;
|
|
165
|
-
/** @type {?} */
|
|
166
|
-
MagentoCartItem.prototype.quantity;
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* An interface for magento bundled cart items.
|
|
170
|
-
* @record
|
|
171
|
-
*/
|
|
172
|
-
function MagentoBundleCartItem() { }
|
|
173
|
-
if (false) {
|
|
174
|
-
/** @type {?} */
|
|
175
|
-
MagentoBundleCartItem.prototype.bundle_options;
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* An interface for magento configurable cart items.
|
|
179
|
-
* @record
|
|
180
|
-
*/
|
|
181
|
-
function MagentoConfigurableCartItem() { }
|
|
182
|
-
if (false) {
|
|
183
|
-
/** @type {?} */
|
|
184
|
-
MagentoConfigurableCartItem.prototype.configurable_options;
|
|
185
|
-
}
|
|
87
|
+
var MagentoCartItemTypeEnum;
|
|
88
|
+
(function (MagentoCartItemTypeEnum) {
|
|
89
|
+
MagentoCartItemTypeEnum["Simple"] = "SimpleCartItem";
|
|
90
|
+
MagentoCartItemTypeEnum["Bundle"] = "BundleCartItem";
|
|
91
|
+
MagentoCartItemTypeEnum["Configurable"] = "ConfigurableCartItem";
|
|
92
|
+
})(MagentoCartItemTypeEnum || (MagentoCartItemTypeEnum = {}));
|
|
186
93
|
|
|
187
|
-
/**
|
|
188
|
-
* @fileoverview added by tsickle
|
|
189
|
-
* Generated from: transforms/outputs/cart-item/simple-cart-item-transformer.ts
|
|
190
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
191
|
-
*/
|
|
192
94
|
/**
|
|
193
95
|
* Transforms the magento MagentoCartItem from the magento cart query into a DaffCartItem.
|
|
194
96
|
*
|
|
195
|
-
* @param
|
|
196
|
-
* @return {?}
|
|
97
|
+
* @param response the response from a magento cart query.
|
|
197
98
|
*/
|
|
198
99
|
function transformMagentoSimpleCartItem(cartItem) {
|
|
199
100
|
var _a;
|
|
@@ -215,31 +116,18 @@ function transformMagentoSimpleCartItem(cartItem) {
|
|
|
215
116
|
label: cartItem.product.thumbnail.label,
|
|
216
117
|
},
|
|
217
118
|
in_stock: cartItem.product.stock_status === MagentoProductStockStatusEnum.InStock,
|
|
218
|
-
discounts: ((_a = cartItem.prices.discounts) === null || _a === void 0 ? void 0 : _a.map(
|
|
219
|
-
* @param {?} discount
|
|
220
|
-
* @return {?}
|
|
221
|
-
*/
|
|
222
|
-
discount => {
|
|
119
|
+
discounts: ((_a = cartItem.prices.discounts) === null || _a === void 0 ? void 0 : _a.map(discount => {
|
|
223
120
|
var _a;
|
|
224
121
|
return ({
|
|
225
122
|
amount: (_a = discount.amount) === null || _a === void 0 ? void 0 : _a.value,
|
|
226
123
|
label: discount.label,
|
|
227
124
|
});
|
|
228
|
-
}))
|
|
125
|
+
})) || [],
|
|
229
126
|
// TODO: implement
|
|
230
127
|
parent_item_id: null,
|
|
231
128
|
} : null;
|
|
232
129
|
}
|
|
233
130
|
|
|
234
|
-
/**
|
|
235
|
-
* @fileoverview added by tsickle
|
|
236
|
-
* Generated from: transforms/outputs/cart-item/bundle-cart-item-transformer.ts
|
|
237
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
238
|
-
*/
|
|
239
|
-
/**
|
|
240
|
-
* @param {?} option
|
|
241
|
-
* @return {?}
|
|
242
|
-
*/
|
|
243
131
|
function transformBundleCartItemOption(option) {
|
|
244
132
|
return {
|
|
245
133
|
option_id: String(option.values[0].id),
|
|
@@ -251,22 +139,12 @@ function transformBundleCartItemOption(option) {
|
|
|
251
139
|
/**
|
|
252
140
|
* Transforms a MagentoBundleCartItem into a DaffCartItem.
|
|
253
141
|
*
|
|
254
|
-
* @param
|
|
255
|
-
* @return {?}
|
|
142
|
+
* @param response the response from a magento cart query.
|
|
256
143
|
*/
|
|
257
144
|
function transformMagentoBundleCartItem(bundleCartItem) {
|
|
258
145
|
return bundleCartItem ? Object.assign(Object.assign({}, transformMagentoSimpleCartItem(bundleCartItem)), { type: DaffCartItemInputType.Composite, options: bundleCartItem.bundle_options.map(transformBundleCartItemOption) }) : null;
|
|
259
146
|
}
|
|
260
147
|
|
|
261
|
-
/**
|
|
262
|
-
* @fileoverview added by tsickle
|
|
263
|
-
* Generated from: transforms/outputs/cart-item/configurable-cart-item-transformer.ts
|
|
264
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
265
|
-
*/
|
|
266
|
-
/**
|
|
267
|
-
* @param {?} option
|
|
268
|
-
* @return {?}
|
|
269
|
-
*/
|
|
270
148
|
function transformConfigurableCartItemAttribute(option) {
|
|
271
149
|
return {
|
|
272
150
|
attribute_label: option.option_label,
|
|
@@ -276,40 +154,28 @@ function transformConfigurableCartItemAttribute(option) {
|
|
|
276
154
|
/**
|
|
277
155
|
* Transforms a MagentoConfigurableCartItem into a DaffCartItem.
|
|
278
156
|
*
|
|
279
|
-
* @param
|
|
280
|
-
* @return {?}
|
|
157
|
+
* @param response the response from a magento cart query.
|
|
281
158
|
*/
|
|
282
159
|
function transformMagentoConfigurableCartItem(configurableCartItem) {
|
|
283
160
|
return configurableCartItem ? Object.assign(Object.assign({}, transformMagentoSimpleCartItem(configurableCartItem)), { type: DaffCartItemInputType.Configurable, attributes: configurableCartItem.configurable_options.map(transformConfigurableCartItemAttribute) }) : null;
|
|
284
161
|
}
|
|
285
162
|
|
|
286
|
-
/**
|
|
287
|
-
* @fileoverview added by tsickle
|
|
288
|
-
* Generated from: transforms/outputs/cart-item/cart-item-transformer.ts
|
|
289
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
290
|
-
*/
|
|
291
163
|
/**
|
|
292
164
|
* Transforms the MagentoCartItem into a DaffCartItem.
|
|
293
165
|
*
|
|
294
|
-
* @param
|
|
295
|
-
* @return {?}
|
|
166
|
+
* @param cartItem a MagentoCartItem
|
|
296
167
|
*/
|
|
297
168
|
function transformMagentoCartItem(cartItem) {
|
|
298
169
|
switch (cartItem.__typename) {
|
|
299
170
|
case MagentoCartItemTypeEnum.Bundle:
|
|
300
|
-
return transformMagentoBundleCartItem(
|
|
171
|
+
return transformMagentoBundleCartItem(cartItem);
|
|
301
172
|
case MagentoCartItemTypeEnum.Configurable:
|
|
302
|
-
return transformMagentoConfigurableCartItem(
|
|
173
|
+
return transformMagentoConfigurableCartItem(cartItem);
|
|
303
174
|
default:
|
|
304
175
|
return transformMagentoSimpleCartItem(cartItem);
|
|
305
176
|
}
|
|
306
177
|
}
|
|
307
178
|
|
|
308
|
-
/**
|
|
309
|
-
* @fileoverview added by tsickle
|
|
310
|
-
* Generated from: transforms/outputs/cart-payment.service.ts
|
|
311
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
312
|
-
*/
|
|
313
179
|
/**
|
|
314
180
|
* Transforms magento carts into an object usable by daffodil.
|
|
315
181
|
*/
|
|
@@ -317,8 +183,7 @@ class DaffMagentoCartPaymentTransformer {
|
|
|
317
183
|
/**
|
|
318
184
|
* Transforms the magento CartPayment from the magento cart query into a DaffCartPaymentMethod.
|
|
319
185
|
*
|
|
320
|
-
* @param
|
|
321
|
-
* @return {?}
|
|
186
|
+
* @param response the response from a magento cart query.
|
|
322
187
|
*/
|
|
323
188
|
transform(responsePayment) {
|
|
324
189
|
return responsePayment ? {
|
|
@@ -326,18 +191,13 @@ class DaffMagentoCartPaymentTransformer {
|
|
|
326
191
|
} : null;
|
|
327
192
|
}
|
|
328
193
|
}
|
|
194
|
+
/** @nocollapse */ DaffMagentoCartPaymentTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartPaymentTransformer_Factory() { return new DaffMagentoCartPaymentTransformer(); }, token: DaffMagentoCartPaymentTransformer, providedIn: "root" });
|
|
329
195
|
DaffMagentoCartPaymentTransformer.decorators = [
|
|
330
196
|
{ type: Injectable, args: [{
|
|
331
197
|
providedIn: 'root',
|
|
332
198
|
},] }
|
|
333
199
|
];
|
|
334
|
-
/** @nocollapse */ DaffMagentoCartPaymentTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartPaymentTransformer_Factory() { return new DaffMagentoCartPaymentTransformer(); }, token: DaffMagentoCartPaymentTransformer, providedIn: "root" });
|
|
335
200
|
|
|
336
|
-
/**
|
|
337
|
-
* @fileoverview added by tsickle
|
|
338
|
-
* Generated from: transforms/outputs/cart-shipping-rate.service.ts
|
|
339
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
340
|
-
*/
|
|
341
201
|
/**
|
|
342
202
|
* Transforms magento cart shipping methods into an object usable by daffodil.
|
|
343
203
|
*/
|
|
@@ -345,8 +205,7 @@ class DaffMagentoCartShippingRateTransformer {
|
|
|
345
205
|
/**
|
|
346
206
|
* Transforms the magento shipping method from the magento cart query into a DaffCartShippingRate.
|
|
347
207
|
*
|
|
348
|
-
* @param
|
|
349
|
-
* @return {?}
|
|
208
|
+
* @param shippingMethod the shippingMethod from a magento cart query.
|
|
350
209
|
*/
|
|
351
210
|
transform(shippingMethod) {
|
|
352
211
|
return shippingMethod ? {
|
|
@@ -361,38 +220,32 @@ class DaffMagentoCartShippingRateTransformer {
|
|
|
361
220
|
} : null;
|
|
362
221
|
}
|
|
363
222
|
}
|
|
223
|
+
/** @nocollapse */ DaffMagentoCartShippingRateTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartShippingRateTransformer_Factory() { return new DaffMagentoCartShippingRateTransformer(); }, token: DaffMagentoCartShippingRateTransformer, providedIn: "root" });
|
|
364
224
|
DaffMagentoCartShippingRateTransformer.decorators = [
|
|
365
225
|
{ type: Injectable, args: [{
|
|
366
226
|
providedIn: 'root',
|
|
367
227
|
},] }
|
|
368
228
|
];
|
|
369
|
-
/** @nocollapse */ DaffMagentoCartShippingRateTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartShippingRateTransformer_Factory() { return new DaffMagentoCartShippingRateTransformer(); }, token: DaffMagentoCartShippingRateTransformer, providedIn: "root" });
|
|
370
229
|
|
|
371
|
-
/**
|
|
372
|
-
* @fileoverview added by tsickle
|
|
373
|
-
* Generated from: transforms/outputs/cart-shipping-information.service.ts
|
|
374
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
375
|
-
*/
|
|
376
230
|
/**
|
|
377
231
|
* Transforms magento cart shipping methods into an object usable by daffodil.
|
|
378
232
|
*/
|
|
379
233
|
class DaffMagentoCartShippingInformationTransformer {
|
|
380
|
-
/**
|
|
381
|
-
* @param {?} shippingRateTransformer
|
|
382
|
-
*/
|
|
383
234
|
constructor(shippingRateTransformer) {
|
|
384
235
|
this.shippingRateTransformer = shippingRateTransformer;
|
|
385
236
|
}
|
|
386
237
|
/**
|
|
387
238
|
* Transforms the magento shipping method from the magento cart query into a DaffCartShippingInformation.
|
|
388
239
|
*
|
|
389
|
-
* @param
|
|
390
|
-
* @return {?}
|
|
240
|
+
* @param shippingMethod the shippingMethod from a magento cart query.
|
|
391
241
|
*/
|
|
392
242
|
transform(shippingMethod) {
|
|
393
|
-
return shippingMethod ? Object.assign(Object.assign({}, this.shippingRateTransformer.transform(shippingMethod)), {
|
|
243
|
+
return shippingMethod ? Object.assign(Object.assign({}, this.shippingRateTransformer.transform(shippingMethod)), {
|
|
244
|
+
// TODO: implement
|
|
245
|
+
address_id: null }) : null;
|
|
394
246
|
}
|
|
395
247
|
}
|
|
248
|
+
/** @nocollapse */ DaffMagentoCartShippingInformationTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartShippingInformationTransformer_Factory() { return new DaffMagentoCartShippingInformationTransformer(ɵɵinject(DaffMagentoCartShippingRateTransformer)); }, token: DaffMagentoCartShippingInformationTransformer, providedIn: "root" });
|
|
396
249
|
DaffMagentoCartShippingInformationTransformer.decorators = [
|
|
397
250
|
{ type: Injectable, args: [{
|
|
398
251
|
providedIn: 'root',
|
|
@@ -402,55 +255,20 @@ DaffMagentoCartShippingInformationTransformer.decorators = [
|
|
|
402
255
|
DaffMagentoCartShippingInformationTransformer.ctorParameters = () => [
|
|
403
256
|
{ type: DaffMagentoCartShippingRateTransformer }
|
|
404
257
|
];
|
|
405
|
-
/** @nocollapse */ DaffMagentoCartShippingInformationTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartShippingInformationTransformer_Factory() { return new DaffMagentoCartShippingInformationTransformer(ɵɵinject(DaffMagentoCartShippingRateTransformer)); }, token: DaffMagentoCartShippingInformationTransformer, providedIn: "root" });
|
|
406
|
-
if (false) {
|
|
407
|
-
/**
|
|
408
|
-
* @type {?}
|
|
409
|
-
* @private
|
|
410
|
-
*/
|
|
411
|
-
DaffMagentoCartShippingInformationTransformer.prototype.shippingRateTransformer;
|
|
412
|
-
}
|
|
413
258
|
|
|
414
|
-
/**
|
|
415
|
-
* @fileoverview added by tsickle
|
|
416
|
-
* Generated from: transforms/outputs/cart-totals-transformer.ts
|
|
417
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
418
|
-
*/
|
|
419
|
-
/**
|
|
420
|
-
* @param {?} discounts
|
|
421
|
-
* @return {?}
|
|
422
|
-
*/
|
|
423
259
|
function transformDiscounts(discounts) {
|
|
424
|
-
return discounts ? discounts.map((
|
|
425
|
-
* @param {?} discount
|
|
426
|
-
* @return {?}
|
|
427
|
-
*/
|
|
428
|
-
discount => ({
|
|
260
|
+
return discounts ? discounts.map(discount => ({
|
|
429
261
|
name: DaffCartTotalTypeEnum.discount,
|
|
430
262
|
label: discount.label,
|
|
431
263
|
value: discount.amount.value,
|
|
432
|
-
}))
|
|
264
|
+
})) : [];
|
|
433
265
|
}
|
|
434
|
-
/**
|
|
435
|
-
* @param {?} cart
|
|
436
|
-
* @return {?}
|
|
437
|
-
*/
|
|
438
266
|
function validateSelectedShippingAddress(cart) {
|
|
439
267
|
var _a, _b, _c;
|
|
440
268
|
return !!((_c = (_b = (_a = cart.shipping_addresses) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.selected_shipping_method) === null || _c === void 0 ? void 0 : _c.amount);
|
|
441
269
|
}
|
|
442
|
-
/**
|
|
443
|
-
* @param {?} cart
|
|
444
|
-
* @return {?}
|
|
445
|
-
*/
|
|
446
270
|
function transformCartTotals(cart) {
|
|
447
|
-
|
|
448
|
-
const totalTax = cart.prices.applied_taxes ? cart.prices.applied_taxes.reduce((/**
|
|
449
|
-
* @param {?} acc
|
|
450
|
-
* @param {?} tax
|
|
451
|
-
* @return {?}
|
|
452
|
-
*/
|
|
453
|
-
(acc, tax) => (daffAdd(acc, tax.amount.value))), 0) : 0;
|
|
271
|
+
const totalTax = cart.prices.applied_taxes ? cart.prices.applied_taxes.reduce((acc, tax) => (daffAdd(acc, tax.amount.value)), 0) : 0;
|
|
454
272
|
return {
|
|
455
273
|
totals: [
|
|
456
274
|
{
|
|
@@ -495,31 +313,23 @@ function transformCartTotals(cart) {
|
|
|
495
313
|
};
|
|
496
314
|
}
|
|
497
315
|
|
|
498
|
-
/**
|
|
499
|
-
* @fileoverview added by tsickle
|
|
500
|
-
* Generated from: transforms/outputs/shipping-address.service.ts
|
|
501
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
502
|
-
*/
|
|
503
316
|
/**
|
|
504
317
|
* Transforms magento addresses into an object usable by daffodil.
|
|
505
318
|
*/
|
|
506
319
|
class DaffMagentoShippingAddressTransformer {
|
|
507
|
-
/**
|
|
508
|
-
* @param {?} addressTransformer
|
|
509
|
-
*/
|
|
510
320
|
constructor(addressTransformer) {
|
|
511
321
|
this.addressTransformer = addressTransformer;
|
|
512
322
|
}
|
|
513
323
|
/**
|
|
514
324
|
* Transforms the magento MagentoCart from the magento cart query into a DaffCartAddress.
|
|
515
325
|
*
|
|
516
|
-
* @param
|
|
517
|
-
* @return {?}
|
|
326
|
+
* @param address the address from a magento cart query.
|
|
518
327
|
*/
|
|
519
328
|
transform(address) {
|
|
520
329
|
return address ? Object.assign(Object.assign({}, this.addressTransformer.transform(address)), { address_type: 'shipping' }) : null;
|
|
521
330
|
}
|
|
522
331
|
}
|
|
332
|
+
/** @nocollapse */ DaffMagentoShippingAddressTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoShippingAddressTransformer_Factory() { return new DaffMagentoShippingAddressTransformer(ɵɵinject(DaffMagentoCartAddressTransformer)); }, token: DaffMagentoShippingAddressTransformer, providedIn: "root" });
|
|
523
333
|
DaffMagentoShippingAddressTransformer.decorators = [
|
|
524
334
|
{ type: Injectable, args: [{
|
|
525
335
|
providedIn: 'root',
|
|
@@ -529,31 +339,11 @@ DaffMagentoShippingAddressTransformer.decorators = [
|
|
|
529
339
|
DaffMagentoShippingAddressTransformer.ctorParameters = () => [
|
|
530
340
|
{ type: DaffMagentoCartAddressTransformer }
|
|
531
341
|
];
|
|
532
|
-
/** @nocollapse */ DaffMagentoShippingAddressTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoShippingAddressTransformer_Factory() { return new DaffMagentoShippingAddressTransformer(ɵɵinject(DaffMagentoCartAddressTransformer)); }, token: DaffMagentoShippingAddressTransformer, providedIn: "root" });
|
|
533
|
-
if (false) {
|
|
534
|
-
/**
|
|
535
|
-
* @type {?}
|
|
536
|
-
* @private
|
|
537
|
-
*/
|
|
538
|
-
DaffMagentoShippingAddressTransformer.prototype.addressTransformer;
|
|
539
|
-
}
|
|
540
342
|
|
|
541
|
-
/**
|
|
542
|
-
* @fileoverview added by tsickle
|
|
543
|
-
* Generated from: transforms/outputs/cart.service.ts
|
|
544
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
545
|
-
*/
|
|
546
343
|
/**
|
|
547
344
|
* Transforms magento carts into an object usable by daffodil.
|
|
548
345
|
*/
|
|
549
346
|
class DaffMagentoCartTransformer {
|
|
550
|
-
/**
|
|
551
|
-
* @param {?} shippingAddressTransformer
|
|
552
|
-
* @param {?} billingAddressTransformer
|
|
553
|
-
* @param {?} paymentTransformer
|
|
554
|
-
* @param {?} shippingInformationTransformer
|
|
555
|
-
* @param {?} shippingRateTransformer
|
|
556
|
-
*/
|
|
557
347
|
constructor(shippingAddressTransformer, billingAddressTransformer, paymentTransformer, shippingInformationTransformer, shippingRateTransformer) {
|
|
558
348
|
this.shippingAddressTransformer = shippingAddressTransformer;
|
|
559
349
|
this.billingAddressTransformer = billingAddressTransformer;
|
|
@@ -561,11 +351,6 @@ class DaffMagentoCartTransformer {
|
|
|
561
351
|
this.shippingInformationTransformer = shippingInformationTransformer;
|
|
562
352
|
this.shippingRateTransformer = shippingRateTransformer;
|
|
563
353
|
}
|
|
564
|
-
/**
|
|
565
|
-
* @private
|
|
566
|
-
* @param {?} cart
|
|
567
|
-
* @return {?}
|
|
568
|
-
*/
|
|
569
354
|
transformShippingAddress(cart) {
|
|
570
355
|
return {
|
|
571
356
|
shipping_address: cart.shipping_addresses[0]
|
|
@@ -573,11 +358,6 @@ class DaffMagentoCartTransformer {
|
|
|
573
358
|
: null,
|
|
574
359
|
};
|
|
575
360
|
}
|
|
576
|
-
/**
|
|
577
|
-
* @private
|
|
578
|
-
* @param {?} cart
|
|
579
|
-
* @return {?}
|
|
580
|
-
*/
|
|
581
361
|
transformBillingAddress(cart) {
|
|
582
362
|
return {
|
|
583
363
|
billing_address: cart.billing_address
|
|
@@ -585,32 +365,17 @@ class DaffMagentoCartTransformer {
|
|
|
585
365
|
: null,
|
|
586
366
|
};
|
|
587
367
|
}
|
|
588
|
-
/**
|
|
589
|
-
* @private
|
|
590
|
-
* @param {?} cart
|
|
591
|
-
* @return {?}
|
|
592
|
-
*/
|
|
593
368
|
transformCartItems(cart) {
|
|
594
369
|
return {
|
|
595
370
|
items: cart.items.map(transformMagentoCartItem),
|
|
596
371
|
};
|
|
597
372
|
}
|
|
598
|
-
/**
|
|
599
|
-
* @private
|
|
600
|
-
* @param {?} cart
|
|
601
|
-
* @return {?}
|
|
602
|
-
*/
|
|
603
373
|
transformTotals(cart) {
|
|
604
374
|
return {
|
|
605
375
|
grand_total: cart.prices.grand_total.value,
|
|
606
376
|
subtotal: cart.prices.subtotal_excluding_tax.value,
|
|
607
377
|
};
|
|
608
378
|
}
|
|
609
|
-
/**
|
|
610
|
-
* @private
|
|
611
|
-
* @param {?} cart
|
|
612
|
-
* @return {?}
|
|
613
|
-
*/
|
|
614
379
|
transformCoupons(cart) {
|
|
615
380
|
return {
|
|
616
381
|
coupons: cart.applied_coupons
|
|
@@ -618,21 +383,11 @@ class DaffMagentoCartTransformer {
|
|
|
618
383
|
: [],
|
|
619
384
|
};
|
|
620
385
|
}
|
|
621
|
-
/**
|
|
622
|
-
* @private
|
|
623
|
-
* @param {?} cart
|
|
624
|
-
* @return {?}
|
|
625
|
-
*/
|
|
626
386
|
transformPayment(cart) {
|
|
627
387
|
return {
|
|
628
388
|
payment: this.paymentTransformer.transform(cart.selected_payment_method),
|
|
629
389
|
};
|
|
630
390
|
}
|
|
631
|
-
/**
|
|
632
|
-
* @private
|
|
633
|
-
* @param {?} cart
|
|
634
|
-
* @return {?}
|
|
635
|
-
*/
|
|
636
391
|
transformShippingInformation(cart) {
|
|
637
392
|
return {
|
|
638
393
|
shipping_information: cart.shipping_addresses[0]
|
|
@@ -640,46 +395,28 @@ class DaffMagentoCartTransformer {
|
|
|
640
395
|
: null,
|
|
641
396
|
};
|
|
642
397
|
}
|
|
643
|
-
/**
|
|
644
|
-
* @private
|
|
645
|
-
* @param {?} cart
|
|
646
|
-
* @return {?}
|
|
647
|
-
*/
|
|
648
398
|
transformShippingMethods(cart) {
|
|
649
399
|
return {
|
|
650
400
|
available_shipping_methods: cart.shipping_addresses[0] && cart.shipping_addresses[0].available_shipping_methods
|
|
651
|
-
? cart.shipping_addresses[0].available_shipping_methods.map((
|
|
652
|
-
* @param {?} method
|
|
653
|
-
* @return {?}
|
|
654
|
-
*/
|
|
655
|
-
method => this.shippingRateTransformer.transform(method)))
|
|
401
|
+
? cart.shipping_addresses[0].available_shipping_methods.map(method => this.shippingRateTransformer.transform(method))
|
|
656
402
|
: [],
|
|
657
403
|
};
|
|
658
404
|
}
|
|
659
|
-
/**
|
|
660
|
-
* @private
|
|
661
|
-
* @param {?} cart
|
|
662
|
-
* @return {?}
|
|
663
|
-
*/
|
|
664
405
|
transformPaymentMethods(cart) {
|
|
665
406
|
return {
|
|
666
|
-
available_payment_methods: cart.available_payment_methods.map((
|
|
667
|
-
* @param {?} method
|
|
668
|
-
* @return {?}
|
|
669
|
-
*/
|
|
670
|
-
method => this.paymentTransformer.transform(method))),
|
|
407
|
+
available_payment_methods: cart.available_payment_methods.map(method => this.paymentTransformer.transform(method)),
|
|
671
408
|
};
|
|
672
409
|
}
|
|
673
410
|
/**
|
|
674
411
|
* Transforms the magento MagentoCart from the magento cart query into a DaffCart.
|
|
675
412
|
*
|
|
676
|
-
* @param
|
|
677
|
-
* @return {?}
|
|
413
|
+
* @param cart the cart from a magento cart query.
|
|
678
414
|
*/
|
|
679
415
|
transform(cart) {
|
|
680
416
|
return cart ? Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ extra_attributes: cart }, this.transformCartItems(cart)), this.transformBillingAddress(cart)), this.transformShippingAddress(cart)), this.transformCoupons(cart)), this.transformPayment(cart)), this.transformTotals(cart)), transformCartTotals(cart)), this.transformShippingInformation(cart)), this.transformShippingMethods(cart)), this.transformPaymentMethods(cart)), { id: cart.id }) : null;
|
|
681
417
|
}
|
|
682
418
|
}
|
|
419
|
+
/** @nocollapse */ DaffMagentoCartTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartTransformer_Factory() { return new DaffMagentoCartTransformer(ɵɵinject(DaffMagentoShippingAddressTransformer), ɵɵinject(DaffMagentoBillingAddressTransformer), ɵɵinject(DaffMagentoCartPaymentTransformer), ɵɵinject(DaffMagentoCartShippingInformationTransformer), ɵɵinject(DaffMagentoCartShippingRateTransformer)); }, token: DaffMagentoCartTransformer, providedIn: "root" });
|
|
683
420
|
DaffMagentoCartTransformer.decorators = [
|
|
684
421
|
{ type: Injectable, args: [{
|
|
685
422
|
providedIn: 'root',
|
|
@@ -693,45 +430,8 @@ DaffMagentoCartTransformer.ctorParameters = () => [
|
|
|
693
430
|
{ type: DaffMagentoCartShippingInformationTransformer },
|
|
694
431
|
{ type: DaffMagentoCartShippingRateTransformer }
|
|
695
432
|
];
|
|
696
|
-
/** @nocollapse */ DaffMagentoCartTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartTransformer_Factory() { return new DaffMagentoCartTransformer(ɵɵinject(DaffMagentoShippingAddressTransformer), ɵɵinject(DaffMagentoBillingAddressTransformer), ɵɵinject(DaffMagentoCartPaymentTransformer), ɵɵinject(DaffMagentoCartShippingInformationTransformer), ɵɵinject(DaffMagentoCartShippingRateTransformer)); }, token: DaffMagentoCartTransformer, providedIn: "root" });
|
|
697
|
-
if (false) {
|
|
698
|
-
/**
|
|
699
|
-
* @type {?}
|
|
700
|
-
* @private
|
|
701
|
-
*/
|
|
702
|
-
DaffMagentoCartTransformer.prototype.shippingAddressTransformer;
|
|
703
|
-
/**
|
|
704
|
-
* @type {?}
|
|
705
|
-
* @private
|
|
706
|
-
*/
|
|
707
|
-
DaffMagentoCartTransformer.prototype.billingAddressTransformer;
|
|
708
|
-
/**
|
|
709
|
-
* @type {?}
|
|
710
|
-
* @private
|
|
711
|
-
*/
|
|
712
|
-
DaffMagentoCartTransformer.prototype.paymentTransformer;
|
|
713
|
-
/**
|
|
714
|
-
* @type {?}
|
|
715
|
-
* @private
|
|
716
|
-
*/
|
|
717
|
-
DaffMagentoCartTransformer.prototype.shippingInformationTransformer;
|
|
718
|
-
/**
|
|
719
|
-
* @type {?}
|
|
720
|
-
* @private
|
|
721
|
-
*/
|
|
722
|
-
DaffMagentoCartTransformer.prototype.shippingRateTransformer;
|
|
723
|
-
}
|
|
724
433
|
|
|
725
|
-
/**
|
|
726
|
-
* @fileoverview added by tsickle
|
|
727
|
-
* Generated from: transforms/inputs/cart-address.service.ts
|
|
728
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
729
|
-
*/
|
|
730
434
|
class DaffMagentoCartAddressInputTransformer {
|
|
731
|
-
/**
|
|
732
|
-
* @param {?} cartAddress
|
|
733
|
-
* @return {?}
|
|
734
|
-
*/
|
|
735
435
|
transform(cartAddress) {
|
|
736
436
|
return {
|
|
737
437
|
city: cartAddress.city,
|
|
@@ -746,29 +446,17 @@ class DaffMagentoCartAddressInputTransformer {
|
|
|
746
446
|
};
|
|
747
447
|
}
|
|
748
448
|
}
|
|
449
|
+
/** @nocollapse */ DaffMagentoCartAddressInputTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartAddressInputTransformer_Factory() { return new DaffMagentoCartAddressInputTransformer(); }, token: DaffMagentoCartAddressInputTransformer, providedIn: "root" });
|
|
749
450
|
DaffMagentoCartAddressInputTransformer.decorators = [
|
|
750
451
|
{ type: Injectable, args: [{
|
|
751
452
|
providedIn: 'root',
|
|
752
453
|
},] }
|
|
753
454
|
];
|
|
754
|
-
/** @nocollapse */ DaffMagentoCartAddressInputTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartAddressInputTransformer_Factory() { return new DaffMagentoCartAddressInputTransformer(); }, token: DaffMagentoCartAddressInputTransformer, providedIn: "root" });
|
|
755
455
|
|
|
756
|
-
/**
|
|
757
|
-
* @fileoverview added by tsickle
|
|
758
|
-
* Generated from: transforms/inputs/shipping-address.service.ts
|
|
759
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
760
|
-
*/
|
|
761
456
|
class DaffMagentoShippingAddressInputTransformer {
|
|
762
|
-
/**
|
|
763
|
-
* @param {?} cartAddressTransformer
|
|
764
|
-
*/
|
|
765
457
|
constructor(cartAddressTransformer) {
|
|
766
458
|
this.cartAddressTransformer = cartAddressTransformer;
|
|
767
459
|
}
|
|
768
|
-
/**
|
|
769
|
-
* @param {?} cartAddress
|
|
770
|
-
* @return {?}
|
|
771
|
-
*/
|
|
772
460
|
transform(cartAddress) {
|
|
773
461
|
return cartAddress.address_id
|
|
774
462
|
? {
|
|
@@ -781,6 +469,7 @@ class DaffMagentoShippingAddressInputTransformer {
|
|
|
781
469
|
};
|
|
782
470
|
}
|
|
783
471
|
}
|
|
472
|
+
/** @nocollapse */ DaffMagentoShippingAddressInputTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoShippingAddressInputTransformer_Factory() { return new DaffMagentoShippingAddressInputTransformer(ɵɵinject(DaffMagentoCartAddressInputTransformer)); }, token: DaffMagentoShippingAddressInputTransformer, providedIn: "root" });
|
|
784
473
|
DaffMagentoShippingAddressInputTransformer.decorators = [
|
|
785
474
|
{ type: Injectable, args: [{
|
|
786
475
|
providedIn: 'root',
|
|
@@ -790,31 +479,11 @@ DaffMagentoShippingAddressInputTransformer.decorators = [
|
|
|
790
479
|
DaffMagentoShippingAddressInputTransformer.ctorParameters = () => [
|
|
791
480
|
{ type: DaffMagentoCartAddressInputTransformer }
|
|
792
481
|
];
|
|
793
|
-
/** @nocollapse */ DaffMagentoShippingAddressInputTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoShippingAddressInputTransformer_Factory() { return new DaffMagentoShippingAddressInputTransformer(ɵɵinject(DaffMagentoCartAddressInputTransformer)); }, token: DaffMagentoShippingAddressInputTransformer, providedIn: "root" });
|
|
794
|
-
if (false) {
|
|
795
|
-
/**
|
|
796
|
-
* @type {?}
|
|
797
|
-
* @private
|
|
798
|
-
*/
|
|
799
|
-
DaffMagentoShippingAddressInputTransformer.prototype.cartAddressTransformer;
|
|
800
|
-
}
|
|
801
482
|
|
|
802
|
-
/**
|
|
803
|
-
* @fileoverview added by tsickle
|
|
804
|
-
* Generated from: transforms/inputs/billing-address.service.ts
|
|
805
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
806
|
-
*/
|
|
807
483
|
class DaffMagentoBillingAddressInputTransformer {
|
|
808
|
-
/**
|
|
809
|
-
* @param {?} cartAddressTransformer
|
|
810
|
-
*/
|
|
811
484
|
constructor(cartAddressTransformer) {
|
|
812
485
|
this.cartAddressTransformer = cartAddressTransformer;
|
|
813
486
|
}
|
|
814
|
-
/**
|
|
815
|
-
* @param {?} cartAddress
|
|
816
|
-
* @return {?}
|
|
817
|
-
*/
|
|
818
487
|
transform(cartAddress) {
|
|
819
488
|
return cartAddress.address_id
|
|
820
489
|
? {
|
|
@@ -827,6 +496,7 @@ class DaffMagentoBillingAddressInputTransformer {
|
|
|
827
496
|
};
|
|
828
497
|
}
|
|
829
498
|
}
|
|
499
|
+
/** @nocollapse */ DaffMagentoBillingAddressInputTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoBillingAddressInputTransformer_Factory() { return new DaffMagentoBillingAddressInputTransformer(ɵɵinject(DaffMagentoCartAddressInputTransformer)); }, token: DaffMagentoBillingAddressInputTransformer, providedIn: "root" });
|
|
830
500
|
DaffMagentoBillingAddressInputTransformer.decorators = [
|
|
831
501
|
{ type: Injectable, args: [{
|
|
832
502
|
providedIn: 'root',
|
|
@@ -836,25 +506,8 @@ DaffMagentoBillingAddressInputTransformer.decorators = [
|
|
|
836
506
|
DaffMagentoBillingAddressInputTransformer.ctorParameters = () => [
|
|
837
507
|
{ type: DaffMagentoCartAddressInputTransformer }
|
|
838
508
|
];
|
|
839
|
-
/** @nocollapse */ DaffMagentoBillingAddressInputTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoBillingAddressInputTransformer_Factory() { return new DaffMagentoBillingAddressInputTransformer(ɵɵinject(DaffMagentoCartAddressInputTransformer)); }, token: DaffMagentoBillingAddressInputTransformer, providedIn: "root" });
|
|
840
|
-
if (false) {
|
|
841
|
-
/**
|
|
842
|
-
* @type {?}
|
|
843
|
-
* @private
|
|
844
|
-
*/
|
|
845
|
-
DaffMagentoBillingAddressInputTransformer.prototype.cartAddressTransformer;
|
|
846
|
-
}
|
|
847
509
|
|
|
848
|
-
/**
|
|
849
|
-
* @fileoverview added by tsickle
|
|
850
|
-
* Generated from: transforms/inputs/cart-item-update.service.ts
|
|
851
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
852
|
-
*/
|
|
853
510
|
class DaffMagentoCartItemUpdateInputTransformer {
|
|
854
|
-
/**
|
|
855
|
-
* @param {?} item
|
|
856
|
-
* @return {?}
|
|
857
|
-
*/
|
|
858
511
|
transform(item) {
|
|
859
512
|
return {
|
|
860
513
|
quantity: item.qty,
|
|
@@ -862,44 +515,26 @@ class DaffMagentoCartItemUpdateInputTransformer {
|
|
|
862
515
|
};
|
|
863
516
|
}
|
|
864
517
|
}
|
|
518
|
+
/** @nocollapse */ DaffMagentoCartItemUpdateInputTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartItemUpdateInputTransformer_Factory() { return new DaffMagentoCartItemUpdateInputTransformer(); }, token: DaffMagentoCartItemUpdateInputTransformer, providedIn: "root" });
|
|
865
519
|
DaffMagentoCartItemUpdateInputTransformer.decorators = [
|
|
866
520
|
{ type: Injectable, args: [{
|
|
867
521
|
providedIn: 'root',
|
|
868
522
|
},] }
|
|
869
523
|
];
|
|
870
|
-
/** @nocollapse */ DaffMagentoCartItemUpdateInputTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartItemUpdateInputTransformer_Factory() { return new DaffMagentoCartItemUpdateInputTransformer(); }, token: DaffMagentoCartItemUpdateInputTransformer, providedIn: "root" });
|
|
871
524
|
|
|
872
|
-
/**
|
|
873
|
-
* @fileoverview added by tsickle
|
|
874
|
-
* Generated from: transforms/inputs/payment-method.service.ts
|
|
875
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
876
|
-
*/
|
|
877
525
|
class DaffMagentoPaymentMethodInputTransformer {
|
|
878
|
-
/**
|
|
879
|
-
* @param {?} payment
|
|
880
|
-
* @return {?}
|
|
881
|
-
*/
|
|
882
526
|
transform(payment) {
|
|
883
527
|
return Object.assign({}, payment.payment_info);
|
|
884
528
|
}
|
|
885
529
|
}
|
|
530
|
+
/** @nocollapse */ DaffMagentoPaymentMethodInputTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoPaymentMethodInputTransformer_Factory() { return new DaffMagentoPaymentMethodInputTransformer(); }, token: DaffMagentoPaymentMethodInputTransformer, providedIn: "root" });
|
|
886
531
|
DaffMagentoPaymentMethodInputTransformer.decorators = [
|
|
887
532
|
{ type: Injectable, args: [{
|
|
888
533
|
providedIn: 'root',
|
|
889
534
|
},] }
|
|
890
535
|
];
|
|
891
|
-
/** @nocollapse */ DaffMagentoPaymentMethodInputTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoPaymentMethodInputTransformer_Factory() { return new DaffMagentoPaymentMethodInputTransformer(); }, token: DaffMagentoPaymentMethodInputTransformer, providedIn: "root" });
|
|
892
536
|
|
|
893
|
-
/**
|
|
894
|
-
* @fileoverview added by tsickle
|
|
895
|
-
* Generated from: transforms/inputs/shipping-method.service.ts
|
|
896
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
897
|
-
*/
|
|
898
537
|
class DaffMagentoShippingMethodInputTransformer {
|
|
899
|
-
/**
|
|
900
|
-
* @param {?} method
|
|
901
|
-
* @return {?}
|
|
902
|
-
*/
|
|
903
538
|
transform(method) {
|
|
904
539
|
return {
|
|
905
540
|
carrier_code: method.carrier,
|
|
@@ -907,74 +542,13 @@ class DaffMagentoShippingMethodInputTransformer {
|
|
|
907
542
|
};
|
|
908
543
|
}
|
|
909
544
|
}
|
|
545
|
+
/** @nocollapse */ DaffMagentoShippingMethodInputTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoShippingMethodInputTransformer_Factory() { return new DaffMagentoShippingMethodInputTransformer(); }, token: DaffMagentoShippingMethodInputTransformer, providedIn: "root" });
|
|
910
546
|
DaffMagentoShippingMethodInputTransformer.decorators = [
|
|
911
547
|
{ type: Injectable, args: [{
|
|
912
548
|
providedIn: 'root',
|
|
913
549
|
},] }
|
|
914
550
|
];
|
|
915
|
-
/** @nocollapse */ DaffMagentoShippingMethodInputTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoShippingMethodInputTransformer_Factory() { return new DaffMagentoShippingMethodInputTransformer(); }, token: DaffMagentoShippingMethodInputTransformer, providedIn: "root" });
|
|
916
|
-
|
|
917
|
-
/**
|
|
918
|
-
* @fileoverview added by tsickle
|
|
919
|
-
* Generated from: transforms/public_api.ts
|
|
920
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
921
|
-
*/
|
|
922
|
-
|
|
923
|
-
/**
|
|
924
|
-
* @fileoverview added by tsickle
|
|
925
|
-
* Generated from: models/requests/cart-item.ts
|
|
926
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
927
|
-
*/
|
|
928
|
-
/**
|
|
929
|
-
* @record
|
|
930
|
-
*/
|
|
931
|
-
function MagentoCartItemInput() { }
|
|
932
|
-
if (false) {
|
|
933
|
-
/** @type {?} */
|
|
934
|
-
MagentoCartItemInput.prototype.quantity;
|
|
935
|
-
/** @type {?} */
|
|
936
|
-
MagentoCartItemInput.prototype.sku;
|
|
937
|
-
/** @type {?|undefined} */
|
|
938
|
-
MagentoCartItemInput.prototype.parent_sku;
|
|
939
|
-
/** @type {?|undefined} */
|
|
940
|
-
MagentoCartItemInput.prototype.selected_options;
|
|
941
|
-
/** @type {?|undefined} */
|
|
942
|
-
MagentoCartItemInput.prototype.entered_options;
|
|
943
|
-
}
|
|
944
|
-
/**
|
|
945
|
-
* @record
|
|
946
|
-
*/
|
|
947
|
-
function MagentoEnteredOptionInput() { }
|
|
948
|
-
if (false) {
|
|
949
|
-
/** @type {?} */
|
|
950
|
-
MagentoEnteredOptionInput.prototype.uid;
|
|
951
|
-
/** @type {?} */
|
|
952
|
-
MagentoEnteredOptionInput.prototype.value;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
/**
|
|
956
|
-
* @fileoverview added by tsickle
|
|
957
|
-
* Generated from: models/requests/public_api.ts
|
|
958
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
959
|
-
*/
|
|
960
|
-
|
|
961
|
-
/**
|
|
962
|
-
* @fileoverview added by tsickle
|
|
963
|
-
* Generated from: models/responses/public_api.ts
|
|
964
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
965
|
-
*/
|
|
966
551
|
|
|
967
|
-
/**
|
|
968
|
-
* @fileoverview added by tsickle
|
|
969
|
-
* Generated from: models/public_api.ts
|
|
970
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
971
|
-
*/
|
|
972
|
-
|
|
973
|
-
/**
|
|
974
|
-
* @fileoverview added by tsickle
|
|
975
|
-
* Generated from: injection-tokens/fragments/cart.ts
|
|
976
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
977
|
-
*/
|
|
978
552
|
/**
|
|
979
553
|
* An multi-provider injection token for providing extra GraphQL fragments that will be spread into cart queries.
|
|
980
554
|
* This can be used to retrieve additional data that is not covered by the standard Daffodil interfaces.
|
|
@@ -986,25 +560,9 @@ if (false) {
|
|
|
986
560
|
* Daffodil only guarantees that stock queries don't exceed the limit of 300.
|
|
987
561
|
* Apps using this token should therefore increase the query complexity limit
|
|
988
562
|
* to accommodate the extra complexity contributed by the provided fragments.
|
|
989
|
-
* @type {?}
|
|
990
|
-
*/
|
|
991
|
-
const DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS = new InjectionToken('DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS', { factory: (/**
|
|
992
|
-
* @return {?}
|
|
993
|
-
*/
|
|
994
|
-
() => []) });
|
|
995
|
-
|
|
996
|
-
/**
|
|
997
|
-
* @fileoverview added by tsickle
|
|
998
|
-
* Generated from: injection-tokens/public_api.ts
|
|
999
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1000
563
|
*/
|
|
564
|
+
const DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS = new InjectionToken('DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS', { factory: () => [] });
|
|
1001
565
|
|
|
1002
|
-
/**
|
|
1003
|
-
* @fileoverview added by tsickle
|
|
1004
|
-
* Generated from: queries/fragments/money.ts
|
|
1005
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1006
|
-
*/
|
|
1007
|
-
/** @type {?} */
|
|
1008
566
|
const moneyFragment = gql `
|
|
1009
567
|
fragment money on Money {
|
|
1010
568
|
value
|
|
@@ -1012,24 +570,12 @@ const moneyFragment = gql `
|
|
|
1012
570
|
}
|
|
1013
571
|
`;
|
|
1014
572
|
|
|
1015
|
-
/**
|
|
1016
|
-
* @fileoverview added by tsickle
|
|
1017
|
-
* Generated from: queries/fragments/cart-coupon.ts
|
|
1018
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1019
|
-
*/
|
|
1020
|
-
/** @type {?} */
|
|
1021
573
|
const cartCouponFragment = gql `
|
|
1022
574
|
fragment cartCoupon on AppliedCoupon {
|
|
1023
575
|
code
|
|
1024
576
|
}
|
|
1025
577
|
`;
|
|
1026
578
|
|
|
1027
|
-
/**
|
|
1028
|
-
* @fileoverview added by tsickle
|
|
1029
|
-
* Generated from: queries/fragments/cart-address.ts
|
|
1030
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1031
|
-
*/
|
|
1032
|
-
/** @type {?} */
|
|
1033
579
|
const cartAddressFragment = gql `
|
|
1034
580
|
fragment cartAddress on CartAddressInterface {
|
|
1035
581
|
city
|
|
@@ -1050,12 +596,6 @@ const cartAddressFragment = gql `
|
|
|
1050
596
|
}
|
|
1051
597
|
`;
|
|
1052
598
|
|
|
1053
|
-
/**
|
|
1054
|
-
* @fileoverview added by tsickle
|
|
1055
|
-
* Generated from: queries/fragments/cart-item.ts
|
|
1056
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1057
|
-
*/
|
|
1058
|
-
/** @type {?} */
|
|
1059
599
|
const cartItemProductFragment = gql `
|
|
1060
600
|
fragment cartItemProduct on ProductInterface {
|
|
1061
601
|
id
|
|
@@ -1070,7 +610,6 @@ const cartItemProductFragment = gql `
|
|
|
1070
610
|
stock_status
|
|
1071
611
|
}
|
|
1072
612
|
`;
|
|
1073
|
-
/** @type {?} */
|
|
1074
613
|
const cartItemFragment = gql `
|
|
1075
614
|
fragment cartItem on CartItemInterface {
|
|
1076
615
|
__typename
|
|
@@ -1117,12 +656,6 @@ const cartItemFragment = gql `
|
|
|
1117
656
|
${moneyFragment}
|
|
1118
657
|
`;
|
|
1119
658
|
|
|
1120
|
-
/**
|
|
1121
|
-
* @fileoverview added by tsickle
|
|
1122
|
-
* Generated from: queries/fragments/available-payment-method.ts
|
|
1123
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1124
|
-
*/
|
|
1125
|
-
/** @type {?} */
|
|
1126
659
|
const availablePaymentMethodFragment = gql `
|
|
1127
660
|
fragment availablePaymentMethod on AvailablePaymentMethod {
|
|
1128
661
|
code
|
|
@@ -1130,12 +663,6 @@ const availablePaymentMethodFragment = gql `
|
|
|
1130
663
|
}
|
|
1131
664
|
`;
|
|
1132
665
|
|
|
1133
|
-
/**
|
|
1134
|
-
* @fileoverview added by tsickle
|
|
1135
|
-
* Generated from: queries/fragments/selected-payment-method.ts
|
|
1136
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1137
|
-
*/
|
|
1138
|
-
/** @type {?} */
|
|
1139
666
|
const selectedPaymentMethodFragment = gql `
|
|
1140
667
|
fragment selectedPaymentMethod on SelectedPaymentMethod {
|
|
1141
668
|
code
|
|
@@ -1144,12 +671,6 @@ const selectedPaymentMethodFragment = gql `
|
|
|
1144
671
|
}
|
|
1145
672
|
`;
|
|
1146
673
|
|
|
1147
|
-
/**
|
|
1148
|
-
* @fileoverview added by tsickle
|
|
1149
|
-
* Generated from: queries/fragments/available-shipping-method.ts
|
|
1150
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1151
|
-
*/
|
|
1152
|
-
/** @type {?} */
|
|
1153
674
|
const availableShippingMethodFragment = gql `
|
|
1154
675
|
fragment availableShippingMethod on AvailableShippingMethod {
|
|
1155
676
|
carrier_code
|
|
@@ -1163,12 +684,6 @@ const availableShippingMethodFragment = gql `
|
|
|
1163
684
|
${moneyFragment}
|
|
1164
685
|
`;
|
|
1165
686
|
|
|
1166
|
-
/**
|
|
1167
|
-
* @fileoverview added by tsickle
|
|
1168
|
-
* Generated from: queries/fragments/selected-shipping-method.ts
|
|
1169
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1170
|
-
*/
|
|
1171
|
-
/** @type {?} */
|
|
1172
687
|
const selectedShippingMethodFragment = gql `
|
|
1173
688
|
fragment selectedShippingMethod on SelectedShippingMethod {
|
|
1174
689
|
carrier_code
|
|
@@ -1182,12 +697,6 @@ const selectedShippingMethodFragment = gql `
|
|
|
1182
697
|
${moneyFragment}
|
|
1183
698
|
`;
|
|
1184
699
|
|
|
1185
|
-
/**
|
|
1186
|
-
* @fileoverview added by tsickle
|
|
1187
|
-
* Generated from: queries/fragments/prices.ts
|
|
1188
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1189
|
-
*/
|
|
1190
|
-
/** @type {?} */
|
|
1191
700
|
const pricesFragment = gql `
|
|
1192
701
|
fragment prices on CartPrices {
|
|
1193
702
|
grand_total {
|
|
@@ -1218,12 +727,6 @@ const pricesFragment = gql `
|
|
|
1218
727
|
${moneyFragment}
|
|
1219
728
|
`;
|
|
1220
729
|
|
|
1221
|
-
/**
|
|
1222
|
-
* @fileoverview added by tsickle
|
|
1223
|
-
* Generated from: queries/fragments/cart.ts
|
|
1224
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1225
|
-
*/
|
|
1226
|
-
/** @type {?} */
|
|
1227
730
|
const cartFragment = gql `
|
|
1228
731
|
fragment cart on Cart {
|
|
1229
732
|
id
|
|
@@ -1264,43 +767,7 @@ const cartFragment = gql `
|
|
|
1264
767
|
${cartCouponFragment}
|
|
1265
768
|
`;
|
|
1266
769
|
|
|
1267
|
-
|
|
1268
|
-
* @fileoverview added by tsickle
|
|
1269
|
-
* Generated from: queries/fragments/public_api.ts
|
|
1270
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1271
|
-
*/
|
|
1272
|
-
|
|
1273
|
-
/**
|
|
1274
|
-
* @fileoverview added by tsickle
|
|
1275
|
-
* Generated from: queries/responses/add-cart-item.ts
|
|
1276
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1277
|
-
*/
|
|
1278
|
-
/**
|
|
1279
|
-
* @record
|
|
1280
|
-
*/
|
|
1281
|
-
function MagentoAddCartItemResponse() { }
|
|
1282
|
-
if (false) {
|
|
1283
|
-
/** @type {?} */
|
|
1284
|
-
MagentoAddCartItemResponse.prototype.addProductsToCart;
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
|
-
/**
|
|
1288
|
-
* @fileoverview added by tsickle
|
|
1289
|
-
* Generated from: queries/responses/public_api.ts
|
|
1290
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1291
|
-
*/
|
|
1292
|
-
|
|
1293
|
-
/**
|
|
1294
|
-
* @fileoverview added by tsickle
|
|
1295
|
-
* Generated from: queries/list-cart-items.ts
|
|
1296
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1297
|
-
*/
|
|
1298
|
-
/** @type {?} */
|
|
1299
|
-
const listCartItems = (/**
|
|
1300
|
-
* @param {?=} extraCartFragments
|
|
1301
|
-
* @return {?}
|
|
1302
|
-
*/
|
|
1303
|
-
(extraCartFragments = []) => gql `
|
|
770
|
+
const listCartItems = (extraCartFragments = []) => gql `
|
|
1304
771
|
query MagentoListCartItems($cartId: String!) {
|
|
1305
772
|
cart(cart_id: $cartId) {
|
|
1306
773
|
items {
|
|
@@ -1311,19 +778,9 @@ const listCartItems = (/**
|
|
|
1311
778
|
}
|
|
1312
779
|
${cartItemFragment}
|
|
1313
780
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1314
|
-
|
|
781
|
+
`;
|
|
1315
782
|
|
|
1316
|
-
|
|
1317
|
-
* @fileoverview added by tsickle
|
|
1318
|
-
* Generated from: queries/add-cart-item.ts
|
|
1319
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1320
|
-
*/
|
|
1321
|
-
/** @type {?} */
|
|
1322
|
-
const addCartItem = (/**
|
|
1323
|
-
* @param {?=} extraCartFragments
|
|
1324
|
-
* @return {?}
|
|
1325
|
-
*/
|
|
1326
|
-
(extraCartFragments = []) => gql `
|
|
783
|
+
const addCartItem = (extraCartFragments = []) => gql `
|
|
1327
784
|
mutation MagentoAddCartItem($cartId: String!, $input: CartItemInput!) {
|
|
1328
785
|
addProductsToCart(
|
|
1329
786
|
cartId: $cartId,
|
|
@@ -1337,19 +794,9 @@ const addCartItem = (/**
|
|
|
1337
794
|
}
|
|
1338
795
|
${cartFragment}
|
|
1339
796
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1340
|
-
|
|
797
|
+
`;
|
|
1341
798
|
|
|
1342
|
-
|
|
1343
|
-
* @fileoverview added by tsickle
|
|
1344
|
-
* Generated from: queries/remove-cart-item.ts
|
|
1345
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1346
|
-
*/
|
|
1347
|
-
/** @type {?} */
|
|
1348
|
-
const removeCartItem = (/**
|
|
1349
|
-
* @param {?=} extraCartFragments
|
|
1350
|
-
* @return {?}
|
|
1351
|
-
*/
|
|
1352
|
-
(extraCartFragments = []) => gql `
|
|
799
|
+
const removeCartItem = (extraCartFragments = []) => gql `
|
|
1353
800
|
mutation MagentoRemoveCartItem($cartId: String!, $itemId: Int!) {
|
|
1354
801
|
removeItemFromCart(input: {
|
|
1355
802
|
cart_id: $cartId,
|
|
@@ -1363,19 +810,9 @@ const removeCartItem = (/**
|
|
|
1363
810
|
}
|
|
1364
811
|
${cartFragment}
|
|
1365
812
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1366
|
-
|
|
813
|
+
`;
|
|
1367
814
|
|
|
1368
|
-
|
|
1369
|
-
* @fileoverview added by tsickle
|
|
1370
|
-
* Generated from: queries/update-cart-item.ts
|
|
1371
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1372
|
-
*/
|
|
1373
|
-
/** @type {?} */
|
|
1374
|
-
const updateCartItem = (/**
|
|
1375
|
-
* @param {?=} extraCartFragments
|
|
1376
|
-
* @return {?}
|
|
1377
|
-
*/
|
|
1378
|
-
(extraCartFragments = []) => gql `
|
|
815
|
+
const updateCartItem = (extraCartFragments = []) => gql `
|
|
1379
816
|
mutation MagentoUpdateCartItem($cartId: String!, $input: CartItemUpdateInput!) {
|
|
1380
817
|
updateCartItems(input: {
|
|
1381
818
|
cart_id: $cartId
|
|
@@ -1389,19 +826,9 @@ const updateCartItem = (/**
|
|
|
1389
826
|
}
|
|
1390
827
|
${cartFragment}
|
|
1391
828
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1392
|
-
|
|
829
|
+
`;
|
|
1393
830
|
|
|
1394
|
-
|
|
1395
|
-
* @fileoverview added by tsickle
|
|
1396
|
-
* Generated from: queries/list-payment-methods.ts
|
|
1397
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1398
|
-
*/
|
|
1399
|
-
/** @type {?} */
|
|
1400
|
-
const listPaymentMethods = (/**
|
|
1401
|
-
* @param {?=} extraCartFragments
|
|
1402
|
-
* @return {?}
|
|
1403
|
-
*/
|
|
1404
|
-
(extraCartFragments = []) => gql `
|
|
831
|
+
const listPaymentMethods = (extraCartFragments = []) => gql `
|
|
1405
832
|
query MagentoListPaymentMethods($cartId: String!) {
|
|
1406
833
|
cart(cart_id: $cartId) {
|
|
1407
834
|
available_payment_methods {
|
|
@@ -1412,19 +839,9 @@ const listPaymentMethods = (/**
|
|
|
1412
839
|
}
|
|
1413
840
|
${availablePaymentMethodFragment}
|
|
1414
841
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1415
|
-
|
|
842
|
+
`;
|
|
1416
843
|
|
|
1417
|
-
|
|
1418
|
-
* @fileoverview added by tsickle
|
|
1419
|
-
* Generated from: queries/get-selected-payment-method.ts
|
|
1420
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1421
|
-
*/
|
|
1422
|
-
/** @type {?} */
|
|
1423
|
-
const getSelectedPaymentMethod = (/**
|
|
1424
|
-
* @param {?=} extraCartFragments
|
|
1425
|
-
* @return {?}
|
|
1426
|
-
*/
|
|
1427
|
-
(extraCartFragments = []) => gql `
|
|
844
|
+
const getSelectedPaymentMethod = (extraCartFragments = []) => gql `
|
|
1428
845
|
query MagentoGetSelectedPaymentMethod($cartId: String!) {
|
|
1429
846
|
cart(cart_id: $cartId) {
|
|
1430
847
|
selected_payment_method {
|
|
@@ -1435,19 +852,9 @@ const getSelectedPaymentMethod = (/**
|
|
|
1435
852
|
}
|
|
1436
853
|
${selectedPaymentMethodFragment}
|
|
1437
854
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1438
|
-
|
|
855
|
+
`;
|
|
1439
856
|
|
|
1440
|
-
|
|
1441
|
-
* @fileoverview added by tsickle
|
|
1442
|
-
* Generated from: queries/set-selected-payment-method.ts
|
|
1443
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1444
|
-
*/
|
|
1445
|
-
/** @type {?} */
|
|
1446
|
-
const setSelectedPaymentMethod = (/**
|
|
1447
|
-
* @param {?=} extraCartFragments
|
|
1448
|
-
* @return {?}
|
|
1449
|
-
*/
|
|
1450
|
-
(extraCartFragments = []) => gql `
|
|
857
|
+
const setSelectedPaymentMethod = (extraCartFragments = []) => gql `
|
|
1451
858
|
mutation MagentoSetSelectedPaymentMethod($cartId: String!, $payment: PaymentMethodInput!) {
|
|
1452
859
|
setPaymentMethodOnCart(input: {
|
|
1453
860
|
cart_id: $cartId
|
|
@@ -1461,19 +868,9 @@ const setSelectedPaymentMethod = (/**
|
|
|
1461
868
|
}
|
|
1462
869
|
${cartFragment}
|
|
1463
870
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1464
|
-
|
|
871
|
+
`;
|
|
1465
872
|
|
|
1466
|
-
|
|
1467
|
-
* @fileoverview added by tsickle
|
|
1468
|
-
* Generated from: queries/set-selected-payment-method-with-billing.ts
|
|
1469
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1470
|
-
*/
|
|
1471
|
-
/** @type {?} */
|
|
1472
|
-
const setSelectedPaymentMethodWithBilling = (/**
|
|
1473
|
-
* @param {?=} extraCartFragments
|
|
1474
|
-
* @return {?}
|
|
1475
|
-
*/
|
|
1476
|
-
(extraCartFragments = []) => gql `
|
|
873
|
+
const setSelectedPaymentMethodWithBilling = (extraCartFragments = []) => gql `
|
|
1477
874
|
mutation MagentoSetSelectedPaymentMethodWithBilling(
|
|
1478
875
|
$cartId: String!,
|
|
1479
876
|
$payment: PaymentMethodInput!,
|
|
@@ -1499,19 +896,9 @@ const setSelectedPaymentMethodWithBilling = (/**
|
|
|
1499
896
|
}
|
|
1500
897
|
${cartFragment}
|
|
1501
898
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1502
|
-
|
|
899
|
+
`;
|
|
1503
900
|
|
|
1504
|
-
|
|
1505
|
-
* @fileoverview added by tsickle
|
|
1506
|
-
* Generated from: queries/set-selected-payment-method-with-billing-and-email.ts
|
|
1507
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1508
|
-
*/
|
|
1509
|
-
/** @type {?} */
|
|
1510
|
-
const setSelectedPaymentMethodWithBillingAndEmail = (/**
|
|
1511
|
-
* @param {?=} extraCartFragments
|
|
1512
|
-
* @return {?}
|
|
1513
|
-
*/
|
|
1514
|
-
(extraCartFragments = []) => gql `
|
|
901
|
+
const setSelectedPaymentMethodWithBillingAndEmail = (extraCartFragments = []) => gql `
|
|
1515
902
|
mutation MagentoSetSelectedPaymentMethodWithBillingAndEmail(
|
|
1516
903
|
$cartId: String!,
|
|
1517
904
|
$payment: PaymentMethodInput!,
|
|
@@ -1546,19 +933,9 @@ const setSelectedPaymentMethodWithBillingAndEmail = (/**
|
|
|
1546
933
|
}
|
|
1547
934
|
${cartFragment}
|
|
1548
935
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1549
|
-
|
|
936
|
+
`;
|
|
1550
937
|
|
|
1551
|
-
|
|
1552
|
-
* @fileoverview added by tsickle
|
|
1553
|
-
* Generated from: queries/list-shipping-methods.ts
|
|
1554
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1555
|
-
*/
|
|
1556
|
-
/** @type {?} */
|
|
1557
|
-
const listShippingMethods = (/**
|
|
1558
|
-
* @param {?=} extraCartFragments
|
|
1559
|
-
* @return {?}
|
|
1560
|
-
*/
|
|
1561
|
-
(extraCartFragments = []) => gql `
|
|
938
|
+
const listShippingMethods = (extraCartFragments = []) => gql `
|
|
1562
939
|
query MagentoListShippingMethods($cartId: String!) {
|
|
1563
940
|
cart(cart_id: $cartId) {
|
|
1564
941
|
id
|
|
@@ -1572,19 +949,9 @@ const listShippingMethods = (/**
|
|
|
1572
949
|
}
|
|
1573
950
|
${availableShippingMethodFragment}
|
|
1574
951
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1575
|
-
|
|
952
|
+
`;
|
|
1576
953
|
|
|
1577
|
-
|
|
1578
|
-
* @fileoverview added by tsickle
|
|
1579
|
-
* Generated from: queries/get-selected-shipping-method.ts
|
|
1580
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1581
|
-
*/
|
|
1582
|
-
/** @type {?} */
|
|
1583
|
-
const getSelectedShippingMethod = (/**
|
|
1584
|
-
* @param {?=} extraCartFragments
|
|
1585
|
-
* @return {?}
|
|
1586
|
-
*/
|
|
1587
|
-
(extraCartFragments = []) => gql `
|
|
954
|
+
const getSelectedShippingMethod = (extraCartFragments = []) => gql `
|
|
1588
955
|
query MagentoGetSelectedShippingMethod($cartId: String!) {
|
|
1589
956
|
cart(cart_id: $cartId) {
|
|
1590
957
|
shipping_addresses {
|
|
@@ -1597,19 +964,9 @@ const getSelectedShippingMethod = (/**
|
|
|
1597
964
|
}
|
|
1598
965
|
${selectedShippingMethodFragment}
|
|
1599
966
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1600
|
-
|
|
967
|
+
`;
|
|
1601
968
|
|
|
1602
|
-
|
|
1603
|
-
* @fileoverview added by tsickle
|
|
1604
|
-
* Generated from: queries/set-selected-shipping-method.ts
|
|
1605
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1606
|
-
*/
|
|
1607
|
-
/** @type {?} */
|
|
1608
|
-
const setSelectedShippingMethod = (/**
|
|
1609
|
-
* @param {?=} extraCartFragments
|
|
1610
|
-
* @return {?}
|
|
1611
|
-
*/
|
|
1612
|
-
(extraCartFragments = []) => gql `
|
|
969
|
+
const setSelectedShippingMethod = (extraCartFragments = []) => gql `
|
|
1613
970
|
mutation MagentoSetSelectedShippingMethod($cartId: String!, $method: ShippingMethodInput!) {
|
|
1614
971
|
setShippingMethodsOnCart(input: {
|
|
1615
972
|
cart_id: $cartId
|
|
@@ -1623,19 +980,9 @@ const setSelectedShippingMethod = (/**
|
|
|
1623
980
|
}
|
|
1624
981
|
${cartFragment}
|
|
1625
982
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1626
|
-
|
|
983
|
+
`;
|
|
1627
984
|
|
|
1628
|
-
|
|
1629
|
-
* @fileoverview added by tsickle
|
|
1630
|
-
* Generated from: queries/get-billing-address.ts
|
|
1631
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1632
|
-
*/
|
|
1633
|
-
/** @type {?} */
|
|
1634
|
-
const getBillingAddress = (/**
|
|
1635
|
-
* @param {?=} extraCartFragments
|
|
1636
|
-
* @return {?}
|
|
1637
|
-
*/
|
|
1638
|
-
(extraCartFragments = []) => gql `
|
|
985
|
+
const getBillingAddress = (extraCartFragments = []) => gql `
|
|
1639
986
|
query MagentoGetBillingAddress($cartId: String!) {
|
|
1640
987
|
cart(cart_id: $cartId) {
|
|
1641
988
|
billing_address {
|
|
@@ -1647,19 +994,9 @@ const getBillingAddress = (/**
|
|
|
1647
994
|
}
|
|
1648
995
|
${cartAddressFragment}
|
|
1649
996
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1650
|
-
|
|
997
|
+
`;
|
|
1651
998
|
|
|
1652
|
-
|
|
1653
|
-
* @fileoverview added by tsickle
|
|
1654
|
-
* Generated from: queries/update-billing-address.ts
|
|
1655
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1656
|
-
*/
|
|
1657
|
-
/** @type {?} */
|
|
1658
|
-
const updateBillingAddress = (/**
|
|
1659
|
-
* @param {?=} extraCartFragments
|
|
1660
|
-
* @return {?}
|
|
1661
|
-
*/
|
|
1662
|
-
(extraCartFragments = []) => gql `
|
|
999
|
+
const updateBillingAddress = (extraCartFragments = []) => gql `
|
|
1663
1000
|
mutation MagentoUpdateBillingAddress(
|
|
1664
1001
|
$cartId: String!,
|
|
1665
1002
|
$address: BillingAddressInput!
|
|
@@ -1676,19 +1013,9 @@ const updateBillingAddress = (/**
|
|
|
1676
1013
|
}
|
|
1677
1014
|
${cartFragment}
|
|
1678
1015
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1679
|
-
|
|
1016
|
+
`;
|
|
1680
1017
|
|
|
1681
|
-
|
|
1682
|
-
* @fileoverview added by tsickle
|
|
1683
|
-
* Generated from: queries/update-billing-address-with-email.ts
|
|
1684
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1685
|
-
*/
|
|
1686
|
-
/** @type {?} */
|
|
1687
|
-
const updateBillingAddressWithEmail = (/**
|
|
1688
|
-
* @param {?=} extraCartFragments
|
|
1689
|
-
* @return {?}
|
|
1690
|
-
*/
|
|
1691
|
-
(extraCartFragments = []) => gql `
|
|
1018
|
+
const updateBillingAddressWithEmail = (extraCartFragments = []) => gql `
|
|
1692
1019
|
mutation MagentoUpdateBillingAddressWithEmail(
|
|
1693
1020
|
$cartId: String!,
|
|
1694
1021
|
$address: BillingAddressInput!,
|
|
@@ -1714,19 +1041,9 @@ const updateBillingAddressWithEmail = (/**
|
|
|
1714
1041
|
}
|
|
1715
1042
|
${cartFragment}
|
|
1716
1043
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1717
|
-
|
|
1044
|
+
`;
|
|
1718
1045
|
|
|
1719
|
-
|
|
1720
|
-
* @fileoverview added by tsickle
|
|
1721
|
-
* Generated from: queries/get-shipping-address.ts
|
|
1722
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1723
|
-
*/
|
|
1724
|
-
/** @type {?} */
|
|
1725
|
-
const getShippingAddress = (/**
|
|
1726
|
-
* @param {?=} extraCartFragments
|
|
1727
|
-
* @return {?}
|
|
1728
|
-
*/
|
|
1729
|
-
(extraCartFragments = []) => gql `
|
|
1046
|
+
const getShippingAddress = (extraCartFragments = []) => gql `
|
|
1730
1047
|
query MagentoGetShippingAddress($cartId: String!) {
|
|
1731
1048
|
cart(cart_id: $cartId) {
|
|
1732
1049
|
shipping_addresses {
|
|
@@ -1738,19 +1055,9 @@ const getShippingAddress = (/**
|
|
|
1738
1055
|
}
|
|
1739
1056
|
${cartAddressFragment}
|
|
1740
1057
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1741
|
-
|
|
1058
|
+
`;
|
|
1742
1059
|
|
|
1743
|
-
|
|
1744
|
-
* @fileoverview added by tsickle
|
|
1745
|
-
* Generated from: queries/update-shipping-address.ts
|
|
1746
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1747
|
-
*/
|
|
1748
|
-
/** @type {?} */
|
|
1749
|
-
const updateShippingAddress = (/**
|
|
1750
|
-
* @param {?=} extraCartFragments
|
|
1751
|
-
* @return {?}
|
|
1752
|
-
*/
|
|
1753
|
-
(extraCartFragments = []) => gql `
|
|
1060
|
+
const updateShippingAddress = (extraCartFragments = []) => gql `
|
|
1754
1061
|
mutation MagentoUpdateShippingAddress(
|
|
1755
1062
|
$cartId: String!,
|
|
1756
1063
|
$address: ShippingAddressInput!
|
|
@@ -1767,19 +1074,9 @@ const updateShippingAddress = (/**
|
|
|
1767
1074
|
}
|
|
1768
1075
|
${cartFragment}
|
|
1769
1076
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1770
|
-
|
|
1077
|
+
`;
|
|
1771
1078
|
|
|
1772
|
-
|
|
1773
|
-
* @fileoverview added by tsickle
|
|
1774
|
-
* Generated from: queries/update-shipping-address-with-email.ts
|
|
1775
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1776
|
-
*/
|
|
1777
|
-
/** @type {?} */
|
|
1778
|
-
const updateShippingAddressWithEmail = (/**
|
|
1779
|
-
* @param {?=} extraCartFragments
|
|
1780
|
-
* @return {?}
|
|
1781
|
-
*/
|
|
1782
|
-
(extraCartFragments = []) => gql `
|
|
1079
|
+
const updateShippingAddressWithEmail = (extraCartFragments = []) => gql `
|
|
1783
1080
|
mutation MagentoUpdateShippingAddressWithEmail(
|
|
1784
1081
|
$cartId: String!,
|
|
1785
1082
|
$address: ShippingAddressInput!,
|
|
@@ -1805,26 +1102,16 @@ const updateShippingAddressWithEmail = (/**
|
|
|
1805
1102
|
}
|
|
1806
1103
|
${cartFragment}
|
|
1807
1104
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1808
|
-
|
|
1105
|
+
`;
|
|
1809
1106
|
|
|
1810
|
-
/**
|
|
1811
|
-
* @fileoverview added by tsickle
|
|
1812
|
-
* Generated from: queries/update-address.ts
|
|
1813
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1814
|
-
*/
|
|
1815
1107
|
/**
|
|
1816
1108
|
* Update the shipping and billing address of the cart.
|
|
1817
1109
|
* At the time of writing, Magento 2 processes compound queries in the order they are defined.
|
|
1818
1110
|
* We rely on this fact and only use the return of the last query.
|
|
1819
1111
|
* This helps us keep query complexity down and save some server CPU cycles.
|
|
1820
1112
|
* Driver behavior is not guaranteed if Magento no longer processes compound queries in the order they are defined.
|
|
1821
|
-
* @type {?}
|
|
1822
|
-
*/
|
|
1823
|
-
const updateAddress = (/**
|
|
1824
|
-
* @param {?=} extraCartFragments
|
|
1825
|
-
* @return {?}
|
|
1826
1113
|
*/
|
|
1827
|
-
(extraCartFragments = []) => gql `
|
|
1114
|
+
const updateAddress = (extraCartFragments = []) => gql `
|
|
1828
1115
|
mutation MagentoUpdateAddress($cartId: String!, $address: CartAddressInput!) {
|
|
1829
1116
|
setBillingAddressOnCart(input: {
|
|
1830
1117
|
cart_id: $cartId
|
|
@@ -1850,26 +1137,16 @@ const updateAddress = (/**
|
|
|
1850
1137
|
}
|
|
1851
1138
|
${cartFragment}
|
|
1852
1139
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1853
|
-
|
|
1140
|
+
`;
|
|
1854
1141
|
|
|
1855
|
-
/**
|
|
1856
|
-
* @fileoverview added by tsickle
|
|
1857
|
-
* Generated from: queries/update-address-with-email.ts
|
|
1858
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1859
|
-
*/
|
|
1860
1142
|
/**
|
|
1861
1143
|
* Update the shipping and billing address of the cart.
|
|
1862
1144
|
* At the time of writing, Magento 2 processes compound queries in the order they are defined.
|
|
1863
1145
|
* We rely on this fact and only use the return of the last query.
|
|
1864
1146
|
* This helps us keep query complexity down and save some server CPU cycles.
|
|
1865
1147
|
* Driver behavior is not guaranteed if Magento no longer processes compound queries in the order they are defined.
|
|
1866
|
-
* @type {?}
|
|
1867
|
-
*/
|
|
1868
|
-
const updateAddressWithEmail = (/**
|
|
1869
|
-
* @param {?=} extraCartFragments
|
|
1870
|
-
* @return {?}
|
|
1871
1148
|
*/
|
|
1872
|
-
(extraCartFragments = []) => gql `
|
|
1149
|
+
const updateAddressWithEmail = (extraCartFragments = []) => gql `
|
|
1873
1150
|
mutation MagentoUpdateAddressWithEmail($cartId: String!, $address: CartAddressInput!, $email: String!) {
|
|
1874
1151
|
setBillingAddressOnCart(input: {
|
|
1875
1152
|
cart_id: $cartId
|
|
@@ -1903,19 +1180,9 @@ const updateAddressWithEmail = (/**
|
|
|
1903
1180
|
}
|
|
1904
1181
|
${cartFragment}
|
|
1905
1182
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1906
|
-
|
|
1183
|
+
`;
|
|
1907
1184
|
|
|
1908
|
-
|
|
1909
|
-
* @fileoverview added by tsickle
|
|
1910
|
-
* Generated from: queries/get-cart.ts
|
|
1911
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1912
|
-
*/
|
|
1913
|
-
/** @type {?} */
|
|
1914
|
-
const getCart = (/**
|
|
1915
|
-
* @param {?=} extraCartFragments
|
|
1916
|
-
* @return {?}
|
|
1917
|
-
*/
|
|
1918
|
-
(extraCartFragments = []) => gql `
|
|
1185
|
+
const getCart = (extraCartFragments = []) => gql `
|
|
1919
1186
|
query MagentoGetCart($cartId: String!) {
|
|
1920
1187
|
cart(cart_id: $cartId) {
|
|
1921
1188
|
...cart
|
|
@@ -1924,26 +1191,14 @@ const getCart = (/**
|
|
|
1924
1191
|
}
|
|
1925
1192
|
${cartFragment}
|
|
1926
1193
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
1927
|
-
|
|
1194
|
+
`;
|
|
1928
1195
|
|
|
1929
|
-
/**
|
|
1930
|
-
* @fileoverview added by tsickle
|
|
1931
|
-
* Generated from: queries/create-cart.ts
|
|
1932
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1933
|
-
*/
|
|
1934
|
-
/** @type {?} */
|
|
1935
1196
|
const createCart = gql `
|
|
1936
1197
|
mutation MagentoCreateCart {
|
|
1937
1198
|
createEmptyCart
|
|
1938
1199
|
}
|
|
1939
1200
|
`;
|
|
1940
1201
|
|
|
1941
|
-
/**
|
|
1942
|
-
* @fileoverview added by tsickle
|
|
1943
|
-
* Generated from: queries/place-order.ts
|
|
1944
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1945
|
-
*/
|
|
1946
|
-
/** @type {?} */
|
|
1947
1202
|
const placeOrder = gql `
|
|
1948
1203
|
mutation MagentoPlaceOrder($cartId: String!) {
|
|
1949
1204
|
placeOrder(
|
|
@@ -1958,12 +1213,6 @@ const placeOrder = gql `
|
|
|
1958
1213
|
}
|
|
1959
1214
|
`;
|
|
1960
1215
|
|
|
1961
|
-
/**
|
|
1962
|
-
* @fileoverview added by tsickle
|
|
1963
|
-
* Generated from: queries/fragments/cart-totals.ts
|
|
1964
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1965
|
-
*/
|
|
1966
|
-
/** @type {?} */
|
|
1967
1216
|
const cartTotalsFragment = gql `
|
|
1968
1217
|
fragment cartTotals on Cart {
|
|
1969
1218
|
id
|
|
@@ -1984,17 +1233,7 @@ const cartTotalsFragment = gql `
|
|
|
1984
1233
|
${pricesFragment}
|
|
1985
1234
|
`;
|
|
1986
1235
|
|
|
1987
|
-
|
|
1988
|
-
* @fileoverview added by tsickle
|
|
1989
|
-
* Generated from: queries/apply-coupon.ts
|
|
1990
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1991
|
-
*/
|
|
1992
|
-
/** @type {?} */
|
|
1993
|
-
const applyCoupon = (/**
|
|
1994
|
-
* @param {?=} extraCartFragments
|
|
1995
|
-
* @return {?}
|
|
1996
|
-
*/
|
|
1997
|
-
(extraCartFragments = []) => gql `
|
|
1236
|
+
const applyCoupon = (extraCartFragments = []) => gql `
|
|
1998
1237
|
mutation MagentoApplyCoupon($cartId: String!, $couponCode: String!) {
|
|
1999
1238
|
applyCouponToCart(
|
|
2000
1239
|
input: {
|
|
@@ -2019,19 +1258,9 @@ const applyCoupon = (/**
|
|
|
2019
1258
|
${cartCouponFragment}
|
|
2020
1259
|
${cartTotalsFragment}
|
|
2021
1260
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
2022
|
-
|
|
1261
|
+
`;
|
|
2023
1262
|
|
|
2024
|
-
|
|
2025
|
-
* @fileoverview added by tsickle
|
|
2026
|
-
* Generated from: queries/list-cart-coupons.ts
|
|
2027
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2028
|
-
*/
|
|
2029
|
-
/** @type {?} */
|
|
2030
|
-
const listCartCoupons = (/**
|
|
2031
|
-
* @param {?=} extraCartFragments
|
|
2032
|
-
* @return {?}
|
|
2033
|
-
*/
|
|
2034
|
-
(extraCartFragments = []) => gql `
|
|
1263
|
+
const listCartCoupons = (extraCartFragments = []) => gql `
|
|
2035
1264
|
query MagentoListCartCoupons($cartId: String!) {
|
|
2036
1265
|
cart(cart_id: $cartId) {
|
|
2037
1266
|
applied_coupons {
|
|
@@ -2042,19 +1271,9 @@ const listCartCoupons = (/**
|
|
|
2042
1271
|
}
|
|
2043
1272
|
${cartCouponFragment}
|
|
2044
1273
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
2045
|
-
|
|
1274
|
+
`;
|
|
2046
1275
|
|
|
2047
|
-
|
|
2048
|
-
* @fileoverview added by tsickle
|
|
2049
|
-
* Generated from: queries/remove-all-coupons.ts
|
|
2050
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2051
|
-
*/
|
|
2052
|
-
/** @type {?} */
|
|
2053
|
-
const removeAllCoupons = (/**
|
|
2054
|
-
* @param {?=} extraCartFragments
|
|
2055
|
-
* @return {?}
|
|
2056
|
-
*/
|
|
2057
|
-
(extraCartFragments = []) => gql `
|
|
1276
|
+
const removeAllCoupons = (extraCartFragments = []) => gql `
|
|
2058
1277
|
mutation MagentoRemoveAllCoupons($cartId: String!) {
|
|
2059
1278
|
removeCouponFromCart(
|
|
2060
1279
|
input: {
|
|
@@ -2078,63 +1297,33 @@ const removeAllCoupons = (/**
|
|
|
2078
1297
|
${cartCouponFragment}
|
|
2079
1298
|
${cartTotalsFragment}
|
|
2080
1299
|
${daffBuildFragmentDefinition(...extraCartFragments)}
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
/**
|
|
2084
|
-
* @fileoverview added by tsickle
|
|
2085
|
-
* Generated from: queries/public_api.ts
|
|
2086
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2087
|
-
*/
|
|
1300
|
+
`;
|
|
2088
1301
|
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
/** @enum {string} */
|
|
2095
|
-
const MagentoCartGraphQlErrorCode = {
|
|
2096
|
-
CART_NOT_FOUND: "graphql-no-such-entity",
|
|
2097
|
-
BAD_INPUT: "graphql-input",
|
|
2098
|
-
};
|
|
1302
|
+
var MagentoCartGraphQlErrorCode;
|
|
1303
|
+
(function (MagentoCartGraphQlErrorCode) {
|
|
1304
|
+
MagentoCartGraphQlErrorCode["CART_NOT_FOUND"] = "graphql-no-such-entity";
|
|
1305
|
+
MagentoCartGraphQlErrorCode["BAD_INPUT"] = "graphql-input";
|
|
1306
|
+
})(MagentoCartGraphQlErrorCode || (MagentoCartGraphQlErrorCode = {}));
|
|
2099
1307
|
|
|
2100
|
-
/**
|
|
2101
|
-
* @fileoverview added by tsickle
|
|
2102
|
-
* Generated from: errors/map.ts
|
|
2103
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2104
|
-
*/
|
|
2105
|
-
/** @type {?} */
|
|
2106
1308
|
const DaffCartMagentoErrorMap = {
|
|
2107
1309
|
[MagentoCartGraphQlErrorCode.CART_NOT_FOUND]: DaffCartNotFoundError,
|
|
2108
1310
|
[MagentoCartGraphQlErrorCode.BAD_INPUT]: DaffBadInputError,
|
|
2109
1311
|
};
|
|
2110
|
-
/** @type {?} */
|
|
2111
1312
|
const DaffCartMagentoErrorMessageRegexMap = {
|
|
2112
1313
|
[DaffCartDriverErrorCodes.INVALID_COUPON_CODE]: /The coupon code isn\'t valid/,
|
|
2113
1314
|
[DaffCartDriverErrorCodes.PRODUCT_OUT_OF_STOCK]: /The requested qty is not available/,
|
|
2114
1315
|
};
|
|
2115
1316
|
|
|
2116
|
-
/**
|
|
2117
|
-
* @fileoverview added by tsickle
|
|
2118
|
-
* Generated from: errors/transform.ts
|
|
2119
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2120
|
-
*/
|
|
2121
|
-
/**
|
|
2122
|
-
* @param {?} error
|
|
2123
|
-
* @param {?=} requestPayload
|
|
2124
|
-
* @return {?}
|
|
2125
|
-
*/
|
|
2126
1317
|
function transformMagentoCartGraphQlError(error, requestPayload) {
|
|
2127
1318
|
var _a;
|
|
2128
1319
|
// TODO: readdress this when we move to eslint
|
|
2129
1320
|
// eslint-disable-next-line
|
|
2130
1321
|
for (const code in DaffCartMagentoErrorMessageRegexMap) {
|
|
2131
|
-
/** @type {?} */
|
|
2132
1322
|
const matchIndex = error.graphQLErrors[0].message.search(DaffCartMagentoErrorMessageRegexMap[code]);
|
|
2133
1323
|
if (matchIndex > -1 && DaffCartDriverErrorMap[code]) {
|
|
2134
|
-
/** @type {?} */
|
|
2135
1324
|
const errObj = new DaffCartDriverErrorMap[code](error.message);
|
|
2136
1325
|
if (errObj instanceof DaffInvalidCouponCodeError) {
|
|
2137
|
-
|
|
1326
|
+
errObj.coupon = (_a = requestPayload) === null || _a === void 0 ? void 0 : _a.code;
|
|
2138
1327
|
}
|
|
2139
1328
|
return errObj;
|
|
2140
1329
|
}
|
|
@@ -2142,11 +1331,6 @@ function transformMagentoCartGraphQlError(error, requestPayload) {
|
|
|
2142
1331
|
return daffTransformMagentoError(error, DaffCartMagentoErrorMap);
|
|
2143
1332
|
}
|
|
2144
1333
|
;
|
|
2145
|
-
/**
|
|
2146
|
-
* @param {?} error
|
|
2147
|
-
* @param {?=} requestPayload
|
|
2148
|
-
* @return {?}
|
|
2149
|
-
*/
|
|
2150
1334
|
function transformCartMagentoError(error, requestPayload) {
|
|
2151
1335
|
var _a;
|
|
2152
1336
|
if ((_a = error.graphQLErrors) === null || _a === void 0 ? void 0 : _a.length) {
|
|
@@ -2157,38 +1341,17 @@ function transformCartMagentoError(error, requestPayload) {
|
|
|
2157
1341
|
}
|
|
2158
1342
|
}
|
|
2159
1343
|
|
|
2160
|
-
/**
|
|
2161
|
-
* @fileoverview added by tsickle
|
|
2162
|
-
* Generated from: injection-tokens/cart-mutation-queue.token.ts
|
|
2163
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2164
|
-
*/
|
|
2165
|
-
/** @type {?} */
|
|
2166
1344
|
const DAFF_MAGENTO_CART_MUTATION_QUEUE = new InjectionToken('DAFF_MAGENTO_CART_MUTATION_QUEUE', {
|
|
2167
1345
|
providedIn: 'root',
|
|
2168
|
-
factory: (
|
|
2169
|
-
* @return {?}
|
|
2170
|
-
*/
|
|
2171
|
-
() => new DaffQueuedApollo(inject(Apollo))),
|
|
1346
|
+
factory: () => new DaffQueuedApollo(inject(Apollo)),
|
|
2172
1347
|
});
|
|
2173
1348
|
|
|
2174
|
-
/**
|
|
2175
|
-
* @fileoverview added by tsickle
|
|
2176
|
-
* Generated from: cart.service.ts
|
|
2177
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2178
|
-
*/
|
|
2179
1349
|
/**
|
|
2180
1350
|
* A service for making Magento GraphQL queries for carts.
|
|
2181
1351
|
*
|
|
2182
|
-
*
|
|
1352
|
+
* @inheritdoc
|
|
2183
1353
|
*/
|
|
2184
1354
|
class DaffMagentoCartService {
|
|
2185
|
-
/**
|
|
2186
|
-
* @param {?} apollo
|
|
2187
|
-
* @param {?} mutationQueue
|
|
2188
|
-
* @param {?} cartTransformer
|
|
2189
|
-
* @param {?} cartItemDriver
|
|
2190
|
-
* @param {?} extraCartFragments
|
|
2191
|
-
*/
|
|
2192
1355
|
constructor(apollo, mutationQueue, cartTransformer, cartItemDriver, extraCartFragments) {
|
|
2193
1356
|
this.apollo = apollo;
|
|
2194
1357
|
this.mutationQueue = mutationQueue;
|
|
@@ -2196,61 +1359,23 @@ class DaffMagentoCartService {
|
|
|
2196
1359
|
this.cartItemDriver = cartItemDriver;
|
|
2197
1360
|
this.extraCartFragments = extraCartFragments;
|
|
2198
1361
|
}
|
|
2199
|
-
/**
|
|
2200
|
-
* @param {?} cartId
|
|
2201
|
-
* @return {?}
|
|
2202
|
-
*/
|
|
2203
1362
|
get(cartId) {
|
|
2204
1363
|
return this.apollo.query({
|
|
2205
1364
|
query: getCart(this.extraCartFragments),
|
|
2206
1365
|
variables: { cartId },
|
|
2207
|
-
}).pipe(catchError((
|
|
2208
|
-
* @param {?} error
|
|
2209
|
-
* @return {?}
|
|
2210
|
-
*/
|
|
2211
|
-
(error) => throwError(transformCartMagentoError(error)))), map((/**
|
|
2212
|
-
* @param {?} result
|
|
2213
|
-
* @return {?}
|
|
2214
|
-
*/
|
|
2215
|
-
result => this.cartTransformer.transform(result.data.cart))));
|
|
1366
|
+
}).pipe(catchError((error) => throwError(transformCartMagentoError(error))), map(result => this.cartTransformer.transform(result.data.cart)));
|
|
2216
1367
|
}
|
|
2217
|
-
/**
|
|
2218
|
-
* @return {?}
|
|
2219
|
-
*/
|
|
2220
1368
|
create() {
|
|
2221
|
-
return this.mutationQueue.mutate({ mutation: createCart }).pipe(map((
|
|
2222
|
-
* @param {?} result
|
|
2223
|
-
* @return {?}
|
|
2224
|
-
*/
|
|
2225
|
-
result => ({ id: result.data.createEmptyCart }))));
|
|
1369
|
+
return this.mutationQueue.mutate({ mutation: createCart }).pipe(map(result => ({ id: result.data.createEmptyCart })));
|
|
2226
1370
|
}
|
|
2227
|
-
/**
|
|
2228
|
-
* @param {?} productId
|
|
2229
|
-
* @param {?} qty
|
|
2230
|
-
* @return {?}
|
|
2231
|
-
*/
|
|
2232
1371
|
addToCart(productId, qty) {
|
|
2233
1372
|
throw new Error('Method is deprecated. Use DaffCartItemServiceInterface#add instead.');
|
|
2234
1373
|
}
|
|
2235
|
-
/**
|
|
2236
|
-
* @param {?} cartId
|
|
2237
|
-
* @return {?}
|
|
2238
|
-
*/
|
|
2239
1374
|
clear(cartId) {
|
|
2240
|
-
return this.cartItemDriver.list(cartId).pipe(switchMap((
|
|
2241
|
-
* @param {?} items
|
|
2242
|
-
* @return {?}
|
|
2243
|
-
*/
|
|
2244
|
-
items => forkJoin(...items.map((/**
|
|
2245
|
-
* @param {?} item
|
|
2246
|
-
* @return {?}
|
|
2247
|
-
*/
|
|
2248
|
-
item => this.cartItemDriver.delete(cartId, item.id)))))), switchMap((/**
|
|
2249
|
-
* @return {?}
|
|
2250
|
-
*/
|
|
2251
|
-
() => this.get(cartId))));
|
|
1375
|
+
return this.cartItemDriver.list(cartId).pipe(switchMap(items => forkJoin(...items.map(item => this.cartItemDriver.delete(cartId, item.id)))), switchMap(() => this.get(cartId)));
|
|
2252
1376
|
}
|
|
2253
1377
|
}
|
|
1378
|
+
/** @nocollapse */ DaffMagentoCartService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartService_Factory() { return new DaffMagentoCartService(ɵɵinject(Apollo), ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DaffMagentoCartTransformer), ɵɵinject(DaffCartItemDriver), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS)); }, token: DaffMagentoCartService, providedIn: "root" });
|
|
2254
1379
|
DaffMagentoCartService.decorators = [
|
|
2255
1380
|
{ type: Injectable, args: [{
|
|
2256
1381
|
providedIn: 'root',
|
|
@@ -2264,66 +1389,17 @@ DaffMagentoCartService.ctorParameters = () => [
|
|
|
2264
1389
|
{ type: undefined, decorators: [{ type: Inject, args: [DaffCartItemDriver,] }] },
|
|
2265
1390
|
{ type: Array, decorators: [{ type: Inject, args: [DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS,] }] }
|
|
2266
1391
|
];
|
|
2267
|
-
/** @nocollapse */ DaffMagentoCartService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartService_Factory() { return new DaffMagentoCartService(ɵɵinject(Apollo), ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DaffMagentoCartTransformer), ɵɵinject(DaffCartItemDriver), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS)); }, token: DaffMagentoCartService, providedIn: "root" });
|
|
2268
|
-
if (false) {
|
|
2269
|
-
/**
|
|
2270
|
-
* @type {?}
|
|
2271
|
-
* @private
|
|
2272
|
-
*/
|
|
2273
|
-
DaffMagentoCartService.prototype.apollo;
|
|
2274
|
-
/**
|
|
2275
|
-
* @type {?}
|
|
2276
|
-
* @private
|
|
2277
|
-
*/
|
|
2278
|
-
DaffMagentoCartService.prototype.mutationQueue;
|
|
2279
|
-
/**
|
|
2280
|
-
* @type {?}
|
|
2281
|
-
* @private
|
|
2282
|
-
*/
|
|
2283
|
-
DaffMagentoCartService.prototype.cartTransformer;
|
|
2284
|
-
/**
|
|
2285
|
-
* @type {?}
|
|
2286
|
-
* @private
|
|
2287
|
-
*/
|
|
2288
|
-
DaffMagentoCartService.prototype.cartItemDriver;
|
|
2289
|
-
/**
|
|
2290
|
-
* @type {?}
|
|
2291
|
-
* @private
|
|
2292
|
-
*/
|
|
2293
|
-
DaffMagentoCartService.prototype.extraCartFragments;
|
|
2294
|
-
}
|
|
2295
1392
|
|
|
2296
|
-
/**
|
|
2297
|
-
* @fileoverview added by tsickle
|
|
2298
|
-
* Generated from: transforms/inputs/cart-item-input-transformers.ts
|
|
2299
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2300
|
-
*/
|
|
2301
|
-
/**
|
|
2302
|
-
* @param {?} item
|
|
2303
|
-
* @return {?}
|
|
2304
|
-
*/
|
|
2305
1393
|
function transformSimpleCartItem(item) {
|
|
2306
1394
|
return {
|
|
2307
1395
|
quantity: item.qty,
|
|
2308
1396
|
sku: item.productId,
|
|
2309
1397
|
};
|
|
2310
1398
|
}
|
|
2311
|
-
/**
|
|
2312
|
-
* @param {?} item
|
|
2313
|
-
* @return {?}
|
|
2314
|
-
*/
|
|
2315
1399
|
function transformCompositeCartItem(item) {
|
|
2316
1400
|
var _a;
|
|
2317
|
-
return Object.assign(Object.assign({}, transformSimpleCartItem(item)), { selected_options: ((_a = item.options) === null || _a === void 0 ? void 0 : _a.map(
|
|
2318
|
-
* @param {?} option
|
|
2319
|
-
* @return {?}
|
|
2320
|
-
*/
|
|
2321
|
-
option => option.value))) || [] });
|
|
1401
|
+
return Object.assign(Object.assign({}, transformSimpleCartItem(item)), { selected_options: ((_a = item.options) === null || _a === void 0 ? void 0 : _a.map(option => option.value)) || [] });
|
|
2322
1402
|
}
|
|
2323
|
-
/**
|
|
2324
|
-
* @param {?} item
|
|
2325
|
-
* @return {?}
|
|
2326
|
-
*/
|
|
2327
1403
|
function transformConfigurableCartItem(item) {
|
|
2328
1404
|
return {
|
|
2329
1405
|
parent_sku: item.productId,
|
|
@@ -2332,24 +1408,12 @@ function transformConfigurableCartItem(item) {
|
|
|
2332
1408
|
};
|
|
2333
1409
|
}
|
|
2334
1410
|
|
|
2335
|
-
/**
|
|
2336
|
-
* @fileoverview added by tsickle
|
|
2337
|
-
* Generated from: cart-item.service.ts
|
|
2338
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2339
|
-
*/
|
|
2340
1411
|
/**
|
|
2341
1412
|
* A service for making Magento GraphQL queries for carts.
|
|
2342
1413
|
*
|
|
2343
|
-
*
|
|
1414
|
+
* @inheritdoc
|
|
2344
1415
|
*/
|
|
2345
1416
|
class DaffMagentoCartItemService {
|
|
2346
|
-
/**
|
|
2347
|
-
* @param {?} apollo
|
|
2348
|
-
* @param {?} mutationQueue
|
|
2349
|
-
* @param {?} extraCartFragments
|
|
2350
|
-
* @param {?} cartTransformer
|
|
2351
|
-
* @param {?} cartItemUpdateInputTransformer
|
|
2352
|
-
*/
|
|
2353
1417
|
constructor(apollo, mutationQueue, extraCartFragments, cartTransformer, cartItemUpdateInputTransformer) {
|
|
2354
1418
|
this.apollo = apollo;
|
|
2355
1419
|
this.mutationQueue = mutationQueue;
|
|
@@ -2357,57 +1421,25 @@ class DaffMagentoCartItemService {
|
|
|
2357
1421
|
this.cartTransformer = cartTransformer;
|
|
2358
1422
|
this.cartItemUpdateInputTransformer = cartItemUpdateInputTransformer;
|
|
2359
1423
|
}
|
|
2360
|
-
/**
|
|
2361
|
-
* @param {?} cartId
|
|
2362
|
-
* @return {?}
|
|
2363
|
-
*/
|
|
2364
1424
|
list(cartId) {
|
|
2365
1425
|
return this.apollo.query({
|
|
2366
1426
|
query: listCartItems(this.extraCartFragments),
|
|
2367
1427
|
variables: { cartId },
|
|
2368
|
-
}).pipe(map((
|
|
2369
|
-
* @param {?} result
|
|
2370
|
-
* @return {?}
|
|
2371
|
-
*/
|
|
2372
|
-
result => result.data.cart.items.map(transformMagentoCartItem))));
|
|
1428
|
+
}).pipe(map(result => result.data.cart.items.map(transformMagentoCartItem)));
|
|
2373
1429
|
}
|
|
2374
|
-
/**
|
|
2375
|
-
* @param {?} cartId
|
|
2376
|
-
* @param {?} itemId
|
|
2377
|
-
* @return {?}
|
|
2378
|
-
*/
|
|
2379
1430
|
get(cartId, itemId) {
|
|
2380
|
-
return this.list(cartId).pipe(map((
|
|
2381
|
-
* @param {?} items
|
|
2382
|
-
* @return {?}
|
|
2383
|
-
*/
|
|
2384
|
-
items => items.find((/**
|
|
2385
|
-
* @param {?} item
|
|
2386
|
-
* @return {?}
|
|
2387
|
-
*/
|
|
2388
|
-
item => item.id === itemId)))));
|
|
1431
|
+
return this.list(cartId).pipe(map(items => items.find(item => item.id === itemId)));
|
|
2389
1432
|
}
|
|
2390
|
-
/**
|
|
2391
|
-
* @param {?} cartId
|
|
2392
|
-
* @param {?} cartItemInput
|
|
2393
|
-
* @return {?}
|
|
2394
|
-
*/
|
|
2395
1433
|
add(cartId, cartItemInput) {
|
|
2396
1434
|
switch (cartItemInput.type) {
|
|
2397
1435
|
case (DaffCartItemInputType.Composite):
|
|
2398
|
-
return this.addBundledProduct(cartId,
|
|
1436
|
+
return this.addBundledProduct(cartId, cartItemInput);
|
|
2399
1437
|
case (DaffCartItemInputType.Configurable):
|
|
2400
|
-
return this.addConfigurableProduct(cartId,
|
|
1438
|
+
return this.addConfigurableProduct(cartId, cartItemInput);
|
|
2401
1439
|
default:
|
|
2402
1440
|
return this.addSimpleProduct(cartId, cartItemInput);
|
|
2403
1441
|
}
|
|
2404
1442
|
}
|
|
2405
|
-
/**
|
|
2406
|
-
* @param {?} cartId
|
|
2407
|
-
* @param {?} itemId
|
|
2408
|
-
* @param {?} changes
|
|
2409
|
-
* @return {?}
|
|
2410
|
-
*/
|
|
2411
1443
|
update(cartId, itemId, changes) {
|
|
2412
1444
|
return this.mutationQueue.mutate({
|
|
2413
1445
|
mutation: updateCartItem(this.extraCartFragments),
|
|
@@ -2415,21 +1447,8 @@ class DaffMagentoCartItemService {
|
|
|
2415
1447
|
cartId,
|
|
2416
1448
|
input: this.cartItemUpdateInputTransformer.transform(Object.assign(Object.assign({}, changes), { id: itemId })),
|
|
2417
1449
|
},
|
|
2418
|
-
}).pipe(map((
|
|
2419
|
-
* @param {?} result
|
|
2420
|
-
* @return {?}
|
|
2421
|
-
*/
|
|
2422
|
-
result => this.cartTransformer.transform(result.data.updateCartItems.cart))), catchError((/**
|
|
2423
|
-
* @param {?} err
|
|
2424
|
-
* @return {?}
|
|
2425
|
-
*/
|
|
2426
|
-
err => throwError(transformCartMagentoError(err)))));
|
|
1450
|
+
}).pipe(map(result => this.cartTransformer.transform(result.data.updateCartItems.cart)), catchError(err => throwError(transformCartMagentoError(err))));
|
|
2427
1451
|
}
|
|
2428
|
-
/**
|
|
2429
|
-
* @param {?} cartId
|
|
2430
|
-
* @param {?} itemId
|
|
2431
|
-
* @return {?}
|
|
2432
|
-
*/
|
|
2433
1452
|
delete(cartId, itemId) {
|
|
2434
1453
|
return this.mutationQueue.mutate({
|
|
2435
1454
|
mutation: removeCartItem(this.extraCartFragments),
|
|
@@ -2437,45 +1456,17 @@ class DaffMagentoCartItemService {
|
|
|
2437
1456
|
cartId,
|
|
2438
1457
|
itemId,
|
|
2439
1458
|
},
|
|
2440
|
-
}).pipe(map((
|
|
2441
|
-
* @param {?} result
|
|
2442
|
-
* @return {?}
|
|
2443
|
-
*/
|
|
2444
|
-
result => this.cartTransformer.transform(result.data.removeItemFromCart.cart))));
|
|
1459
|
+
}).pipe(map(result => this.cartTransformer.transform(result.data.removeItemFromCart.cart)));
|
|
2445
1460
|
}
|
|
2446
|
-
/**
|
|
2447
|
-
* @private
|
|
2448
|
-
* @param {?} cartId
|
|
2449
|
-
* @param {?} cartItemInput
|
|
2450
|
-
* @return {?}
|
|
2451
|
-
*/
|
|
2452
1461
|
addBundledProduct(cartId, cartItemInput) {
|
|
2453
1462
|
return this.addCartItemRequest(cartId, transformCompositeCartItem(cartItemInput));
|
|
2454
1463
|
}
|
|
2455
|
-
/**
|
|
2456
|
-
* @private
|
|
2457
|
-
* @param {?} cartId
|
|
2458
|
-
* @param {?} cartItemInput
|
|
2459
|
-
* @return {?}
|
|
2460
|
-
*/
|
|
2461
1464
|
addConfigurableProduct(cartId, cartItemInput) {
|
|
2462
1465
|
return this.addCartItemRequest(cartId, transformConfigurableCartItem(cartItemInput));
|
|
2463
1466
|
}
|
|
2464
|
-
/**
|
|
2465
|
-
* @private
|
|
2466
|
-
* @param {?} cartId
|
|
2467
|
-
* @param {?} cartItemInput
|
|
2468
|
-
* @return {?}
|
|
2469
|
-
*/
|
|
2470
1467
|
addSimpleProduct(cartId, cartItemInput) {
|
|
2471
1468
|
return this.addCartItemRequest(cartId, transformSimpleCartItem(cartItemInput));
|
|
2472
1469
|
}
|
|
2473
|
-
/**
|
|
2474
|
-
* @private
|
|
2475
|
-
* @param {?} cartId
|
|
2476
|
-
* @param {?} input
|
|
2477
|
-
* @return {?}
|
|
2478
|
-
*/
|
|
2479
1470
|
addCartItemRequest(cartId, input) {
|
|
2480
1471
|
return this.mutationQueue.mutate({
|
|
2481
1472
|
mutation: addCartItem(this.extraCartFragments),
|
|
@@ -2483,13 +1474,10 @@ class DaffMagentoCartItemService {
|
|
|
2483
1474
|
cartId,
|
|
2484
1475
|
input,
|
|
2485
1476
|
},
|
|
2486
|
-
}).pipe(map((
|
|
2487
|
-
* @param {?} result
|
|
2488
|
-
* @return {?}
|
|
2489
|
-
*/
|
|
2490
|
-
result => this.cartTransformer.transform(result.data.addProductsToCart.cart))));
|
|
1477
|
+
}).pipe(map(result => this.cartTransformer.transform(result.data.addProductsToCart.cart)));
|
|
2491
1478
|
}
|
|
2492
1479
|
}
|
|
1480
|
+
/** @nocollapse */ DaffMagentoCartItemService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartItemService_Factory() { return new DaffMagentoCartItemService(ɵɵinject(Apollo), ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartTransformer), ɵɵinject(DaffMagentoCartItemUpdateInputTransformer)); }, token: DaffMagentoCartItemService, providedIn: "root" });
|
|
2493
1481
|
DaffMagentoCartItemService.decorators = [
|
|
2494
1482
|
{ type: Injectable, args: [{
|
|
2495
1483
|
providedIn: 'root',
|
|
@@ -2503,55 +1491,13 @@ DaffMagentoCartItemService.ctorParameters = () => [
|
|
|
2503
1491
|
{ type: DaffMagentoCartTransformer },
|
|
2504
1492
|
{ type: DaffMagentoCartItemUpdateInputTransformer }
|
|
2505
1493
|
];
|
|
2506
|
-
/** @nocollapse */ DaffMagentoCartItemService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartItemService_Factory() { return new DaffMagentoCartItemService(ɵɵinject(Apollo), ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartTransformer), ɵɵinject(DaffMagentoCartItemUpdateInputTransformer)); }, token: DaffMagentoCartItemService, providedIn: "root" });
|
|
2507
|
-
if (false) {
|
|
2508
|
-
/**
|
|
2509
|
-
* @type {?}
|
|
2510
|
-
* @private
|
|
2511
|
-
*/
|
|
2512
|
-
DaffMagentoCartItemService.prototype.apollo;
|
|
2513
|
-
/**
|
|
2514
|
-
* @type {?}
|
|
2515
|
-
* @private
|
|
2516
|
-
*/
|
|
2517
|
-
DaffMagentoCartItemService.prototype.mutationQueue;
|
|
2518
|
-
/**
|
|
2519
|
-
* @type {?}
|
|
2520
|
-
* @private
|
|
2521
|
-
*/
|
|
2522
|
-
DaffMagentoCartItemService.prototype.extraCartFragments;
|
|
2523
|
-
/**
|
|
2524
|
-
* @type {?}
|
|
2525
|
-
* @private
|
|
2526
|
-
*/
|
|
2527
|
-
DaffMagentoCartItemService.prototype.cartTransformer;
|
|
2528
|
-
/**
|
|
2529
|
-
* @type {?}
|
|
2530
|
-
* @private
|
|
2531
|
-
*/
|
|
2532
|
-
DaffMagentoCartItemService.prototype.cartItemUpdateInputTransformer;
|
|
2533
|
-
}
|
|
2534
1494
|
|
|
2535
|
-
/**
|
|
2536
|
-
* @fileoverview added by tsickle
|
|
2537
|
-
* Generated from: cart-payment.service.ts
|
|
2538
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2539
|
-
*/
|
|
2540
1495
|
/**
|
|
2541
1496
|
* A service for making Magento GraphQL queries for carts.
|
|
2542
1497
|
*
|
|
2543
|
-
*
|
|
1498
|
+
* @inheritdoc
|
|
2544
1499
|
*/
|
|
2545
1500
|
class DaffMagentoCartPaymentService {
|
|
2546
|
-
/**
|
|
2547
|
-
* @param {?} apollo
|
|
2548
|
-
* @param {?} mutationQueue
|
|
2549
|
-
* @param {?} cartTransformer
|
|
2550
|
-
* @param {?} paymentTransformer
|
|
2551
|
-
* @param {?} paymentInputTransformer
|
|
2552
|
-
* @param {?} cartAddressInputTransformer
|
|
2553
|
-
* @param {?} extraCartFragments
|
|
2554
|
-
*/
|
|
2555
1501
|
constructor(apollo, mutationQueue, cartTransformer, paymentTransformer, paymentInputTransformer, cartAddressInputTransformer, extraCartFragments) {
|
|
2556
1502
|
this.apollo = apollo;
|
|
2557
1503
|
this.mutationQueue = mutationQueue;
|
|
@@ -2561,25 +1507,12 @@ class DaffMagentoCartPaymentService {
|
|
|
2561
1507
|
this.cartAddressInputTransformer = cartAddressInputTransformer;
|
|
2562
1508
|
this.extraCartFragments = extraCartFragments;
|
|
2563
1509
|
}
|
|
2564
|
-
/**
|
|
2565
|
-
* @param {?} cartId
|
|
2566
|
-
* @return {?}
|
|
2567
|
-
*/
|
|
2568
1510
|
get(cartId) {
|
|
2569
1511
|
return this.apollo.query({
|
|
2570
1512
|
query: getSelectedPaymentMethod(this.extraCartFragments),
|
|
2571
1513
|
variables: { cartId },
|
|
2572
|
-
}).pipe(map((
|
|
2573
|
-
* @param {?} result
|
|
2574
|
-
* @return {?}
|
|
2575
|
-
*/
|
|
2576
|
-
result => this.paymentTransformer.transform(result.data.cart.selected_payment_method))));
|
|
1514
|
+
}).pipe(map(result => this.paymentTransformer.transform(result.data.cart.selected_payment_method)));
|
|
2577
1515
|
}
|
|
2578
|
-
/**
|
|
2579
|
-
* @param {?} cartId
|
|
2580
|
-
* @param {?} payment
|
|
2581
|
-
* @return {?}
|
|
2582
|
-
*/
|
|
2583
1516
|
update(cartId, payment) {
|
|
2584
1517
|
return this.mutationQueue.mutate({
|
|
2585
1518
|
mutation: setSelectedPaymentMethod(this.extraCartFragments),
|
|
@@ -2587,27 +1520,13 @@ class DaffMagentoCartPaymentService {
|
|
|
2587
1520
|
cartId,
|
|
2588
1521
|
payment: this.paymentInputTransformer.transform(payment),
|
|
2589
1522
|
},
|
|
2590
|
-
}).pipe(map((
|
|
2591
|
-
* @param {?} result
|
|
2592
|
-
* @return {?}
|
|
2593
|
-
*/
|
|
2594
|
-
result => this.cartTransformer.transform(result.data.setPaymentMethodOnCart.cart))));
|
|
1523
|
+
}).pipe(map(result => this.cartTransformer.transform(result.data.setPaymentMethodOnCart.cart)));
|
|
2595
1524
|
}
|
|
2596
|
-
/**
|
|
2597
|
-
* @param {?} cartId
|
|
2598
|
-
* @param {?} payment
|
|
2599
|
-
* @param {?} address
|
|
2600
|
-
* @return {?}
|
|
2601
|
-
*/
|
|
2602
1525
|
updateWithBilling(cartId, payment, address) {
|
|
2603
1526
|
return address.email
|
|
2604
1527
|
? this.updateWithBillingAddressAndEmail(cartId, payment, address)
|
|
2605
1528
|
: this.updateWithBillingAddress(cartId, payment, address);
|
|
2606
1529
|
}
|
|
2607
|
-
/**
|
|
2608
|
-
* @param {?} cartId
|
|
2609
|
-
* @return {?}
|
|
2610
|
-
*/
|
|
2611
1530
|
remove(cartId) {
|
|
2612
1531
|
return this.mutationQueue.mutate({
|
|
2613
1532
|
mutation: setSelectedPaymentMethod(this.extraCartFragments),
|
|
@@ -2617,13 +1536,6 @@ class DaffMagentoCartPaymentService {
|
|
|
2617
1536
|
},
|
|
2618
1537
|
}).pipe(mapTo(undefined));
|
|
2619
1538
|
}
|
|
2620
|
-
/**
|
|
2621
|
-
* @private
|
|
2622
|
-
* @param {?} cartId
|
|
2623
|
-
* @param {?} payment
|
|
2624
|
-
* @param {?} address
|
|
2625
|
-
* @return {?}
|
|
2626
|
-
*/
|
|
2627
1539
|
updateWithBillingAddress(cartId, payment, address) {
|
|
2628
1540
|
return this.mutationQueue.mutate({
|
|
2629
1541
|
mutation: setSelectedPaymentMethodWithBilling(this.extraCartFragments),
|
|
@@ -2632,23 +1544,8 @@ class DaffMagentoCartPaymentService {
|
|
|
2632
1544
|
payment: this.paymentInputTransformer.transform(payment),
|
|
2633
1545
|
address: this.cartAddressInputTransformer.transform(address),
|
|
2634
1546
|
},
|
|
2635
|
-
}).pipe(map((
|
|
2636
|
-
* @param {?} resp
|
|
2637
|
-
* @return {?}
|
|
2638
|
-
*/
|
|
2639
|
-
resp => this.cartTransformer.transform(resp.data.setPaymentMethodOnCart.cart))), catchError((/**
|
|
2640
|
-
* @param {?} error
|
|
2641
|
-
* @return {?}
|
|
2642
|
-
*/
|
|
2643
|
-
error => throwError(transformCartMagentoError(error)))));
|
|
1547
|
+
}).pipe(map(resp => this.cartTransformer.transform(resp.data.setPaymentMethodOnCart.cart)), catchError(error => throwError(transformCartMagentoError(error))));
|
|
2644
1548
|
}
|
|
2645
|
-
/**
|
|
2646
|
-
* @private
|
|
2647
|
-
* @param {?} cartId
|
|
2648
|
-
* @param {?} payment
|
|
2649
|
-
* @param {?} address
|
|
2650
|
-
* @return {?}
|
|
2651
|
-
*/
|
|
2652
1549
|
updateWithBillingAddressAndEmail(cartId, payment, address) {
|
|
2653
1550
|
return this.mutationQueue.mutate({
|
|
2654
1551
|
mutation: setSelectedPaymentMethodWithBillingAndEmail(this.extraCartFragments),
|
|
@@ -2658,17 +1555,10 @@ class DaffMagentoCartPaymentService {
|
|
|
2658
1555
|
payment: this.paymentInputTransformer.transform(payment),
|
|
2659
1556
|
address: this.cartAddressInputTransformer.transform(address),
|
|
2660
1557
|
},
|
|
2661
|
-
}).pipe(map((
|
|
2662
|
-
* @param {?} resp
|
|
2663
|
-
* @return {?}
|
|
2664
|
-
*/
|
|
2665
|
-
resp => this.cartTransformer.transform(resp.data.setGuestEmailOnCart.cart))), catchError((/**
|
|
2666
|
-
* @param {?} error
|
|
2667
|
-
* @return {?}
|
|
2668
|
-
*/
|
|
2669
|
-
error => throwError(transformCartMagentoError(error)))));
|
|
1558
|
+
}).pipe(map(resp => this.cartTransformer.transform(resp.data.setGuestEmailOnCart.cart)), catchError(error => throwError(transformCartMagentoError(error))));
|
|
2670
1559
|
}
|
|
2671
1560
|
}
|
|
1561
|
+
/** @nocollapse */ DaffMagentoCartPaymentService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartPaymentService_Factory() { return new DaffMagentoCartPaymentService(ɵɵinject(Apollo), ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DaffMagentoCartTransformer), ɵɵinject(DaffMagentoCartPaymentTransformer), ɵɵinject(DaffMagentoPaymentMethodInputTransformer), ɵɵinject(DaffMagentoBillingAddressInputTransformer), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS)); }, token: DaffMagentoCartPaymentService, providedIn: "root" });
|
|
2672
1562
|
DaffMagentoCartPaymentService.decorators = [
|
|
2673
1563
|
{ type: Injectable, args: [{
|
|
2674
1564
|
providedIn: 'root',
|
|
@@ -2684,85 +1574,26 @@ DaffMagentoCartPaymentService.ctorParameters = () => [
|
|
|
2684
1574
|
{ type: DaffMagentoBillingAddressInputTransformer },
|
|
2685
1575
|
{ type: Array, decorators: [{ type: Inject, args: [DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS,] }] }
|
|
2686
1576
|
];
|
|
2687
|
-
/** @nocollapse */ DaffMagentoCartPaymentService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartPaymentService_Factory() { return new DaffMagentoCartPaymentService(ɵɵinject(Apollo), ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DaffMagentoCartTransformer), ɵɵinject(DaffMagentoCartPaymentTransformer), ɵɵinject(DaffMagentoPaymentMethodInputTransformer), ɵɵinject(DaffMagentoBillingAddressInputTransformer), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS)); }, token: DaffMagentoCartPaymentService, providedIn: "root" });
|
|
2688
|
-
if (false) {
|
|
2689
|
-
/**
|
|
2690
|
-
* @type {?}
|
|
2691
|
-
* @private
|
|
2692
|
-
*/
|
|
2693
|
-
DaffMagentoCartPaymentService.prototype.apollo;
|
|
2694
|
-
/**
|
|
2695
|
-
* @type {?}
|
|
2696
|
-
* @private
|
|
2697
|
-
*/
|
|
2698
|
-
DaffMagentoCartPaymentService.prototype.mutationQueue;
|
|
2699
|
-
/**
|
|
2700
|
-
* @type {?}
|
|
2701
|
-
* @private
|
|
2702
|
-
*/
|
|
2703
|
-
DaffMagentoCartPaymentService.prototype.cartTransformer;
|
|
2704
|
-
/**
|
|
2705
|
-
* @type {?}
|
|
2706
|
-
* @private
|
|
2707
|
-
*/
|
|
2708
|
-
DaffMagentoCartPaymentService.prototype.paymentTransformer;
|
|
2709
|
-
/**
|
|
2710
|
-
* @type {?}
|
|
2711
|
-
* @private
|
|
2712
|
-
*/
|
|
2713
|
-
DaffMagentoCartPaymentService.prototype.paymentInputTransformer;
|
|
2714
|
-
/**
|
|
2715
|
-
* @type {?}
|
|
2716
|
-
* @private
|
|
2717
|
-
*/
|
|
2718
|
-
DaffMagentoCartPaymentService.prototype.cartAddressInputTransformer;
|
|
2719
|
-
/**
|
|
2720
|
-
* @type {?}
|
|
2721
|
-
* @private
|
|
2722
|
-
*/
|
|
2723
|
-
DaffMagentoCartPaymentService.prototype.extraCartFragments;
|
|
2724
|
-
}
|
|
2725
1577
|
|
|
2726
|
-
/**
|
|
2727
|
-
* @fileoverview added by tsickle
|
|
2728
|
-
* Generated from: cart-payment-methods.service.ts
|
|
2729
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2730
|
-
*/
|
|
2731
1578
|
/**
|
|
2732
1579
|
* A service for making Magento GraphQL queries for carts.
|
|
2733
1580
|
*
|
|
2734
|
-
*
|
|
1581
|
+
* @inheritdoc
|
|
2735
1582
|
*/
|
|
2736
1583
|
class DaffMagentoCartPaymentMethodsService {
|
|
2737
|
-
/**
|
|
2738
|
-
* @param {?} apollo
|
|
2739
|
-
* @param {?} extraCartFragments
|
|
2740
|
-
* @param {?} paymentTransformer
|
|
2741
|
-
*/
|
|
2742
1584
|
constructor(apollo, extraCartFragments, paymentTransformer) {
|
|
2743
1585
|
this.apollo = apollo;
|
|
2744
1586
|
this.extraCartFragments = extraCartFragments;
|
|
2745
1587
|
this.paymentTransformer = paymentTransformer;
|
|
2746
1588
|
}
|
|
2747
|
-
/**
|
|
2748
|
-
* @param {?} cartId
|
|
2749
|
-
* @return {?}
|
|
2750
|
-
*/
|
|
2751
1589
|
list(cartId) {
|
|
2752
1590
|
return this.apollo.query({
|
|
2753
1591
|
query: listPaymentMethods(this.extraCartFragments),
|
|
2754
1592
|
variables: { cartId },
|
|
2755
|
-
}).pipe(map((
|
|
2756
|
-
* @param {?} result
|
|
2757
|
-
* @return {?}
|
|
2758
|
-
*/
|
|
2759
|
-
result => result.data.cart.available_payment_methods.map((/**
|
|
2760
|
-
* @param {?} item
|
|
2761
|
-
* @return {?}
|
|
2762
|
-
*/
|
|
2763
|
-
item => this.paymentTransformer.transform(item))))));
|
|
1593
|
+
}).pipe(map(result => result.data.cart.available_payment_methods.map(item => this.paymentTransformer.transform(item))));
|
|
2764
1594
|
}
|
|
2765
1595
|
}
|
|
1596
|
+
/** @nocollapse */ DaffMagentoCartPaymentMethodsService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartPaymentMethodsService_Factory() { return new DaffMagentoCartPaymentMethodsService(ɵɵinject(Apollo), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartPaymentTransformer)); }, token: DaffMagentoCartPaymentMethodsService, providedIn: "root" });
|
|
2766
1597
|
DaffMagentoCartPaymentMethodsService.decorators = [
|
|
2767
1598
|
{ type: Injectable, args: [{
|
|
2768
1599
|
providedIn: 'root',
|
|
@@ -2774,44 +1605,13 @@ DaffMagentoCartPaymentMethodsService.ctorParameters = () => [
|
|
|
2774
1605
|
{ type: Array, decorators: [{ type: Inject, args: [DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS,] }] },
|
|
2775
1606
|
{ type: DaffMagentoCartPaymentTransformer }
|
|
2776
1607
|
];
|
|
2777
|
-
/** @nocollapse */ DaffMagentoCartPaymentMethodsService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartPaymentMethodsService_Factory() { return new DaffMagentoCartPaymentMethodsService(ɵɵinject(Apollo), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartPaymentTransformer)); }, token: DaffMagentoCartPaymentMethodsService, providedIn: "root" });
|
|
2778
|
-
if (false) {
|
|
2779
|
-
/**
|
|
2780
|
-
* @type {?}
|
|
2781
|
-
* @private
|
|
2782
|
-
*/
|
|
2783
|
-
DaffMagentoCartPaymentMethodsService.prototype.apollo;
|
|
2784
|
-
/**
|
|
2785
|
-
* @type {?}
|
|
2786
|
-
* @private
|
|
2787
|
-
*/
|
|
2788
|
-
DaffMagentoCartPaymentMethodsService.prototype.extraCartFragments;
|
|
2789
|
-
/**
|
|
2790
|
-
* @type {?}
|
|
2791
|
-
* @private
|
|
2792
|
-
*/
|
|
2793
|
-
DaffMagentoCartPaymentMethodsService.prototype.paymentTransformer;
|
|
2794
|
-
}
|
|
2795
1608
|
|
|
2796
|
-
/**
|
|
2797
|
-
* @fileoverview added by tsickle
|
|
2798
|
-
* Generated from: cart-billing-address.service.ts
|
|
2799
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2800
|
-
*/
|
|
2801
1609
|
/**
|
|
2802
1610
|
* A service for making Magento GraphQL queries for carts.
|
|
2803
1611
|
*
|
|
2804
|
-
*
|
|
1612
|
+
* @inheritdoc
|
|
2805
1613
|
*/
|
|
2806
1614
|
class DaffMagentoCartBillingAddressService {
|
|
2807
|
-
/**
|
|
2808
|
-
* @param {?} apollo
|
|
2809
|
-
* @param {?} mutationQueue
|
|
2810
|
-
* @param {?} extraCartFragments
|
|
2811
|
-
* @param {?} cartTransformer
|
|
2812
|
-
* @param {?} billingAddressTransformer
|
|
2813
|
-
* @param {?} billingAddressInputTransformer
|
|
2814
|
-
*/
|
|
2815
1615
|
constructor(apollo, mutationQueue, extraCartFragments, cartTransformer, billingAddressTransformer, billingAddressInputTransformer) {
|
|
2816
1616
|
this.apollo = apollo;
|
|
2817
1617
|
this.mutationQueue = mutationQueue;
|
|
@@ -2820,36 +1620,17 @@ class DaffMagentoCartBillingAddressService {
|
|
|
2820
1620
|
this.billingAddressTransformer = billingAddressTransformer;
|
|
2821
1621
|
this.billingAddressInputTransformer = billingAddressInputTransformer;
|
|
2822
1622
|
}
|
|
2823
|
-
/**
|
|
2824
|
-
* @param {?} cartId
|
|
2825
|
-
* @return {?}
|
|
2826
|
-
*/
|
|
2827
1623
|
get(cartId) {
|
|
2828
1624
|
return this.apollo.query({
|
|
2829
1625
|
query: getBillingAddress(this.extraCartFragments),
|
|
2830
1626
|
variables: { cartId },
|
|
2831
|
-
}).pipe(map(
|
|
2832
|
-
* @param {?} result
|
|
2833
|
-
* @return {?}
|
|
2834
|
-
*/
|
|
2835
|
-
result => result.data.cart.billing_address
|
|
1627
|
+
}).pipe(map(result => result.data.cart.billing_address
|
|
2836
1628
|
? this.billingAddressTransformer.transform(Object.assign(Object.assign({}, result.data.cart.billing_address), { email: result.data.cart.email }))
|
|
2837
|
-
: null))
|
|
1629
|
+
: null));
|
|
2838
1630
|
}
|
|
2839
|
-
/**
|
|
2840
|
-
* @param {?} cartId
|
|
2841
|
-
* @param {?} address
|
|
2842
|
-
* @return {?}
|
|
2843
|
-
*/
|
|
2844
1631
|
update(cartId, address) {
|
|
2845
1632
|
return address.email ? this.updateAddressWithEmail(cartId, address) : this.updateAddress(cartId, address);
|
|
2846
1633
|
}
|
|
2847
|
-
/**
|
|
2848
|
-
* @private
|
|
2849
|
-
* @param {?} cartId
|
|
2850
|
-
* @param {?} address
|
|
2851
|
-
* @return {?}
|
|
2852
|
-
*/
|
|
2853
1634
|
updateAddress(cartId, address) {
|
|
2854
1635
|
return this.mutationQueue.mutate({
|
|
2855
1636
|
mutation: updateBillingAddress(this.extraCartFragments),
|
|
@@ -2857,22 +1638,8 @@ class DaffMagentoCartBillingAddressService {
|
|
|
2857
1638
|
cartId,
|
|
2858
1639
|
address: this.billingAddressInputTransformer.transform(address),
|
|
2859
1640
|
},
|
|
2860
|
-
}).pipe(map((
|
|
2861
|
-
* @param {?} resp
|
|
2862
|
-
* @return {?}
|
|
2863
|
-
*/
|
|
2864
|
-
resp => this.cartTransformer.transform(resp.data.setBillingAddressOnCart.cart))), catchError((/**
|
|
2865
|
-
* @param {?} error
|
|
2866
|
-
* @return {?}
|
|
2867
|
-
*/
|
|
2868
|
-
error => throwError(transformCartMagentoError(error)))));
|
|
1641
|
+
}).pipe(map(resp => this.cartTransformer.transform(resp.data.setBillingAddressOnCart.cart)), catchError(error => throwError(transformCartMagentoError(error))));
|
|
2869
1642
|
}
|
|
2870
|
-
/**
|
|
2871
|
-
* @private
|
|
2872
|
-
* @param {?} cartId
|
|
2873
|
-
* @param {?} address
|
|
2874
|
-
* @return {?}
|
|
2875
|
-
*/
|
|
2876
1643
|
updateAddressWithEmail(cartId, address) {
|
|
2877
1644
|
return this.mutationQueue.mutate({
|
|
2878
1645
|
mutation: updateBillingAddressWithEmail(this.extraCartFragments),
|
|
@@ -2881,17 +1648,10 @@ class DaffMagentoCartBillingAddressService {
|
|
|
2881
1648
|
email: address.email,
|
|
2882
1649
|
address: this.billingAddressInputTransformer.transform(address),
|
|
2883
1650
|
},
|
|
2884
|
-
}).pipe(map((
|
|
2885
|
-
* @param {?} resp
|
|
2886
|
-
* @return {?}
|
|
2887
|
-
*/
|
|
2888
|
-
resp => this.cartTransformer.transform(Object.assign(Object.assign({}, resp.data.setBillingAddressOnCart.cart), { email: resp.data.setGuestEmailOnCart.cart.email })))), catchError((/**
|
|
2889
|
-
* @param {?} error
|
|
2890
|
-
* @return {?}
|
|
2891
|
-
*/
|
|
2892
|
-
error => throwError(transformCartMagentoError(error)))));
|
|
1651
|
+
}).pipe(map(resp => this.cartTransformer.transform(Object.assign(Object.assign({}, resp.data.setBillingAddressOnCart.cart), { email: resp.data.setGuestEmailOnCart.cart.email }))), catchError(error => throwError(transformCartMagentoError(error))));
|
|
2893
1652
|
}
|
|
2894
1653
|
}
|
|
1654
|
+
/** @nocollapse */ DaffMagentoCartBillingAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartBillingAddressService_Factory() { return new DaffMagentoCartBillingAddressService(ɵɵinject(Apollo), ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartTransformer), ɵɵinject(DaffMagentoBillingAddressTransformer), ɵɵinject(DaffMagentoBillingAddressInputTransformer)); }, token: DaffMagentoCartBillingAddressService, providedIn: "root" });
|
|
2895
1655
|
DaffMagentoCartBillingAddressService.decorators = [
|
|
2896
1656
|
{ type: Injectable, args: [{
|
|
2897
1657
|
providedIn: 'root',
|
|
@@ -2906,59 +1666,13 @@ DaffMagentoCartBillingAddressService.ctorParameters = () => [
|
|
|
2906
1666
|
{ type: DaffMagentoBillingAddressTransformer },
|
|
2907
1667
|
{ type: DaffMagentoBillingAddressInputTransformer }
|
|
2908
1668
|
];
|
|
2909
|
-
/** @nocollapse */ DaffMagentoCartBillingAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartBillingAddressService_Factory() { return new DaffMagentoCartBillingAddressService(ɵɵinject(Apollo), ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartTransformer), ɵɵinject(DaffMagentoBillingAddressTransformer), ɵɵinject(DaffMagentoBillingAddressInputTransformer)); }, token: DaffMagentoCartBillingAddressService, providedIn: "root" });
|
|
2910
|
-
if (false) {
|
|
2911
|
-
/**
|
|
2912
|
-
* @type {?}
|
|
2913
|
-
* @private
|
|
2914
|
-
*/
|
|
2915
|
-
DaffMagentoCartBillingAddressService.prototype.apollo;
|
|
2916
|
-
/**
|
|
2917
|
-
* @type {?}
|
|
2918
|
-
* @private
|
|
2919
|
-
*/
|
|
2920
|
-
DaffMagentoCartBillingAddressService.prototype.mutationQueue;
|
|
2921
|
-
/**
|
|
2922
|
-
* @type {?}
|
|
2923
|
-
* @private
|
|
2924
|
-
*/
|
|
2925
|
-
DaffMagentoCartBillingAddressService.prototype.extraCartFragments;
|
|
2926
|
-
/**
|
|
2927
|
-
* @type {?}
|
|
2928
|
-
* @private
|
|
2929
|
-
*/
|
|
2930
|
-
DaffMagentoCartBillingAddressService.prototype.cartTransformer;
|
|
2931
|
-
/**
|
|
2932
|
-
* @type {?}
|
|
2933
|
-
* @private
|
|
2934
|
-
*/
|
|
2935
|
-
DaffMagentoCartBillingAddressService.prototype.billingAddressTransformer;
|
|
2936
|
-
/**
|
|
2937
|
-
* @type {?}
|
|
2938
|
-
* @private
|
|
2939
|
-
*/
|
|
2940
|
-
DaffMagentoCartBillingAddressService.prototype.billingAddressInputTransformer;
|
|
2941
|
-
}
|
|
2942
1669
|
|
|
2943
|
-
/**
|
|
2944
|
-
* @fileoverview added by tsickle
|
|
2945
|
-
* Generated from: cart-shipping-address.service.ts
|
|
2946
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2947
|
-
*/
|
|
2948
1670
|
/**
|
|
2949
1671
|
* A service for making Magento GraphQL queries for a cart's shipping address.
|
|
2950
1672
|
*
|
|
2951
|
-
*
|
|
1673
|
+
* @inheritdoc
|
|
2952
1674
|
*/
|
|
2953
1675
|
class DaffMagentoCartShippingAddressService {
|
|
2954
|
-
/**
|
|
2955
|
-
* @param {?} apollo
|
|
2956
|
-
* @param {?} mutationQueue
|
|
2957
|
-
* @param {?} extraCartFragments
|
|
2958
|
-
* @param {?} cartTransformer
|
|
2959
|
-
* @param {?} shippingAddressTransformer
|
|
2960
|
-
* @param {?} shippingAddressInputTransformer
|
|
2961
|
-
*/
|
|
2962
1676
|
constructor(apollo, mutationQueue, extraCartFragments, cartTransformer, shippingAddressTransformer, shippingAddressInputTransformer) {
|
|
2963
1677
|
this.apollo = apollo;
|
|
2964
1678
|
this.mutationQueue = mutationQueue;
|
|
@@ -2967,36 +1681,17 @@ class DaffMagentoCartShippingAddressService {
|
|
|
2967
1681
|
this.shippingAddressTransformer = shippingAddressTransformer;
|
|
2968
1682
|
this.shippingAddressInputTransformer = shippingAddressInputTransformer;
|
|
2969
1683
|
}
|
|
2970
|
-
/**
|
|
2971
|
-
* @param {?} cartId
|
|
2972
|
-
* @return {?}
|
|
2973
|
-
*/
|
|
2974
1684
|
get(cartId) {
|
|
2975
1685
|
return this.apollo.query({
|
|
2976
1686
|
query: getShippingAddress(this.extraCartFragments),
|
|
2977
1687
|
variables: { cartId },
|
|
2978
|
-
}).pipe(map(
|
|
2979
|
-
* @param {?} result
|
|
2980
|
-
* @return {?}
|
|
2981
|
-
*/
|
|
2982
|
-
result => result.data.cart.shipping_addresses[0]
|
|
1688
|
+
}).pipe(map(result => result.data.cart.shipping_addresses[0]
|
|
2983
1689
|
? this.shippingAddressTransformer.transform(Object.assign(Object.assign({}, result.data.cart.shipping_addresses[0]), { email: result.data.cart.email }))
|
|
2984
|
-
: null))
|
|
1690
|
+
: null));
|
|
2985
1691
|
}
|
|
2986
|
-
/**
|
|
2987
|
-
* @param {?} cartId
|
|
2988
|
-
* @param {?} address
|
|
2989
|
-
* @return {?}
|
|
2990
|
-
*/
|
|
2991
1692
|
update(cartId, address) {
|
|
2992
1693
|
return address.email ? this.updateAddressWithEmail(cartId, address) : this.updateAddress(cartId, address);
|
|
2993
1694
|
}
|
|
2994
|
-
/**
|
|
2995
|
-
* @private
|
|
2996
|
-
* @param {?} cartId
|
|
2997
|
-
* @param {?} address
|
|
2998
|
-
* @return {?}
|
|
2999
|
-
*/
|
|
3000
1695
|
updateAddress(cartId, address) {
|
|
3001
1696
|
return this.mutationQueue.mutate({
|
|
3002
1697
|
mutation: updateShippingAddress(this.extraCartFragments),
|
|
@@ -3004,22 +1699,8 @@ class DaffMagentoCartShippingAddressService {
|
|
|
3004
1699
|
cartId,
|
|
3005
1700
|
address: this.shippingAddressInputTransformer.transform(address),
|
|
3006
1701
|
},
|
|
3007
|
-
}).pipe(map((
|
|
3008
|
-
* @param {?} resp
|
|
3009
|
-
* @return {?}
|
|
3010
|
-
*/
|
|
3011
|
-
resp => this.cartTransformer.transform(resp.data.setShippingAddressesOnCart.cart))), catchError((/**
|
|
3012
|
-
* @param {?} error
|
|
3013
|
-
* @return {?}
|
|
3014
|
-
*/
|
|
3015
|
-
error => throwError(transformCartMagentoError(error)))));
|
|
1702
|
+
}).pipe(map(resp => this.cartTransformer.transform(resp.data.setShippingAddressesOnCart.cart)), catchError(error => throwError(transformCartMagentoError(error))));
|
|
3016
1703
|
}
|
|
3017
|
-
/**
|
|
3018
|
-
* @private
|
|
3019
|
-
* @param {?} cartId
|
|
3020
|
-
* @param {?} address
|
|
3021
|
-
* @return {?}
|
|
3022
|
-
*/
|
|
3023
1704
|
updateAddressWithEmail(cartId, address) {
|
|
3024
1705
|
return this.mutationQueue.mutate({
|
|
3025
1706
|
mutation: updateShippingAddressWithEmail(this.extraCartFragments),
|
|
@@ -3028,17 +1709,10 @@ class DaffMagentoCartShippingAddressService {
|
|
|
3028
1709
|
email: address.email,
|
|
3029
1710
|
address: this.shippingAddressInputTransformer.transform(address),
|
|
3030
1711
|
},
|
|
3031
|
-
}).pipe(map((
|
|
3032
|
-
* @param {?} resp
|
|
3033
|
-
* @return {?}
|
|
3034
|
-
*/
|
|
3035
|
-
resp => this.cartTransformer.transform(Object.assign(Object.assign({}, resp.data.setShippingAddressesOnCart.cart), { email: resp.data.setGuestEmailOnCart.cart.email })))), catchError((/**
|
|
3036
|
-
* @param {?} error
|
|
3037
|
-
* @return {?}
|
|
3038
|
-
*/
|
|
3039
|
-
error => throwError(transformCartMagentoError(error)))));
|
|
1712
|
+
}).pipe(map(resp => this.cartTransformer.transform(Object.assign(Object.assign({}, resp.data.setShippingAddressesOnCart.cart), { email: resp.data.setGuestEmailOnCart.cart.email }))), catchError(error => throwError(transformCartMagentoError(error))));
|
|
3040
1713
|
}
|
|
3041
1714
|
}
|
|
1715
|
+
/** @nocollapse */ DaffMagentoCartShippingAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartShippingAddressService_Factory() { return new DaffMagentoCartShippingAddressService(ɵɵinject(Apollo), ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartTransformer), ɵɵinject(DaffMagentoShippingAddressTransformer), ɵɵinject(DaffMagentoShippingAddressInputTransformer)); }, token: DaffMagentoCartShippingAddressService, providedIn: "root" });
|
|
3042
1716
|
DaffMagentoCartShippingAddressService.decorators = [
|
|
3043
1717
|
{ type: Injectable, args: [{
|
|
3044
1718
|
providedIn: 'root',
|
|
@@ -3053,80 +1727,26 @@ DaffMagentoCartShippingAddressService.ctorParameters = () => [
|
|
|
3053
1727
|
{ type: DaffMagentoShippingAddressTransformer },
|
|
3054
1728
|
{ type: DaffMagentoShippingAddressInputTransformer }
|
|
3055
1729
|
];
|
|
3056
|
-
/** @nocollapse */ DaffMagentoCartShippingAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartShippingAddressService_Factory() { return new DaffMagentoCartShippingAddressService(ɵɵinject(Apollo), ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartTransformer), ɵɵinject(DaffMagentoShippingAddressTransformer), ɵɵinject(DaffMagentoShippingAddressInputTransformer)); }, token: DaffMagentoCartShippingAddressService, providedIn: "root" });
|
|
3057
|
-
if (false) {
|
|
3058
|
-
/**
|
|
3059
|
-
* @type {?}
|
|
3060
|
-
* @private
|
|
3061
|
-
*/
|
|
3062
|
-
DaffMagentoCartShippingAddressService.prototype.apollo;
|
|
3063
|
-
/**
|
|
3064
|
-
* @type {?}
|
|
3065
|
-
* @private
|
|
3066
|
-
*/
|
|
3067
|
-
DaffMagentoCartShippingAddressService.prototype.mutationQueue;
|
|
3068
|
-
/**
|
|
3069
|
-
* @type {?}
|
|
3070
|
-
* @private
|
|
3071
|
-
*/
|
|
3072
|
-
DaffMagentoCartShippingAddressService.prototype.extraCartFragments;
|
|
3073
|
-
/**
|
|
3074
|
-
* @type {?}
|
|
3075
|
-
* @private
|
|
3076
|
-
*/
|
|
3077
|
-
DaffMagentoCartShippingAddressService.prototype.cartTransformer;
|
|
3078
|
-
/**
|
|
3079
|
-
* @type {?}
|
|
3080
|
-
* @private
|
|
3081
|
-
*/
|
|
3082
|
-
DaffMagentoCartShippingAddressService.prototype.shippingAddressTransformer;
|
|
3083
|
-
/**
|
|
3084
|
-
* @type {?}
|
|
3085
|
-
* @private
|
|
3086
|
-
*/
|
|
3087
|
-
DaffMagentoCartShippingAddressService.prototype.shippingAddressInputTransformer;
|
|
3088
|
-
}
|
|
3089
1730
|
|
|
3090
|
-
/**
|
|
3091
|
-
* @fileoverview added by tsickle
|
|
3092
|
-
* Generated from: cart-shipping-methods.service.ts
|
|
3093
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3094
|
-
*/
|
|
3095
1731
|
/**
|
|
3096
1732
|
* A service for making Magento GraphQL queries for carts' shipping methods.
|
|
3097
1733
|
*
|
|
3098
|
-
*
|
|
1734
|
+
* @inheritdoc
|
|
3099
1735
|
*/
|
|
3100
1736
|
class DaffMagentoCartShippingMethodsService {
|
|
3101
|
-
/**
|
|
3102
|
-
* @param {?} apollo
|
|
3103
|
-
* @param {?} extraCartFragments
|
|
3104
|
-
* @param {?} shippingRateTransformer
|
|
3105
|
-
*/
|
|
3106
1737
|
constructor(apollo, extraCartFragments, shippingRateTransformer) {
|
|
3107
1738
|
this.apollo = apollo;
|
|
3108
1739
|
this.extraCartFragments = extraCartFragments;
|
|
3109
1740
|
this.shippingRateTransformer = shippingRateTransformer;
|
|
3110
1741
|
}
|
|
3111
|
-
/**
|
|
3112
|
-
* @param {?} cartId
|
|
3113
|
-
* @return {?}
|
|
3114
|
-
*/
|
|
3115
1742
|
list(cartId) {
|
|
3116
1743
|
return this.apollo.query({
|
|
3117
1744
|
query: listShippingMethods(this.extraCartFragments),
|
|
3118
1745
|
variables: { cartId },
|
|
3119
|
-
}).pipe(map((
|
|
3120
|
-
* @param {?} result
|
|
3121
|
-
* @return {?}
|
|
3122
|
-
*/
|
|
3123
|
-
result => result.data.cart.shipping_addresses[0].available_shipping_methods.map((/**
|
|
3124
|
-
* @param {?} item
|
|
3125
|
-
* @return {?}
|
|
3126
|
-
*/
|
|
3127
|
-
item => this.shippingRateTransformer.transform(item))))));
|
|
1746
|
+
}).pipe(map(result => result.data.cart.shipping_addresses[0].available_shipping_methods.map(item => this.shippingRateTransformer.transform(item))));
|
|
3128
1747
|
}
|
|
3129
1748
|
}
|
|
1749
|
+
/** @nocollapse */ DaffMagentoCartShippingMethodsService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartShippingMethodsService_Factory() { return new DaffMagentoCartShippingMethodsService(ɵɵinject(Apollo), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartShippingRateTransformer)); }, token: DaffMagentoCartShippingMethodsService, providedIn: "root" });
|
|
3130
1750
|
DaffMagentoCartShippingMethodsService.decorators = [
|
|
3131
1751
|
{ type: Injectable, args: [{
|
|
3132
1752
|
providedIn: 'root',
|
|
@@ -3138,44 +1758,13 @@ DaffMagentoCartShippingMethodsService.ctorParameters = () => [
|
|
|
3138
1758
|
{ type: Array, decorators: [{ type: Inject, args: [DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS,] }] },
|
|
3139
1759
|
{ type: DaffMagentoCartShippingRateTransformer }
|
|
3140
1760
|
];
|
|
3141
|
-
/** @nocollapse */ DaffMagentoCartShippingMethodsService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartShippingMethodsService_Factory() { return new DaffMagentoCartShippingMethodsService(ɵɵinject(Apollo), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartShippingRateTransformer)); }, token: DaffMagentoCartShippingMethodsService, providedIn: "root" });
|
|
3142
|
-
if (false) {
|
|
3143
|
-
/**
|
|
3144
|
-
* @type {?}
|
|
3145
|
-
* @private
|
|
3146
|
-
*/
|
|
3147
|
-
DaffMagentoCartShippingMethodsService.prototype.apollo;
|
|
3148
|
-
/**
|
|
3149
|
-
* @type {?}
|
|
3150
|
-
* @private
|
|
3151
|
-
*/
|
|
3152
|
-
DaffMagentoCartShippingMethodsService.prototype.extraCartFragments;
|
|
3153
|
-
/**
|
|
3154
|
-
* @type {?}
|
|
3155
|
-
* @private
|
|
3156
|
-
*/
|
|
3157
|
-
DaffMagentoCartShippingMethodsService.prototype.shippingRateTransformer;
|
|
3158
|
-
}
|
|
3159
1761
|
|
|
3160
|
-
/**
|
|
3161
|
-
* @fileoverview added by tsickle
|
|
3162
|
-
* Generated from: cart-shipping-information.service.ts
|
|
3163
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3164
|
-
*/
|
|
3165
1762
|
/**
|
|
3166
1763
|
* A service for making Magento GraphQL queries for carts.
|
|
3167
1764
|
*
|
|
3168
|
-
*
|
|
1765
|
+
* @inheritdoc
|
|
3169
1766
|
*/
|
|
3170
1767
|
class DaffMagentoCartShippingInformationService {
|
|
3171
|
-
/**
|
|
3172
|
-
* @param {?} apollo
|
|
3173
|
-
* @param {?} mutationQueue
|
|
3174
|
-
* @param {?} extraCartFragments
|
|
3175
|
-
* @param {?} cartTransformer
|
|
3176
|
-
* @param {?} shippingRateTransformer
|
|
3177
|
-
* @param {?} shippingMethodInputTransformer
|
|
3178
|
-
*/
|
|
3179
1768
|
constructor(apollo, mutationQueue, extraCartFragments, cartTransformer, shippingRateTransformer, shippingMethodInputTransformer) {
|
|
3180
1769
|
this.apollo = apollo;
|
|
3181
1770
|
this.mutationQueue = mutationQueue;
|
|
@@ -3184,27 +1773,14 @@ class DaffMagentoCartShippingInformationService {
|
|
|
3184
1773
|
this.shippingRateTransformer = shippingRateTransformer;
|
|
3185
1774
|
this.shippingMethodInputTransformer = shippingMethodInputTransformer;
|
|
3186
1775
|
}
|
|
3187
|
-
/**
|
|
3188
|
-
* @param {?} cartId
|
|
3189
|
-
* @return {?}
|
|
3190
|
-
*/
|
|
3191
1776
|
get(cartId) {
|
|
3192
1777
|
return this.apollo.query({
|
|
3193
1778
|
query: getSelectedShippingMethod(this.extraCartFragments),
|
|
3194
1779
|
variables: { cartId },
|
|
3195
|
-
}).pipe(map(
|
|
3196
|
-
* @param {?} result
|
|
3197
|
-
* @return {?}
|
|
3198
|
-
*/
|
|
3199
|
-
result => result.data.cart.shipping_addresses[0]
|
|
1780
|
+
}).pipe(map(result => result.data.cart.shipping_addresses[0]
|
|
3200
1781
|
? this.shippingRateTransformer.transform(result.data.cart.shipping_addresses[0].selected_shipping_method)
|
|
3201
|
-
: null))
|
|
1782
|
+
: null));
|
|
3202
1783
|
}
|
|
3203
|
-
/**
|
|
3204
|
-
* @param {?} cartId
|
|
3205
|
-
* @param {?} shippingInfo
|
|
3206
|
-
* @return {?}
|
|
3207
|
-
*/
|
|
3208
1784
|
update(cartId, shippingInfo) {
|
|
3209
1785
|
return this.mutationQueue.mutate({
|
|
3210
1786
|
mutation: setSelectedShippingMethod(this.extraCartFragments),
|
|
@@ -3212,11 +1788,7 @@ class DaffMagentoCartShippingInformationService {
|
|
|
3212
1788
|
cartId,
|
|
3213
1789
|
method: this.shippingMethodInputTransformer.transform(shippingInfo),
|
|
3214
1790
|
},
|
|
3215
|
-
}).pipe(switchMap(
|
|
3216
|
-
* @param {?} result
|
|
3217
|
-
* @return {?}
|
|
3218
|
-
*/
|
|
3219
|
-
result =>
|
|
1791
|
+
}).pipe(switchMap(result =>
|
|
3220
1792
|
// because Magento only returns the selected shipping method for the mutation
|
|
3221
1793
|
// we have to manually refetch the available shipping methods
|
|
3222
1794
|
// with fetchPolicy: 'network-only' in order to skip the cache
|
|
@@ -3224,21 +1796,8 @@ class DaffMagentoCartShippingInformationService {
|
|
|
3224
1796
|
query: listShippingMethods(this.extraCartFragments),
|
|
3225
1797
|
variables: { cartId },
|
|
3226
1798
|
fetchPolicy: 'network-only',
|
|
3227
|
-
}).pipe(map((
|
|
3228
|
-
* @param {?} shippingMethods
|
|
3229
|
-
* @return {?}
|
|
3230
|
-
*/
|
|
3231
|
-
shippingMethods => (Object.assign(Object.assign({}, this.cartTransformer.transform(result.data.setShippingMethodsOnCart.cart)), { available_shipping_methods: shippingMethods.data.cart.shipping_addresses[0].available_shipping_methods.map((/**
|
|
3232
|
-
* @param {?} item
|
|
3233
|
-
* @return {?}
|
|
3234
|
-
*/
|
|
3235
|
-
item => this.shippingRateTransformer.transform(item))) }))))))));
|
|
1799
|
+
}).pipe(map(shippingMethods => (Object.assign(Object.assign({}, this.cartTransformer.transform(result.data.setShippingMethodsOnCart.cart)), { available_shipping_methods: shippingMethods.data.cart.shipping_addresses[0].available_shipping_methods.map(item => this.shippingRateTransformer.transform(item)) }))))));
|
|
3236
1800
|
}
|
|
3237
|
-
/**
|
|
3238
|
-
* @param {?} cartId
|
|
3239
|
-
* @param {?=} id
|
|
3240
|
-
* @return {?}
|
|
3241
|
-
*/
|
|
3242
1801
|
delete(cartId, id) {
|
|
3243
1802
|
return this.mutationQueue.mutate({
|
|
3244
1803
|
mutation: setSelectedShippingMethod(this.extraCartFragments),
|
|
@@ -3249,13 +1808,10 @@ class DaffMagentoCartShippingInformationService {
|
|
|
3249
1808
|
method_code: '',
|
|
3250
1809
|
},
|
|
3251
1810
|
},
|
|
3252
|
-
}).pipe(map((
|
|
3253
|
-
* @param {?} result
|
|
3254
|
-
* @return {?}
|
|
3255
|
-
*/
|
|
3256
|
-
result => this.cartTransformer.transform(result.data.setShippingMethodsOnCart.cart))));
|
|
1811
|
+
}).pipe(map(result => this.cartTransformer.transform(result.data.setShippingMethodsOnCart.cart)));
|
|
3257
1812
|
}
|
|
3258
1813
|
}
|
|
1814
|
+
/** @nocollapse */ DaffMagentoCartShippingInformationService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartShippingInformationService_Factory() { return new DaffMagentoCartShippingInformationService(ɵɵinject(Apollo), ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartTransformer), ɵɵinject(DaffMagentoCartShippingRateTransformer), ɵɵinject(DaffMagentoShippingMethodInputTransformer)); }, token: DaffMagentoCartShippingInformationService, providedIn: "root" });
|
|
3259
1815
|
DaffMagentoCartShippingInformationService.decorators = [
|
|
3260
1816
|
{ type: Injectable, args: [{
|
|
3261
1817
|
providedIn: 'root',
|
|
@@ -3270,77 +1826,22 @@ DaffMagentoCartShippingInformationService.ctorParameters = () => [
|
|
|
3270
1826
|
{ type: DaffMagentoCartShippingRateTransformer },
|
|
3271
1827
|
{ type: DaffMagentoShippingMethodInputTransformer }
|
|
3272
1828
|
];
|
|
3273
|
-
/** @nocollapse */ DaffMagentoCartShippingInformationService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartShippingInformationService_Factory() { return new DaffMagentoCartShippingInformationService(ɵɵinject(Apollo), ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartTransformer), ɵɵinject(DaffMagentoCartShippingRateTransformer), ɵɵinject(DaffMagentoShippingMethodInputTransformer)); }, token: DaffMagentoCartShippingInformationService, providedIn: "root" });
|
|
3274
|
-
if (false) {
|
|
3275
|
-
/**
|
|
3276
|
-
* @type {?}
|
|
3277
|
-
* @private
|
|
3278
|
-
*/
|
|
3279
|
-
DaffMagentoCartShippingInformationService.prototype.apollo;
|
|
3280
|
-
/**
|
|
3281
|
-
* @type {?}
|
|
3282
|
-
* @private
|
|
3283
|
-
*/
|
|
3284
|
-
DaffMagentoCartShippingInformationService.prototype.mutationQueue;
|
|
3285
|
-
/**
|
|
3286
|
-
* @type {?}
|
|
3287
|
-
* @private
|
|
3288
|
-
*/
|
|
3289
|
-
DaffMagentoCartShippingInformationService.prototype.extraCartFragments;
|
|
3290
|
-
/**
|
|
3291
|
-
* @type {?}
|
|
3292
|
-
* @private
|
|
3293
|
-
*/
|
|
3294
|
-
DaffMagentoCartShippingInformationService.prototype.cartTransformer;
|
|
3295
|
-
/**
|
|
3296
|
-
* @type {?}
|
|
3297
|
-
* @private
|
|
3298
|
-
*/
|
|
3299
|
-
DaffMagentoCartShippingInformationService.prototype.shippingRateTransformer;
|
|
3300
|
-
/**
|
|
3301
|
-
* @type {?}
|
|
3302
|
-
* @private
|
|
3303
|
-
*/
|
|
3304
|
-
DaffMagentoCartShippingInformationService.prototype.shippingMethodInputTransformer;
|
|
3305
|
-
}
|
|
3306
1829
|
|
|
3307
|
-
/**
|
|
3308
|
-
* @fileoverview added by tsickle
|
|
3309
|
-
* Generated from: cart-address.service.ts
|
|
3310
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3311
|
-
*/
|
|
3312
1830
|
/**
|
|
3313
1831
|
* A service for making Magento GraphQL queries for carts.
|
|
3314
1832
|
*
|
|
3315
|
-
*
|
|
1833
|
+
* @inheritdoc
|
|
3316
1834
|
*/
|
|
3317
1835
|
class DaffMagentoCartAddressService {
|
|
3318
|
-
/**
|
|
3319
|
-
* @param {?} mutationQueue
|
|
3320
|
-
* @param {?} extraCartFragments
|
|
3321
|
-
* @param {?} cartTransformer
|
|
3322
|
-
* @param {?} cartAddressInputTransformer
|
|
3323
|
-
*/
|
|
3324
1836
|
constructor(mutationQueue, extraCartFragments, cartTransformer, cartAddressInputTransformer) {
|
|
3325
1837
|
this.mutationQueue = mutationQueue;
|
|
3326
1838
|
this.extraCartFragments = extraCartFragments;
|
|
3327
1839
|
this.cartTransformer = cartTransformer;
|
|
3328
1840
|
this.cartAddressInputTransformer = cartAddressInputTransformer;
|
|
3329
1841
|
}
|
|
3330
|
-
/**
|
|
3331
|
-
* @param {?} cartId
|
|
3332
|
-
* @param {?} address
|
|
3333
|
-
* @return {?}
|
|
3334
|
-
*/
|
|
3335
1842
|
update(cartId, address) {
|
|
3336
1843
|
return address.email ? this.updateAddressWithEmail(cartId, address) : this.updateAddress(cartId, address);
|
|
3337
1844
|
}
|
|
3338
|
-
/**
|
|
3339
|
-
* @private
|
|
3340
|
-
* @param {?} cartId
|
|
3341
|
-
* @param {?} address
|
|
3342
|
-
* @return {?}
|
|
3343
|
-
*/
|
|
3344
1845
|
updateAddress(cartId, address) {
|
|
3345
1846
|
return this.mutationQueue.mutate({
|
|
3346
1847
|
mutation: updateAddress(this.extraCartFragments),
|
|
@@ -3348,22 +1849,8 @@ class DaffMagentoCartAddressService {
|
|
|
3348
1849
|
cartId,
|
|
3349
1850
|
address: this.cartAddressInputTransformer.transform(address),
|
|
3350
1851
|
},
|
|
3351
|
-
}).pipe(map((
|
|
3352
|
-
* @param {?} resp
|
|
3353
|
-
* @return {?}
|
|
3354
|
-
*/
|
|
3355
|
-
resp => this.cartTransformer.transform(resp.data.setShippingAddressesOnCart.cart))), catchError((/**
|
|
3356
|
-
* @param {?} error
|
|
3357
|
-
* @return {?}
|
|
3358
|
-
*/
|
|
3359
|
-
error => throwError(transformCartMagentoError(error)))));
|
|
1852
|
+
}).pipe(map(resp => this.cartTransformer.transform(resp.data.setShippingAddressesOnCart.cart)), catchError(error => throwError(transformCartMagentoError(error))));
|
|
3360
1853
|
}
|
|
3361
|
-
/**
|
|
3362
|
-
* @private
|
|
3363
|
-
* @param {?} cartId
|
|
3364
|
-
* @param {?} address
|
|
3365
|
-
* @return {?}
|
|
3366
|
-
*/
|
|
3367
1854
|
updateAddressWithEmail(cartId, address) {
|
|
3368
1855
|
return this.mutationQueue.mutate({
|
|
3369
1856
|
mutation: updateAddressWithEmail(this.extraCartFragments),
|
|
@@ -3372,17 +1859,10 @@ class DaffMagentoCartAddressService {
|
|
|
3372
1859
|
email: address.email,
|
|
3373
1860
|
address: this.cartAddressInputTransformer.transform(address),
|
|
3374
1861
|
},
|
|
3375
|
-
}).pipe(map((
|
|
3376
|
-
* @param {?} resp
|
|
3377
|
-
* @return {?}
|
|
3378
|
-
*/
|
|
3379
|
-
resp => this.cartTransformer.transform(resp.data.setGuestEmailOnCart.cart))), catchError((/**
|
|
3380
|
-
* @param {?} error
|
|
3381
|
-
* @return {?}
|
|
3382
|
-
*/
|
|
3383
|
-
error => throwError(transformCartMagentoError(error)))));
|
|
1862
|
+
}).pipe(map(resp => this.cartTransformer.transform(resp.data.setGuestEmailOnCart.cart)), catchError(error => throwError(transformCartMagentoError(error))));
|
|
3384
1863
|
}
|
|
3385
1864
|
}
|
|
1865
|
+
/** @nocollapse */ DaffMagentoCartAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartAddressService_Factory() { return new DaffMagentoCartAddressService(ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartTransformer), ɵɵinject(DaffMagentoCartAddressInputTransformer)); }, token: DaffMagentoCartAddressService, providedIn: "root" });
|
|
3386
1866
|
DaffMagentoCartAddressService.decorators = [
|
|
3387
1867
|
{ type: Injectable, args: [{
|
|
3388
1868
|
providedIn: 'root',
|
|
@@ -3395,65 +1875,22 @@ DaffMagentoCartAddressService.ctorParameters = () => [
|
|
|
3395
1875
|
{ type: DaffMagentoCartTransformer },
|
|
3396
1876
|
{ type: DaffMagentoCartAddressInputTransformer }
|
|
3397
1877
|
];
|
|
3398
|
-
/** @nocollapse */ DaffMagentoCartAddressService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartAddressService_Factory() { return new DaffMagentoCartAddressService(ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartTransformer), ɵɵinject(DaffMagentoCartAddressInputTransformer)); }, token: DaffMagentoCartAddressService, providedIn: "root" });
|
|
3399
|
-
if (false) {
|
|
3400
|
-
/**
|
|
3401
|
-
* @type {?}
|
|
3402
|
-
* @private
|
|
3403
|
-
*/
|
|
3404
|
-
DaffMagentoCartAddressService.prototype.mutationQueue;
|
|
3405
|
-
/**
|
|
3406
|
-
* @type {?}
|
|
3407
|
-
* @private
|
|
3408
|
-
*/
|
|
3409
|
-
DaffMagentoCartAddressService.prototype.extraCartFragments;
|
|
3410
|
-
/**
|
|
3411
|
-
* @type {?}
|
|
3412
|
-
* @private
|
|
3413
|
-
*/
|
|
3414
|
-
DaffMagentoCartAddressService.prototype.cartTransformer;
|
|
3415
|
-
/**
|
|
3416
|
-
* @type {?}
|
|
3417
|
-
* @private
|
|
3418
|
-
*/
|
|
3419
|
-
DaffMagentoCartAddressService.prototype.cartAddressInputTransformer;
|
|
3420
|
-
}
|
|
3421
1878
|
|
|
3422
|
-
/**
|
|
3423
|
-
* @fileoverview added by tsickle
|
|
3424
|
-
* Generated from: transforms/outputs/cart-coupon-response.service.ts
|
|
3425
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3426
|
-
*/
|
|
3427
1879
|
/**
|
|
3428
1880
|
* Transforms magento carts into an object usable by daffodil.
|
|
3429
1881
|
*/
|
|
3430
1882
|
class DaffMagentoCartCouponResponseTransformer {
|
|
3431
|
-
/**
|
|
3432
|
-
* @private
|
|
3433
|
-
* @param {?} cart
|
|
3434
|
-
* @return {?}
|
|
3435
|
-
*/
|
|
3436
1883
|
transformCartItems(cart) {
|
|
3437
1884
|
return {
|
|
3438
1885
|
items: cart.items.map(transformMagentoCartItem),
|
|
3439
1886
|
};
|
|
3440
1887
|
}
|
|
3441
|
-
/**
|
|
3442
|
-
* @private
|
|
3443
|
-
* @param {?} cart
|
|
3444
|
-
* @return {?}
|
|
3445
|
-
*/
|
|
3446
1888
|
transformTotals(cart) {
|
|
3447
1889
|
return {
|
|
3448
1890
|
grand_total: cart.prices.grand_total.value,
|
|
3449
1891
|
subtotal: cart.prices.subtotal_excluding_tax.value,
|
|
3450
1892
|
};
|
|
3451
1893
|
}
|
|
3452
|
-
/**
|
|
3453
|
-
* @private
|
|
3454
|
-
* @param {?} cart
|
|
3455
|
-
* @return {?}
|
|
3456
|
-
*/
|
|
3457
1894
|
transformCoupons(cart) {
|
|
3458
1895
|
return {
|
|
3459
1896
|
coupons: cart.applied_coupons
|
|
@@ -3464,46 +1901,30 @@ class DaffMagentoCartCouponResponseTransformer {
|
|
|
3464
1901
|
/**
|
|
3465
1902
|
* Transforms the MagentoCart from the cart coupon operations into a DaffCart partial.
|
|
3466
1903
|
*
|
|
3467
|
-
* @param
|
|
3468
|
-
* @return {?}
|
|
1904
|
+
* @param cart the cart from a magento cart query.
|
|
3469
1905
|
*/
|
|
3470
1906
|
transform(cart) {
|
|
3471
1907
|
return cart ? Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.transformCartItems(cart)), this.transformCoupons(cart)), this.transformTotals(cart)), transformCartTotals(cart)), { id: cart.id }) : null;
|
|
3472
1908
|
}
|
|
3473
1909
|
}
|
|
1910
|
+
/** @nocollapse */ DaffMagentoCartCouponResponseTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartCouponResponseTransformer_Factory() { return new DaffMagentoCartCouponResponseTransformer(); }, token: DaffMagentoCartCouponResponseTransformer, providedIn: "root" });
|
|
3474
1911
|
DaffMagentoCartCouponResponseTransformer.decorators = [
|
|
3475
1912
|
{ type: Injectable, args: [{
|
|
3476
1913
|
providedIn: 'root',
|
|
3477
1914
|
},] }
|
|
3478
1915
|
];
|
|
3479
|
-
/** @nocollapse */ DaffMagentoCartCouponResponseTransformer.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartCouponResponseTransformer_Factory() { return new DaffMagentoCartCouponResponseTransformer(); }, token: DaffMagentoCartCouponResponseTransformer, providedIn: "root" });
|
|
3480
1916
|
|
|
3481
|
-
/**
|
|
3482
|
-
* @fileoverview added by tsickle
|
|
3483
|
-
* Generated from: cart-coupon.service.ts
|
|
3484
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3485
|
-
*/
|
|
3486
1917
|
/**
|
|
3487
1918
|
* A service for making Magento GraphQL queries for carts.
|
|
3488
1919
|
*
|
|
3489
|
-
*
|
|
1920
|
+
* @inheritdoc
|
|
3490
1921
|
*/
|
|
3491
1922
|
class DaffMagentoCartCouponService {
|
|
3492
|
-
/**
|
|
3493
|
-
* @param {?} mutationQueue
|
|
3494
|
-
* @param {?} extraCartFragments
|
|
3495
|
-
* @param {?} cartTransformer
|
|
3496
|
-
*/
|
|
3497
1923
|
constructor(mutationQueue, extraCartFragments, cartTransformer) {
|
|
3498
1924
|
this.mutationQueue = mutationQueue;
|
|
3499
1925
|
this.extraCartFragments = extraCartFragments;
|
|
3500
1926
|
this.cartTransformer = cartTransformer;
|
|
3501
1927
|
}
|
|
3502
|
-
/**
|
|
3503
|
-
* @param {?} cartId
|
|
3504
|
-
* @param {?} coupon
|
|
3505
|
-
* @return {?}
|
|
3506
|
-
*/
|
|
3507
1928
|
apply(cartId, coupon) {
|
|
3508
1929
|
return this.mutationQueue.mutate({
|
|
3509
1930
|
mutation: applyCoupon(this.extraCartFragments),
|
|
@@ -3511,65 +1932,29 @@ class DaffMagentoCartCouponService {
|
|
|
3511
1932
|
cartId,
|
|
3512
1933
|
couponCode: coupon.code,
|
|
3513
1934
|
},
|
|
3514
|
-
}).pipe(map((
|
|
3515
|
-
* @param {?} result
|
|
3516
|
-
* @return {?}
|
|
3517
|
-
*/
|
|
3518
|
-
result => this.cartTransformer.transform(result.data.applyCouponToCart.cart))), catchError((/**
|
|
3519
|
-
* @param {?} err
|
|
3520
|
-
* @return {?}
|
|
3521
|
-
*/
|
|
3522
|
-
err => throwError(transformCartMagentoError(err, coupon)))));
|
|
1935
|
+
}).pipe(map(result => this.cartTransformer.transform(result.data.applyCouponToCart.cart)), catchError(err => throwError(transformCartMagentoError(err, coupon))));
|
|
3523
1936
|
}
|
|
3524
|
-
/**
|
|
3525
|
-
* @param {?} cartId
|
|
3526
|
-
* @return {?}
|
|
3527
|
-
*/
|
|
3528
1937
|
list(cartId) {
|
|
3529
1938
|
return this.mutationQueue.mutate({
|
|
3530
1939
|
mutation: listCartCoupons(this.extraCartFragments),
|
|
3531
1940
|
variables: {
|
|
3532
1941
|
cartId,
|
|
3533
1942
|
},
|
|
3534
|
-
}).pipe(map((
|
|
3535
|
-
* @param {?} result
|
|
3536
|
-
* @return {?}
|
|
3537
|
-
*/
|
|
3538
|
-
result => result.data.cart.applied_coupons.map(daffMagentoCouponTransform))), catchError((/**
|
|
3539
|
-
* @param {?} err
|
|
3540
|
-
* @return {?}
|
|
3541
|
-
*/
|
|
3542
|
-
err => throwError(transformCartMagentoError(err)))));
|
|
1943
|
+
}).pipe(map(result => result.data.cart.applied_coupons.map(daffMagentoCouponTransform)), catchError(err => throwError(transformCartMagentoError(err))));
|
|
3543
1944
|
}
|
|
3544
|
-
/**
|
|
3545
|
-
* @param {?} cartId
|
|
3546
|
-
* @param {?} coupon
|
|
3547
|
-
* @return {?}
|
|
3548
|
-
*/
|
|
3549
1945
|
remove(cartId, coupon) {
|
|
3550
1946
|
return this.removeAll(cartId);
|
|
3551
1947
|
}
|
|
3552
|
-
/**
|
|
3553
|
-
* @param {?} cartId
|
|
3554
|
-
* @return {?}
|
|
3555
|
-
*/
|
|
3556
1948
|
removeAll(cartId) {
|
|
3557
1949
|
return this.mutationQueue.mutate({
|
|
3558
1950
|
mutation: removeAllCoupons(this.extraCartFragments),
|
|
3559
1951
|
variables: {
|
|
3560
1952
|
cartId,
|
|
3561
1953
|
},
|
|
3562
|
-
}).pipe(map((
|
|
3563
|
-
* @param {?} result
|
|
3564
|
-
* @return {?}
|
|
3565
|
-
*/
|
|
3566
|
-
result => this.cartTransformer.transform(result.data.removeCouponFromCart.cart))), catchError((/**
|
|
3567
|
-
* @param {?} err
|
|
3568
|
-
* @return {?}
|
|
3569
|
-
*/
|
|
3570
|
-
err => throwError(transformCartMagentoError(err)))));
|
|
1954
|
+
}).pipe(map(result => this.cartTransformer.transform(result.data.removeCouponFromCart.cart)), catchError(err => throwError(transformCartMagentoError(err))));
|
|
3571
1955
|
}
|
|
3572
1956
|
}
|
|
1957
|
+
/** @nocollapse */ DaffMagentoCartCouponService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartCouponService_Factory() { return new DaffMagentoCartCouponService(ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartCouponResponseTransformer)); }, token: DaffMagentoCartCouponService, providedIn: "root" });
|
|
3573
1958
|
DaffMagentoCartCouponService.decorators = [
|
|
3574
1959
|
{ type: Injectable, args: [{
|
|
3575
1960
|
providedIn: 'root',
|
|
@@ -3581,68 +1966,30 @@ DaffMagentoCartCouponService.ctorParameters = () => [
|
|
|
3581
1966
|
{ type: Array, decorators: [{ type: Inject, args: [DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS,] }] },
|
|
3582
1967
|
{ type: DaffMagentoCartCouponResponseTransformer }
|
|
3583
1968
|
];
|
|
3584
|
-
/** @nocollapse */ DaffMagentoCartCouponService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartCouponService_Factory() { return new DaffMagentoCartCouponService(ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE), ɵɵinject(DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS), ɵɵinject(DaffMagentoCartCouponResponseTransformer)); }, token: DaffMagentoCartCouponService, providedIn: "root" });
|
|
3585
|
-
if (false) {
|
|
3586
|
-
/**
|
|
3587
|
-
* @type {?}
|
|
3588
|
-
* @private
|
|
3589
|
-
*/
|
|
3590
|
-
DaffMagentoCartCouponService.prototype.mutationQueue;
|
|
3591
|
-
/**
|
|
3592
|
-
* @type {?}
|
|
3593
|
-
* @private
|
|
3594
|
-
*/
|
|
3595
|
-
DaffMagentoCartCouponService.prototype.extraCartFragments;
|
|
3596
|
-
/**
|
|
3597
|
-
* @type {?}
|
|
3598
|
-
* @private
|
|
3599
|
-
*/
|
|
3600
|
-
DaffMagentoCartCouponService.prototype.cartTransformer;
|
|
3601
|
-
}
|
|
3602
1969
|
|
|
3603
|
-
/**
|
|
3604
|
-
* @fileoverview added by tsickle
|
|
3605
|
-
* Generated from: cart-order.service.ts
|
|
3606
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3607
|
-
*/
|
|
3608
1970
|
/**
|
|
3609
1971
|
* A service for making Magento GraphQL queries for carts.
|
|
3610
1972
|
*
|
|
3611
|
-
*
|
|
1973
|
+
* @inheritdoc
|
|
3612
1974
|
*/
|
|
3613
1975
|
class DaffMagentoCartOrderService {
|
|
3614
|
-
/**
|
|
3615
|
-
* @param {?} mutationQueue
|
|
3616
|
-
*/
|
|
3617
1976
|
constructor(mutationQueue) {
|
|
3618
1977
|
this.mutationQueue = mutationQueue;
|
|
3619
1978
|
}
|
|
3620
|
-
/**
|
|
3621
|
-
* @param {?} cartId
|
|
3622
|
-
* @param {?=} payment
|
|
3623
|
-
* @return {?}
|
|
3624
|
-
*/
|
|
3625
1979
|
placeOrder(cartId, payment) {
|
|
3626
1980
|
return this.mutationQueue.mutate({
|
|
3627
1981
|
mutation: placeOrder,
|
|
3628
1982
|
variables: {
|
|
3629
1983
|
cartId,
|
|
3630
1984
|
},
|
|
3631
|
-
}).pipe(map((
|
|
3632
|
-
* @param {?} result
|
|
3633
|
-
* @return {?}
|
|
3634
|
-
*/
|
|
3635
|
-
result => ({
|
|
1985
|
+
}).pipe(map(result => ({
|
|
3636
1986
|
id: result.data.placeOrder.order.order_number,
|
|
3637
1987
|
orderId: result.data.placeOrder.order.order_number,
|
|
3638
1988
|
cartId,
|
|
3639
|
-
}))
|
|
3640
|
-
* @param {?} err
|
|
3641
|
-
* @return {?}
|
|
3642
|
-
*/
|
|
3643
|
-
err => throwError(transformCartMagentoError(err)))));
|
|
1989
|
+
})), catchError(err => throwError(transformCartMagentoError(err))));
|
|
3644
1990
|
}
|
|
3645
1991
|
}
|
|
1992
|
+
/** @nocollapse */ DaffMagentoCartOrderService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartOrderService_Factory() { return new DaffMagentoCartOrderService(ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE)); }, token: DaffMagentoCartOrderService, providedIn: "root" });
|
|
3646
1993
|
DaffMagentoCartOrderService.decorators = [
|
|
3647
1994
|
{ type: Injectable, args: [{
|
|
3648
1995
|
providedIn: 'root',
|
|
@@ -3652,24 +1999,8 @@ DaffMagentoCartOrderService.decorators = [
|
|
|
3652
1999
|
DaffMagentoCartOrderService.ctorParameters = () => [
|
|
3653
2000
|
{ type: DaffQueuedApollo, decorators: [{ type: Inject, args: [DAFF_MAGENTO_CART_MUTATION_QUEUE,] }] }
|
|
3654
2001
|
];
|
|
3655
|
-
/** @nocollapse */ DaffMagentoCartOrderService.ɵprov = ɵɵdefineInjectable({ factory: function DaffMagentoCartOrderService_Factory() { return new DaffMagentoCartOrderService(ɵɵinject(DAFF_MAGENTO_CART_MUTATION_QUEUE)); }, token: DaffMagentoCartOrderService, providedIn: "root" });
|
|
3656
|
-
if (false) {
|
|
3657
|
-
/**
|
|
3658
|
-
* @type {?}
|
|
3659
|
-
* @private
|
|
3660
|
-
*/
|
|
3661
|
-
DaffMagentoCartOrderService.prototype.mutationQueue;
|
|
3662
|
-
}
|
|
3663
2002
|
|
|
3664
|
-
/**
|
|
3665
|
-
* @fileoverview added by tsickle
|
|
3666
|
-
* Generated from: cart-driver.module.ts
|
|
3667
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3668
|
-
*/
|
|
3669
2003
|
class DaffCartMagentoDriverModule {
|
|
3670
|
-
/**
|
|
3671
|
-
* @return {?}
|
|
3672
|
-
*/
|
|
3673
2004
|
static forRoot() {
|
|
3674
2005
|
return {
|
|
3675
2006
|
ngModule: DaffCartMagentoDriverModule,
|
|
@@ -3747,21 +2078,7 @@ DaffCartMagentoDriverModule.decorators = [
|
|
|
3747
2078
|
];
|
|
3748
2079
|
|
|
3749
2080
|
/**
|
|
3750
|
-
*
|
|
3751
|
-
* Generated from: public_api.ts
|
|
3752
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3753
|
-
*/
|
|
3754
|
-
|
|
3755
|
-
/**
|
|
3756
|
-
* @fileoverview added by tsickle
|
|
3757
|
-
* Generated from: index.ts
|
|
3758
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
3759
|
-
*/
|
|
3760
|
-
|
|
3761
|
-
/**
|
|
3762
|
-
* @fileoverview added by tsickle
|
|
3763
|
-
* Generated from: daffodil-cart-driver-magento.ts
|
|
3764
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2081
|
+
* Generated bundle index. Do not edit.
|
|
3765
2082
|
*/
|
|
3766
2083
|
|
|
3767
2084
|
export { DAFF_CART_MAGENTO_EXTRA_CART_FRAGMENTS, DaffCartMagentoDriverModule, DaffMagentoBillingAddressInputTransformer, DaffMagentoBillingAddressTransformer, DaffMagentoCartAddressInputTransformer, DaffMagentoCartAddressTransformer, DaffMagentoCartBillingAddressService, DaffMagentoCartItemService, DaffMagentoCartItemUpdateInputTransformer, DaffMagentoCartPaymentMethodsService, DaffMagentoCartPaymentService, DaffMagentoCartPaymentTransformer, DaffMagentoCartService, DaffMagentoCartShippingAddressService, DaffMagentoCartShippingInformationService, DaffMagentoCartShippingInformationTransformer, DaffMagentoCartShippingMethodsService, DaffMagentoCartShippingRateTransformer, DaffMagentoCartTransformer, DaffMagentoPaymentMethodInputTransformer, DaffMagentoShippingAddressInputTransformer, DaffMagentoShippingAddressTransformer, DaffMagentoShippingMethodInputTransformer, MagentoCartItemTypeEnum, addCartItem, applyCoupon, availablePaymentMethodFragment, availableShippingMethodFragment, cartAddressFragment, cartCouponFragment, cartFragment, cartItemFragment, createCart, getBillingAddress, getCart, getSelectedPaymentMethod, getSelectedShippingMethod, getShippingAddress, listCartCoupons, listCartItems, listPaymentMethods, listShippingMethods, moneyFragment, placeOrder, pricesFragment, removeAllCoupons, removeCartItem, selectedPaymentMethodFragment, selectedShippingMethodFragment, setSelectedPaymentMethod, setSelectedPaymentMethodWithBilling, setSelectedPaymentMethodWithBillingAndEmail, setSelectedShippingMethod, updateAddress, updateAddressWithEmail, updateBillingAddress, updateBillingAddressWithEmail, updateCartItem, updateShippingAddress, updateShippingAddressWithEmail, DAFF_MAGENTO_CART_MUTATION_QUEUE as ɵa, DaffMagentoCartAddressService as ɵb, DaffMagentoCartOrderService as ɵc, DaffMagentoCartCouponService as ɵd, DaffMagentoCartCouponResponseTransformer as ɵe };
|