@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/state/testing/index.d.ts
CHANGED
|
@@ -1 +1,130 @@
|
|
|
1
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Dictionary } from '@ngrx/entity';
|
|
3
|
+
import { Action } from '@ngrx/store';
|
|
4
|
+
import { BehaviorSubject } from 'rxjs';
|
|
5
|
+
import { DaffCart, DaffCartItem, DaffCartOrderResult, DaffConfigurableCartItemAttribute, DaffCompositeCartItemOption, DaffCompositeCartItem, DaffConfigurableCartItem } from '@daffodil/cart';
|
|
6
|
+
import { DaffCartFacadeInterface, DaffCartResolveState, DaffCartLoading, DaffCartErrors, DaffCartOperationType } from '@daffodil/cart/state';
|
|
7
|
+
import { DaffOperationEntity, DaffStateError, DaffState } from '@daffodil/core/state';
|
|
8
|
+
import { DaffMockCartItem, DaffMockCompositeCartItem, DaffMockConfigurableCartItem } from '@daffodil/cart/testing';
|
|
9
|
+
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
10
|
+
|
|
11
|
+
declare class DaffCartStateTestingModule {
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartStateTestingModule, never>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffCartStateTestingModule, never, never, never>;
|
|
14
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffCartStateTestingModule>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare class MockDaffCartFacade implements DaffCartFacadeInterface {
|
|
18
|
+
cart$: BehaviorSubject<DaffCart>;
|
|
19
|
+
resolved$: BehaviorSubject<DaffCartResolveState>;
|
|
20
|
+
loadingObject$: BehaviorSubject<DaffCartLoading>;
|
|
21
|
+
featureLoading$: BehaviorSubject<boolean>;
|
|
22
|
+
featureResolving$: BehaviorSubject<boolean>;
|
|
23
|
+
featureMutating$: BehaviorSubject<boolean>;
|
|
24
|
+
loading$: BehaviorSubject<boolean>;
|
|
25
|
+
resolving$: BehaviorSubject<boolean>;
|
|
26
|
+
mutating$: BehaviorSubject<boolean>;
|
|
27
|
+
billingAddressLoading$: BehaviorSubject<boolean>;
|
|
28
|
+
billingAddressResolving$: BehaviorSubject<boolean>;
|
|
29
|
+
billingAddressMutating$: BehaviorSubject<boolean>;
|
|
30
|
+
shippingAddressLoading$: BehaviorSubject<boolean>;
|
|
31
|
+
shippingAddressResolving$: BehaviorSubject<boolean>;
|
|
32
|
+
shippingAddressMutating$: BehaviorSubject<boolean>;
|
|
33
|
+
shippingInformationLoading$: BehaviorSubject<boolean>;
|
|
34
|
+
shippingInformationResolving$: BehaviorSubject<boolean>;
|
|
35
|
+
shippingInformationMutating$: BehaviorSubject<boolean>;
|
|
36
|
+
shippingMethodsLoading$: BehaviorSubject<boolean>;
|
|
37
|
+
shippingMethodsResolving$: BehaviorSubject<boolean>;
|
|
38
|
+
paymentLoading$: BehaviorSubject<boolean>;
|
|
39
|
+
paymentResolving$: BehaviorSubject<boolean>;
|
|
40
|
+
paymentMutating$: BehaviorSubject<boolean>;
|
|
41
|
+
paymentMethodsLoading$: BehaviorSubject<boolean>;
|
|
42
|
+
paymentMethodsResolving$: BehaviorSubject<boolean>;
|
|
43
|
+
couponLoading$: BehaviorSubject<boolean>;
|
|
44
|
+
couponResolving$: BehaviorSubject<boolean>;
|
|
45
|
+
couponMutating$: BehaviorSubject<boolean>;
|
|
46
|
+
itemLoading$: BehaviorSubject<boolean>;
|
|
47
|
+
itemAdding$: BehaviorSubject<boolean>;
|
|
48
|
+
itemResolving$: BehaviorSubject<boolean>;
|
|
49
|
+
itemMutating$: BehaviorSubject<boolean>;
|
|
50
|
+
errors$: BehaviorSubject<DaffCartErrors>;
|
|
51
|
+
cartErrors$: BehaviorSubject<DaffCartErrors[DaffCartOperationType.Cart]>;
|
|
52
|
+
itemErrors$: BehaviorSubject<DaffCartErrors[DaffCartOperationType.Item]>;
|
|
53
|
+
billingAddressErrors$: BehaviorSubject<DaffCartErrors[DaffCartOperationType.BillingAddress]>;
|
|
54
|
+
shippingAddressErrors$: BehaviorSubject<DaffCartErrors[DaffCartOperationType.ShippingAddress]>;
|
|
55
|
+
shippingInformationErrors$: BehaviorSubject<DaffCartErrors[DaffCartOperationType.ShippingInformation]>;
|
|
56
|
+
shippingMethodsErrors$: BehaviorSubject<DaffCartErrors[DaffCartOperationType.ShippingMethods]>;
|
|
57
|
+
paymentErrors$: BehaviorSubject<DaffCartErrors[DaffCartOperationType.Payment]>;
|
|
58
|
+
paymentMethodsErrors$: BehaviorSubject<DaffCartErrors[DaffCartOperationType.PaymentMethods]>;
|
|
59
|
+
couponErrors$: BehaviorSubject<DaffCartErrors[DaffCartOperationType.Coupon]>;
|
|
60
|
+
itemEntities$: BehaviorSubject<DaffOperationEntity<DaffCartItem>[]>;
|
|
61
|
+
totalItems$: BehaviorSubject<number>;
|
|
62
|
+
hasOutOfStockItems$: BehaviorSubject<boolean>;
|
|
63
|
+
outOfStockItems$: BehaviorSubject<DaffOperationEntity<DaffCartItem>[]>;
|
|
64
|
+
inStockItems$: BehaviorSubject<DaffOperationEntity<DaffCartItem>[]>;
|
|
65
|
+
itemDictionary$: BehaviorSubject<Dictionary<DaffOperationEntity<DaffCartItem>>>;
|
|
66
|
+
paymentId$: BehaviorSubject<any>;
|
|
67
|
+
isCartEmpty$: BehaviorSubject<boolean>;
|
|
68
|
+
isBillingSameAsShipping$: BehaviorSubject<boolean>;
|
|
69
|
+
hasBillingAddress$: BehaviorSubject<boolean>;
|
|
70
|
+
hasShippingAddress$: BehaviorSubject<boolean>;
|
|
71
|
+
hasShippingMethod$: BehaviorSubject<boolean>;
|
|
72
|
+
hasPaymentMethod$: BehaviorSubject<boolean>;
|
|
73
|
+
canPlaceOrder$: BehaviorSubject<boolean>;
|
|
74
|
+
orderResultLoading$: BehaviorSubject<boolean>;
|
|
75
|
+
orderResultErrors$: BehaviorSubject<DaffStateError[]>;
|
|
76
|
+
orderResult$: BehaviorSubject<DaffCartOrderResult>;
|
|
77
|
+
orderResultId$: BehaviorSubject<string>;
|
|
78
|
+
orderResultCartId$: BehaviorSubject<string>;
|
|
79
|
+
hasOrderResult$: BehaviorSubject<boolean>;
|
|
80
|
+
getConfiguredCartItemAttributes(itemId: DaffCartItem['id']): BehaviorSubject<DaffConfigurableCartItemAttribute[]>;
|
|
81
|
+
getCompositeCartItemOptions(itemId: DaffCartItem['id']): BehaviorSubject<DaffCompositeCartItemOption[]>;
|
|
82
|
+
isCartItemOutOfStock(itemId: DaffCartItem['id']): BehaviorSubject<boolean>;
|
|
83
|
+
dispatch(action: Action): void;
|
|
84
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MockDaffCartFacade, never>;
|
|
85
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MockDaffCartFacade>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @role mock
|
|
90
|
+
*/
|
|
91
|
+
declare class DaffMockStatefulCartItem extends DaffMockCartItem implements DaffOperationEntity<DaffCartItem> {
|
|
92
|
+
daffState: DaffState;
|
|
93
|
+
daffErrors: any[];
|
|
94
|
+
daffTemp: boolean;
|
|
95
|
+
}
|
|
96
|
+
declare class DaffStatefulCartItemFactory extends DaffModelFactory<DaffOperationEntity<DaffCartItem>> {
|
|
97
|
+
constructor();
|
|
98
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffStatefulCartItemFactory, never>;
|
|
99
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffStatefulCartItemFactory>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @role mock
|
|
104
|
+
*/
|
|
105
|
+
declare class DaffMockStatefulCompositeCartItem extends DaffMockCompositeCartItem implements DaffOperationEntity<DaffCompositeCartItem> {
|
|
106
|
+
daffState: DaffState;
|
|
107
|
+
daffErrors: any[];
|
|
108
|
+
daffTemp: boolean;
|
|
109
|
+
}
|
|
110
|
+
declare class DaffStatefulCompositeCartItemFactory extends DaffModelFactory<DaffOperationEntity<DaffCompositeCartItem>> {
|
|
111
|
+
constructor();
|
|
112
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffStatefulCompositeCartItemFactory, never>;
|
|
113
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffStatefulCompositeCartItemFactory>;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @role mock
|
|
118
|
+
*/
|
|
119
|
+
declare class DaffMockStatefulConfigurableCartItem extends DaffMockConfigurableCartItem implements DaffOperationEntity<DaffConfigurableCartItem> {
|
|
120
|
+
daffState: DaffState;
|
|
121
|
+
daffErrors: any[];
|
|
122
|
+
daffTemp: boolean;
|
|
123
|
+
}
|
|
124
|
+
declare class DaffStatefulConfigurableCartItemFactory extends DaffModelFactory<DaffOperationEntity<DaffConfigurableCartItem>> {
|
|
125
|
+
constructor();
|
|
126
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffStatefulConfigurableCartItemFactory, never>;
|
|
127
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffStatefulConfigurableCartItemFactory>;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export { DaffCartStateTestingModule, DaffMockStatefulCartItem, DaffMockStatefulCompositeCartItem, DaffMockStatefulConfigurableCartItem, DaffStatefulCartItemFactory, DaffStatefulCompositeCartItemFactory, DaffStatefulConfigurableCartItemFactory, MockDaffCartFacade };
|
package/testing/index.d.ts
CHANGED
|
@@ -1 +1,169 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _daffodil_cart from '@daffodil/cart';
|
|
2
|
+
import { DaffCartShippingRate, DaffCartTotal, DaffCartTotalTypeEnum, DaffCart, DaffCartItem, DaffCartItemInputType, DaffCartItemDiscount, DaffConfigurableCartItem, DaffCompositeCartItem, DaffCartAddress, DaffCartPaymentMethod, DaffCartCoupon } from '@daffodil/cart';
|
|
3
|
+
import { DaffModelFactory } from '@daffodil/core/testing';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { DaffProductImage, DaffProduct } from '@daffodil/product';
|
|
6
|
+
|
|
7
|
+
declare class MockCartShippingRate implements DaffCartShippingRate {
|
|
8
|
+
id: string;
|
|
9
|
+
carrier: string;
|
|
10
|
+
carrier_title: string;
|
|
11
|
+
method_code: string;
|
|
12
|
+
method_title: string;
|
|
13
|
+
method_description: string;
|
|
14
|
+
price: number;
|
|
15
|
+
}
|
|
16
|
+
declare class DaffCartShippingRateFactory extends DaffModelFactory<DaffCartShippingRate> {
|
|
17
|
+
constructor();
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartShippingRateFactory, never>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartShippingRateFactory>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare class MockDaffCartTotal implements DaffCartTotal {
|
|
23
|
+
name: DaffCartTotalTypeEnum;
|
|
24
|
+
value: number;
|
|
25
|
+
label: string;
|
|
26
|
+
order: number;
|
|
27
|
+
}
|
|
28
|
+
declare class DaffCartTotalFactory extends DaffModelFactory<DaffCartTotal> {
|
|
29
|
+
constructor();
|
|
30
|
+
createGrandTotal(partial?: Partial<DaffCartTotal>): DaffCartTotal;
|
|
31
|
+
createSubtotalExcludingTax(partial?: Partial<DaffCartTotal>): DaffCartTotal;
|
|
32
|
+
createSubtotalIncludingTax(partial?: Partial<DaffCartTotal>): DaffCartTotal;
|
|
33
|
+
createSubtotalWithDiscountExcludingTax(partial?: Partial<DaffCartTotal>): DaffCartTotal;
|
|
34
|
+
createSubtotalWithDiscountIncludingTax(partial?: Partial<DaffCartTotal>): DaffCartTotal;
|
|
35
|
+
createTax(partial?: Partial<DaffCartTotal>): DaffCartTotal;
|
|
36
|
+
createDiscount(partial?: Partial<DaffCartTotal>): DaffCartTotal;
|
|
37
|
+
createShipping(partial?: Partial<DaffCartTotal>): DaffCartTotal;
|
|
38
|
+
createAllTotals(): Record<DaffCartTotal['name'], DaffCartTotal>;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartTotalFactory, never>;
|
|
40
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartTotalFactory>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare class MockCart implements DaffCart {
|
|
44
|
+
protected totalFactory: DaffCartTotalFactory;
|
|
45
|
+
protected shippingInformationFactory: DaffCartShippingRateFactory;
|
|
46
|
+
id: string;
|
|
47
|
+
coupons: any[];
|
|
48
|
+
items: any[];
|
|
49
|
+
billing_address: any;
|
|
50
|
+
shipping_address: any;
|
|
51
|
+
shipping_information: _daffodil_cart.DaffCartShippingRate;
|
|
52
|
+
totals: Record<string, _daffodil_cart.DaffCartTotal>;
|
|
53
|
+
payment: any;
|
|
54
|
+
available_shipping_methods: any[];
|
|
55
|
+
available_payment_methods: any[];
|
|
56
|
+
extra_attributes: {};
|
|
57
|
+
constructor(totalFactory: DaffCartTotalFactory, shippingInformationFactory: DaffCartShippingRateFactory);
|
|
58
|
+
}
|
|
59
|
+
declare class DaffCartFactory extends DaffModelFactory<DaffCart> {
|
|
60
|
+
constructor(totalFactory: DaffCartTotalFactory, shippingInformationFactory: DaffCartShippingRateFactory);
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartFactory, never>;
|
|
62
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartFactory>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @role mock
|
|
67
|
+
*/
|
|
68
|
+
declare class DaffMockCartItem implements DaffCartItem {
|
|
69
|
+
id: string;
|
|
70
|
+
type: DaffCartItemInputType;
|
|
71
|
+
product_id: string;
|
|
72
|
+
parent_item_id: string;
|
|
73
|
+
image: DaffProductImage;
|
|
74
|
+
sku: string;
|
|
75
|
+
name: string;
|
|
76
|
+
url: string;
|
|
77
|
+
qty: number;
|
|
78
|
+
price: number;
|
|
79
|
+
row_total: number;
|
|
80
|
+
in_stock: boolean;
|
|
81
|
+
_numberOfDiscounts: number;
|
|
82
|
+
discounts: DaffCartItemDiscount[];
|
|
83
|
+
private _discounts;
|
|
84
|
+
}
|
|
85
|
+
declare class DaffCartItemFactory extends DaffModelFactory<DaffCartItem> {
|
|
86
|
+
constructor();
|
|
87
|
+
fromProduct(product: DaffProduct): DaffCartItem;
|
|
88
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartItemFactory, never>;
|
|
89
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartItemFactory>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @role mock
|
|
94
|
+
*/
|
|
95
|
+
declare class DaffMockConfigurableCartItem extends DaffMockCartItem implements DaffConfigurableCartItem {
|
|
96
|
+
type: DaffCartItemInputType;
|
|
97
|
+
attributes: {
|
|
98
|
+
attribute_label: string;
|
|
99
|
+
value_label: string;
|
|
100
|
+
}[];
|
|
101
|
+
}
|
|
102
|
+
declare class DaffConfigurableCartItemFactory extends DaffModelFactory<DaffConfigurableCartItem> {
|
|
103
|
+
constructor();
|
|
104
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffConfigurableCartItemFactory, never>;
|
|
105
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffConfigurableCartItemFactory>;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @role mock
|
|
110
|
+
*/
|
|
111
|
+
declare class DaffMockCompositeCartItem extends DaffMockCartItem implements DaffCompositeCartItem {
|
|
112
|
+
type: DaffCartItemInputType;
|
|
113
|
+
options: {
|
|
114
|
+
id: string;
|
|
115
|
+
option_label: string;
|
|
116
|
+
value_label: string;
|
|
117
|
+
}[];
|
|
118
|
+
}
|
|
119
|
+
declare class DaffCompositeCartItemFactory extends DaffModelFactory<DaffCompositeCartItem> {
|
|
120
|
+
constructor();
|
|
121
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCompositeCartItemFactory, never>;
|
|
122
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCompositeCartItemFactory>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
declare class MockCartAddress implements DaffCartAddress {
|
|
126
|
+
id: string;
|
|
127
|
+
address_type: string;
|
|
128
|
+
email: string;
|
|
129
|
+
prefix: string;
|
|
130
|
+
firstname: string;
|
|
131
|
+
middlename: string;
|
|
132
|
+
lastname: string;
|
|
133
|
+
suffix: string;
|
|
134
|
+
company: string;
|
|
135
|
+
street: string;
|
|
136
|
+
city: string;
|
|
137
|
+
state: string;
|
|
138
|
+
region: string;
|
|
139
|
+
postcode: string;
|
|
140
|
+
country_id: string;
|
|
141
|
+
telephone: string;
|
|
142
|
+
}
|
|
143
|
+
declare class DaffCartAddressFactory extends DaffModelFactory<DaffCartAddress> {
|
|
144
|
+
constructor();
|
|
145
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartAddressFactory, never>;
|
|
146
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartAddressFactory>;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
declare class MockCartPayment implements DaffCartPaymentMethod {
|
|
150
|
+
method: string;
|
|
151
|
+
}
|
|
152
|
+
declare class DaffCartPaymentFactory extends DaffModelFactory<DaffCartPaymentMethod> {
|
|
153
|
+
constructor();
|
|
154
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartPaymentFactory, never>;
|
|
155
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartPaymentFactory>;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
declare class MockDaffCartCoupon implements DaffCartCoupon {
|
|
159
|
+
id: string;
|
|
160
|
+
code: string;
|
|
161
|
+
description: string;
|
|
162
|
+
}
|
|
163
|
+
declare class DaffCartCouponFactory extends DaffModelFactory<DaffCartCoupon> {
|
|
164
|
+
constructor();
|
|
165
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffCartCouponFactory, never>;
|
|
166
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffCartCouponFactory>;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export { DaffCartAddressFactory, DaffCartCouponFactory, DaffCartFactory, DaffCartItemFactory, DaffCartPaymentFactory, DaffCartShippingRateFactory, DaffCartTotalFactory, DaffCompositeCartItemFactory, DaffConfigurableCartItemFactory, DaffMockCartItem, DaffMockCompositeCartItem, DaffMockConfigurableCartItem, MockCart, MockCartAddress, MockCartPayment, MockCartShippingRate, MockDaffCartCoupon, MockDaffCartTotal };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when a cart driver call is sent with a cart identifier
|
|
4
|
-
* that cannot be found by the platform.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffCartNotFoundError extends DaffInheritableError implements DaffError {
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(message?: string);
|
|
9
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare enum DaffCartDriverErrorCodes {
|
|
2
|
-
CART_NOT_FOUND = "DAFF_CART_NOT_FOUND",
|
|
3
|
-
PRODUCT_OUT_OF_STOCK = "DAFF_PRODUCT_OUT_OF_STOCK",
|
|
4
|
-
INVALID_COUPON_CODE = "DAFF_INVALID_COUPON_CODE",
|
|
5
|
-
INVALID_COUNTRY = "DAFF_INVALID_COUNTRY",
|
|
6
|
-
INVALID_EMAIL = "DAFF_INVALID_EMAIL",
|
|
7
|
-
INVALID_REGION = "DAFF_INVALID_REGION",
|
|
8
|
-
INVALID_API_RESPONSE = "DAFF_INVALID_API_RESPONSE",
|
|
9
|
-
EXPIRED_PAYMENT_METHOD = "DAFF_EXPIRED_PAYMENT_METHOD",
|
|
10
|
-
ITEM_EXCEEDS_MAX_QTY = "ITEM_EXCEEDS_MAX_QTY",
|
|
11
|
-
UNAUTHORIZED_FOR_CART = "DAFF_UNAUTHORIZED_FOR_CART"
|
|
12
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when the payment token used for the payment method update has expired.
|
|
4
|
-
* This happens when the a place order request happens too long after payment update.
|
|
5
|
-
* The payment must be updated again before an order can be placed.
|
|
6
|
-
*/
|
|
7
|
-
export declare class DaffCartExpiredPaymentTokenError extends DaffInheritableError implements DaffError {
|
|
8
|
-
message: string;
|
|
9
|
-
readonly code: string;
|
|
10
|
-
constructor(message: string);
|
|
11
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when the platform's API response is missing required information
|
|
4
|
-
* or malformed in an unrecoverable way.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffCartInvalidAPIResponseError extends DaffInheritableError implements DaffError {
|
|
7
|
-
message: string;
|
|
8
|
-
readonly code: string;
|
|
9
|
-
constructor(message: string);
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when the specified country is invalid for the specified address
|
|
4
|
-
* or missing where it is required.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffInvalidCountryError extends DaffInheritableError implements DaffError {
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(message?: string);
|
|
9
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DaffCartCoupon } from '@daffodil/cart';
|
|
2
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
3
|
-
/**
|
|
4
|
-
* An error thrown when the specified coupon code cannot be applied to the cart.
|
|
5
|
-
* Either the coupon code does not exist or the required conditions are not met.
|
|
6
|
-
*/
|
|
7
|
-
export declare class DaffInvalidCouponCodeError extends DaffInheritableError implements DaffError {
|
|
8
|
-
coupon?: DaffCartCoupon['code'];
|
|
9
|
-
readonly code: string;
|
|
10
|
-
constructor(message?: string, coupon?: DaffCartCoupon['code']);
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when the email is not in the correct format.
|
|
4
|
-
*/
|
|
5
|
-
export declare class DaffInvalidEmailError extends DaffInheritableError implements DaffError {
|
|
6
|
-
readonly code: string;
|
|
7
|
-
constructor(message?: string);
|
|
8
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when the specified region is invalid for the specified address
|
|
4
|
-
* or missing where it is required.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffInvalidRegionError extends DaffInheritableError implements DaffError {
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(message?: string);
|
|
9
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when a cart item's requested quantity
|
|
4
|
-
* exceeds the maximum allowed by the platform.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffCartItemExceedsMaxQtyError extends DaffInheritableError implements DaffError {
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(message?: string);
|
|
9
|
-
}
|
package/driver/errors/map.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { DaffCartNotFoundError } from './cart-not-found';
|
|
2
|
-
import { DaffCartExpiredPaymentTokenError } from './expired-payment-token';
|
|
3
|
-
import { DaffCartInvalidAPIResponseError } from './invalid-api-response';
|
|
4
|
-
import { DaffInvalidCountryError } from './invalid-country';
|
|
5
|
-
import { DaffInvalidCouponCodeError } from './invalid-coupon-code';
|
|
6
|
-
import { DaffInvalidEmailError } from './invalid-email';
|
|
7
|
-
import { DaffInvalidRegionError } from './invalid-region';
|
|
8
|
-
import { DaffCartItemExceedsMaxQtyError } from './item-exceeds-max-qty';
|
|
9
|
-
import { DaffProductOutOfStockError } from './product-out-of-stock';
|
|
10
|
-
import { DaffUnauthorizedForCartError } from './unauthorized-for-cart';
|
|
11
|
-
/**
|
|
12
|
-
* A mapping from error codes to error class constructors.
|
|
13
|
-
*/
|
|
14
|
-
export declare const DaffCartDriverErrorMap: {
|
|
15
|
-
DAFF_CART_NOT_FOUND: typeof DaffCartNotFoundError;
|
|
16
|
-
DAFF_PRODUCT_OUT_OF_STOCK: typeof DaffProductOutOfStockError;
|
|
17
|
-
DAFF_INVALID_COUPON_CODE: typeof DaffInvalidCouponCodeError;
|
|
18
|
-
DAFF_INVALID_COUNTRY: typeof DaffInvalidCountryError;
|
|
19
|
-
DAFF_INVALID_EMAIL: typeof DaffInvalidEmailError;
|
|
20
|
-
DAFF_INVALID_REGION: typeof DaffInvalidRegionError;
|
|
21
|
-
DAFF_INVALID_API_RESPONSE: typeof DaffCartInvalidAPIResponseError;
|
|
22
|
-
DAFF_EXPIRED_PAYMENT_METHOD: typeof DaffCartExpiredPaymentTokenError;
|
|
23
|
-
ITEM_EXCEEDS_MAX_QTY: typeof DaffCartItemExceedsMaxQtyError;
|
|
24
|
-
DAFF_UNAUTHORIZED_FOR_CART: typeof DaffUnauthorizedForCartError;
|
|
25
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when a cart item's requested quantity
|
|
4
|
-
* exceeds the amount currently in stock.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffProductOutOfStockError extends DaffInheritableError implements DaffError {
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(message?: string);
|
|
9
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { DaffCartDriverErrorCodes } from './codes.enum';
|
|
2
|
-
export { DaffCartDriverErrorMap } from './map';
|
|
3
|
-
export { DaffCartNotFoundError } from './cart-not-found';
|
|
4
|
-
export { DaffCartExpiredPaymentTokenError } from './expired-payment-token';
|
|
5
|
-
export { DaffCartInvalidAPIResponseError } from './invalid-api-response';
|
|
6
|
-
export { DaffInvalidCountryError } from './invalid-country';
|
|
7
|
-
export { DaffInvalidCouponCodeError } from './invalid-coupon-code';
|
|
8
|
-
export { DaffInvalidEmailError } from './invalid-email';
|
|
9
|
-
export { DaffInvalidRegionError } from './invalid-region';
|
|
10
|
-
export { DaffProductOutOfStockError } from './product-out-of-stock';
|
|
11
|
-
export { DaffCartItemExceedsMaxQtyError } from './item-exceeds-max-qty';
|
|
12
|
-
export { DaffUnauthorizedForCartError } from './unauthorized-for-cart';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when the current user is not authorized for the requested cart.
|
|
4
|
-
*/
|
|
5
|
-
export declare class DaffUnauthorizedForCartError extends DaffInheritableError implements DaffError {
|
|
6
|
-
readonly code: string;
|
|
7
|
-
constructor(message?: string);
|
|
8
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { RequestInfo } from 'angular-in-memory-web-api';
|
|
2
|
-
import { DaffCartFactory } from '@daffodil/cart/testing';
|
|
3
|
-
import { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
|
|
4
|
-
import { DaffInMemoryBackendProductService } from '@daffodil/product/driver/in-memory';
|
|
5
|
-
import { DaffCartInMemoryExtraAttributesHook } from '../../injection-tokens/public_api';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* @inheritdoc
|
|
9
|
-
*/
|
|
10
|
-
export declare class DaffInMemoryBackendCartService implements DaffInMemorySingleRouteableBackend {
|
|
11
|
-
private cartFactory;
|
|
12
|
-
private extraFieldsHook;
|
|
13
|
-
private productBackend;
|
|
14
|
-
readonly collectionName = "cart";
|
|
15
|
-
constructor(cartFactory: DaffCartFactory, extraFieldsHook: DaffCartInMemoryExtraAttributesHook, productBackend: DaffInMemoryBackendProductService);
|
|
16
|
-
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
17
|
-
post(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
18
|
-
/**
|
|
19
|
-
* Gets whatever follows the cart ID section of the request URL.
|
|
20
|
-
*/
|
|
21
|
-
private getAction;
|
|
22
|
-
private clear;
|
|
23
|
-
private create;
|
|
24
|
-
private merge;
|
|
25
|
-
private getCart;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartService, never>;
|
|
27
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryBackendCartService>;
|
|
28
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { RequestInfo } from 'angular-in-memory-web-api';
|
|
2
|
-
import { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
|
|
3
|
-
import { DaffCartInMemoryExtraAttributesHook } from '../../injection-tokens/public_api';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* @inheritdoc
|
|
7
|
-
*/
|
|
8
|
-
export declare class DaffInMemoryBackendCartAddressService implements DaffInMemorySingleRouteableBackend {
|
|
9
|
-
private extraFieldsHook;
|
|
10
|
-
readonly collectionName = "cart-address";
|
|
11
|
-
constructor(extraFieldsHook: DaffCartInMemoryExtraAttributesHook);
|
|
12
|
-
put(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
13
|
-
private getCart;
|
|
14
|
-
private updateAddress;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartAddressService, never>;
|
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryBackendCartAddressService>;
|
|
17
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { RequestInfo } from 'angular-in-memory-web-api';
|
|
2
|
-
import { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
|
|
3
|
-
import { DaffCartInMemoryExtraAttributesHook } from '../../injection-tokens/public_api';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* @inheritdoc
|
|
7
|
-
*/
|
|
8
|
-
export declare class DaffInMemoryBackendCartBillingAddressService implements DaffInMemorySingleRouteableBackend {
|
|
9
|
-
private extraFieldsHook;
|
|
10
|
-
readonly collectionName = "cart-billing-address";
|
|
11
|
-
constructor(extraFieldsHook: DaffCartInMemoryExtraAttributesHook);
|
|
12
|
-
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
13
|
-
put(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
14
|
-
private getCart;
|
|
15
|
-
private getBillingAddress;
|
|
16
|
-
private updateBillingAddress;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartBillingAddressService, never>;
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryBackendCartBillingAddressService>;
|
|
19
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { RequestInfo } from 'angular-in-memory-web-api';
|
|
2
|
-
import { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
|
|
3
|
-
import { DaffCartInMemoryExtraAttributesHook } from '../../injection-tokens/public_api';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* @inheritdoc
|
|
7
|
-
*/
|
|
8
|
-
export declare class DaffInMemoryBackendCartCouponService implements DaffInMemorySingleRouteableBackend {
|
|
9
|
-
private extraFieldsHook;
|
|
10
|
-
readonly collectionName = "cart-coupon";
|
|
11
|
-
constructor(extraFieldsHook: DaffCartInMemoryExtraAttributesHook);
|
|
12
|
-
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
13
|
-
post(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
14
|
-
delete(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
15
|
-
/**
|
|
16
|
-
* Gets whatever follows the cart ID section of the request URL.
|
|
17
|
-
*/
|
|
18
|
-
private getAction;
|
|
19
|
-
private getCart;
|
|
20
|
-
private listCoupons;
|
|
21
|
-
private applyCoupon;
|
|
22
|
-
private removeCoupon;
|
|
23
|
-
private removeAllCoupons;
|
|
24
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartCouponService, never>;
|
|
25
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryBackendCartCouponService>;
|
|
26
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { RequestInfo } from 'angular-in-memory-web-api';
|
|
2
|
-
import { DaffCartItemFactory } from '@daffodil/cart/testing';
|
|
3
|
-
import { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
|
|
4
|
-
import { DaffInMemoryBackendProductService } from '@daffodil/product/driver/in-memory';
|
|
5
|
-
import { DaffCartInMemoryExtraAttributesHook } from '../../injection-tokens/public_api';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* @inheritdoc
|
|
9
|
-
*/
|
|
10
|
-
export declare class DaffInMemoryBackendCartItemsService implements DaffInMemorySingleRouteableBackend {
|
|
11
|
-
private cartItemFactory;
|
|
12
|
-
private extraFieldsHook;
|
|
13
|
-
private productBackend;
|
|
14
|
-
readonly collectionName = "cart-items";
|
|
15
|
-
constructor(cartItemFactory: DaffCartItemFactory, extraFieldsHook: DaffCartInMemoryExtraAttributesHook, productBackend: DaffInMemoryBackendProductService);
|
|
16
|
-
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
17
|
-
put(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
18
|
-
post(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
19
|
-
delete(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
20
|
-
/**
|
|
21
|
-
* Gets whatever follows the cart ID section of the request URL.
|
|
22
|
-
*/
|
|
23
|
-
private getAction;
|
|
24
|
-
private getCart;
|
|
25
|
-
private transformItemInput;
|
|
26
|
-
private listItems;
|
|
27
|
-
private getItem;
|
|
28
|
-
private updateItem;
|
|
29
|
-
private addItem;
|
|
30
|
-
private deleteItem;
|
|
31
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartItemsService, never>;
|
|
32
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryBackendCartItemsService>;
|
|
33
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { RequestInfo } from 'angular-in-memory-web-api';
|
|
2
|
-
import { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* @inheritdoc
|
|
6
|
-
*/
|
|
7
|
-
export declare class DaffInMemoryBackendCartOrderService implements DaffInMemorySingleRouteableBackend {
|
|
8
|
-
readonly collectionName = "cart-order";
|
|
9
|
-
post(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
10
|
-
private placeOrder;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartOrderService, never>;
|
|
12
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryBackendCartOrderService>;
|
|
13
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { RequestInfo } from 'angular-in-memory-web-api';
|
|
2
|
-
import { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
|
|
3
|
-
import { DaffCartInMemoryExtraAttributesHook } from '../../injection-tokens/public_api';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* @inheritdoc
|
|
7
|
-
*/
|
|
8
|
-
export declare class DaffInMemoryBackendCartPaymentService implements DaffInMemorySingleRouteableBackend {
|
|
9
|
-
private extraFieldsHook;
|
|
10
|
-
readonly collectionName = "cart-payment";
|
|
11
|
-
constructor(extraFieldsHook: DaffCartInMemoryExtraAttributesHook);
|
|
12
|
-
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
13
|
-
put(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
14
|
-
delete(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
15
|
-
private getCart;
|
|
16
|
-
private getPayment;
|
|
17
|
-
private updatePayment;
|
|
18
|
-
private removePayment;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartPaymentService, never>;
|
|
20
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryBackendCartPaymentService>;
|
|
21
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { RequestInfo } from 'angular-in-memory-web-api';
|
|
2
|
-
import { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
/**
|
|
5
|
-
* @inheritdoc
|
|
6
|
-
*/
|
|
7
|
-
export declare class DaffInMemoryBackendCartPaymentMethodsService implements DaffInMemorySingleRouteableBackend {
|
|
8
|
-
readonly collectionName = "cart-payment-methods";
|
|
9
|
-
get(reqInfo: RequestInfo): import("rxjs").Observable<any>;
|
|
10
|
-
private getCart;
|
|
11
|
-
private listPaymentMethods;
|
|
12
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffInMemoryBackendCartPaymentMethodsService, never>;
|
|
13
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffInMemoryBackendCartPaymentMethodsService>;
|
|
14
|
-
}
|