@daffodil/cart 0.88.1 → 0.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/driver/in-memory/index.d.ts +382 -1
- package/driver/index.d.ts +364 -1
- package/driver/magento/index.d.ts +995 -1
- package/driver/magento/testing/index.d.ts +188 -1
- package/driver/testing/index.d.ts +163 -1
- package/fesm2022/daffodil-cart-driver-in-memory.mjs +73 -73
- package/fesm2022/daffodil-cart-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver-magento-testing.mjs +30 -30
- package/fesm2022/daffodil-cart-driver-magento-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver-magento.mjs +76 -76
- package/fesm2022/daffodil-cart-driver-magento.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver-testing.mjs +37 -37
- package/fesm2022/daffodil-cart-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-driver.mjs +3 -3
- package/fesm2022/daffodil-cart-driver.mjs.map +1 -1
- package/fesm2022/daffodil-cart-routing.mjs +37 -37
- package/fesm2022/daffodil-cart-routing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-state-testing.mjs +16 -16
- package/fesm2022/daffodil-cart-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart-state.mjs +46 -46
- package/fesm2022/daffodil-cart-state.mjs.map +1 -1
- package/fesm2022/daffodil-cart-testing.mjs +27 -28
- package/fesm2022/daffodil-cart-testing.mjs.map +1 -1
- package/fesm2022/daffodil-cart.mjs +3 -3
- package/fesm2022/daffodil-cart.mjs.map +1 -1
- package/index.d.ts +459 -1
- package/package.json +1 -1
- package/routing/index.d.ts +240 -1
- package/state/index.d.ts +1704 -1
- package/state/testing/index.d.ts +130 -1
- package/testing/index.d.ts +169 -1
- package/driver/errors/cart-not-found.d.ts +0 -9
- package/driver/errors/codes.enum.d.ts +0 -12
- package/driver/errors/expired-payment-token.d.ts +0 -11
- package/driver/errors/invalid-api-response.d.ts +0 -10
- package/driver/errors/invalid-country.d.ts +0 -9
- package/driver/errors/invalid-coupon-code.d.ts +0 -11
- package/driver/errors/invalid-email.d.ts +0 -8
- package/driver/errors/invalid-region.d.ts +0 -9
- package/driver/errors/item-exceeds-max-qty.d.ts +0 -9
- package/driver/errors/map.d.ts +0 -25
- package/driver/errors/product-out-of-stock.d.ts +0 -9
- package/driver/errors/public_api.d.ts +0 -12
- package/driver/errors/unauthorized-for-cart.d.ts +0 -8
- package/driver/in-memory/backend/cart/cart.service.d.ts +0 -28
- package/driver/in-memory/backend/cart-address/cart-address.service.d.ts +0 -17
- package/driver/in-memory/backend/cart-billing-address/cart-billing-address.service.d.ts +0 -19
- package/driver/in-memory/backend/cart-coupon/cart-coupon.service.d.ts +0 -26
- package/driver/in-memory/backend/cart-items/cart-items.service.d.ts +0 -33
- package/driver/in-memory/backend/cart-order/cart-order.service.d.ts +0 -13
- package/driver/in-memory/backend/cart-payment/cart-payment.service.d.ts +0 -21
- package/driver/in-memory/backend/cart-payment-methods/cart-payment-methods.service.d.ts +0 -14
- package/driver/in-memory/backend/cart-root.service.d.ts +0 -35
- package/driver/in-memory/backend/cart-shipping-address/cart-shipping-address.service.d.ts +0 -19
- package/driver/in-memory/backend/cart-shipping-information/cart-shipping-information.service.d.ts +0 -23
- package/driver/in-memory/backend/cart-shipping-methods/cart-shipping-methods.service.d.ts +0 -17
- package/driver/in-memory/backend/public_api.d.ts +0 -12
- package/driver/in-memory/collection-names.d.ts +0 -11
- package/driver/in-memory/drivers/cart/cart.service.d.ts +0 -24
- package/driver/in-memory/drivers/cart-address/cart-address.service.d.ts +0 -17
- package/driver/in-memory/drivers/cart-billing-address/cart-billing-address.service.d.ts +0 -18
- package/driver/in-memory/drivers/cart-coupon/cart-coupon.service.d.ts +0 -20
- package/driver/in-memory/drivers/cart-driver.module.d.ts +0 -9
- package/driver/in-memory/drivers/cart-item/cart-item.service.d.ts +0 -21
- package/driver/in-memory/drivers/cart-order/cart-order.service.d.ts +0 -17
- package/driver/in-memory/drivers/cart-payment/cart-payment.service.d.ts +0 -20
- package/driver/in-memory/drivers/cart-payment-methods/cart-payment-methods.service.d.ts +0 -17
- package/driver/in-memory/drivers/cart-shipping-address/cart-shipping-address.service.d.ts +0 -18
- package/driver/in-memory/drivers/cart-shipping-information/cart-shipping-information.service.d.ts +0 -19
- package/driver/in-memory/drivers/cart-shipping-methods/cart-shipping-methods.service.d.ts +0 -17
- package/driver/in-memory/drivers/public_api.d.ts +0 -11
- package/driver/in-memory/helpers/compute-cart-item-prices.d.ts +0 -3
- package/driver/in-memory/helpers/compute-cart-totals.d.ts +0 -3
- package/driver/in-memory/injection-tokens/extra-attributes-hook.token.d.ts +0 -4
- package/driver/in-memory/injection-tokens/public_api.d.ts +0 -1
- package/driver/in-memory/public_api.d.ts +0 -4
- package/driver/injection-tokens/free-payment-method.d.ts +0 -2
- package/driver/injection-tokens/public_api.d.ts +0 -1
- package/driver/interfaces/cart-address-service.interface.d.ts +0 -12
- package/driver/interfaces/cart-billing-address-service.interface.d.ts +0 -16
- package/driver/interfaces/cart-coupon-service.interface.d.ts +0 -24
- package/driver/interfaces/cart-item-service.interface.d.ts +0 -28
- package/driver/interfaces/cart-order-service.interface.d.ts +0 -12
- package/driver/interfaces/cart-payment-methods-service.interface.d.ts +0 -12
- package/driver/interfaces/cart-payment-service.interface.d.ts +0 -22
- package/driver/interfaces/cart-service.interface.d.ts +0 -29
- package/driver/interfaces/cart-shipping-address-service.interface.d.ts +0 -16
- package/driver/interfaces/cart-shipping-information-service.interface.d.ts +0 -21
- package/driver/interfaces/cart-shipping-methods-service.interface.d.ts +0 -12
- package/driver/interfaces/public_api.d.ts +0 -11
- package/driver/magento/cart-address.service.d.ts +0 -26
- package/driver/magento/cart-billing-address.service.d.ts +0 -30
- package/driver/magento/cart-coupon.service.d.ts +0 -24
- package/driver/magento/cart-driver.module.d.ts +0 -9
- package/driver/magento/cart-item.service.d.ts +0 -35
- package/driver/magento/cart-order.service.d.ts +0 -17
- package/driver/magento/cart-payment-methods.service.d.ts +0 -21
- package/driver/magento/cart-payment.service.d.ts +0 -34
- package/driver/magento/cart-shipping-address.service.d.ts +0 -30
- package/driver/magento/cart-shipping-information.service.d.ts +0 -29
- package/driver/magento/cart-shipping-methods.service.d.ts +0 -21
- package/driver/magento/cart.service.d.ts +0 -32
- package/driver/magento/errors/codes.d.ts +0 -5
- package/driver/magento/errors/map.d.ts +0 -11
- package/driver/magento/errors/transform.d.ts +0 -15
- package/driver/magento/injection-tokens/cart-mutation-queue.token.d.ts +0 -2
- package/driver/magento/injection-tokens/fragments/cart.d.ts +0 -2
- package/driver/magento/injection-tokens/public_api.d.ts +0 -3
- package/driver/magento/injection-tokens/transforms/cart/token.d.ts +0 -2
- package/driver/magento/injection-tokens/transforms/cart-item/token.d.ts +0 -2
- package/driver/magento/interfaces/cart-item-transform.type.d.ts +0 -3
- package/driver/magento/interfaces/cart-transform.type.d.ts +0 -6
- package/driver/magento/interfaces/public_api.d.ts +0 -2
- package/driver/magento/models/public_api.d.ts +0 -2
- package/driver/magento/models/requests/billing-address.d.ts +0 -5
- package/driver/magento/models/requests/cart-address-base.d.ts +0 -5
- package/driver/magento/models/requests/cart-address.d.ts +0 -12
- package/driver/magento/models/requests/cart-item-update.d.ts +0 -4
- package/driver/magento/models/requests/cart-item.d.ts +0 -11
- package/driver/magento/models/requests/payment-method.d.ts +0 -4
- package/driver/magento/models/requests/public_api.d.ts +0 -8
- package/driver/magento/models/requests/shipping-address.d.ts +0 -4
- package/driver/magento/models/requests/shipping-method.d.ts +0 -4
- package/driver/magento/models/responses/cart-address.d.ts +0 -19
- package/driver/magento/models/responses/cart-coupon.d.ts +0 -3
- package/driver/magento/models/responses/cart-item.d.ts +0 -60
- package/driver/magento/models/responses/cart-payment-method.d.ts +0 -6
- package/driver/magento/models/responses/cart-shipping-method.d.ts +0 -8
- package/driver/magento/models/responses/cart.d.ts +0 -33
- package/driver/magento/models/responses/public_api.d.ts +0 -9
- package/driver/magento/models/responses/shipping-address.d.ts +0 -6
- package/driver/magento/models/responses/user-error.enum.d.ts +0 -6
- package/driver/magento/models/responses/user-error.type.d.ts +0 -5
- package/driver/magento/public_api.d.ts +0 -16
- package/driver/magento/queries/add-item/public_api.d.ts +0 -3
- package/driver/magento/queries/add-item/query.d.ts +0 -4
- package/driver/magento/queries/add-item/response.type.d.ts +0 -9
- package/driver/magento/queries/add-item/variables.type.d.ts +0 -5
- package/driver/magento/queries/apply-coupon/public_api.d.ts +0 -3
- package/driver/magento/queries/apply-coupon/query.d.ts +0 -4
- package/driver/magento/queries/apply-coupon/response.type.d.ts +0 -6
- package/driver/magento/queries/apply-coupon/variables.type.d.ts +0 -4
- package/driver/magento/queries/create-cart/public_api.d.ts +0 -3
- package/driver/magento/queries/create-cart/query.d.ts +0 -1
- package/driver/magento/queries/create-cart/response.type.d.ts +0 -4
- package/driver/magento/queries/create-cart/variables.type.d.ts +0 -2
- package/driver/magento/queries/fragments/available-payment-method.d.ts +0 -1
- package/driver/magento/queries/fragments/available-shipping-method.d.ts +0 -1
- package/driver/magento/queries/fragments/cart-address.d.ts +0 -1
- package/driver/magento/queries/fragments/cart-coupon.d.ts +0 -1
- package/driver/magento/queries/fragments/cart-item.d.ts +0 -2
- package/driver/magento/queries/fragments/cart.d.ts +0 -1
- package/driver/magento/queries/fragments/prices.d.ts +0 -1
- package/driver/magento/queries/fragments/public_api.d.ts +0 -10
- package/driver/magento/queries/fragments/selected-payment-method.d.ts +0 -1
- package/driver/magento/queries/fragments/selected-shipping-method.d.ts +0 -1
- package/driver/magento/queries/fragments/user-error.d.ts +0 -1
- package/driver/magento/queries/get-billing-address/public_api.d.ts +0 -3
- package/driver/magento/queries/get-billing-address/query.d.ts +0 -4
- package/driver/magento/queries/get-billing-address/response.type.d.ts +0 -8
- package/driver/magento/queries/get-billing-address/variables.type.d.ts +0 -3
- package/driver/magento/queries/get-cart/public_api.d.ts +0 -3
- package/driver/magento/queries/get-cart/query.d.ts +0 -4
- package/driver/magento/queries/get-cart/response.type.d.ts +0 -5
- package/driver/magento/queries/get-cart/variables.type.d.ts +0 -3
- package/driver/magento/queries/get-selected-payment-method/public_api.d.ts +0 -3
- package/driver/magento/queries/get-selected-payment-method/query.d.ts +0 -4
- package/driver/magento/queries/get-selected-payment-method/response.type.d.ts +0 -7
- package/driver/magento/queries/get-selected-payment-method/variables.type.d.ts +0 -3
- package/driver/magento/queries/get-selected-shipping-method/public_api.d.ts +0 -3
- package/driver/magento/queries/get-selected-shipping-method/query.d.ts +0 -4
- package/driver/magento/queries/get-selected-shipping-method/response.type.d.ts +0 -10
- package/driver/magento/queries/get-selected-shipping-method/variables.type.d.ts +0 -3
- package/driver/magento/queries/get-shipping-address/public_api.d.ts +0 -3
- package/driver/magento/queries/get-shipping-address/query.d.ts +0 -4
- package/driver/magento/queries/get-shipping-address/response.type.d.ts +0 -8
- package/driver/magento/queries/get-shipping-address/variables.type.d.ts +0 -3
- package/driver/magento/queries/list-coupons/public_api.d.ts +0 -3
- package/driver/magento/queries/list-coupons/query.d.ts +0 -4
- package/driver/magento/queries/list-coupons/response.type.d.ts +0 -6
- package/driver/magento/queries/list-coupons/variables.type.d.ts +0 -3
- package/driver/magento/queries/list-items/public_api.d.ts +0 -3
- package/driver/magento/queries/list-items/query.d.ts +0 -4
- package/driver/magento/queries/list-items/response.type.d.ts +0 -7
- package/driver/magento/queries/list-items/variables.type.d.ts +0 -3
- package/driver/magento/queries/list-payment-methods/public_api.d.ts +0 -3
- package/driver/magento/queries/list-payment-methods/query.d.ts +0 -4
- package/driver/magento/queries/list-payment-methods/response.type.d.ts +0 -7
- package/driver/magento/queries/list-payment-methods/variables.type.d.ts +0 -3
- package/driver/magento/queries/list-shipping-methods/public_api.d.ts +0 -3
- package/driver/magento/queries/list-shipping-methods/query.d.ts +0 -3
- package/driver/magento/queries/list-shipping-methods/response.type.d.ts +0 -7
- package/driver/magento/queries/list-shipping-methods/variables.type.d.ts +0 -3
- package/driver/magento/queries/merge-carts/public_api.d.ts +0 -3
- package/driver/magento/queries/merge-carts/query.d.ts +0 -4
- package/driver/magento/queries/merge-carts/response.type.d.ts +0 -4
- package/driver/magento/queries/merge-carts/variables.type.d.ts +0 -4
- package/driver/magento/queries/place-order/public_api.d.ts +0 -3
- package/driver/magento/queries/place-order/query.d.ts +0 -2
- package/driver/magento/queries/place-order/response.type.d.ts +0 -12
- package/driver/magento/queries/place-order/variables.type.d.ts +0 -3
- package/driver/magento/queries/public_api.d.ts +0 -28
- package/driver/magento/queries/remove-all-coupons/public_api.d.ts +0 -3
- package/driver/magento/queries/remove-all-coupons/query.d.ts +0 -4
- package/driver/magento/queries/remove-all-coupons/response.type.d.ts +0 -6
- package/driver/magento/queries/remove-all-coupons/variables.type.d.ts +0 -3
- package/driver/magento/queries/remove-item/public_api.d.ts +0 -3
- package/driver/magento/queries/remove-item/query.d.ts +0 -4
- package/driver/magento/queries/remove-item/response.type.d.ts +0 -4
- package/driver/magento/queries/remove-item/variables.type.d.ts +0 -4
- package/driver/magento/queries/set-selected-payment-method/public_api.d.ts +0 -3
- package/driver/magento/queries/set-selected-payment-method/query.d.ts +0 -4
- package/driver/magento/queries/set-selected-payment-method/response.type.d.ts +0 -4
- package/driver/magento/queries/set-selected-payment-method/variables.type.d.ts +0 -5
- package/driver/magento/queries/set-selected-payment-method-with-billing/public_api.d.ts +0 -3
- package/driver/magento/queries/set-selected-payment-method-with-billing/query.d.ts +0 -4
- package/driver/magento/queries/set-selected-payment-method-with-billing/response.type.d.ts +0 -10
- package/driver/magento/queries/set-selected-payment-method-with-billing/variables.type.d.ts +0 -6
- package/driver/magento/queries/set-selected-payment-method-with-billing-and-email/public_api.d.ts +0 -3
- package/driver/magento/queries/set-selected-payment-method-with-billing-and-email/query.d.ts +0 -4
- package/driver/magento/queries/set-selected-payment-method-with-billing-and-email/response.type.d.ts +0 -16
- package/driver/magento/queries/set-selected-payment-method-with-billing-and-email/variables.type.d.ts +0 -7
- package/driver/magento/queries/set-selected-shipping-method/public_api.d.ts +0 -3
- package/driver/magento/queries/set-selected-shipping-method/query.d.ts +0 -4
- package/driver/magento/queries/set-selected-shipping-method/response.type.d.ts +0 -4
- package/driver/magento/queries/set-selected-shipping-method/variables.type.d.ts +0 -5
- package/driver/magento/queries/update-address/public_api.d.ts +0 -3
- package/driver/magento/queries/update-address/query.d.ts +0 -11
- package/driver/magento/queries/update-address/response.type.d.ts +0 -11
- package/driver/magento/queries/update-address/variables.type.d.ts +0 -6
- package/driver/magento/queries/update-address-with-email/public_api.d.ts +0 -3
- package/driver/magento/queries/update-address-with-email/query.d.ts +0 -11
- package/driver/magento/queries/update-address-with-email/response.type.d.ts +0 -18
- package/driver/magento/queries/update-address-with-email/variables.type.d.ts +0 -7
- package/driver/magento/queries/update-billing-address/public_api.d.ts +0 -3
- package/driver/magento/queries/update-billing-address/query.d.ts +0 -4
- package/driver/magento/queries/update-billing-address/response.type.d.ts +0 -4
- package/driver/magento/queries/update-billing-address/variables.type.d.ts +0 -5
- package/driver/magento/queries/update-billing-address-with-email/public_api.d.ts +0 -3
- package/driver/magento/queries/update-billing-address-with-email/query.d.ts +0 -4
- package/driver/magento/queries/update-billing-address-with-email/response.type.d.ts +0 -11
- package/driver/magento/queries/update-billing-address-with-email/variables.type.d.ts +0 -6
- package/driver/magento/queries/update-item/public_api.d.ts +0 -3
- package/driver/magento/queries/update-item/query.d.ts +0 -4
- package/driver/magento/queries/update-item/response.type.d.ts +0 -4
- package/driver/magento/queries/update-item/variables.type.d.ts +0 -5
- package/driver/magento/queries/update-shipping-address/public_api.d.ts +0 -3
- package/driver/magento/queries/update-shipping-address/query.d.ts +0 -4
- package/driver/magento/queries/update-shipping-address/response.type.d.ts +0 -4
- package/driver/magento/queries/update-shipping-address/variables.type.d.ts +0 -5
- package/driver/magento/queries/update-shipping-address-with-email/public_api.d.ts +0 -3
- package/driver/magento/queries/update-shipping-address-with-email/query.d.ts +0 -4
- package/driver/magento/queries/update-shipping-address-with-email/response.type.d.ts +0 -11
- package/driver/magento/queries/update-shipping-address-with-email/variables.type.d.ts +0 -6
- package/driver/magento/testing/factories/cart-address-input.factory.d.ts +0 -20
- package/driver/magento/testing/factories/cart-address.factory.d.ts +0 -30
- package/driver/magento/testing/factories/cart-coupon.factory.d.ts +0 -11
- package/driver/magento/testing/factories/cart-item/bundle-cart-item.factory.d.ts +0 -25
- package/driver/magento/testing/factories/cart-item/cart-item.factory.d.ts +0 -24
- package/driver/magento/testing/factories/cart-item/configurable-cart-item.factory.d.ts +0 -16
- package/driver/magento/testing/factories/cart-payment-method.factory.d.ts +0 -13
- package/driver/magento/testing/factories/cart-shipping-method.factory.d.ts +0 -17
- package/driver/magento/testing/factories/cart.factory.d.ts +0 -38
- package/driver/magento/testing/factories/public_api.d.ts +0 -10
- package/driver/magento/testing/factories/shipping-address.factory.d.ts +0 -14
- package/driver/magento/testing/public_api.d.ts +0 -1
- package/driver/magento/transforms/inputs/billing-address.service.d.ts +0 -11
- package/driver/magento/transforms/inputs/cart-address.service.d.ts +0 -8
- package/driver/magento/transforms/inputs/cart-item-input-transformers.d.ts +0 -5
- package/driver/magento/transforms/inputs/cart-item-update.service.d.ts +0 -8
- package/driver/magento/transforms/inputs/payment-method.service.d.ts +0 -8
- package/driver/magento/transforms/inputs/shipping-address.service.d.ts +0 -11
- package/driver/magento/transforms/inputs/shipping-method.service.d.ts +0 -8
- package/driver/magento/transforms/outputs/billing-address.service.d.ts +0 -19
- package/driver/magento/transforms/outputs/cart-address.service.d.ts +0 -16
- package/driver/magento/transforms/outputs/cart-coupon-response.service.d.ts +0 -21
- package/driver/magento/transforms/outputs/cart-coupon.d.ts +0 -3
- package/driver/magento/transforms/outputs/cart-item/bundle-cart-item-transformer.d.ts +0 -8
- package/driver/magento/transforms/outputs/cart-item/cart-item-transformer.d.ts +0 -11
- package/driver/magento/transforms/outputs/cart-item/configurable-cart-item-transformer.d.ts +0 -8
- package/driver/magento/transforms/outputs/cart-item/simple-cart-item-transformer.d.ts +0 -8
- package/driver/magento/transforms/outputs/cart-payment.service.d.ts +0 -16
- package/driver/magento/transforms/outputs/cart-shipping-rate.service.d.ts +0 -16
- package/driver/magento/transforms/outputs/cart-totals-transformer.d.ts +0 -5
- package/driver/magento/transforms/outputs/cart.service.d.ts +0 -36
- package/driver/magento/transforms/outputs/shipping-address.service.d.ts +0 -19
- package/driver/magento/transforms/public_api.d.ts +0 -12
- package/driver/operators/handle-cart-not-found.d.ts +0 -8
- package/driver/operators/public_api.d.ts +0 -1
- package/driver/public_api.d.ts +0 -5
- package/driver/services/public_api.d.ts +0 -1
- package/driver/services/resolve.service.d.ts +0 -25
- package/driver/testing/drivers/cart/cart.service.d.ts +0 -22
- package/driver/testing/drivers/cart-address/cart-address.service.d.ts +0 -16
- package/driver/testing/drivers/cart-billing-address/cart-billing-address.service.d.ts +0 -17
- package/driver/testing/drivers/cart-coupon/cart-coupon.service.d.ts +0 -19
- package/driver/testing/drivers/cart-driver.module.d.ts +0 -9
- package/driver/testing/drivers/cart-item/cart-item.service.d.ts +0 -20
- package/driver/testing/drivers/cart-order/cart-order.service.d.ts +0 -12
- package/driver/testing/drivers/cart-payment/cart-payment.service.d.ts +0 -19
- package/driver/testing/drivers/cart-payment-methods/cart-payment-methods.service.d.ts +0 -15
- package/driver/testing/drivers/cart-shipping-address/cart-shipping-address.service.d.ts +0 -17
- package/driver/testing/drivers/cart-shipping-information/cart-shipping-information.service.d.ts +0 -18
- package/driver/testing/drivers/cart-shipping-methods/cart-shipping-methods.service.d.ts +0 -15
- package/driver/testing/drivers/public_api.d.ts +0 -12
- package/driver/testing/public_api.d.ts +0 -1
- package/errors/codes.enum.d.ts +0 -10
- package/errors/map.d.ts +0 -10
- package/errors/public_api.d.ts +0 -3
- package/errors/resolution/cart-not-found-or-created-resolution.d.ts +0 -11
- package/errors/resolution/cart-resolution.d.ts +0 -10
- package/errors/resolution/cart-server-side-resolution.d.ts +0 -12
- package/errors/resolution/cart-storage-resolution.d.ts +0 -11
- package/errors/resolution/public_api.d.ts +0 -4
- package/helpers/get-affected-item.d.ts +0 -5
- package/helpers/get-item-total-discount.d.ts +0 -5
- package/helpers/input-to-item-transform.d.ts +0 -5
- package/helpers/public_api.d.ts +0 -3
- package/injection-tokens/payment-method-map.d.ts +0 -7
- package/injection-tokens/public_api.d.ts +0 -1
- package/models/cart-address.d.ts +0 -11
- package/models/cart-coupon.d.ts +0 -15
- package/models/cart-item-input.d.ts +0 -70
- package/models/cart-item.d.ts +0 -63
- package/models/cart-order-result.d.ts +0 -15
- package/models/cart-payment.d.ts +0 -15
- package/models/cart-shipping-rate.d.ts +0 -30
- package/models/cart-total.d.ts +0 -37
- package/models/cart.d.ts +0 -55
- package/models/composite-cart-item.d.ts +0 -24
- package/models/configurable-cart-item.d.ts +0 -23
- package/models/public_api.d.ts +0 -11
- package/public_api.d.ts +0 -5
- package/routing/cart-routing.module.d.ts +0 -9
- package/routing/config/config.d.ts +0 -16
- package/routing/config/resolution/config.d.ts +0 -15
- package/routing/guards/billing-address/billing-address-guard-redirect.token.d.ts +0 -1
- package/routing/guards/billing-address/billing-address.guard.d.ts +0 -19
- package/routing/guards/cart-items/cart-items-guard-redirect.token.d.ts +0 -1
- package/routing/guards/cart-items/cart-items.guard.d.ts +0 -20
- package/routing/guards/in-stock-items/in-stock-items-guard-redirect.token.d.ts +0 -1
- package/routing/guards/in-stock-items/in-stock-items.guard.d.ts +0 -21
- package/routing/guards/order-result/order-result-guard-redirect.token.d.ts +0 -1
- package/routing/guards/order-result/order-result.guard.d.ts +0 -17
- package/routing/guards/payment-method/payment-method-guard-redirect.token.d.ts +0 -1
- package/routing/guards/payment-method/payment-method.guard.d.ts +0 -19
- package/routing/guards/public_api.d.ts +0 -17
- package/routing/guards/resolve-cart/redirect.token.d.ts +0 -1
- package/routing/guards/resolve-cart/resolve-cart.guard.d.ts +0 -22
- package/routing/guards/resolved-cart/resolved-cart.guard.d.ts +0 -21
- package/routing/guards/shipping-address/shipping-address-guard-redirect.token.d.ts +0 -1
- package/routing/guards/shipping-address/shipping-address.guard.d.ts +0 -19
- package/routing/guards/shipping-method/shipping-method-guard-redirect.token.d.ts +0 -1
- package/routing/guards/shipping-method/shipping-method.guard.d.ts +0 -19
- package/routing/public_api.d.ts +0 -5
- package/routing/resolvers/cart-resolver.service.d.ts +0 -20
- package/routing/resolvers/empty-cart-resolver.service.d.ts +0 -20
- package/routing/resolvers/public_api.d.ts +0 -4
- package/routing/resolvers/tokens/cart-resolver-redirect.token.d.ts +0 -1
- package/routing/resolvers/tokens/empty-cart-resolver-redirect.token.d.ts +0 -1
- package/state/actions/cart-address.actions.d.ts +0 -40
- package/state/actions/cart-billing-address.actions.d.ts +0 -65
- package/state/actions/cart-coupon.actions.d.ts +0 -124
- package/state/actions/cart-item.actions.d.ts +0 -188
- package/state/actions/cart-order.actions.d.ts +0 -51
- package/state/actions/cart-payment-methods.actions.d.ts +0 -38
- package/state/actions/cart-payment.actions.d.ts +0 -135
- package/state/actions/cart-retrieval.d.ts +0 -5
- package/state/actions/cart-shipping-address.actions.d.ts +0 -65
- package/state/actions/cart-shipping-information.actions.d.ts +0 -86
- package/state/actions/cart-shipping-methods.actions.d.ts +0 -32
- package/state/actions/cart.actions.d.ts +0 -184
- package/state/actions/public_api.d.ts +0 -12
- package/state/cart-retrieval/get-response.d.ts +0 -8
- package/state/cart-retrieval/public_api.d.ts +0 -3
- package/state/cart-retrieval/token.d.ts +0 -2
- package/state/cart-retrieval/type.d.ts +0 -40
- package/state/cart-state.module.d.ts +0 -8
- package/state/effects/cart-address.effects.d.ts +0 -16
- package/state/effects/cart-billing-address.effects.d.ts +0 -17
- package/state/effects/cart-coupon.effects.d.ts +0 -19
- package/state/effects/cart-item.effects.d.ts +0 -26
- package/state/effects/cart-order.effects.d.ts +0 -18
- package/state/effects/cart-payment-methods.effects.d.ts +0 -16
- package/state/effects/cart-payment-processor.effects.d.ts +0 -40
- package/state/effects/cart-payment.effects.d.ts +0 -19
- package/state/effects/cart-resolver.effects.d.ts +0 -27
- package/state/effects/cart-shipping-address.effects.d.ts +0 -17
- package/state/effects/cart-shipping-information.effects.d.ts +0 -18
- package/state/effects/cart-shipping-methods.effects.d.ts +0 -16
- package/state/effects/cart.effects.d.ts +0 -19
- package/state/effects/public_api.d.ts +0 -1
- package/state/facades/cart/cart-facade.interface.d.ts +0 -212
- package/state/facades/cart/cart.facade.d.ts +0 -90
- package/state/helpers/cart-items-entity-transform.d.ts +0 -12
- package/state/helpers/public_api.d.ts +0 -1
- package/state/injection-tokens/cart-item-state-debounce-time.d.ts +0 -1
- package/state/injection-tokens/error-matcher.token.d.ts +0 -2
- package/state/injection-tokens/public_api.d.ts +0 -2
- package/state/models/public_api.d.ts +0 -1
- package/state/models/stateful-cart.d.ts +0 -8
- package/state/public_api.d.ts +0 -10
- package/state/reducers/action-types.type.d.ts +0 -3
- package/state/reducers/cart/cart.reducer.d.ts +0 -4
- package/state/reducers/cart/retrieval-actions.reducer.d.ts +0 -9
- package/state/reducers/cart-billing-address/cart-billing-address.reducer.d.ts +0 -4
- package/state/reducers/cart-coupon/cart-coupon.reducer.d.ts +0 -4
- package/state/reducers/cart-initial-state.d.ts +0 -2
- package/state/reducers/cart-item/cart-item.reducer.d.ts +0 -4
- package/state/reducers/cart-item-entities/adapter.d.ts +0 -6
- package/state/reducers/cart-item-entities/cart-item-entities.reducer.d.ts +0 -11
- package/state/reducers/cart-item-entities/retrieval-actions.reducer.d.ts +0 -9
- package/state/reducers/cart-item-entities/set-state-meta-reducer.d.ts +0 -10
- package/state/reducers/cart-operation-type.enum.d.ts +0 -15
- package/state/reducers/cart-order/cart-order-initial-state.d.ts +0 -2
- package/state/reducers/cart-order/cart-order-state.interface.d.ts +0 -7
- package/state/reducers/cart-order/cart-order.reducer.d.ts +0 -4
- package/state/reducers/cart-payment/cart-payment.reducer.d.ts +0 -4
- package/state/reducers/cart-payment/payment.reducer.d.ts +0 -3
- package/state/reducers/cart-payment-methods/cart-payment-methods.reducer.d.ts +0 -4
- package/state/reducers/cart-reducers-state.interface.d.ts +0 -13
- package/state/reducers/cart-reducers.d.ts +0 -3
- package/state/reducers/cart-resolve/cart-resolve-state.enum.d.ts +0 -7
- package/state/reducers/cart-resolve/cart-resolve.reducer.d.ts +0 -4
- package/state/reducers/cart-shipping-address/cart-shipping-address.reducer.d.ts +0 -4
- package/state/reducers/cart-shipping-information/cart-shipping-information.reducer.d.ts +0 -4
- package/state/reducers/cart-shipping-methods/cart-shipping-methods.reducer.d.ts +0 -4
- package/state/reducers/cart-state.interface.d.ts +0 -10
- package/state/reducers/cart-store-feature-key.d.ts +0 -1
- package/state/reducers/cart.reducer.d.ts +0 -8
- package/state/reducers/errors/cart-errors.type.d.ts +0 -5
- package/state/reducers/errors/error-state-helpers.d.ts +0 -29
- package/state/reducers/loading/cart-loading.type.d.ts +0 -27
- package/state/reducers/public_api.d.ts +0 -17
- package/state/reducers/token/config.token.d.ts +0 -8
- package/state/reducers/token/extra.token.d.ts +0 -3
- package/state/reducers/token/meta.token.d.ts +0 -3
- package/state/reducers/token/public_api.d.ts +0 -2
- package/state/reducers/token/reducers.token.d.ts +0 -3
- package/state/selectors/cart/cart.selector.d.ts +0 -178
- package/state/selectors/cart-feature.selector.d.ts +0 -7
- package/state/selectors/cart-item-entities/cart-item-entities.selectors.d.ts +0 -26
- package/state/selectors/cart-order/cart-order.selector.d.ts +0 -20
- package/state/selectors/cart.selector.d.ts +0 -8
- package/state/selectors/public_api.d.ts +0 -1
- package/state/testing/cart-testing.module.d.ts +0 -6
- package/state/testing/factories/stateful-cart-item.factory.d.ts +0 -18
- package/state/testing/factories/stateful-composite-cart-item.factory.d.ts +0 -18
- package/state/testing/factories/stateful-configurable-cart-item.factory.d.ts +0 -18
- package/state/testing/mock-cart-facade.d.ts +0 -77
- package/state/testing/public_api.d.ts +0 -5
- package/storage/cart-storage.service.d.ts +0 -23
- package/testing/factories/cart-address.factory.d.ts +0 -26
- package/testing/factories/cart-coupon.factory.d.ts +0 -13
- package/testing/factories/cart-item/cart-item.factory.d.ts +0 -30
- package/testing/factories/cart-item/composite-cart-item.factory.d.ts +0 -20
- package/testing/factories/cart-item/configurable-cart-item.factory.d.ts +0 -19
- package/testing/factories/cart-payment.factory.d.ts +0 -11
- package/testing/factories/cart-shipping-rate.factory.d.ts +0 -17
- package/testing/factories/cart-total.factory.d.ts +0 -23
- package/testing/factories/cart.factory.d.ts +0 -26
- package/testing/factories/public_api.d.ts +0 -9
- package/testing/public_api.d.ts +0 -1
package/helpers/public_api.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const DaffCartPaymentMethodIdMap: import("@angular/core").InjectionToken<{
|
|
2
|
-
[key: string]: string;
|
|
3
|
-
}>, provideDaffCartPaymentMethodIdMap: <R extends {
|
|
4
|
-
[key: string]: string;
|
|
5
|
-
} = {
|
|
6
|
-
[key: string]: string;
|
|
7
|
-
}>(value: R) => import("@angular/core").ValueProvider;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DaffCartPaymentMethodIdMap } from './payment-method-map';
|
package/models/cart-address.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DaffIdentifiable } from '@daffodil/core';
|
|
2
|
-
import { DaffPersonalAddress } from '@daffodil/geography';
|
|
3
|
-
/**
|
|
4
|
-
* An address that is saved in the cart for checkout purposes.
|
|
5
|
-
*/
|
|
6
|
-
export interface DaffCartAddress extends DaffPersonalAddress, DaffIdentifiable {
|
|
7
|
-
/**
|
|
8
|
-
* The type of the address: billing or shipping.
|
|
9
|
-
*/
|
|
10
|
-
address_type: string;
|
|
11
|
-
}
|
package/models/cart-coupon.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DaffIdentifiable } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* A coupon applied to the cart.
|
|
4
|
-
* Also known as a promo code.
|
|
5
|
-
*/
|
|
6
|
-
export interface DaffCartCoupon extends DaffIdentifiable {
|
|
7
|
-
/**
|
|
8
|
-
* The coupon code.
|
|
9
|
-
*/
|
|
10
|
-
code: string;
|
|
11
|
-
/**
|
|
12
|
-
* An optional coupon description.
|
|
13
|
-
*/
|
|
14
|
-
description?: string;
|
|
15
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { ID } from '@daffodil/core';
|
|
2
|
-
import { DaffProduct } from '@daffodil/product';
|
|
3
|
-
/**
|
|
4
|
-
* An enum for the type of the cart item.
|
|
5
|
-
*/
|
|
6
|
-
export declare enum DaffCartItemInputType {
|
|
7
|
-
Simple = "simple",
|
|
8
|
-
Composite = "composite",
|
|
9
|
-
Configurable = "configurable"
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* A set of fields specifying how to add a product to the cart.
|
|
13
|
-
*/
|
|
14
|
-
export interface DaffCartItemInput {
|
|
15
|
-
/**
|
|
16
|
-
* The type of cart item that corresponds to the product being added to the cart.
|
|
17
|
-
*/
|
|
18
|
-
type: DaffCartItemInputType;
|
|
19
|
-
/**
|
|
20
|
-
* The ID of the product to add to the cart.
|
|
21
|
-
*/
|
|
22
|
-
productId: DaffProduct['id'];
|
|
23
|
-
/**
|
|
24
|
-
* How many of the product should be added to the cart.
|
|
25
|
-
*/
|
|
26
|
-
qty: number;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* A more constrained cart item input for simple products.
|
|
30
|
-
*/
|
|
31
|
-
export interface DaffSimpleCartItemInput extends DaffCartItemInput {
|
|
32
|
-
type: DaffCartItemInputType.Simple;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* A cart item input for composite products.
|
|
36
|
-
*/
|
|
37
|
-
export interface DaffCompositeCartItemInput extends DaffCartItemInput {
|
|
38
|
-
type: DaffCartItemInputType.Composite;
|
|
39
|
-
/**
|
|
40
|
-
* The selected options for the composite product to be added to the cart.
|
|
41
|
-
*/
|
|
42
|
-
options: DaffCompositeCartItemInputOption[];
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Designates a particular option for the composite product to add to the cart.
|
|
46
|
-
*/
|
|
47
|
-
export interface DaffCompositeCartItemInputOption {
|
|
48
|
-
/**
|
|
49
|
-
* An identifier of the option for which a value has been chosen.
|
|
50
|
-
*/
|
|
51
|
-
code: string | number;
|
|
52
|
-
/**
|
|
53
|
-
* How many of the specified option should be added to the cart.
|
|
54
|
-
*/
|
|
55
|
-
quantity: number;
|
|
56
|
-
/**
|
|
57
|
-
* The value identifying the chosen composite product option.
|
|
58
|
-
*/
|
|
59
|
-
value: string;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Designates a particular configurable product variant to add to the cart.
|
|
63
|
-
*/
|
|
64
|
-
export interface DaffConfigurableCartItemInput extends DaffCartItemInput {
|
|
65
|
-
type: DaffCartItemInputType.Configurable;
|
|
66
|
-
/**
|
|
67
|
-
* The value identifying the particular configurable product variant.
|
|
68
|
-
*/
|
|
69
|
-
variantId: ID;
|
|
70
|
-
}
|
package/models/cart-item.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { ID, DaffLocatable, DaffIdentifiable } from '@daffodil/core';
|
|
2
|
-
import { DaffProductImage, DaffProduct } from '@daffodil/product';
|
|
3
|
-
import { DaffCartItemInputType } from './cart-item-input';
|
|
4
|
-
/**
|
|
5
|
-
* A discount applied to a specific cart item.
|
|
6
|
-
*/
|
|
7
|
-
export interface DaffCartItemDiscount {
|
|
8
|
-
/**
|
|
9
|
-
* The amount of the discount.
|
|
10
|
-
*/
|
|
11
|
-
amount: number;
|
|
12
|
-
/**
|
|
13
|
-
* A human-readable label describing the discount.
|
|
14
|
-
*/
|
|
15
|
-
label: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* A cart item.
|
|
19
|
-
* Cart item types correspond to product types.
|
|
20
|
-
* They hold information about the product to which they correspond and how many of said product is in the cart.
|
|
21
|
-
*/
|
|
22
|
-
export interface DaffCartItem extends DaffLocatable, DaffIdentifiable {
|
|
23
|
-
/**
|
|
24
|
-
* The type of cart item.
|
|
25
|
-
*/
|
|
26
|
-
type: DaffCartItemInputType;
|
|
27
|
-
/**
|
|
28
|
-
* The image or thumbnail of the corresponding product.
|
|
29
|
-
*/
|
|
30
|
-
image?: DaffProductImage;
|
|
31
|
-
/**
|
|
32
|
-
* The ID of the corresponding product.
|
|
33
|
-
*/
|
|
34
|
-
product_id: DaffProduct['id'];
|
|
35
|
-
parent_item_id: ID;
|
|
36
|
-
sku: string;
|
|
37
|
-
/**
|
|
38
|
-
* A human-readable label.
|
|
39
|
-
*/
|
|
40
|
-
name: string;
|
|
41
|
-
/**
|
|
42
|
-
* How many of the corresponding product is in the cart.
|
|
43
|
-
*/
|
|
44
|
-
qty: number;
|
|
45
|
-
/**
|
|
46
|
-
* The price per item, excluding cart discounts.
|
|
47
|
-
* This includes any discounts and sales that apply to the product or category.
|
|
48
|
-
*/
|
|
49
|
-
price: number;
|
|
50
|
-
/**
|
|
51
|
-
* The total for the entire row, not including cart discounts.
|
|
52
|
-
* This includes any discounts and sales that apply to the product or category.
|
|
53
|
-
*/
|
|
54
|
-
row_total: number;
|
|
55
|
-
/**
|
|
56
|
-
* Whether or not the specified quantity of the corresponding product is in stock.
|
|
57
|
-
*/
|
|
58
|
-
in_stock: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* A list of discounts applied to the cart item row.
|
|
61
|
-
*/
|
|
62
|
-
discounts: DaffCartItemDiscount[];
|
|
63
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ID } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* The result of placing an order for a cart.
|
|
4
|
-
* Stores a reference to a cart and order object.
|
|
5
|
-
*/
|
|
6
|
-
export interface DaffCartOrderResult {
|
|
7
|
-
/**
|
|
8
|
-
* The ID of the cart for which this order was placed.
|
|
9
|
-
*/
|
|
10
|
-
cartId: ID;
|
|
11
|
-
/**
|
|
12
|
-
* The ID of the order placed.
|
|
13
|
-
*/
|
|
14
|
-
orderId: ID;
|
|
15
|
-
}
|
package/models/cart-payment.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The kind of payment used for the cart.
|
|
3
|
-
*/
|
|
4
|
-
export interface DaffCartPaymentMethod {
|
|
5
|
-
/**
|
|
6
|
-
* Identifies the kind of payment used.
|
|
7
|
-
* e.g. "credit-card"
|
|
8
|
-
*/
|
|
9
|
-
method: string;
|
|
10
|
-
/**
|
|
11
|
-
* A very generic collection of payment info.
|
|
12
|
-
* Payment and processor specific.
|
|
13
|
-
*/
|
|
14
|
-
payment_info?: any;
|
|
15
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { DaffIdentifiable } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* Contains information about a particular shipping option.
|
|
4
|
-
*/
|
|
5
|
-
export interface DaffCartShippingRate extends DaffIdentifiable {
|
|
6
|
-
/**
|
|
7
|
-
* Identifies the shipping carrier.
|
|
8
|
-
*/
|
|
9
|
-
carrier: string;
|
|
10
|
-
/**
|
|
11
|
-
* A human-readable label of the shipping carrier.
|
|
12
|
-
*/
|
|
13
|
-
carrier_title: string;
|
|
14
|
-
/**
|
|
15
|
-
* Identifies the shipping method.
|
|
16
|
-
*/
|
|
17
|
-
method_code: string;
|
|
18
|
-
/**
|
|
19
|
-
* A human-readable label of the shipping method.
|
|
20
|
-
*/
|
|
21
|
-
method_title: string;
|
|
22
|
-
/**
|
|
23
|
-
* A human-readable description of the shipping method.
|
|
24
|
-
*/
|
|
25
|
-
method_description: string;
|
|
26
|
-
/**
|
|
27
|
-
* The price of the shipping option.
|
|
28
|
-
*/
|
|
29
|
-
price: number;
|
|
30
|
-
}
|
package/models/cart-total.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An enum for the types of totals that can appear in a cart.
|
|
3
|
-
*/
|
|
4
|
-
export declare enum DaffCartTotalTypeEnum {
|
|
5
|
-
grandTotal = "grand_total",
|
|
6
|
-
subtotalExcludingTax = "subtotal_excluding_tax",
|
|
7
|
-
subtotalIncludingTax = "subtotal_including_tax",
|
|
8
|
-
subtotalWithDiscountExcludingTax = "subtotal_with_discount_excluding_tax",
|
|
9
|
-
subtotalWithDiscountIncludingTax = "subtotal_with_discount_including_tax",
|
|
10
|
-
discount = "discount",
|
|
11
|
-
tax = "tax",
|
|
12
|
-
shipping = "shipping"
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Since some cart totals might not have a value defined at all times, like shipping, the values of these totals
|
|
16
|
-
* can be null. Allowing their values to be null differentiates a non-existent value from a zero value. In the case of
|
|
17
|
-
* shipping, this would mean the difference between a cart with no selected shipping method and a cart with a selected shipping
|
|
18
|
-
* method that costs zero.
|
|
19
|
-
*/
|
|
20
|
-
export interface DaffCartTotal {
|
|
21
|
-
/**
|
|
22
|
-
* The amount of the total.
|
|
23
|
-
*/
|
|
24
|
-
value: number;
|
|
25
|
-
/**
|
|
26
|
-
* A human-readable label of the total.
|
|
27
|
-
*/
|
|
28
|
-
label: string;
|
|
29
|
-
/**
|
|
30
|
-
* The type of the total.
|
|
31
|
-
*/
|
|
32
|
-
name: DaffCartTotalTypeEnum | string;
|
|
33
|
-
/**
|
|
34
|
-
* The position in the totals list in which this total should be displayed.
|
|
35
|
-
*/
|
|
36
|
-
order: number;
|
|
37
|
-
}
|
package/models/cart.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { DaffIdentifiable } from '@daffodil/core';
|
|
2
|
-
import { DaffCartAddress } from './cart-address';
|
|
3
|
-
import { DaffCartCoupon } from './cart-coupon';
|
|
4
|
-
import { DaffCartItem } from './cart-item';
|
|
5
|
-
import { DaffCartPaymentMethod } from './cart-payment';
|
|
6
|
-
import { DaffCartShippingRate } from './cart-shipping-rate';
|
|
7
|
-
import { DaffCartTotal } from './cart-total';
|
|
8
|
-
/**
|
|
9
|
-
* A cart.
|
|
10
|
-
* Contains products in the form of cart items.
|
|
11
|
-
* Contains payment and shipping info used for checkout.
|
|
12
|
-
*/
|
|
13
|
-
export interface DaffCart extends DaffIdentifiable {
|
|
14
|
-
/**
|
|
15
|
-
* A list of coupons applied to the cart.
|
|
16
|
-
*/
|
|
17
|
-
coupons: DaffCartCoupon[];
|
|
18
|
-
/**
|
|
19
|
-
* A list of cart items.
|
|
20
|
-
*/
|
|
21
|
-
items?: DaffCartItem[];
|
|
22
|
-
/**
|
|
23
|
-
* The billing address of the cart.
|
|
24
|
-
*/
|
|
25
|
-
billing_address: DaffCartAddress | null;
|
|
26
|
-
/**
|
|
27
|
-
* The shipping address of the cart.
|
|
28
|
-
*/
|
|
29
|
-
shipping_address: DaffCartAddress | null;
|
|
30
|
-
/**
|
|
31
|
-
* The selected payment method of the cart.
|
|
32
|
-
*/
|
|
33
|
-
payment?: DaffCartPaymentMethod;
|
|
34
|
-
/**
|
|
35
|
-
* A list of totals for the cart.
|
|
36
|
-
*/
|
|
37
|
-
totals: Record<DaffCartTotal['name'], DaffCartTotal>;
|
|
38
|
-
/**
|
|
39
|
-
* The selected shipping method.
|
|
40
|
-
*/
|
|
41
|
-
shipping_information: DaffCartShippingRate | null;
|
|
42
|
-
/**
|
|
43
|
-
* A list of available shipping methods.
|
|
44
|
-
*/
|
|
45
|
-
available_shipping_methods: DaffCartShippingRate[];
|
|
46
|
-
/**
|
|
47
|
-
* A list of available payment methods.
|
|
48
|
-
*/
|
|
49
|
-
available_payment_methods: DaffCartPaymentMethod[];
|
|
50
|
-
/**
|
|
51
|
-
* The field is set to the platform cart object returned by the most recent driver call.
|
|
52
|
-
* No fields are guaranteed here. Use this with care.
|
|
53
|
-
*/
|
|
54
|
-
extra_attributes?: any;
|
|
55
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { DaffIdentifiable } from '@daffodil/core';
|
|
2
|
-
import { DaffCartItem } from './cart-item';
|
|
3
|
-
/**
|
|
4
|
-
* A cart item for a composite product.
|
|
5
|
-
*/
|
|
6
|
-
export interface DaffCompositeCartItem extends DaffCartItem {
|
|
7
|
-
/**
|
|
8
|
-
* A list of composite cart item options.
|
|
9
|
-
*/
|
|
10
|
-
options: DaffCompositeCartItemOption[];
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* A composite product option in a cart item.
|
|
14
|
-
*/
|
|
15
|
-
export interface DaffCompositeCartItemOption extends DaffIdentifiable {
|
|
16
|
-
/**
|
|
17
|
-
* A human-readable label for the option.
|
|
18
|
-
*/
|
|
19
|
-
option_label: string;
|
|
20
|
-
/**
|
|
21
|
-
* A human-readable label for the particular value chosen for the option.
|
|
22
|
-
*/
|
|
23
|
-
value_label: string;
|
|
24
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { DaffCartItem } from './cart-item';
|
|
2
|
-
/**
|
|
3
|
-
* A cart item for a configurable product.
|
|
4
|
-
*/
|
|
5
|
-
export interface DaffConfigurableCartItem extends DaffCartItem {
|
|
6
|
-
/**
|
|
7
|
-
* A list of the chosen configurable attributes.
|
|
8
|
-
*/
|
|
9
|
-
attributes: DaffConfigurableCartItemAttribute[];
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Defines a selected attribute for a configurable cart item.
|
|
13
|
-
*/
|
|
14
|
-
export interface DaffConfigurableCartItemAttribute {
|
|
15
|
-
/**
|
|
16
|
-
* A human-readable label for the attribute.
|
|
17
|
-
*/
|
|
18
|
-
attribute_label: string;
|
|
19
|
-
/**
|
|
20
|
-
* A human-readable label for the particular value chosen for the attribute.
|
|
21
|
-
*/
|
|
22
|
-
value_label: string;
|
|
23
|
-
}
|
package/models/public_api.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './cart';
|
|
2
|
-
export * from './cart-item';
|
|
3
|
-
export * from './composite-cart-item';
|
|
4
|
-
export * from './configurable-cart-item';
|
|
5
|
-
export * from './cart-item-input';
|
|
6
|
-
export { DaffCartAddress } from './cart-address';
|
|
7
|
-
export { DaffCartPaymentMethod } from './cart-payment';
|
|
8
|
-
export { DaffCartShippingRate } from './cart-shipping-rate';
|
|
9
|
-
export * from './cart-total';
|
|
10
|
-
export { DaffCartCoupon } from './cart-coupon';
|
|
11
|
-
export { DaffCartOrderResult } from './cart-order-result';
|
package/public_api.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import { DaffCartRoutingConfiguration } from './config/config';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class DaffCartRoutingModule {
|
|
5
|
-
static forRoot(config?: DaffCartRoutingConfiguration): ModuleWithProviders<DaffCartRoutingModule>;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartRoutingModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCartRoutingModule, never, never, never>;
|
|
8
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCartRoutingModule>;
|
|
9
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { DaffCartRoutingResolutionConfiguration } from './resolution/config';
|
|
2
|
-
/**
|
|
3
|
-
* An object that describes the configuration of the`@daffodil/cart/state` package.
|
|
4
|
-
*/
|
|
5
|
-
export interface DaffCartRoutingConfiguration {
|
|
6
|
-
resolution: DaffCartRoutingResolutionConfiguration;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* The default values of the `@daffodil/cart/state` state configuration.
|
|
10
|
-
*/
|
|
11
|
-
export declare const daffCartRoutingConfigurationDefault: DaffCartRoutingConfiguration;
|
|
12
|
-
/**
|
|
13
|
-
* The token holding the runtime configuration for the behavior of the
|
|
14
|
-
* `@daffodil/cart/state` package.
|
|
15
|
-
*/
|
|
16
|
-
export declare const DAFF_CART_ROUTING_CONFIG: import("@angular/core").InjectionToken<DaffCartRoutingConfiguration>, provideDaffCartRoutingConfig: <R extends DaffCartRoutingConfiguration = DaffCartRoutingConfiguration>(config: Partial<R> | import("@angular/core").InjectionToken<Partial<R>>) => import("@angular/core").FactoryProvider;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An object that describes the resolution configuration of the cart state package.
|
|
3
|
-
*/
|
|
4
|
-
export interface DaffCartRoutingResolutionConfiguration {
|
|
5
|
-
/**
|
|
6
|
-
* When Daffodil fails to resolve a cart, you should navigate your users to
|
|
7
|
-
* a page that is outside the scope of resolution. The `failedResolutionPath` allows you
|
|
8
|
-
* to control where to navigate your users to when resolution fails.
|
|
9
|
-
*/
|
|
10
|
-
failedResolutionPath: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The default values of the resolution slice of the cart state configuration.
|
|
14
|
-
*/
|
|
15
|
-
export declare const daffCartRoutingResolutionConfigurationDefault: DaffCartRoutingResolutionConfiguration;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DaffCartBillingAddressGuardRedirectUrl: import("@angular/core").InjectionToken<string>, provideDaffCartBillingAddressGuardRedirectUrl: <R extends string = string>(value: R) => import("@angular/core").ValueProvider;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Router } from '@angular/router';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffCartFacade } from '@daffodil/cart/state';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* A routing guard that will redirect to a given url if the billing address on the cart is not defined.
|
|
7
|
-
* The url is `/` by default, but can be overridden with the DaffCartBillingAddressGuardRedirectUrl injection token.
|
|
8
|
-
* The guard will not wait until the cart has been resolved before performing the check and emitting.
|
|
9
|
-
* Ensure that the cart is resolved prior to running this guard with the {@link DaffResolvedCartGuard}.
|
|
10
|
-
*/
|
|
11
|
-
export declare class DaffBillingAddressGuard {
|
|
12
|
-
private facade;
|
|
13
|
-
private router;
|
|
14
|
-
private redirectUrl;
|
|
15
|
-
constructor(facade: DaffCartFacade, router: Router, redirectUrl: string);
|
|
16
|
-
canActivate(): Observable<boolean>;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffBillingAddressGuard, never>;
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffBillingAddressGuard>;
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DaffCartItemsGuardRedirectUrl: import("@angular/core").InjectionToken<string>, provideDaffCartItemsGuardRedirectUrl: <R extends string = string>(value: R) => import("@angular/core").ValueProvider;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Router } from '@angular/router';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffCartFacade } from '@daffodil/cart/state';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* A routing guard that will ensure that the cart is not empty before allowing activation of a route.
|
|
7
|
-
* If the cart has items in it, then `canActivate` will emit true. If not, it will emit false and redirect to a specific path.
|
|
8
|
-
* The url is `/` by default but can be overridden with the {@link DaffCartItemsGuardRedirectUrl} injection token.
|
|
9
|
-
* The guard will not wait until the cart has been resolved before performing the check and emitting.
|
|
10
|
-
* Ensure that the cart is resolved prior to running this guard with the {@link DaffResolvedCartGuard}.
|
|
11
|
-
*/
|
|
12
|
-
export declare class DaffCartItemsGuard {
|
|
13
|
-
private facade;
|
|
14
|
-
private router;
|
|
15
|
-
private redirectUrl;
|
|
16
|
-
constructor(facade: DaffCartFacade, router: Router, redirectUrl: string);
|
|
17
|
-
canActivate(): Observable<boolean>;
|
|
18
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartItemsGuard, never>;
|
|
19
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartItemsGuard>;
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DaffCartInStockItemsGuardRedirectUrl: import("@angular/core").InjectionToken<string>, provideDaffCartInStockItemsGuardRedirectUrl: <R extends string = string>(value: R) => import("@angular/core").ValueProvider;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Router } from '@angular/router';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffCartFacade } from '@daffodil/cart/state';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* A routing guard that will ensure that the cart has only in-stock items before allowing activation of a route.
|
|
7
|
-
* If the cart has any out of stock items in it, then `canActivate` will emit `false` and redirect to a specific path.
|
|
8
|
-
* The url is `/` by default but can be overridden with the {@link DaffCartInStockItemsGuardRedirectUrl} injection token.
|
|
9
|
-
* The guard will not wait until the cart has been resolved before performing the check and emitting.
|
|
10
|
-
* Ensure that the cart is resolved prior to running this guard with the {@link DaffResolvedCartGuard}.
|
|
11
|
-
*/
|
|
12
|
-
export declare class DaffCartInStockItemsGuard {
|
|
13
|
-
private facade;
|
|
14
|
-
private router;
|
|
15
|
-
private redirectUrl;
|
|
16
|
-
constructor(facade: DaffCartFacade, router: Router, redirectUrl: string);
|
|
17
|
-
canActivateChild(): Observable<boolean>;
|
|
18
|
-
canActivate(): Observable<boolean>;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartInStockItemsGuard, never>;
|
|
20
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartInStockItemsGuard>;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DaffCartOrderResultGuardRedirectUrl: import("@angular/core").InjectionToken<string>, provideDaffCartOrderResultGuardRedirectUrl: <R extends string = string>(value: R) => import("@angular/core").ValueProvider;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Router } from '@angular/router';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffCartFacade } from '@daffodil/cart/state';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* A routing guard that will redirect to a given url if the cart order result is not defined.
|
|
7
|
-
* The url is `/` by default, but can be overridden with the DaffCartOrderResultGuardRedirectUrl injection token.
|
|
8
|
-
*/
|
|
9
|
-
export declare class DaffOrderResultGuard {
|
|
10
|
-
private facade;
|
|
11
|
-
private router;
|
|
12
|
-
private redirectUrl;
|
|
13
|
-
constructor(facade: DaffCartFacade, router: Router, redirectUrl: string);
|
|
14
|
-
canActivate(): Observable<boolean>;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffOrderResultGuard, never>;
|
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffOrderResultGuard>;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DaffCartPaymentMethodGuardRedirectUrl: import("@angular/core").InjectionToken<string>, provideDaffCartPaymentMethodGuardRedirectUrl: <R extends string = string>(value: R) => import("@angular/core").ValueProvider;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Router } from '@angular/router';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffCartFacade } from '@daffodil/cart/state';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* A routing guard that will redirect to a given url if the payment method on the cart is not defined.
|
|
7
|
-
* The url is `/` by default, but can be overridden with the DaffCartPaymentMethodGuardRedirectUrl injection token.
|
|
8
|
-
* The guard will not wait until the cart has been resolved before performing the check and emitting.
|
|
9
|
-
* Ensure that the cart is resolved prior to running this guard with the {@link DaffResolvedCartGuard}.
|
|
10
|
-
*/
|
|
11
|
-
export declare class DaffPaymentMethodGuard {
|
|
12
|
-
private facade;
|
|
13
|
-
private router;
|
|
14
|
-
private redirectUrl;
|
|
15
|
-
constructor(facade: DaffCartFacade, router: Router, redirectUrl: string);
|
|
16
|
-
canActivate(): Observable<boolean>;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffPaymentMethodGuard, never>;
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffPaymentMethodGuard>;
|
|
19
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export { DaffBillingAddressGuard } from './billing-address/billing-address.guard';
|
|
2
|
-
export { DaffResolvedCartGuard } from './resolved-cart/resolved-cart.guard';
|
|
3
|
-
export { DaffResolveCartGuard } from './resolve-cart/resolve-cart.guard';
|
|
4
|
-
export { DaffCartItemsGuard } from './cart-items/cart-items.guard';
|
|
5
|
-
export { DaffCartInStockItemsGuard } from './in-stock-items/in-stock-items.guard';
|
|
6
|
-
export { DaffPaymentMethodGuard } from './payment-method/payment-method.guard';
|
|
7
|
-
export { DaffShippingAddressGuard } from './shipping-address/shipping-address.guard';
|
|
8
|
-
export { DaffShippingMethodGuard } from './shipping-method/shipping-method.guard';
|
|
9
|
-
export { DaffOrderResultGuard } from './order-result/order-result.guard';
|
|
10
|
-
export { DaffCartBillingAddressGuardRedirectUrl } from './billing-address/billing-address-guard-redirect.token';
|
|
11
|
-
export { DaffCartItemsGuardRedirectUrl } from './cart-items/cart-items-guard-redirect.token';
|
|
12
|
-
export { DaffCartInStockItemsGuardRedirectUrl } from './in-stock-items/in-stock-items-guard-redirect.token';
|
|
13
|
-
export { DaffCartPaymentMethodGuardRedirectUrl } from './payment-method/payment-method-guard-redirect.token';
|
|
14
|
-
export { DaffCartShippingAddressGuardRedirectUrl } from './shipping-address/shipping-address-guard-redirect.token';
|
|
15
|
-
export { DaffCartShippingMethodGuardRedirectUrl } from './shipping-method/shipping-method-guard-redirect.token';
|
|
16
|
-
export { DaffCartOrderResultGuardRedirectUrl } from './order-result/order-result-guard-redirect.token';
|
|
17
|
-
export { DaffResolveCartGuardRedirectUrl } from './resolve-cart/redirect.token';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DaffResolveCartGuardRedirectUrl: import("@angular/core").InjectionToken<string>, provideDaffResolveCartGuardRedirectUrl: <R extends string = string>(value: R) => import("@angular/core").ValueProvider;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Router, UrlTree } from '@angular/router';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffCartStorageService } from '@daffodil/cart';
|
|
4
|
-
import { DaffCartFacade } from '@daffodil/cart/state';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* A routing guard that will optionally redirect to a given url if the cart is not properly resolved.
|
|
8
|
-
* It will initiate cart resolution.
|
|
9
|
-
* The url has no default and the guard will not redirect if no value is specified.
|
|
10
|
-
* Specify a redirect path with the {@link DaffResolvedCartGuardRedirectUrl} injection token.
|
|
11
|
-
* The guard will wait until the cart has been resolved before performing the check and emitting.
|
|
12
|
-
*/
|
|
13
|
-
export declare class DaffResolveCartGuard {
|
|
14
|
-
private facade;
|
|
15
|
-
private router;
|
|
16
|
-
private redirectUrl;
|
|
17
|
-
private storage;
|
|
18
|
-
constructor(facade: DaffCartFacade, router: Router, redirectUrl: string, storage: DaffCartStorageService);
|
|
19
|
-
canActivate(): Observable<boolean | UrlTree>;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffResolveCartGuard, never>;
|
|
21
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffResolveCartGuard>;
|
|
22
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Router, UrlTree } from '@angular/router';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffCartFacade } from '@daffodil/cart/state';
|
|
4
|
-
import { DaffCartRoutingConfiguration } from '../../config/config';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* A routing guard that will optionally redirect to a given url if the cart is not properly resolved.
|
|
8
|
-
* It will initiate cart resolution.
|
|
9
|
-
* The url has no default and the guard will not redirect if no value is specified.
|
|
10
|
-
* Specify a redirect path with the {@link DaffResolvedCartGuardRedirectUrl} injection token.
|
|
11
|
-
* The guard will wait until the cart has been resolved before performing the check and emitting.
|
|
12
|
-
*/
|
|
13
|
-
export declare class DaffResolvedCartGuard {
|
|
14
|
-
private facade;
|
|
15
|
-
private router;
|
|
16
|
-
private config;
|
|
17
|
-
constructor(facade: DaffCartFacade, router: Router, config: DaffCartRoutingConfiguration);
|
|
18
|
-
canActivate(): Observable<boolean | UrlTree>;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffResolvedCartGuard, never>;
|
|
20
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffResolvedCartGuard>;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DaffCartShippingAddressGuardRedirectUrl: import("@angular/core").InjectionToken<string>, provideDaffCartShippingAddressGuardRedirectUrl: <R extends string = string>(value: R) => import("@angular/core").ValueProvider;
|