@daffodil/order 0.39.13 → 0.40.1
Sign up to get free protection for your applications and to get access to all the features.
- package/daffodil-order.d.ts +1 -0
- package/driver/daffodil-order-driver.d.ts +1 -0
- package/driver/in-memory/backend/order.service.d.ts +3 -0
- package/driver/in-memory/daffodil-order-driver-in-memory.d.ts +1 -0
- package/driver/in-memory/drivers/order-driver.module.d.ts +5 -0
- package/driver/in-memory/drivers/order.service.d.ts +3 -0
- package/driver/in-memory/package.json +5 -6
- package/driver/magento/2.4.0/README.md +5 -0
- package/driver/magento/2.4.0/daffodil-order-driver-magento-2.4.0.d.ts +1 -0
- package/driver/magento/2.4.0/errors/transform.d.ts +1 -1
- package/driver/magento/2.4.0/order-driver.module.d.ts +5 -0
- package/driver/magento/2.4.0/order.service.d.ts +4 -1
- package/driver/magento/2.4.0/package.json +5 -6
- package/driver/magento/2.4.0/queries/fragments/order-address.d.ts +1 -1
- package/driver/magento/2.4.0/queries/fragments/order-invoice.d.ts +1 -1
- package/driver/magento/2.4.0/queries/fragments/order-item.d.ts +1 -1
- package/driver/magento/2.4.0/queries/fragments/order-payment.d.ts +1 -1
- package/driver/magento/2.4.0/queries/fragments/order-shipment-item.d.ts +1 -1
- package/driver/magento/2.4.0/queries/fragments/order-shipment-tracking.d.ts +1 -1
- package/driver/magento/2.4.0/queries/fragments/order-shipment.d.ts +1 -1
- package/driver/magento/2.4.0/queries/fragments/order.d.ts +1 -1
- package/driver/magento/2.4.0/queries/get-guest-orders.d.ts +1 -1
- package/driver/magento/2.4.1/README.md +5 -0
- package/driver/magento/2.4.1/daffodil-order-driver-magento-2.4.1.d.ts +1 -0
- package/driver/magento/2.4.1/errors/transform.d.ts +1 -1
- package/driver/magento/2.4.1/order-driver.module.d.ts +5 -0
- package/driver/magento/2.4.1/order.service.d.ts +4 -1
- package/driver/magento/2.4.1/package.json +5 -6
- package/driver/magento/2.4.1/queries/fragments/order-address.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-credit-item.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-credit-total.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-credit.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-invoice-item.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-invoice-total.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-invoice.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-item.d.ts +2 -2
- package/driver/magento/2.4.1/queries/fragments/order-payment.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-shipment-item.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-shipment-tracking.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-shipment.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order-total.d.ts +1 -1
- package/driver/magento/2.4.1/queries/fragments/order.d.ts +1 -1
- package/driver/magento/2.4.1/queries/get-guest-orders.d.ts +1 -1
- package/driver/package.json +5 -6
- package/driver/testing/daffodil-order-driver-testing.d.ts +1 -0
- package/driver/testing/drivers/order-driver.module.d.ts +5 -0
- package/driver/testing/drivers/order.service.d.ts +3 -0
- package/driver/testing/package.json +5 -6
- package/{esm2015/daffodil-order.js → esm2020/daffodil-order.mjs} +0 -0
- package/{esm2015/driver/daffodil-order-driver.js → esm2020/driver/daffodil-order-driver.mjs} +0 -0
- package/{esm2015/driver/errors/invalid-api-response.js → esm2020/driver/errors/invalid-api-response.mjs} +0 -0
- package/{esm2015/driver/errors/order-not-found.js → esm2020/driver/errors/order-not-found.mjs} +0 -0
- package/{esm2015/driver/errors/public_api.js → esm2020/driver/errors/public_api.mjs} +0 -0
- package/esm2020/driver/in-memory/backend/order.service.mjs +57 -0
- package/{esm2015/driver/in-memory/daffodil-order-driver-in-memory.js → esm2020/driver/in-memory/daffodil-order-driver-in-memory.mjs} +0 -0
- package/esm2020/driver/in-memory/drivers/order-driver.module.mjs +32 -0
- package/esm2020/driver/in-memory/drivers/order.service.mjs +28 -0
- package/{esm2015/driver/in-memory/drivers/public_api.js → esm2020/driver/in-memory/drivers/public_api.mjs} +0 -0
- package/{esm2015/driver/in-memory/index.js → esm2020/driver/in-memory/index.mjs} +0 -0
- package/{esm2015/driver/in-memory/public_api.js → esm2020/driver/in-memory/public_api.mjs} +0 -0
- package/{esm2015/driver/index.js → esm2020/driver/index.mjs} +0 -0
- package/{esm2015/driver/interfaces/order-service.interface.js → esm2020/driver/interfaces/order-service.interface.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/daffodil-order-driver-magento-2.4.0.js → esm2020/driver/magento/2.4.0/daffodil-order-driver-magento-2.4.0.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/errors/codes.js → esm2020/driver/magento/2.4.0/errors/codes.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/errors/map.js → esm2020/driver/magento/2.4.0/errors/map.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/errors/transform.js → esm2020/driver/magento/2.4.0/errors/transform.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/index.js → esm2020/driver/magento/2.4.0/index.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/injection-tokens/fragments/order.js → esm2020/driver/magento/2.4.0/injection-tokens/fragments/order.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/injection-tokens/public_api.js → esm2020/driver/magento/2.4.0/injection-tokens/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order-address.js → esm2020/driver/magento/2.4.0/models/responses/order-address.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order-invoice.js → esm2020/driver/magento/2.4.0/models/responses/order-invoice.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order-item.js → esm2020/driver/magento/2.4.0/models/responses/order-item.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order-payment.js → esm2020/driver/magento/2.4.0/models/responses/order-payment.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order-shipment-item.js → esm2020/driver/magento/2.4.0/models/responses/order-shipment-item.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order-shipment-tracking.js → esm2020/driver/magento/2.4.0/models/responses/order-shipment-tracking.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order-shipment.js → esm2020/driver/magento/2.4.0/models/responses/order-shipment.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/order.js → esm2020/driver/magento/2.4.0/models/responses/order.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/models/responses/public_api.js → esm2020/driver/magento/2.4.0/models/responses/public_api.mjs} +0 -0
- package/esm2020/driver/magento/2.4.0/order-driver.module.mjs +32 -0
- package/esm2020/driver/magento/2.4.0/order.service.mjs +54 -0
- package/{esm2015/driver/magento/2.4.0/public_api.js → esm2020/driver/magento/2.4.0/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/queries/fragments/order-address.js → esm2020/driver/magento/2.4.0/queries/fragments/order-address.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.0/queries/fragments/order-invoice.js → esm2020/driver/magento/2.4.0/queries/fragments/order-invoice.mjs} +2 -2
- package/esm2020/driver/magento/2.4.0/queries/fragments/order-item.mjs +27 -0
- package/{esm2015/driver/magento/2.4.0/queries/fragments/order-payment.js → esm2020/driver/magento/2.4.0/queries/fragments/order-payment.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.0/queries/fragments/order-shipment-item.js → esm2020/driver/magento/2.4.0/queries/fragments/order-shipment-item.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.0/queries/fragments/order-shipment-tracking.js → esm2020/driver/magento/2.4.0/queries/fragments/order-shipment-tracking.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.0/queries/fragments/order-shipment.js → esm2020/driver/magento/2.4.0/queries/fragments/order-shipment.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.0/queries/fragments/order.js → esm2020/driver/magento/2.4.0/queries/fragments/order.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.0/queries/fragments/public_api.js → esm2020/driver/magento/2.4.0/queries/fragments/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/queries/get-guest-orders.js → esm2020/driver/magento/2.4.0/queries/get-guest-orders.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.0/queries/public_api.js → esm2020/driver/magento/2.4.0/queries/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/queries/responses/get-guest-orders.js → esm2020/driver/magento/2.4.0/queries/responses/get-guest-orders.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/queries/responses/public_api.js → esm2020/driver/magento/2.4.0/queries/responses/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.0/transforms/responses/order.js → esm2020/driver/magento/2.4.0/transforms/responses/order.mjs} +0 -0
- package/esm2020/driver/magento/2.4.0/validators/get-orders.mjs +17 -0
- package/{esm2015/driver/magento/2.4.0/validators/public_api.js → esm2020/driver/magento/2.4.0/validators/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/daffodil-order-driver-magento-2.4.1.js → esm2020/driver/magento/2.4.1/daffodil-order-driver-magento-2.4.1.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/errors/codes.js → esm2020/driver/magento/2.4.1/errors/codes.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/errors/map.js → esm2020/driver/magento/2.4.1/errors/map.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/errors/transform.js → esm2020/driver/magento/2.4.1/errors/transform.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/index.js → esm2020/driver/magento/2.4.1/index.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/injection-tokens/fragments/order.js → esm2020/driver/magento/2.4.1/injection-tokens/fragments/order.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/injection-tokens/public_api.js → esm2020/driver/magento/2.4.1/injection-tokens/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/discount.js → esm2020/driver/magento/2.4.1/models/responses/discount.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-address.js → esm2020/driver/magento/2.4.1/models/responses/order-address.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-credit-item.js → esm2020/driver/magento/2.4.1/models/responses/order-credit-item.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-credit.js → esm2020/driver/magento/2.4.1/models/responses/order-credit.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-invoice-item.js → esm2020/driver/magento/2.4.1/models/responses/order-invoice-item.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-invoice.js → esm2020/driver/magento/2.4.1/models/responses/order-invoice.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-item.js → esm2020/driver/magento/2.4.1/models/responses/order-item.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-payment.js → esm2020/driver/magento/2.4.1/models/responses/order-payment.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-shipment-item.js → esm2020/driver/magento/2.4.1/models/responses/order-shipment-item.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-shipment-tracking.js → esm2020/driver/magento/2.4.1/models/responses/order-shipment-tracking.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-shipment.js → esm2020/driver/magento/2.4.1/models/responses/order-shipment.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order-total.js → esm2020/driver/magento/2.4.1/models/responses/order-total.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/order.js → esm2020/driver/magento/2.4.1/models/responses/order.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/models/responses/public_api.js → esm2020/driver/magento/2.4.1/models/responses/public_api.mjs} +0 -0
- package/esm2020/driver/magento/2.4.1/order-driver.module.mjs +32 -0
- package/esm2020/driver/magento/2.4.1/order.service.mjs +54 -0
- package/{esm2015/driver/magento/2.4.1/public_api.js → esm2020/driver/magento/2.4.1/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-address.js → esm2020/driver/magento/2.4.1/queries/fragments/order-address.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-credit-item.js → esm2020/driver/magento/2.4.1/queries/fragments/order-credit-item.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-credit-total.js → esm2020/driver/magento/2.4.1/queries/fragments/order-credit-total.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-credit.js → esm2020/driver/magento/2.4.1/queries/fragments/order-credit.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-invoice-item.js → esm2020/driver/magento/2.4.1/queries/fragments/order-invoice-item.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-invoice-total.js → esm2020/driver/magento/2.4.1/queries/fragments/order-invoice-total.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-invoice.js → esm2020/driver/magento/2.4.1/queries/fragments/order-invoice.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-item.js → esm2020/driver/magento/2.4.1/queries/fragments/order-item.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-payment.js → esm2020/driver/magento/2.4.1/queries/fragments/order-payment.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-shipment-item.js → esm2020/driver/magento/2.4.1/queries/fragments/order-shipment-item.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-shipment-tracking.js → esm2020/driver/magento/2.4.1/queries/fragments/order-shipment-tracking.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-shipment.js → esm2020/driver/magento/2.4.1/queries/fragments/order-shipment.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order-total.js → esm2020/driver/magento/2.4.1/queries/fragments/order-total.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/order.js → esm2020/driver/magento/2.4.1/queries/fragments/order.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/fragments/public_api.js → esm2020/driver/magento/2.4.1/queries/fragments/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/queries/get-guest-orders.js → esm2020/driver/magento/2.4.1/queries/get-guest-orders.mjs} +2 -2
- package/{esm2015/driver/magento/2.4.1/queries/public_api.js → esm2020/driver/magento/2.4.1/queries/public_api.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/queries/responses/get-guest-orders.js → esm2020/driver/magento/2.4.1/queries/responses/get-guest-orders.mjs} +0 -0
- package/{esm2015/driver/magento/2.4.1/queries/responses/public_api.js → esm2020/driver/magento/2.4.1/queries/responses/public_api.mjs} +0 -0
- package/esm2020/driver/magento/2.4.1/transforms/responses/order.mjs +234 -0
- package/esm2020/driver/magento/2.4.1/validators/get-orders.mjs +17 -0
- package/{esm2015/driver/magento/2.4.1/validators/public_api.js → esm2020/driver/magento/2.4.1/validators/public_api.mjs} +0 -0
- package/{esm2015/driver/testing/daffodil-order-driver-testing.js → esm2020/driver/testing/daffodil-order-driver-testing.mjs} +0 -0
- package/esm2020/driver/testing/drivers/order-driver.module.mjs +32 -0
- package/esm2020/driver/testing/drivers/order.service.mjs +28 -0
- package/{esm2015/driver/testing/drivers/public_api.js → esm2020/driver/testing/drivers/public_api.mjs} +0 -0
- package/{esm2015/driver/testing/index.js → esm2020/driver/testing/index.mjs} +0 -0
- package/{esm2015/driver/testing/public_api.js → esm2020/driver/testing/public_api.mjs} +0 -0
- package/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/{esm2015/injection-tokens/error-matcher.token.js → esm2020/injection-tokens/error-matcher.token.mjs} +0 -0
- package/{esm2015/injection-tokens/public_api.js → esm2020/injection-tokens/public_api.mjs} +0 -0
- package/{esm2015/models/composite-order-item.js → esm2020/models/composite-order-item.mjs} +0 -0
- package/{esm2015/models/configurable-order-item.js → esm2020/models/configurable-order-item.mjs} +0 -0
- package/{esm2015/models/order-address.js → esm2020/models/order-address.mjs} +0 -0
- package/{esm2015/models/order-coupon.js → esm2020/models/order-coupon.mjs} +0 -0
- package/{esm2015/models/order-credit.js → esm2020/models/order-credit.mjs} +0 -0
- package/{esm2015/models/order-invoice.js → esm2020/models/order-invoice.mjs} +0 -0
- package/{esm2015/models/order-item.js → esm2020/models/order-item.mjs} +0 -0
- package/{esm2015/models/order-payment.js → esm2020/models/order-payment.mjs} +0 -0
- package/{esm2015/models/order-shipment-item.js → esm2020/models/order-shipment-item.mjs} +0 -0
- package/{esm2015/models/order-shipment-tracking.js → esm2020/models/order-shipment-tracking.mjs} +0 -0
- package/{esm2015/models/order-shipment.js → esm2020/models/order-shipment.mjs} +0 -0
- package/{esm2015/models/order-shipping-method.js → esm2020/models/order-shipping-method.mjs} +0 -0
- package/{esm2015/models/order-total.js → esm2020/models/order-total.mjs} +0 -0
- package/{esm2015/models/order.js → esm2020/models/order.mjs} +0 -0
- package/{esm2015/models/public_api.js → esm2020/models/public_api.mjs} +0 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- package/{esm2015/routing/daffodil-order-routing.js → esm2020/routing/daffodil-order-routing.mjs} +0 -0
- package/{esm2015/routing/guards/placed-order/placed-order-guard-redirect.token.js → esm2020/routing/guards/placed-order/placed-order-guard-redirect.token.mjs} +0 -0
- package/esm2020/routing/guards/placed-order/placed-order.guard.mjs +38 -0
- package/{esm2015/routing/guards/public_api.js → esm2020/routing/guards/public_api.mjs} +0 -0
- package/{esm2015/routing/index.js → esm2020/routing/index.mjs} +0 -0
- package/esm2020/routing/order-routing.module.mjs +19 -0
- package/{esm2015/routing/public_api.js → esm2020/routing/public_api.mjs} +0 -0
- package/{esm2015/state/actions/order.actions.js → esm2020/state/actions/order.actions.mjs} +0 -0
- package/esm2020/state/daffodil-order-state.mjs +5 -0
- package/esm2020/state/effects/order.effects.mjs +36 -0
- package/{esm2015/state/facades/order/order-facade.interface.js → esm2020/state/facades/order/order-facade.interface.mjs} +0 -0
- package/{esm2015/state/facades/order/order.facade.js → esm2020/state/facades/order/order.facade.mjs} +9 -11
- package/{esm2015/state/facades/public_api.js → esm2020/state/facades/public_api.mjs} +0 -0
- package/{esm2015/state/index.js → esm2020/state/index.mjs} +0 -0
- package/esm2020/state/order-state.module.mjs +33 -0
- package/{esm2015/state/public_api.js → esm2020/state/public_api.mjs} +0 -0
- package/{esm2015/state/reducers/order/order-initial-state.js → esm2020/state/reducers/order/order-initial-state.mjs} +0 -0
- package/{esm2015/state/reducers/order/order-reducer.interface.js → esm2020/state/reducers/order/order-reducer.interface.mjs} +0 -0
- package/esm2020/state/reducers/order/order.reducer.mjs +32 -0
- package/{esm2015/state/reducers/order/public_api.js → esm2020/state/reducers/order/public_api.mjs} +0 -0
- package/{esm2015/state/reducers/order-entities/order-entities-adapter.js → esm2020/state/reducers/order-entities/order-entities-adapter.mjs} +5 -7
- package/{esm2015/state/reducers/order-entities/order-entities-initial-state.js → esm2020/state/reducers/order-entities/order-entities-initial-state.mjs} +0 -0
- package/{esm2015/state/reducers/order-entities/order-entities-state.interface.js → esm2020/state/reducers/order-entities/order-entities-state.interface.mjs} +0 -0
- package/{esm2015/state/reducers/order-entities/order-entities.reducer.js → esm2020/state/reducers/order-entities/order-entities.reducer.mjs} +0 -0
- package/{esm2015/state/reducers/order-entities/public_api.js → esm2020/state/reducers/order-entities/public_api.mjs} +0 -0
- package/{esm2015/state/reducers/order-reducers.interface.js → esm2020/state/reducers/order-reducers.interface.mjs} +0 -0
- package/{esm2015/state/reducers/order-reducers.js → esm2020/state/reducers/order-reducers.mjs} +0 -0
- package/{esm2015/state/reducers/order-store-feature-key.js → esm2020/state/reducers/order-store-feature-key.mjs} +0 -0
- package/{esm2015/state/reducers/public_api.js → esm2020/state/reducers/public_api.mjs} +0 -0
- package/esm2020/state/selectors/order-all.selector.mjs +12 -0
- package/esm2020/state/selectors/order-entities.selector.mjs +76 -0
- package/esm2020/state/selectors/order-feature.selector.mjs +9 -0
- package/esm2020/state/selectors/order.selector.mjs +18 -0
- package/{esm2015/state/selectors/public_api.js → esm2020/state/selectors/public_api.mjs} +0 -0
- package/{esm2015/state/testing/daffodil-order-state-testing.js → esm2020/state/testing/daffodil-order-state-testing.mjs} +0 -0
- package/{esm2015/state/testing/index.js → esm2020/state/testing/index.mjs} +0 -0
- package/esm2020/state/testing/mock-order-facade.mjs +81 -0
- package/esm2020/state/testing/order-testing.module.mjs +20 -0
- package/{esm2015/state/testing/public_api.js → esm2020/state/testing/public_api.mjs} +0 -0
- package/{esm2015/testing/daffodil-order-testing.js → esm2020/testing/daffodil-order-testing.mjs} +0 -0
- package/esm2020/testing/factories/composite-order-item.factory.mjs +36 -0
- package/esm2020/testing/factories/configurable-order-item.factory.mjs +35 -0
- package/esm2020/testing/factories/order-address.factory.mjs +25 -0
- package/esm2020/testing/factories/order-coupon.factory.mjs +24 -0
- package/esm2020/testing/factories/order-invoice.factory.mjs +28 -0
- package/{esm2015/testing/factories/order-item.factory.js → esm2020/testing/factories/order-item.factory.mjs} +9 -9
- package/{esm2015/testing/factories/order-payment.factory.js → esm2020/testing/factories/order-payment.factory.mjs} +9 -9
- package/esm2020/testing/factories/order-shipment-item.factory.mjs +25 -0
- package/esm2020/testing/factories/order-shipment-tracking.factory.mjs +28 -0
- package/esm2020/testing/factories/order-shipment.factory.mjs +30 -0
- package/{esm2015/testing/factories/order-shipping-rate.factory.js → esm2020/testing/factories/order-shipping-rate.factory.mjs} +9 -9
- package/esm2020/testing/factories/order-total.factory.mjs +28 -0
- package/{esm2015/testing/factories/order.factory.js → esm2020/testing/factories/order.factory.mjs} +9 -9
- package/{esm2015/testing/factories/public_api.js → esm2020/testing/factories/public_api.mjs} +0 -0
- package/{esm2015/testing/helpers/order-helper.js → esm2020/testing/helpers/order-helper.mjs} +0 -0
- package/{esm2015/testing/helpers/public_api.js → esm2020/testing/helpers/public_api.mjs} +0 -0
- package/{esm2015/testing/index.js → esm2020/testing/index.mjs} +0 -0
- package/{esm2015/testing/public_api.js → esm2020/testing/public_api.mjs} +0 -0
- package/fesm2015/daffodil-order-driver-in-memory.mjs +117 -0
- package/fesm2015/daffodil-order-driver-in-memory.mjs.map +1 -0
- package/fesm2015/{daffodil-order-driver-magento-2.4.0.js → daffodil-order-driver-magento-2.4.0.mjs} +31 -21
- package/fesm2015/daffodil-order-driver-magento-2.4.0.mjs.map +1 -0
- package/fesm2015/{daffodil-order-driver-magento-2.4.1.js → daffodil-order-driver-magento-2.4.1.mjs} +31 -21
- package/fesm2015/daffodil-order-driver-magento-2.4.1.mjs.map +1 -0
- package/fesm2015/daffodil-order-driver-testing.mjs +63 -0
- package/fesm2015/daffodil-order-driver-testing.mjs.map +1 -0
- package/fesm2015/{daffodil-order-driver.js → daffodil-order-driver.mjs} +1 -1
- package/fesm2015/daffodil-order-driver.mjs.map +1 -0
- package/fesm2015/daffodil-order-routing.mjs +62 -0
- package/fesm2015/daffodil-order-routing.mjs.map +1 -0
- package/fesm2015/{daffodil-order-state-testing.js → daffodil-order-state-testing.mjs} +22 -13
- package/fesm2015/daffodil-order-state-testing.mjs.map +1 -0
- package/fesm2015/{daffodil-order-state.js → daffodil-order-state.mjs} +64 -73
- package/fesm2015/daffodil-order-state.mjs.map +1 -0
- package/fesm2015/daffodil-order-testing.mjs +387 -0
- package/fesm2015/daffodil-order-testing.mjs.map +1 -0
- package/fesm2015/{daffodil-order.js → daffodil-order.mjs} +1 -1
- package/fesm2015/daffodil-order.mjs.map +1 -0
- package/fesm2020/daffodil-order-driver-in-memory.mjs +117 -0
- package/fesm2020/daffodil-order-driver-in-memory.mjs.map +1 -0
- package/fesm2020/daffodil-order-driver-magento-2.4.0.mjs +459 -0
- package/fesm2020/daffodil-order-driver-magento-2.4.0.mjs.map +1 -0
- package/fesm2020/daffodil-order-driver-magento-2.4.1.mjs +646 -0
- package/fesm2020/daffodil-order-driver-magento-2.4.1.mjs.map +1 -0
- package/fesm2020/daffodil-order-driver-testing.mjs +63 -0
- package/fesm2020/daffodil-order-driver-testing.mjs.map +1 -0
- package/fesm2020/daffodil-order-driver.mjs +27 -0
- package/fesm2020/daffodil-order-driver.mjs.map +1 -0
- package/fesm2020/daffodil-order-routing.mjs +60 -0
- package/fesm2020/daffodil-order-routing.mjs.map +1 -0
- package/fesm2020/daffodil-order-state-testing.mjs +105 -0
- package/fesm2020/daffodil-order-state-testing.mjs.map +1 -0
- package/fesm2020/daffodil-order-state.mjs +400 -0
- package/fesm2020/daffodil-order-state.mjs.map +1 -0
- package/fesm2020/daffodil-order-testing.mjs +387 -0
- package/fesm2020/daffodil-order-testing.mjs.map +1 -0
- package/fesm2020/daffodil-order.mjs +31 -0
- package/fesm2020/daffodil-order.mjs.map +1 -0
- package/package.json +98 -14
- package/routing/daffodil-order-routing.d.ts +1 -0
- package/routing/guards/placed-order/placed-order.guard.d.ts +3 -0
- package/routing/order-routing.module.d.ts +4 -0
- package/routing/package.json +5 -6
- package/state/daffodil-order-state.d.ts +1 -1
- package/state/effects/order.effects.d.ts +5 -2
- package/state/facades/order/order.facade.d.ts +3 -0
- package/state/order-state.module.d.ts +7 -0
- package/state/package.json +5 -6
- package/state/testing/daffodil-order-state-testing.d.ts +1 -0
- package/state/testing/mock-order-facade.d.ts +3 -0
- package/state/testing/order-testing.module.d.ts +4 -0
- package/state/testing/package.json +5 -6
- package/testing/daffodil-order-testing.d.ts +1 -0
- package/testing/factories/composite-order-item.factory.d.ts +3 -0
- package/testing/factories/configurable-order-item.factory.d.ts +3 -0
- package/testing/factories/order-address.factory.d.ts +3 -0
- package/testing/factories/order-coupon.factory.d.ts +3 -0
- package/testing/factories/order-invoice.factory.d.ts +3 -0
- package/testing/factories/order-item.factory.d.ts +3 -0
- package/testing/factories/order-payment.factory.d.ts +3 -0
- package/testing/factories/order-shipment-item.factory.d.ts +3 -0
- package/testing/factories/order-shipment-tracking.factory.d.ts +3 -0
- package/testing/factories/order-shipment.factory.d.ts +3 -0
- package/testing/factories/order-shipping-rate.factory.d.ts +3 -0
- package/testing/factories/order-total.factory.d.ts +3 -0
- package/testing/factories/order.factory.d.ts +3 -0
- package/testing/package.json +5 -6
- package/bundles/daffodil-order-driver-in-memory.umd.js +0 -125
- package/bundles/daffodil-order-driver-in-memory.umd.js.map +0 -1
- package/bundles/daffodil-order-driver-in-memory.umd.min.js +0 -2
- package/bundles/daffodil-order-driver-in-memory.umd.min.js.map +0 -1
- package/bundles/daffodil-order-driver-magento-2.4.0.umd.js +0 -657
- package/bundles/daffodil-order-driver-magento-2.4.0.umd.js.map +0 -1
- package/bundles/daffodil-order-driver-magento-2.4.0.umd.min.js +0 -16
- package/bundles/daffodil-order-driver-magento-2.4.0.umd.min.js.map +0 -1
- package/bundles/daffodil-order-driver-magento-2.4.1.umd.js +0 -737
- package/bundles/daffodil-order-driver-magento-2.4.1.umd.js.map +0 -1
- package/bundles/daffodil-order-driver-magento-2.4.1.umd.min.js +0 -2
- package/bundles/daffodil-order-driver-magento-2.4.1.umd.min.js.map +0 -1
- package/bundles/daffodil-order-driver-testing.umd.js +0 -67
- package/bundles/daffodil-order-driver-testing.umd.js.map +0 -1
- package/bundles/daffodil-order-driver-testing.umd.min.js +0 -2
- package/bundles/daffodil-order-driver-testing.umd.min.js.map +0 -1
- package/bundles/daffodil-order-driver.umd.js +0 -360
- package/bundles/daffodil-order-driver.umd.js.map +0 -1
- package/bundles/daffodil-order-driver.umd.min.js +0 -16
- package/bundles/daffodil-order-driver.umd.min.js.map +0 -1
- package/bundles/daffodil-order-routing.umd.js +0 -66
- package/bundles/daffodil-order-routing.umd.js.map +0 -1
- package/bundles/daffodil-order-routing.umd.min.js +0 -2
- package/bundles/daffodil-order-routing.umd.min.js.map +0 -1
- package/bundles/daffodil-order-state-testing.umd.js +0 -107
- package/bundles/daffodil-order-state-testing.umd.js.map +0 -1
- package/bundles/daffodil-order-state-testing.umd.min.js +0 -2
- package/bundles/daffodil-order-state-testing.umd.min.js.map +0 -1
- package/bundles/daffodil-order-state.umd.js +0 -748
- package/bundles/daffodil-order-state.umd.js.map +0 -1
- package/bundles/daffodil-order-state.umd.min.js +0 -16
- package/bundles/daffodil-order-state.umd.min.js.map +0 -1
- package/bundles/daffodil-order-testing.umd.js +0 -766
- package/bundles/daffodil-order-testing.umd.js.map +0 -1
- package/bundles/daffodil-order-testing.umd.min.js +0 -16
- package/bundles/daffodil-order-testing.umd.min.js.map +0 -1
- package/bundles/daffodil-order.umd.js +0 -36
- package/bundles/daffodil-order.umd.js.map +0 -1
- package/bundles/daffodil-order.umd.min.js +0 -2
- package/bundles/daffodil-order.umd.min.js.map +0 -1
- package/daffodil-order.metadata.json +0 -1
- package/driver/daffodil-order-driver.metadata.json +0 -1
- package/driver/in-memory/daffodil-order-driver-in-memory.metadata.json +0 -1
- package/driver/magento/2.4.0/daffodil-order-driver-magento-2.4.0.metadata.json +0 -1
- package/driver/magento/2.4.1/daffodil-order-driver-magento-2.4.1.metadata.json +0 -1
- package/driver/testing/daffodil-order-driver-testing.metadata.json +0 -1
- package/esm2015/driver/in-memory/backend/order.service.js +0 -59
- package/esm2015/driver/in-memory/drivers/order-driver.module.js +0 -25
- package/esm2015/driver/in-memory/drivers/order.service.js +0 -30
- package/esm2015/driver/magento/2.4.0/order-driver.module.js +0 -25
- package/esm2015/driver/magento/2.4.0/order.service.js +0 -55
- package/esm2015/driver/magento/2.4.0/queries/fragments/order-item.js +0 -27
- package/esm2015/driver/magento/2.4.0/validators/get-orders.js +0 -18
- package/esm2015/driver/magento/2.4.1/order-driver.module.js +0 -25
- package/esm2015/driver/magento/2.4.1/order.service.js +0 -55
- package/esm2015/driver/magento/2.4.1/transforms/responses/order.js +0 -207
- package/esm2015/driver/magento/2.4.1/validators/get-orders.js +0 -18
- package/esm2015/driver/testing/drivers/order-driver.module.js +0 -25
- package/esm2015/driver/testing/drivers/order.service.js +0 -30
- package/esm2015/routing/guards/placed-order/placed-order.guard.js +0 -40
- package/esm2015/routing/order-routing.module.js +0 -12
- package/esm2015/state/daffodil-order-state.js +0 -6
- package/esm2015/state/effects/order.effects.js +0 -49
- package/esm2015/state/order-state.module.js +0 -20
- package/esm2015/state/reducers/order/order.reducer.js +0 -21
- package/esm2015/state/selectors/order-all.selector.js +0 -10
- package/esm2015/state/selectors/order-entities.selector.js +0 -79
- package/esm2015/state/selectors/order-feature.selector.js +0 -11
- package/esm2015/state/selectors/order.selector.js +0 -21
- package/esm2015/state/testing/mock-order-facade.js +0 -79
- package/esm2015/state/testing/order-testing.module.js +0 -13
- package/esm2015/testing/factories/composite-order-item.factory.js +0 -36
- package/esm2015/testing/factories/configurable-order-item.factory.js +0 -35
- package/esm2015/testing/factories/order-address.factory.js +0 -25
- package/esm2015/testing/factories/order-coupon.factory.js +0 -24
- package/esm2015/testing/factories/order-invoice.factory.js +0 -28
- package/esm2015/testing/factories/order-shipment-item.factory.js +0 -25
- package/esm2015/testing/factories/order-shipment-tracking.factory.js +0 -28
- package/esm2015/testing/factories/order-shipment.factory.js +0 -30
- package/esm2015/testing/factories/order-total.factory.js +0 -28
- package/fesm2015/daffodil-order-driver-in-memory.js +0 -114
- package/fesm2015/daffodil-order-driver-in-memory.js.map +0 -1
- package/fesm2015/daffodil-order-driver-magento-2.4.0.js.map +0 -1
- package/fesm2015/daffodil-order-driver-magento-2.4.1.js.map +0 -1
- package/fesm2015/daffodil-order-driver-testing.js +0 -58
- package/fesm2015/daffodil-order-driver-testing.js.map +0 -1
- package/fesm2015/daffodil-order-driver.js.map +0 -1
- package/fesm2015/daffodil-order-routing.js +0 -54
- package/fesm2015/daffodil-order-routing.js.map +0 -1
- package/fesm2015/daffodil-order-state-testing.js.map +0 -1
- package/fesm2015/daffodil-order-state.js.map +0 -1
- package/fesm2015/daffodil-order-testing.js +0 -386
- package/fesm2015/daffodil-order-testing.js.map +0 -1
- package/fesm2015/daffodil-order.js.map +0 -1
- package/routing/daffodil-order-routing.metadata.json +0 -1
- package/state/daffodil-order-state.metadata.json +0 -1
- package/state/testing/daffodil-order-state-testing.metadata.json +0 -1
- package/testing/daffodil-order-testing.metadata.json +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"daffodil-order-driver-magento-2.4.1.mjs","sources":["../../../libs/order/driver/magento/2.4.1/src/models/responses/order-item.ts","../../../libs/order/driver/magento/2.4.1/src/transforms/responses/order.ts","../../../libs/order/driver/magento/2.4.1/src/models/responses/order-invoice-item.ts","../../../libs/order/driver/magento/2.4.1/src/models/responses/order-shipment-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-address.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-credit-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-credit-total.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-credit.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-invoice-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-invoice-total.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-invoice.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-payment.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-shipment-item.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-shipment-tracking.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-shipment.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order-total.ts","../../../libs/order/driver/magento/2.4.1/src/queries/fragments/order.ts","../../../libs/order/driver/magento/2.4.1/src/queries/get-guest-orders.ts","../../../libs/order/driver/magento/2.4.1/src/injection-tokens/fragments/order.ts","../../../libs/order/driver/magento/2.4.1/src/errors/codes.ts","../../../libs/order/driver/magento/2.4.1/src/errors/map.ts","../../../libs/order/driver/magento/2.4.1/src/errors/transform.ts","../../../libs/order/driver/magento/2.4.1/src/validators/get-orders.ts","../../../libs/order/driver/magento/2.4.1/src/order.service.ts","../../../libs/order/driver/magento/2.4.1/src/order-driver.module.ts","../../../libs/order/driver/magento/2.4.1/src/daffodil-order-driver-magento-2.4.1.ts"],"sourcesContent":["import { MagentoMoney } from '@daffodil/driver/magento';\n\nimport { MagentoDiscount } from './discount';\n\nexport enum MagentoOrderItemType {\n Simple = 'simple',\n Configurable = 'configurable',\n Bundle = 'bundle'\n};\n\nexport type MagentoOrderItemTypenames =\n 'OrderItem' |\n 'BundleOrderItem' |\n 'GiftCardOrderItem' |\n 'DownloadableOrderItem';\n\nexport interface MagentoOrderItemOption {\n __typename?: string;\n label: string;\n value: string;\n};\n\nexport interface MagentoOrderItem {\n __typename?: MagentoOrderItemTypenames;\n discounts: MagentoDiscount[];\n product_name: string;\n product_sale_price: MagentoMoney;\n product_sku: string;\n product_type: MagentoOrderItemType;\n product_url_key: string;\n quantity_canceled: number;\n quantity_invoiced: number;\n quantity_ordered: number;\n quantity_refunded: number;\n quantity_returned: number;\n quantity_shipped: number;\n selected_options: MagentoOrderItemOption[];\n entered_options: MagentoOrderItemOption[];\n status: string;\n}\n\nexport interface MagentoOrderBundleItemSelectedOption {\n __typename?: string;\n label: string;\n values: MagentoOrderBundleItemSelectedOptionValue[];\n};\n\nexport interface MagentoOrderBundleItemSelectedOptionValue {\n price: MagentoMoney;\n product_name: string;\n product_sku: string;\n quantity: number;\n};\n\nexport interface MagentoOrderBundleItem extends MagentoOrderItem {\n bundle_options: MagentoOrderBundleItemSelectedOption[];\n};\n","import {\n daffAdd,\n daffSubtract,\n} from '@daffodil/core';\nimport {\n DaffOrder,\n DaffOrderTotal,\n DaffOrderItem,\n DaffOrderAddress,\n DaffOrderShipment,\n DaffOrderShipmentItem,\n DaffOrderShipmentTracking,\n DaffOrderPayment,\n DaffOrderInvoice,\n DaffOrderTotalTypeEnum,\n DaffCompositeOrderItemOption,\n DaffOrderItemType,\n DaffConfigurableOrderItemAttribute,\n DaffOrderCoupon,\n} from '@daffodil/order';\n\nimport { MagentoDiscount } from '../../models/responses/discount';\nimport { MagentoOrderCredit } from '../../models/responses/order-credit';\nimport { MagentoOrderCreditItem } from '../../models/responses/order-credit-item';\nimport { MagentoOrderInvoiceItem } from '../../models/responses/order-invoice-item';\nimport {\n MagentoOrderBundleItem,\n MagentoOrderBundleItemSelectedOption,\n MagentoOrderItemOption,\n MagentoOrderItemType,\n} from '../../models/responses/order-item';\nimport { MagentoOrderTotal } from '../../models/responses/order-total';\nimport {\n MagentoOrder,\n MagentoOrderItem,\n MagentoOrderShipment,\n MagentoOrderAddress,\n MagentoOrderShipmentItem,\n MagentoOrderShipmentTracking,\n MagentoOrderPayment,\n MagentoOrderInvoice,\n} from '../../models/responses/public_api';\n\nfunction transformTotals(totals: MagentoOrderTotal): DaffOrderTotal[] {\n return [\n {\n label: 'Grand Total',\n type: DaffOrderTotalTypeEnum.GrandTotal,\n value: totals.grand_total.value,\n sort_order: 1,\n },\n {\n label: 'Subtotal',\n type: DaffOrderTotalTypeEnum.Subtotal,\n value: totals.subtotal.value,\n sort_order: 0,\n },\n {\n label: 'Shipping',\n type: DaffOrderTotalTypeEnum.Shipping,\n value: totals.total_shipping.value,\n sort_order: 2,\n },\n {\n label: 'Tax',\n type: DaffOrderTotalTypeEnum.Tax,\n value: totals.total_tax.value,\n sort_order: 3,\n },\n {\n label: 'Discount',\n type: DaffOrderTotalTypeEnum.Discount,\n value: totals.discounts.reduce((acc, discount) => daffAdd(acc, discount.amount.value), 0),\n sort_order: 4,\n },\n ];\n}\n\nfunction transformCouponDiscount(discount: MagentoDiscount): DaffOrderCoupon {\n return {\n code: discount.label,\n };\n}\n\nfunction transformConfigurableOption(option: MagentoOrderItemOption): DaffConfigurableOrderItemAttribute {\n return {\n attribute_label: option.label,\n\t value_label: option.value,\n };\n}\n\nfunction transformBundleOption(option: MagentoOrderBundleItemSelectedOption): DaffCompositeOrderItemOption {\n return {\n option_label: option.label,\n\t value_label: option.values && option.values[0] && option.values[0].product_name,\n };\n}\n\nfunction transformAdditionalItemFields(item: MagentoOrderItem) {\n switch (item.product_type) {\n case MagentoOrderItemType.Bundle:\n return {\n type: DaffOrderItemType.Composite,\n options: (<MagentoOrderBundleItem>item).bundle_options.map(transformBundleOption),\n };\n case MagentoOrderItemType.Configurable:\n return {\n type: DaffOrderItemType.Configurable,\n attributes: item.selected_options.map(transformConfigurableOption),\n };\n case MagentoOrderItemType.Simple:\n return {\n type: DaffOrderItemType.Simple,\n };\n default:\n return {};\n }\n}\n\nfunction transformItem(item: MagentoOrderItem, order: MagentoOrder, qty: number): DaffOrderItem {\n const discount = item.discounts.reduce((acc, d) => daffAdd(acc, d.amount.value), 0);\n const rowTotal = qty * item.product_sale_price.value;\n const rowTotalWithDiscount = qty * daffSubtract(item.product_sale_price.value, discount);\n\n return {\n type: DaffOrderItemType.Simple,\n id: null,\n item_id: null,\n qty_ordered: item.quantity_ordered,\n qty_canceled: item.quantity_canceled,\n qty_fulfilled: item.quantity_shipped,\n qty,\n image: {\n url: item.product_url_key,\n id: null,\n label: null,\n },\n order_id: order.id,\n created_at: null,\n updated_at: null,\n product_id: null,\n parent_item_id: null,\n sku: item.product_sku,\n name: item.product_name,\n weight: null,\n price: item.product_sale_price.value,\n discount_percent: Math.floor(discount / item.product_sale_price.value * 100),\n discount_amount: discount,\n tax_percent: null,\n tax_amount: null,\n row_total: rowTotal,\n row_total_with_discount: rowTotalWithDiscount,\n row_weight: null,\n tax_before_discount: null,\n ...transformAdditionalItemFields(item),\n };\n}\n\nfunction transformAddress(address: MagentoOrderAddress, order: MagentoOrder): DaffOrderAddress {\n return {\n order_id: order.id,\n prefix: address.prefix,\n suffix: address.suffix,\n firstname: address.firstname,\n middlename: address.middlename,\n lastname: address.lastname,\n telephone: address.telephone,\n email: null,\n street: address.street[0],\n street2: address.street[1],\n city: address.city,\n region: address.region_code,\n country: address.country_code,\n postcode: address.postcode,\n };\n}\n\nfunction transformShipmentItem(shipmentItem: MagentoOrderShipmentItem, order: MagentoOrder): DaffOrderShipmentItem {\n return {\n item: transformItem(shipmentItem.order_item, order, shipmentItem.quantity_shipped),\n qty: shipmentItem.quantity_shipped,\n };\n}\n\nfunction transformShipmentTracking(tracking: MagentoOrderShipmentTracking): DaffOrderShipmentTracking {\n return {\n tracking_number: tracking.number,\n tracking_url: null,\n carrier: tracking.carrier,\n title: tracking.title,\n carrier_logo: null,\n };\n}\n\nfunction transformShipment(shipment: MagentoOrderShipment, order: MagentoOrder): DaffOrderShipment {\n return {\n carrier: order.carrier,\n carrier_title: null,\n code: null,\n method: order.shipping_method,\n method_description: null,\n tracking: shipment.tracking.map(transformShipmentTracking),\n items: shipment.items.map(item => transformShipmentItem(item, order)),\n };\n}\n\nfunction transformPayment(payment: MagentoOrderPayment, order: MagentoOrder): DaffOrderPayment {\n const findAdditionalData = key => {\n const index = payment.additional_data.findIndex(({ name }) => name === key);\n\n return index > -1 ? payment.additional_data[index].value : null;\n };\n return {\n id: null,\n payment_id: null,\n order_id: order.id,\n created_at: null,\n updated_at: null,\n method: payment.type,\n cc_type: findAdditionalData('cc_type'),\n cc_last4: findAdditionalData('cc_last4'),\n cc_owner: findAdditionalData('cc_owner'),\n cc_exp_month: findAdditionalData('cc_exp_month'),\n cc_exp_year: findAdditionalData('cc_exp_year'),\n };\n}\n\nfunction transformInvoiceItem(invoiceItem: MagentoOrderInvoiceItem, order: MagentoOrder): DaffOrderShipmentItem {\n return {\n item: transformItem(invoiceItem.order_item, order, invoiceItem.quantity_invoiced),\n qty: invoiceItem.quantity_invoiced,\n };\n}\n\nfunction transformInvoice(invoice: MagentoOrderInvoice, order: MagentoOrder, payment: MagentoOrderPayment): DaffOrderInvoice {\n return {\n totals: transformTotals(invoice.total),\n billing_address: transformAddress(order.billing_address, order),\n shipping_address: transformAddress(order.shipping_address, order),\n payment: transformPayment(payment, order),\n items: invoice.items.map(item => transformInvoiceItem(item, order)),\n shipping_method: null,\n };\n}\n\nfunction transformCreditItem(creditItem: MagentoOrderCreditItem, order: MagentoOrder): DaffOrderShipmentItem {\n return {\n item: transformItem(creditItem.order_item, order, creditItem.quantity_refunded),\n qty: creditItem.quantity_refunded,\n };\n}\n\nfunction transformCredit(credit: MagentoOrderCredit, order: MagentoOrder): DaffOrderInvoice {\n return {\n totals: transformTotals(credit.total),\n billing_address: transformAddress(order.billing_address, order),\n shipping_address: transformAddress(order.shipping_address, order),\n payment: transformPayment(order.payment_methods[0], order),\n items: credit.items.map(item => transformCreditItem(item, order)),\n shipping_method: null,\n };\n}\n\n/**\n * Transforms the MagentoOrder from the magento order query into a DaffOrder.\n */\nexport function daffMagentoTransformOrder(order: MagentoOrder): DaffOrder {\n return {\n extra_attributes: order,\n\n id: order.number,\n customer_id: null,\n updated_at: null,\n created_at: order.order_date,\n status: order.status,\n\n totals: transformTotals(order.total),\n applied_codes: order.total.discounts.map(transformCouponDiscount),\n items: order.items.map(item => transformItem(item, order, item.quantity_ordered)),\n billing_addresses: [\n transformAddress(order.billing_address, order),\n ],\n shipping_addresses: [\n transformAddress(order.shipping_address, order),\n ],\n shipments: order.shipments.map(shipment => transformShipment(shipment, order)),\n payment: transformPayment(order.payment_methods[0], order),\n // TODO: find out if the index is the correct payment for invoice\n invoices: order.invoices.map((invoice, index) => transformInvoice(invoice, order, order.payment_methods[index])),\n credits: order.credit_memos.map(credit => transformCredit(credit, order)),\n };\n}\n","import {\n MagentoOrderBundleItemSelectedOption,\n MagentoOrderItem,\n} from './order-item';\n\nexport type MagentoOrderInvoiceItemTypenames =\n 'InvoiceItem' |\n 'BundleInvoiceItem' |\n 'GiftCardInvoiceItem' |\n 'DownloadableInvoiceItem';\n\nexport interface MagentoOrderInvoiceItem {\n __typename?: MagentoOrderInvoiceItemTypenames;\n order_item: MagentoOrderItem;\n quantity_invoiced: number;\n};\n\nexport interface MagentoOrderInvoiceBundleItem extends MagentoOrderInvoiceItem {\n bundle_options: MagentoOrderBundleItemSelectedOption[];\n};\n","import {\n MagentoOrderBundleItemSelectedOption,\n MagentoOrderItem,\n} from './order-item';\n\nexport type MagentoOrderShipmentItemTypenames =\n 'ShipmentItem' |\n 'BundleShipmentItem' |\n 'GiftCardShipmentItem';\n\nexport interface MagentoOrderShipmentItem {\n __typename?: MagentoOrderShipmentItemTypenames;\n order_item: MagentoOrderItem;\n quantity_shipped: number;\n};\n\nexport interface MagentoOrderShipmentBundleItem extends MagentoOrderShipmentItem {\n bundle_options: MagentoOrderBundleItemSelectedOption[];\n};\n","import { gql } from '@damienwebdev/apollo-angular';\n\n\nexport const orderAddressFragment = gql`\n fragment orderAddress on OrderAddress {\n city\n company\n country_code\n fax\n firstname\n middlename\n lastname\n postcode\n prefix\n region\n region_code\n street\n suffix\n telephone\n }\n`;\n","import { gql } from '@damienwebdev/apollo-angular';\n\nexport const orderBundleItemSelectedOptionFragment = gql`\n fragment orderBundleItemSelectedOption on ItemSelectedBundleOption {\n label\n values {\n product_name\n }\n }\n`;\n\nexport const orderItemFragment = gql`\n fragment orderItem on OrderItemInterface {\n quantity_ordered\n quantity_canceled\n quantity_shipped\n quantity_invoiced\n product_url_key\n product_sku\n product_name\n product_type\n product_sale_price {\n value\n }\n discounts {\n amount {\n value\n }\n }\n selected_options {\n label\n value\n }\n ... on BundleOrderItem {\n bundle_options {\n ...orderBundleItemSelectedOption\n }\n }\n }\n ${orderBundleItemSelectedOptionFragment}\n`;\n","import { gql } from '@damienwebdev/apollo-angular';\n\nimport { orderItemFragment } from './order-item';\n\nexport const orderCreditItemFragment = gql`\n fragment orderCreditItem on CreditMemoItemInterface {\n quantity_refunded\n order_item {\n ...orderItem\n }\n }\n ${orderItemFragment}\n`;\n","import { gql } from '@damienwebdev/apollo-angular';\n\n\nexport const orderCreditTotalFragment = gql`\n fragment orderCreditTotal on CreditMemoTotal {\n discounts {\n amount {\n value\n }\n label\n }\n grand_total {\n value\n }\n subtotal {\n value\n }\n total_tax {\n value\n }\n total_shipping {\n value\n }\n }\n`;\n","import { gql } from '@damienwebdev/apollo-angular';\n\nimport { orderCreditItemFragment } from './order-credit-item';\nimport { orderCreditTotalFragment } from './order-credit-total';\n\nexport const orderCreditFragment = gql`\n fragment orderCredit on CreditMemo {\n items {\n ...orderCreditItem\n }\n total {\n ...orderCreditTotal\n }\n }\n ${orderCreditItemFragment}\n ${orderCreditTotalFragment}\n`;\n","import { gql } from '@damienwebdev/apollo-angular';\n\nimport { orderItemFragment } from './order-item';\n\nexport const orderInvoiceItemFragment = gql`\n fragment orderInvoiceItem on InvoiceItemInterface {\n quantity_invoiced\n order_item {\n ...orderItem\n }\n }\n ${orderItemFragment}\n`;\n","import { gql } from '@damienwebdev/apollo-angular';\n\n\nexport const orderInvoiceTotalFragment = gql`\n fragment orderInvoiceTotal on InvoiceTotal {\n discounts {\n amount {\n value\n }\n label\n }\n grand_total {\n value\n }\n subtotal {\n value\n }\n total_tax {\n value\n }\n total_shipping {\n value\n }\n }\n`;\n","import { gql } from '@damienwebdev/apollo-angular';\n\nimport { orderInvoiceItemFragment } from './order-invoice-item';\nimport { orderInvoiceTotalFragment } from './order-invoice-total';\n\nexport const orderInvoiceFragment = gql`\n fragment orderInvoice on Invoice {\n items {\n ...orderInvoiceItem\n }\n total {\n ...orderInvoiceTotal\n }\n }\n ${orderInvoiceItemFragment}\n ${orderInvoiceTotalFragment}\n`;\n","import { gql } from '@damienwebdev/apollo-angular';\n\n\nexport const orderPaymentFragment = gql`\n fragment orderPayment on OrderPaymentMethod {\n name\n type\n additional_data {\n name\n value\n }\n }\n`;\n","import { gql } from '@damienwebdev/apollo-angular';\n\nimport { orderItemFragment } from './order-item';\n\nexport const orderShipmentItemFragment = gql`\n fragment orderShipmentItem on ShipmentItemInterface {\n quantity_shipped\n order_item {\n ...orderItem\n }\n }\n ${orderItemFragment}\n`;\n","import { gql } from '@damienwebdev/apollo-angular';\n\n\nexport const orderShipmentTrackingFragment = gql`\n fragment orderShipmentTracking on ShipmentTracking {\n number\n carrier\n title\n }\n`;\n","import { gql } from '@damienwebdev/apollo-angular';\n\nimport { orderShipmentItemFragment } from './order-shipment-item';\nimport { orderShipmentTrackingFragment } from './order-shipment-tracking';\n\nexport const orderShipmentFragment = gql`\n fragment orderShipment on OrderShipment {\n tracking {\n ...orderShipmentTracking\n }\n items {\n ...orderShipmentItem\n }\n }\n ${orderShipmentItemFragment}\n ${orderShipmentTrackingFragment}\n`;\n","import { gql } from '@damienwebdev/apollo-angular';\n\n\nexport const orderTotalFragment = gql`\n fragment orderTotal on OrderTotal {\n discounts {\n amount {\n value\n }\n label\n }\n grand_total {\n value\n }\n subtotal {\n value\n }\n total_tax {\n value\n }\n total_shipping {\n value\n }\n }\n`;\n","import { gql } from '@damienwebdev/apollo-angular';\n\nimport { orderAddressFragment } from './order-address';\nimport { orderCreditFragment } from './order-credit';\nimport { orderInvoiceFragment } from './order-invoice';\nimport { orderItemFragment } from './order-item';\nimport { orderPaymentFragment } from './order-payment';\nimport { orderShipmentFragment } from './order-shipment';\nimport { orderTotalFragment } from './order-total';\n\nexport const orderFragment = gql`\n fragment order on GraycoreGuestOrder {\n id\n order_date\n status\n carrier\n number\n shipping_method\n items {\n ...orderItem\n }\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n }\n shipments {\n ...orderShipment\n }\n payment_methods {\n ...orderPayment\n }\n invoices {\n ...orderInvoice\n }\n credit_memos {\n ...orderCredit\n }\n total {\n ...orderTotal\n }\n }\n ${orderItemFragment}\n ${orderShipmentFragment}\n ${orderPaymentFragment}\n ${orderInvoiceFragment}\n ${orderCreditFragment}\n ${orderAddressFragment}\n ${orderTotalFragment}\n`;\n","import { gql } from '@damienwebdev/apollo-angular';\nimport { DocumentNode } from 'graphql';\n\nimport {\n daffBuildFragmentNameSpread,\n daffBuildFragmentDefinition,\n} from '@daffodil/core/graphql';\n\nimport { orderFragment } from './fragments/public_api';\n\nexport const getGuestOrders = (extraOrderFragments: DocumentNode[] = []) => gql`\n query MagentoGetGuestOrders($cartId: String!) {\n graycoreGuestOrders(cartId: $cartId) {\n items {\n ...order\n ${daffBuildFragmentNameSpread(...extraOrderFragments)}\n }\n }\n }\n ${orderFragment}\n ${daffBuildFragmentDefinition(...extraOrderFragments)}\n`;\n","import { InjectionToken } from '@angular/core';\nimport { DocumentNode } from 'graphql';\n\n/**\n * An multi-provider injection token for providing extra GraphQL fragments that will be spread into order queries.\n * This can be used to retrieve additional data that is not covered by the standard Daffodil interfaces.\n * The data will appear in DaffOrder#extra_attributes.\n *\n * Fragment structure is platform-specific and this feature should be used with care.\n */\nexport const DaffMagentoExtraOrderFragments = new InjectionToken<DocumentNode[]>('DaffMagentoExtraOrderFragments', { factory: () => []});\n","export enum MagentoOrderGraphQlErrorCode {\n\tCART_NOT_FOUND = 'graphql-no-such-entity',\n}\n","import { DaffCartNotFoundError } from '@daffodil/cart/driver';\nimport { DaffErrorCodeMap } from '@daffodil/core';\n\nimport { MagentoOrderGraphQlErrorCode } from './codes';\n\nexport const DaffOrderMagentoErrorMap: DaffErrorCodeMap = {\n [MagentoOrderGraphQlErrorCode.CART_NOT_FOUND]: DaffCartNotFoundError,\n};\n","import { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffOrderMagentoErrorMap } from './map';\n\nexport function transformMagentoOrderError(error: any) {\n return daffTransformMagentoError(error, DaffOrderMagentoErrorMap);\n}\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffOrderInvalidAPIResponseError } from '@daffodil/order/driver';\n\nimport { MagentoGetGuestOrdersResponse } from '../queries/public_api';\n\nexport const validateGetOrdersResponse = (response: ApolloQueryResult<MagentoGetGuestOrdersResponse>) => {\n if (response.data?.graycoreGuestOrders?.items) {\n if (response.data.graycoreGuestOrders.items.reduce((acc, order) => acc && !!(\n order.billing_address\n && order.shipping_address\n && order.payment_methods\n ), true)) {\n return response;\n } else {\n throw new DaffOrderInvalidAPIResponseError('One of the orders does not contain required fields.');\n }\n } else {\n throw new DaffOrderInvalidAPIResponseError('Get orders response does not contain a valid list of orders.');\n }\n};\n","import {\n Inject,\n Injectable,\n} from '@angular/core';\nimport { Apollo } from '@damienwebdev/apollo-angular';\nimport { DocumentNode } from 'graphql';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCart } from '@daffodil/cart';\nimport { DaffOrder } from '@daffodil/order';\nimport {\n DaffOrderServiceInterface,\n DaffOrderNotFoundError,\n} from '@daffodil/order/driver';\n\nimport { transformMagentoOrderError } from './errors/transform';\nimport { DaffMagentoExtraOrderFragments } from './injection-tokens/public_api';\nimport {\n getGuestOrders,\n MagentoGetGuestOrdersResponse,\n} from './queries/public_api';\nimport { daffMagentoTransformOrder } from './transforms/responses/order';\nimport { validateGetOrdersResponse } from './validators/public_api';\n\n/**\n * A service for making Magento GraphQL queries for orders.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffOrderMagentoService implements DaffOrderServiceInterface {\n constructor(\n private apollo: Apollo,\n @Inject(DaffMagentoExtraOrderFragments) public extraOrderFragments: DocumentNode[],\n ) {}\n\n list(cartId?: DaffCart['id']): Observable<DaffOrder[]> {\n return this.apollo.query<MagentoGetGuestOrdersResponse>({\n query: getGuestOrders(this.extraOrderFragments),\n variables: {\n cartId,\n },\n }).pipe(\n map(validateGetOrdersResponse),\n map(result => result.data.graycoreGuestOrders.items.map(daffMagentoTransformOrder)),\n catchError(err => throwError(transformMagentoOrderError(err))),\n );\n }\n\n get(orderId: DaffOrder['id'], cartId?: DaffCart['id']): Observable<DaffOrder> {\n return this.list(cartId).pipe(\n map(orders => {\n for (const order of orders) {\n if (order.id === orderId) {\n return order;\n }\n }\n\n // order not found\n throw new DaffOrderNotFoundError(`Could not find an order with ID ${orderId}`);\n }),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { DaffOrderDriver } from '@daffodil/order/driver';\n\nimport { DaffOrderMagentoService } from './order.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffOrderMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffOrderMagentoDriverModule> {\n return {\n ngModule: DaffOrderMagentoDriverModule,\n providers: [\n {\n provide: DaffOrderDriver,\n useExisting: DaffOrderMagentoService,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;IAIY,qBAIX;AAJD,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,oBAAA,CAAA,cAAA,CAAA,GAAA,cAA6B,CAAA;AAC7B,IAAA,oBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACnB,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,GAI/B,EAAA,CAAA,CAAA,CAAA;AAAA,CAAC;AAYD,CAAC;AAyBD,CAAC;AAOD,CAAC;AAID;;ACbD,SAAS,eAAe,CAAC,MAAyB,EAAA;IAChD,OAAO;AACL,QAAA;AACE,YAAA,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,sBAAsB,CAAC,UAAU;AACvC,YAAA,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,KAAK;AAC/B,YAAA,UAAU,EAAE,CAAC;AACd,SAAA;AACD,QAAA;AACE,YAAA,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,sBAAsB,CAAC,QAAQ;AACrC,YAAA,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK;AAC5B,YAAA,UAAU,EAAE,CAAC;AACd,SAAA;AACD,QAAA;AACE,YAAA,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,sBAAsB,CAAC,QAAQ;AACrC,YAAA,KAAK,EAAE,MAAM,CAAC,cAAc,CAAC,KAAK;AAClC,YAAA,UAAU,EAAE,CAAC;AACd,SAAA;AACD,QAAA;AACE,YAAA,KAAK,EAAE,KAAK;YACZ,IAAI,EAAE,s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'@angular/core';
|
3
|
+
import { Injectable, NgModule } from '@angular/core';
|
4
|
+
import { DaffOrderDriver } from '@daffodil/order/driver';
|
5
|
+
import { of } from 'rxjs';
|
6
|
+
import * as i1 from '@daffodil/order/testing';
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @inheritdoc
|
10
|
+
*/
|
11
|
+
class DaffTestingOrderService {
|
12
|
+
constructor(orderFactory) {
|
13
|
+
this.orderFactory = orderFactory;
|
14
|
+
}
|
15
|
+
get(orderId) {
|
16
|
+
return of(this.orderFactory.create({ id: orderId }));
|
17
|
+
}
|
18
|
+
list() {
|
19
|
+
return of(this.orderFactory.createMany(5));
|
20
|
+
}
|
21
|
+
}
|
22
|
+
/** @nocollapse */ /** @nocollapse */ DaffTestingOrderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffTestingOrderService, deps: [{ token: i1.DaffOrderFactory }], target: i0.ɵɵFactoryTarget.Injectable });
|
23
|
+
/** @nocollapse */ /** @nocollapse */ DaffTestingOrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffTestingOrderService, providedIn: 'root' });
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffTestingOrderService, decorators: [{
|
25
|
+
type: Injectable,
|
26
|
+
args: [{
|
27
|
+
providedIn: 'root',
|
28
|
+
}]
|
29
|
+
}], ctorParameters: function () { return [{ type: i1.DaffOrderFactory }]; } });
|
30
|
+
|
31
|
+
class DaffOrderTestingDriverModule {
|
32
|
+
static forRoot() {
|
33
|
+
return {
|
34
|
+
ngModule: DaffOrderTestingDriverModule,
|
35
|
+
providers: [
|
36
|
+
{
|
37
|
+
provide: DaffOrderDriver,
|
38
|
+
useExisting: DaffTestingOrderService,
|
39
|
+
},
|
40
|
+
],
|
41
|
+
};
|
42
|
+
}
|
43
|
+
}
|
44
|
+
/** @nocollapse */ /** @nocollapse */ DaffOrderTestingDriverModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderTestingDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
45
|
+
/** @nocollapse */ /** @nocollapse */ DaffOrderTestingDriverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderTestingDriverModule, imports: [CommonModule] });
|
46
|
+
/** @nocollapse */ /** @nocollapse */ DaffOrderTestingDriverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderTestingDriverModule, imports: [[
|
47
|
+
CommonModule,
|
48
|
+
]] });
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderTestingDriverModule, decorators: [{
|
50
|
+
type: NgModule,
|
51
|
+
args: [{
|
52
|
+
imports: [
|
53
|
+
CommonModule,
|
54
|
+
],
|
55
|
+
}]
|
56
|
+
}] });
|
57
|
+
|
58
|
+
/**
|
59
|
+
* Generated bundle index. Do not edit.
|
60
|
+
*/
|
61
|
+
|
62
|
+
export { DaffOrderTestingDriverModule, DaffTestingOrderService };
|
63
|
+
//# sourceMappingURL=daffodil-order-driver-testing.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"daffodil-order-driver-testing.mjs","sources":["../../../libs/order/driver/testing/src/drivers/order.service.ts","../../../libs/order/driver/testing/src/drivers/order-driver.module.ts","../../../libs/order/driver/testing/src/daffodil-order-driver-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffOrder } from '@daffodil/order';\nimport { DaffOrderServiceInterface } from '@daffodil/order/driver';\nimport { DaffOrderFactory } from '@daffodil/order/testing';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffTestingOrderService implements DaffOrderServiceInterface {\n\n constructor(\n private orderFactory: DaffOrderFactory,\n ) {}\n\n get(orderId: DaffOrder['id']): Observable<DaffOrder> {\n return of(this.orderFactory.create({ id: orderId }));\n }\n\n list(): Observable<DaffOrder[]> {\n return of(this.orderFactory.createMany(5));\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { DaffOrderDriver } from '@daffodil/order/driver';\n\nimport { DaffTestingOrderService } from './order.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffOrderTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffOrderTestingDriverModule> {\n return {\n ngModule: DaffOrderTestingDriverModule,\n providers: [\n {\n provide: DaffOrderDriver,\n useExisting: DaffTestingOrderService,\n },\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAUA;;AAEG;MAIU,uBAAuB,CAAA;AAElC,IAAA,WAAA,CACU,YAA8B,EAAA;QAA9B,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAkB;KACpC;AAEJ,IAAA,GAAG,CAAC,OAAwB,EAAA;AAC1B,QAAA,OAAO,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;KACtD;IAED,IAAI,GAAA;QACF,OAAO,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KAC5C;;0JAZU,uBAAuB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,sCAAA,uBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UA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|
1
|
+
import { InjectionToken } from '@angular/core';
|
2
|
+
import { DaffInheritableError } from '@daffodil/core';
|
3
|
+
|
4
|
+
const DaffOrderDriver = new InjectionToken('DaffOrderDriver');
|
5
|
+
|
6
|
+
class DaffOrderInvalidAPIResponseError extends DaffInheritableError {
|
7
|
+
constructor(message) {
|
8
|
+
super(message);
|
9
|
+
this.message = message;
|
10
|
+
this.code = 'DAFF_ORDER_INVALID_API_RESPONSE';
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
class DaffOrderNotFoundError extends DaffInheritableError {
|
15
|
+
constructor(message) {
|
16
|
+
super(message);
|
17
|
+
this.message = message;
|
18
|
+
this.code = 'DAFF_ORDER_NOT_FOUND';
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
/**
|
23
|
+
* Generated bundle index. Do not edit.
|
24
|
+
*/
|
25
|
+
|
26
|
+
export { DaffOrderDriver, DaffOrderInvalidAPIResponseError, DaffOrderNotFoundError };
|
27
|
+
//# sourceMappingURL=daffodil-order-driver.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"daffodil-order-driver.mjs","sources":["../../../libs/order/driver/src/interfaces/order-service.interface.ts","../../../libs/order/driver/src/errors/invalid-api-response.ts","../../../libs/order/driver/src/errors/order-not-found.ts","../../../libs/order/driver/src/daffodil-order-driver.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { DaffCart } from '@daffodil/cart';\nimport { DaffOrder } from '@daffodil/order';\n\nexport const DaffOrderDriver = new InjectionToken<DaffOrderServiceInterface>('DaffOrderDriver');\n\n/**\n * Query order objects accessible by the logged-in user.\n */\nexport interface DaffOrderServiceInterface<\n T extends DaffOrder = DaffOrder,\n V extends DaffCart = DaffCart\n> {\n /**\n * Get an order object with the specified order ID.\n */\n get(orderId: T['id'], cartId?: V['id']): Observable<T>;\n\n /**\n * List all order objects for the logged-in user.\n */\n list(cartId?: V['id']): Observable<T[]>;\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport class DaffOrderInvalidAPIResponseError extends DaffInheritableError implements DaffError {\n public readonly code: string = 'DAFF_ORDER_INVALID_API_RESPONSE';\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport class DaffOrderNotFoundError extends DaffInheritableError implements DaffError {\n public readonly code: string = 'DAFF_ORDER_NOT_FOUND';\n\n constructor(public message: string) {\n super(message);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAMa,eAAe,GAAG,IAAI,cAAc,CAA4B,iBAAiB;;ACDxF,MAAO,gCAAiC,SAAQ,oBAAoB,CAAA;AAGxE,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;QAFlB,IAAI,CAAA,IAAA,GAAW,iCAAiC,CAAC;KAIhE;AACF;;ACNK,MAAO,sBAAuB,SAAQ,oBAAoB,CAAA;AAG9D,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;QAFlB,IAAI,CAAA,IAAA,GAAW,sBAAsB,CAAC;KAIrD;AACF;;ACXD;;AAEG;;;;"}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { InjectionToken, Injectable, Inject, NgModule } from '@angular/core';
|
3
|
+
import * as i2 from '@angular/router';
|
4
|
+
import { tap } from 'rxjs/operators';
|
5
|
+
import * as i1 from '@daffodil/order/state';
|
6
|
+
|
7
|
+
const DaffPlacedOrderGuardRedirectUrl = new InjectionToken('DaffPlacedOrderGuardRedirectUrl');
|
8
|
+
|
9
|
+
/**
|
10
|
+
* A routing guard that will redirect to a given url if the placed order is not defined.
|
11
|
+
* The url is `/` by default, but can be overridden with the DaffPlacedOrderGuardRedirectUrl injection token.
|
12
|
+
*/
|
13
|
+
class DaffPlacedOrderGuard {
|
14
|
+
constructor(facade, router, redirectUrl) {
|
15
|
+
this.facade = facade;
|
16
|
+
this.router = router;
|
17
|
+
this.redirectUrl = redirectUrl;
|
18
|
+
}
|
19
|
+
canActivate() {
|
20
|
+
return this.facade.hasPlacedOrder$.pipe(tap(hasPlacedOrder => {
|
21
|
+
if (!hasPlacedOrder) {
|
22
|
+
this.router.navigateByUrl(this.redirectUrl);
|
23
|
+
}
|
24
|
+
}));
|
25
|
+
}
|
26
|
+
}
|
27
|
+
/** @nocollapse */ /** @nocollapse */ DaffPlacedOrderGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPlacedOrderGuard, deps: [{ token: i1.DaffOrderFacade }, { token: i2.Router }, { token: DaffPlacedOrderGuardRedirectUrl }], target: i0.ɵɵFactoryTarget.Injectable });
|
28
|
+
/** @nocollapse */ /** @nocollapse */ DaffPlacedOrderGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPlacedOrderGuard, providedIn: 'root' });
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffPlacedOrderGuard, decorators: [{
|
30
|
+
type: Injectable,
|
31
|
+
args: [{
|
32
|
+
providedIn: 'root',
|
33
|
+
}]
|
34
|
+
}], ctorParameters: function () { return [{ type: i1.DaffOrderFacade }, { type: i2.Router }, { type: undefined, decorators: [{
|
35
|
+
type: Inject,
|
36
|
+
args: [DaffPlacedOrderGuardRedirectUrl]
|
37
|
+
}] }]; } });
|
38
|
+
|
39
|
+
class DaffOrderRoutingModule {
|
40
|
+
}
|
41
|
+
/** @nocollapse */ /** @nocollapse */ DaffOrderRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
42
|
+
/** @nocollapse */ /** @nocollapse */ DaffOrderRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderRoutingModule });
|
43
|
+
/** @nocollapse */ /** @nocollapse */ DaffOrderRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderRoutingModule, providers: [
|
44
|
+
{ provide: DaffPlacedOrderGuardRedirectUrl, useValue: '/' },
|
45
|
+
] });
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderRoutingModule, decorators: [{
|
47
|
+
type: NgModule,
|
48
|
+
args: [{
|
49
|
+
providers: [
|
50
|
+
{ provide: DaffPlacedOrderGuardRedirectUrl, useValue: '/' },
|
51
|
+
],
|
52
|
+
}]
|
53
|
+
}] });
|
54
|
+
|
55
|
+
/**
|
56
|
+
* Generated bundle index. Do not edit.
|
57
|
+
*/
|
58
|
+
|
59
|
+
export { DaffOrderRoutingModule, DaffPlacedOrderGuard, DaffPlacedOrderGuardRedirectUrl };
|
60
|
+
//# sourceMappingURL=daffodil-order-routing.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"daffodil-order-routing.mjs","sources":["../../../libs/order/routing/src/guards/placed-order/placed-order-guard-redirect.token.ts","../../../libs/order/routing/src/guards/placed-order/placed-order.guard.ts","../../../libs/order/routing/src/order-routing.module.ts","../../../libs/order/routing/src/daffodil-order-routing.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const DaffPlacedOrderGuardRedirectUrl = new InjectionToken<string>('DaffPlacedOrderGuardRedirectUrl');\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n CanActivate,\n Router,\n} from '@angular/router';\nimport { Observable } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\nimport { DaffOrderFacade } from '@daffodil/order/state';\n\nimport { DaffPlacedOrderGuardRedirectUrl } from './placed-order-guard-redirect.token';\n\n/**\n * A routing guard that will redirect to a given url if the placed order is not defined.\n * The url is `/` by default, but can be overridden with the DaffPlacedOrderGuardRedirectUrl injection token.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPlacedOrderGuard implements CanActivate {\n constructor(\n\t\tprivate facade: DaffOrderFacade,\n\t\tprivate router: Router,\n\t\t@Inject(DaffPlacedOrderGuardRedirectUrl) private redirectUrl: string,\n ) {}\n\n canActivate(): Observable<boolean> {\n return this.facade.hasPlacedOrder$.pipe(\n tap(hasPlacedOrder => {\n if (!hasPlacedOrder) {\n this.router.navigateByUrl(this.redirectUrl);\n }\n }),\n );\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffPlacedOrderGuardRedirectUrl } from './guards/public_api';\n\n@NgModule({\n providers: [\n { provide: DaffPlacedOrderGuardRedirectUrl, useValue: '/' },\n ],\n})\nexport class DaffOrderRoutingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAEa,+BAA+B,GAAG,IAAI,cAAc,CAAS,iCAAiC;;ACa3G;;;AAGG;MAIU,oBAAoB,CAAA;AAC/B,IAAA,WAAA,CACQ,MAAuB,EACvB,MAAc,EAC2B,WAAmB,EAAA;QAF5D,IAAM,CAAA,MAAA,GAAN,MAAM,CAAiB;QACvB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QAC2B,IAAW,CAAA,WAAA,GAAX,WAAW,CAAQ;KAChE;IAEJ,WAAW,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CACrC,GAAG,CAAC,cAAc,IAAG;YACnB,IAAI,CAAC,cAAc,EAAE;gBACnB,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,W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S,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,+BAA+B,EAAE,QAAQ,EAAE,GAAG,EAAE;AAC5D,qBAAA;AACF,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
@@ -0,0 +1,105 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { Injectable, NgModule } from '@angular/core';
|
3
|
+
import { BehaviorSubject } from 'rxjs';
|
4
|
+
import { DaffOrderFacade } from '@daffodil/order/state';
|
5
|
+
|
6
|
+
/**
|
7
|
+
* @inheritdoc
|
8
|
+
*/
|
9
|
+
class MockDaffOrderFacade {
|
10
|
+
constructor() {
|
11
|
+
this.loading$ = new BehaviorSubject(null);
|
12
|
+
this.errors$ = new BehaviorSubject([]);
|
13
|
+
this.orders$ = new BehaviorSubject([]);
|
14
|
+
this.orderIds$ = new BehaviorSubject([]);
|
15
|
+
this.orderCount$ = new BehaviorSubject(null);
|
16
|
+
this.orderEntities$ = new BehaviorSubject({});
|
17
|
+
this.placedOrder$ = new BehaviorSubject(null);
|
18
|
+
this.hasPlacedOrder$ = new BehaviorSubject(false);
|
19
|
+
}
|
20
|
+
getOrder$(orderId) {
|
21
|
+
return new BehaviorSubject(null);
|
22
|
+
}
|
23
|
+
getTotals$(orderId) {
|
24
|
+
return new BehaviorSubject([]);
|
25
|
+
}
|
26
|
+
getAppliedCodes$(orderId) {
|
27
|
+
return new BehaviorSubject([]);
|
28
|
+
}
|
29
|
+
getItems$(orderId) {
|
30
|
+
return new BehaviorSubject([]);
|
31
|
+
}
|
32
|
+
getBillingAddresses$(orderId) {
|
33
|
+
return new BehaviorSubject([]);
|
34
|
+
}
|
35
|
+
getShippingAddresses$(orderId) {
|
36
|
+
return new BehaviorSubject([]);
|
37
|
+
}
|
38
|
+
getShipments$(orderId) {
|
39
|
+
return new BehaviorSubject([]);
|
40
|
+
}
|
41
|
+
getPayment$(orderId) {
|
42
|
+
return new BehaviorSubject(null);
|
43
|
+
}
|
44
|
+
getInvoices$(orderId) {
|
45
|
+
return new BehaviorSubject([]);
|
46
|
+
}
|
47
|
+
getCredits$(orderId) {
|
48
|
+
return new BehaviorSubject([]);
|
49
|
+
}
|
50
|
+
getGrandTotal$(orderId) {
|
51
|
+
return new BehaviorSubject(null);
|
52
|
+
}
|
53
|
+
;
|
54
|
+
getSubtotal$(orderId) {
|
55
|
+
return new BehaviorSubject(null);
|
56
|
+
}
|
57
|
+
;
|
58
|
+
getShippingTotal$(orderId) {
|
59
|
+
return new BehaviorSubject(null);
|
60
|
+
}
|
61
|
+
;
|
62
|
+
getDiscountTotal$(orderId) {
|
63
|
+
return new BehaviorSubject(null);
|
64
|
+
}
|
65
|
+
;
|
66
|
+
hasDiscount$(orderId) {
|
67
|
+
return new BehaviorSubject(false);
|
68
|
+
}
|
69
|
+
;
|
70
|
+
getTaxTotal$(orderId) {
|
71
|
+
return new BehaviorSubject(null);
|
72
|
+
}
|
73
|
+
;
|
74
|
+
dispatch(action) { }
|
75
|
+
;
|
76
|
+
}
|
77
|
+
/** @nocollapse */ /** @nocollapse */ MockDaffOrderFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MockDaffOrderFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
78
|
+
/** @nocollapse */ /** @nocollapse */ MockDaffOrderFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MockDaffOrderFacade, providedIn: 'root' });
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MockDaffOrderFacade, decorators: [{
|
80
|
+
type: Injectable,
|
81
|
+
args: [{ providedIn: 'root' }]
|
82
|
+
}] });
|
83
|
+
|
84
|
+
class DaffOrderTestingModule {
|
85
|
+
}
|
86
|
+
/** @nocollapse */ /** @nocollapse */ DaffOrderTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
87
|
+
/** @nocollapse */ /** @nocollapse */ DaffOrderTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderTestingModule });
|
88
|
+
/** @nocollapse */ /** @nocollapse */ DaffOrderTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderTestingModule, providers: [
|
89
|
+
{ provide: DaffOrderFacade, useExisting: MockDaffOrderFacade },
|
90
|
+
] });
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffOrderTestingModule, decorators: [{
|
92
|
+
type: NgModule,
|
93
|
+
args: [{
|
94
|
+
providers: [
|
95
|
+
{ provide: DaffOrderFacade, useExisting: MockDaffOrderFacade },
|
96
|
+
],
|
97
|
+
}]
|
98
|
+
}] });
|
99
|
+
|
100
|
+
/**
|
101
|
+
* Generated bundle index. Do not edit.
|
102
|
+
*/
|
103
|
+
|
104
|
+
export { DaffOrderTestingModule, MockDaffOrderFacade };
|
105
|
+
//# sourceMappingURL=daffodil-order-state-testing.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"daffodil-order-state-testing.mjs","sources":["../../../libs/order/state/testing/src/mock-order-facade.ts","../../../libs/order/state/testing/src/order-testing.module.ts","../../../libs/order/state/testing/src/daffodil-order-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Dictionary } from '@ngrx/entity';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport {\n DaffOrder,\n DaffOrderTotal,\n} from '@daffodil/order';\nimport { DaffOrderFacadeInterface } from '@daffodil/order/state';\n\n/**\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffOrderFacade implements DaffOrderFacadeInterface {\n loading$: BehaviorSubject<boolean> = new BehaviorSubject(null);\n errors$: BehaviorSubject<DaffStateError[]> = new BehaviorSubject([]);\n\n orders$: BehaviorSubject<DaffOrder[]> = new BehaviorSubject([]);\n orderIds$: BehaviorSubject<DaffOrder['id'][]> = new BehaviorSubject([]);\n orderCount$: BehaviorSubject<number> = new BehaviorSubject(null);\n orderEntities$: BehaviorSubject<Dictionary<DaffOrder>> = new BehaviorSubject({});\n\n placedOrder$: BehaviorSubject<DaffOrder> = new BehaviorSubject(null);\n hasPlacedOrder$: BehaviorSubject<boolean> = new BehaviorSubject(false);\n\n getOrder$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrder> {\n return new BehaviorSubject(null);\n }\n\n getTotals$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrder['totals']> {\n return new BehaviorSubject([]);\n }\n\n getAppliedCodes$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrder['applied_codes']> {\n return new BehaviorSubject([]);\n }\n\n getItems$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrder['items']> {\n return new BehaviorSubject([]);\n }\n\n getBillingAddresses$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrder['billing_addresses']> {\n return new BehaviorSubject([]);\n }\n\n getShippingAddresses$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrder['shipping_addresses']> {\n return new BehaviorSubject([]);\n }\n\n getShipments$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrder['shipments']> {\n return new BehaviorSubject([]);\n }\n\n getPayment$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrder['payment']> {\n return new BehaviorSubject(null);\n }\n\n getInvoices$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrder['invoices']> {\n return new BehaviorSubject([]);\n }\n\n getCredits$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrder['credits']> {\n return new BehaviorSubject([]);\n }\n getGrandTotal$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrderTotal> {\n return new BehaviorSubject(null);\n };\n getSubtotal$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrderTotal> {\n return new BehaviorSubject(null);\n };\n getShippingTotal$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrderTotal> {\n return new BehaviorSubject(null);\n };\n getDiscountTotal$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrderTotal> {\n return new BehaviorSubject(null);\n };\n hasDiscount$(orderId: DaffOrder['id']): BehaviorSubject<boolean> {\n return new BehaviorSubject(false);\n };\n getTaxTotal$(orderId: DaffOrder['id']): BehaviorSubject<DaffOrderTotal> {\n return new BehaviorSubject(null);\n };\n\n dispatch(action: Action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffOrderFacade } from '@daffodil/order/state';\n\nimport { MockDaffOrderFacade } from './mock-order-facade';\n\n@NgModule({\n providers: [\n { provide: DaffOrderFacade, useExisting: MockDaffOrderFacade },\n ],\n})\nexport class DaffOrderTestingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAYA;;AAEG;MAEU,mBAAmB,CAAA;AADhC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,QAAQ,GAA6B,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;AAC/D,QAAA,IAAA,CAAA,OAAO,GAAsC,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;AAErE,QAAA,IAAA,CAAA,OAAO,GAAiC,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;AAChE,QAAA,IAAA,CAAA,SAAS,GAAuC,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;AACxE,QAAA,IAAA,CAAA,WAAW,GAA4B,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;AACjE,QAAA,IAAA,CAAA,cAAc,GAA2C,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;AAEjF,QAAA,IAAA,CAAA,YAAY,GAA+B,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;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