@daffodil/order 0.39.11 → 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/models/responses/order-address.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} +1 -1
- 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} +3 -3
- 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} +33 -23
- 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
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"daffodil-order-driver-magento-2.4.0.umd.js","sources":["../../../libs/order/driver/magento/2.4.0/src/transforms/responses/order.ts","../../../node_modules/tslib/tslib.es6.js","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-address.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-payment.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-item.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-shipment-item.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-invoice.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-shipment-tracking.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-shipment.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order.ts","../../../libs/order/driver/magento/2.4.0/src/queries/get-guest-orders.ts","../../../libs/order/driver/magento/2.4.0/src/injection-tokens/fragments/order.ts","../../../libs/order/driver/magento/2.4.0/src/errors/codes.ts","../../../libs/order/driver/magento/2.4.0/src/errors/map.ts","../../../libs/order/driver/magento/2.4.0/src/errors/transform.ts","../../../libs/order/driver/magento/2.4.0/src/validators/get-orders.ts","../../../libs/order/driver/magento/2.4.0/src/order.service.ts","../../../libs/order/driver/magento/2.4.0/src/order-driver.module.ts","../../../libs/order/driver/magento/2.4.0/src/daffodil-order-driver-magento-2.4.0.ts"],"sourcesContent":["import {\n DaffOrder,\n DaffOrderTotal,\n DaffOrderItem,\n DaffOrderAddress,\n DaffOrderShipment,\n DaffOrderShipmentItem,\n DaffOrderShipmentTracking,\n DaffOrderPayment,\n DaffOrderInvoice,\n DaffOrderTotalTypeEnum,\n DaffOrderItemType,\n} from '@daffodil/order';\n\nimport {\n MagentoGraycoreOrder,\n MagentoGraycoreOrderItem,\n MagentoGraycoreOrderShipment,\n MagentoGraycoreOrderAddress,\n MagentoGraycoreOrderShipmentItem,\n MagentoGraycoreOrderShipmentTracking,\n MagentoGraycoreOrderPayment,\n MagentoGraycoreOrderInvoice,\n} from '../../models/responses/public_api';\n\nfunction transformTotals(totals: {\n grand_total: number;\n subtotal: number;\n shipping: number;\n discount: number;\n tax: number;\n}): DaffOrderTotal[] {\n return [\n {\n label: 'Grand Total',\n type: DaffOrderTotalTypeEnum.GrandTotal,\n value: totals.grand_total,\n sort_order: 1,\n },\n {\n label: 'Subtotal',\n type: DaffOrderTotalTypeEnum.Subtotal,\n value: totals.subtotal,\n sort_order: 0,\n },\n {\n label: 'Shipping',\n type: DaffOrderTotalTypeEnum.Shipping,\n value: totals.shipping,\n sort_order: 2,\n },\n {\n label: 'Tax',\n type: DaffOrderTotalTypeEnum.Tax,\n value: totals.tax,\n sort_order: 3,\n },\n {\n label: 'Discount',\n type: DaffOrderTotalTypeEnum.Discount,\n value: totals.discount,\n sort_order: 4,\n },\n ];\n}\n\nfunction transformItem(item: MagentoGraycoreOrderItem): DaffOrderItem {\n return {\n id: null,\n item_id: null,\n type: DaffOrderItemType.Simple,\n qty_ordered: item.qty_ordered,\n qty_canceled: item.qty_canceled,\n qty_fulfilled: item.qty_fulfilled,\n qty: item.qty,\n image: {\n url: item.image,\n id: null,\n label: null,\n },\n order_id: item.order_id,\n created_at: item.created_at,\n updated_at: item.updated_at,\n product_id: String(item.product_id),\n parent_item_id: null,\n sku: item.sku,\n name: item.name,\n weight: item.weight,\n price: item.price,\n discount_percent: item.discount_percent,\n discount_amount: item.discount_amount,\n tax_percent: item.tax_percent,\n tax_amount: item.tax_amount,\n row_total: item.row_total,\n row_total_with_discount: item.row_total_with_discount,\n row_weight: item.row_weight,\n tax_before_discount: item.tax_before_discount,\n };\n}\n\nfunction transformAddress(address: MagentoGraycoreOrderAddress): DaffOrderAddress {\n return {\n order_id: String(address.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: address.email,\n street: address.street[0],\n street2: address.street[1],\n city: address.city,\n region: address.region_id,\n country: address.country_code,\n postcode: address.postcode,\n };\n}\n\nfunction transformShipmentItem(shipmentItem: MagentoGraycoreOrderShipmentItem): DaffOrderShipmentItem {\n return {\n item: transformItem(shipmentItem.item),\n qty: shipmentItem.qty,\n };\n}\n\nfunction transformShipmentTracking(tracking: MagentoGraycoreOrderShipmentTracking): DaffOrderShipmentTracking {\n return {\n tracking_number: tracking.tracking_number,\n tracking_url: null,\n carrier: tracking.carrier,\n title: tracking.title,\n carrier_logo: null,\n };\n}\n\nfunction transformShipment(shipment: MagentoGraycoreOrderShipment): DaffOrderShipment {\n return {\n carrier: null,\n carrier_title: null,\n code: null,\n method: null,\n method_description: null,\n tracking: shipment.tracking.map(transformShipmentTracking),\n items: shipment.items.map(transformShipmentItem),\n };\n}\n\nfunction transformPayment(payment: MagentoGraycoreOrderPayment): DaffOrderPayment {\n return {\n id: String(payment.payment_id),\n payment_id: String(payment.payment_id),\n order_id: String(payment.order_id),\n created_at: null,\n updated_at: null,\n method: payment.method,\n cc_type: payment.cc_type,\n cc_last4: payment.cc_last4,\n cc_owner: payment.cc_owner,\n cc_exp_month: payment.cc_exp_month,\n cc_exp_year: payment.cc_exp_year,\n };\n}\n\nfunction transformInvoice(invoice: MagentoGraycoreOrderInvoice): DaffOrderInvoice {\n return {\n totals: transformTotals(invoice),\n billing_address: transformAddress(invoice.billing_address),\n shipping_address: transformAddress(invoice.shipping_address),\n payment: transformPayment(invoice.payment),\n items: invoice.items.map(transformShipmentItem),\n shipping_method: null,\n };\n}\n\n/**\n * Transforms the MagentoGraycoreOrder from the magento order query into a DaffOrder.\n */\nexport function daffMagentoTransformOrder(order: MagentoGraycoreOrder): DaffOrder {\n return {\n extra_attributes: order,\n\n id: String(order.order_number),\n customer_id: String(order.customer_id),\n created_at: order.created_at,\n updated_at: order.updated_at,\n status: order.status,\n\n totals: transformTotals(order),\n applied_codes: order.applied_codes.map(code => ({ code })),\n items: order.items.map(transformItem),\n billing_addresses: [\n transformAddress(order.billing_address),\n ],\n shipping_addresses: [\n transformAddress(order.shipping_address),\n ],\n shipments: order.shipments.map(transformShipment),\n payment: transformPayment(order.payment),\n invoices: order.invoices.map(transformInvoice),\n credits: order.credits.map(transformInvoice),\n };\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import { gql } from 'apollo-angular';\n\n\nexport const orderAddressFragment = gql`\n fragment orderAddress on GraycoreOrderAddress {\n order_id\n prefix\n suffix\n firstname\n middlename\n lastname\n telephone\n email\n street\n city\n region\n region_id\n country_code\n postcode\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderPaymentFragment = gql`\n fragment orderPayment on GraycoreOrderPayment {\n payment_id\n order_id\n method\n cc_type\n cc_last4\n cc_owner\n cc_exp_month\n cc_exp_year\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderItemFragment = gql`\n fragment orderItem on GraycoreOrderItem {\n qty_ordered\n image\n qty_canceled\n qty_fulfilled\n order_id\n created_at\n updated_at\n product_id\n sku\n name\n weight\n qty\n price\n discount_percent\n discount_amount\n tax_percent\n tax_amount\n row_total\n row_total_with_discount\n row_weight\n tax_before_discount\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderItemFragment } from './order-item';\n\nexport const orderShipmentItemFragment = gql`\n fragment orderShipmentItem on GraycoreOrderShipmentItem {\n qty\n item {\n ...orderItem\n }\n }\n ${orderItemFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderAddressFragment } from './order-address';\nimport { orderPaymentFragment } from './order-payment';\nimport { orderShipmentItemFragment } from './order-shipment-item';\n\nexport const orderInvoiceFragment = gql`\n fragment orderInvoice on GraycoreOrderInvoice {\n items {\n ...orderShipmentItem\n }\n grand_total\n subtotal\n shipping\n discount\n tax\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n\t\t}\n\t\tpayment {\n\t\t\t...orderPayment\n\t\t}\n }\n ${orderShipmentItemFragment}\n ${orderAddressFragment}\n ${orderPaymentFragment}\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderShipmentTrackingFragment = gql`\n fragment orderShipmentTracking on GraycoreOrderShipmentTracking {\n tracking_number\n carrier\n title\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderShipmentItemFragment } from './order-shipment-item';\nimport { orderShipmentTrackingFragment } from './order-shipment-tracking';\n\nexport const orderShipmentFragment = gql`\n fragment orderShipment on GraycoreOrderShipment {\n tracking {\n ...orderShipmentTracking\n }\n items {\n ...orderShipmentItem\n }\n }\n ${orderShipmentItemFragment}\n ${orderShipmentTrackingFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderAddressFragment } from './order-address';\nimport { orderInvoiceFragment } from './order-invoice';\nimport { orderItemFragment } from './order-item';\nimport { orderPaymentFragment } from './order-payment';\nimport { orderShipmentFragment } from './order-shipment';\n\nexport const orderFragment = gql`\n fragment order on GraycoreOrder {\n id\n order_number\n customer_id\n created_at\n updated_at\n grand_total\n subtotal\n shipping\n discount\n tax\n status\n applied_codes\n items {\n ...orderItem\n }\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n }\n shipments {\n ...orderShipment\n }\n payment {\n ...orderPayment\n }\n invoices {\n ...orderInvoice\n }\n credits {\n ...orderInvoice\n }\n }\n ${orderItemFragment}\n ${orderShipmentFragment}\n ${orderPaymentFragment}\n ${orderInvoiceFragment}\n ${orderAddressFragment}\n`;\n","import { gql } from '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 orders {\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?.orders) {\n if (response.data.graycoreGuestOrders.orders.reduce((acc, order) => acc && !!(\n order.billing_address\n && order.shipping_address\n && order.payment\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 '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.orders.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":["DaffOrderTotalTypeEnum","DaffOrderItemType","gql","daffBuildFragmentNameSpread","daffBuildFragmentDefinition","InjectionToken","DaffCartNotFoundError","daffTransformMagentoError","DaffOrderInvalidAPIResponseError","map","catchError","throwError","DaffOrderNotFoundError","Injectable","Apollo","Inject","DaffOrderDriver","NgModule","CommonModule"],"mappings":";;;;;;IAyBA,SAAS,eAAe,CAAC,MAMxB;QACC,OAAO;YACL;gBACE,KAAK,EAAE,aAAa;gBACpB,IAAI,E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
-
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@daffodil/order"),require("apollo-angular"),require("@daffodil/core/graphql"),require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("@daffodil/order/driver"),require("@daffodil/driver/magento"),require("@daffodil/cart/driver"),require("@angular/common")):"function"==typeof define&&define.amd?define("@daffodil/order/driver/magento/2.4.0",["exports","@daffodil/order","apollo-angular","@daffodil/core/graphql","@angular/core","rxjs","rxjs/operators","@daffodil/order/driver","@daffodil/driver/magento","@daffodil/cart/driver","@angular/common"],e):e(((r="undefined"!=typeof globalThis?globalThis:r||self).daffodil=r.daffodil||{},r.daffodil.order=r.daffodil.order||{},r.daffodil.order.driver=r.daffodil.order.driver||{},r.daffodil.order.driver.magento=r.daffodil.order.driver.magento||{},r.daffodil.order.driver.magento[2]=r.daffodil.order.driver.magento[2]||{},r.daffodil.order.driver.magento[2][4]=r.daffodil.order.driver.magento[2][4]||{},r.daffodil.order.driver.magento[2][4][0]={}),r.daffodil.order,r.i1,r.graphql,r.ng.core,r.rxjs,r.rxjs.operators,r.daffodil.order.driver,r.magento,r.driver,r.ng.common)}(this,(function(r,e,n,t,o,d,a,i,c,s,l){"use strict";function u(r){return[{label:"Grand Total",type:e.DaffOrderTotalTypeEnum.GrandTotal,value:r.grand_total,sort_order:1},{label:"Subtotal",type:e.DaffOrderTotalTypeEnum.Subtotal,value:r.subtotal,sort_order:0},{label:"Shipping",type:e.DaffOrderTotalTypeEnum.Shipping,value:r.shipping,sort_order:2},{label:"Tax",type:e.DaffOrderTotalTypeEnum.Tax,value:r.tax,sort_order:3},{label:"Discount",type:e.DaffOrderTotalTypeEnum.Discount,value:r.discount,sort_order:4}]}function m(r){return{id:null,item_id:null,type:e.DaffOrderItemType.Simple,qty_ordered:r.qty_ordered,qty_canceled:r.qty_canceled,qty_fulfilled:r.qty_fulfilled,qty:r.qty,image:{url:r.image,id:null,label:null},order_id:r.order_id,created_at:r.created_at,updated_at:r.updated_at,product_id:String(r.product_id),parent_item_id:null,sku:r.sku,name:r.name,weight:r.weight,price:r.price,discount_percent:r.discount_percent,discount_amount:r.discount_amount,tax_percent:r.tax_percent,tax_amount:r.tax_amount,row_total:r.row_total,row_total_with_discount:r.row_total_with_discount,row_weight:r.row_weight,tax_before_discount:r.tax_before_discount}}function f(r){return{order_id:String(r.order_id),prefix:r.prefix,suffix:r.suffix,firstname:r.firstname,middlename:r.middlename,lastname:r.lastname,telephone:r.telephone,email:r.email,street:r.street[0],street2:r.street[1],city:r.city,region:r.region_id,country:r.country_code,postcode:r.postcode}}function p(r){return{item:m(r.item),qty:r.qty}}function _(r){return{tracking_number:r.tracking_number,tracking_url:null,carrier:r.carrier,title:r.title,carrier_logo:null}}function g(r){return{carrier:null,carrier_title:null,code:null,method:null,method_description:null,tracking:r.tracking.map(_),items:r.items.map(p)}}function y(r){return{id:String(r.payment_id),payment_id:String(r.payment_id),order_id:String(r.order_id),created_at:null,updated_at:null,method:r.method,cc_type:r.cc_type,cc_last4:r.cc_last4,cc_owner:r.cc_owner,cc_exp_month:r.cc_exp_month,cc_exp_year:r.cc_exp_year}}function h(r){return{totals:u(r),billing_address:f(r.billing_address),shipping_address:f(r.shipping_address),payment:y(r.payment),items:r.items.map(p),shipping_method:null}}function v(r){return{extra_attributes:r,id:String(r.order_number),customer_id:String(r.customer_id),created_at:r.created_at,updated_at:r.updated_at,status:r.status,totals:u(r),applied_codes:r.applied_codes.map((function(r){return{code:r}})),items:r.items.map(m),billing_addresses:[f(r.billing_address)],shipping_addresses:[f(r.shipping_address)],shipments:r.shipments.map(g),payment:y(r.payment),invoices:r.invoices.map(h),credits:r.credits.map(h)}}
|
2
|
-
/*! *****************************************************************************
|
3
|
-
Copyright (c) Microsoft Corporation.
|
4
|
-
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
6
|
-
purpose with or without fee is hereby granted.
|
7
|
-
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
15
|
-
***************************************************************************** */Object.create;function x(r){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&r[e],t=0;if(n)return n.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(r,e){var n="function"==typeof Symbol&&r[Symbol.iterator];if(!n)return r;var t,o,d=n.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(t=d.next()).done;)a.push(t.value)}catch(r){o={error:r}}finally{try{t&&!t.done&&(n=d.return)&&n.call(d)}finally{if(o)throw o.error}}return a}function O(){for(var r=[],e=0;e<arguments.length;e++)r=r.concat(b(arguments[e]));return r}function q(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}Object.create;var I,w,S,T,G,D,k,A,j,F,E,P=n.gql(I||(I=q(["\n fragment orderAddress on GraycoreOrderAddress {\n order_id\n prefix\n suffix\n firstname\n middlename\n lastname\n telephone\n email\n street\n city\n region\n region_id\n country_code\n postcode\n }\n"],["\n fragment orderAddress on GraycoreOrderAddress {\n order_id\n prefix\n suffix\n firstname\n middlename\n lastname\n telephone\n email\n street\n city\n region\n region_id\n country_code\n postcode\n }\n"]))),M=n.gql(w||(w=q(["\n fragment orderPayment on GraycoreOrderPayment {\n payment_id\n order_id\n method\n cc_type\n cc_last4\n cc_owner\n cc_exp_month\n cc_exp_year\n }\n"],["\n fragment orderPayment on GraycoreOrderPayment {\n payment_id\n order_id\n method\n cc_type\n cc_last4\n cc_owner\n cc_exp_month\n cc_exp_year\n }\n"]))),N=n.gql(S||(S=q(["\n fragment orderItem on GraycoreOrderItem {\n qty_ordered\n image\n qty_canceled\n qty_fulfilled\n order_id\n created_at\n updated_at\n product_id\n sku\n name\n weight\n qty\n price\n discount_percent\n discount_amount\n tax_percent\n tax_amount\n row_total\n row_total_with_discount\n row_weight\n tax_before_discount\n }\n"],["\n fragment orderItem on GraycoreOrderItem {\n qty_ordered\n image\n qty_canceled\n qty_fulfilled\n order_id\n created_at\n updated_at\n product_id\n sku\n name\n weight\n qty\n price\n discount_percent\n discount_amount\n tax_percent\n tax_amount\n row_total\n row_total_with_discount\n row_weight\n tax_before_discount\n }\n"]))),C=n.gql(T||(T=q(["\n fragment orderShipmentItem on GraycoreOrderShipmentItem {\n qty\n item {\n ...orderItem\n }\n }\n ","\n"],["\n fragment orderShipmentItem on GraycoreOrderShipmentItem {\n qty\n item {\n ...orderItem\n }\n }\n ","\n"])),N),R=n.gql(G||(G=q(["\n fragment orderInvoice on GraycoreOrderInvoice {\n items {\n ...orderShipmentItem\n }\n grand_total\n subtotal\n shipping\n discount\n tax\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n\t\t}\n\t\tpayment {\n\t\t\t...orderPayment\n\t\t}\n }\n ","\n ","\n ","\n"],["\n fragment orderInvoice on GraycoreOrderInvoice {\n items {\n ...orderShipmentItem\n }\n grand_total\n subtotal\n shipping\n discount\n tax\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n\t\t}\n\t\tpayment {\n\t\t\t...orderPayment\n\t\t}\n }\n ","\n ","\n ","\n"])),C,P,M),$=n.gql(D||(D=q(["\n fragment orderShipmentTracking on GraycoreOrderShipmentTracking {\n tracking_number\n carrier\n title\n }\n"],["\n fragment orderShipmentTracking on GraycoreOrderShipmentTracking {\n tracking_number\n carrier\n title\n }\n"]))),B=n.gql(k||(k=q(["\n fragment orderShipment on GraycoreOrderShipment {\n tracking {\n ...orderShipmentTracking\n }\n items {\n ...orderShipmentItem\n }\n }\n ","\n ","\n"],["\n fragment orderShipment on GraycoreOrderShipment {\n tracking {\n ...orderShipmentTracking\n }\n items {\n ...orderShipmentItem\n }\n }\n ","\n ","\n"])),C,$),U=n.gql(A||(A=q(["\n fragment order on GraycoreOrder {\n id\n order_number\n customer_id\n created_at\n updated_at\n grand_total\n subtotal\n shipping\n discount\n tax\n status\n applied_codes\n items {\n ...orderItem\n }\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n }\n shipments {\n ...orderShipment\n }\n payment {\n ...orderPayment\n }\n invoices {\n ...orderInvoice\n }\n credits {\n ...orderInvoice\n }\n }\n ","\n ","\n ","\n ","\n ","\n"],["\n fragment order on GraycoreOrder {\n id\n order_number\n customer_id\n created_at\n updated_at\n grand_total\n subtotal\n shipping\n discount\n tax\n status\n applied_codes\n items {\n ...orderItem\n }\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n }\n shipments {\n ...orderShipment\n }\n payment {\n ...orderPayment\n }\n invoices {\n ...orderInvoice\n }\n credits {\n ...orderInvoice\n }\n }\n ","\n ","\n ","\n ","\n ","\n"])),N,B,M,R,P),z=function(r){return void 0===r&&(r=[]),n.gql(j||(j=q(["\n query MagentoGetGuestOrders($cartId: String!) {\n graycoreGuestOrders(cartId: $cartId) {\n orders {\n ...order\n ","\n }\n }\n }\n ","\n ","\n"],["\n query MagentoGetGuestOrders($cartId: String!) {\n graycoreGuestOrders(cartId: $cartId) {\n orders {\n ...order\n ","\n }\n }\n }\n ","\n ","\n"])),t.daffBuildFragmentNameSpread.apply(void 0,O(r)),U,t.daffBuildFragmentDefinition.apply(void 0,O(r)))},H=new o.InjectionToken("DaffMagentoExtraOrderFragments",{factory:function(){return[]}});!function(r){r.CART_NOT_FOUND="graphql-no-such-entity"}(F||(F={}));var J=((E={})[F.CART_NOT_FOUND]=s.DaffCartNotFoundError,E);var K=function(r){var e,n;if(null===(n=null===(e=r.data)||void 0===e?void 0:e.graycoreGuestOrders)||void 0===n?void 0:n.orders){if(r.data.graycoreGuestOrders.orders.reduce((function(r,e){return r&&!!(e.billing_address&&e.shipping_address&&e.payment)}),!0))return r;throw new i.DaffOrderInvalidAPIResponseError("One of the orders does not contain required fields.")}throw new i.DaffOrderInvalidAPIResponseError("Get orders response does not contain a valid list of orders.")},L=function(){function r(r,e){this.apollo=r,this.extraOrderFragments=e}return r.prototype.list=function(r){return this.apollo.query({query:z(this.extraOrderFragments),variables:{cartId:r}}).pipe(a.map(K),a.map((function(r){return r.data.graycoreGuestOrders.orders.map(v)})),a.catchError((function(r){return d.throwError((e=r,c.daffTransformMagentoError(e,J)));var e})))},r.prototype.get=function(r,e){return this.list(e).pipe(a.map((function(e){var n,t;try{for(var o=x(e),d=o.next();!d.done;d=o.next()){var a=d.value;if(a.id===r)return a}}catch(r){n={error:r}}finally{try{d&&!d.done&&(t=o.return)&&t.call(o)}finally{if(n)throw n.error}}throw new i.DaffOrderNotFoundError("Could not find an order with ID "+r)})))},r}();L.ɵprov=o.ɵɵdefineInjectable({factory:function(){return new L(o.ɵɵinject(n.Apollo),o.ɵɵinject(H))},token:L,providedIn:"root"}),L.decorators=[{type:o.Injectable,args:[{providedIn:"root"}]}],L.ctorParameters=function(){return[{type:n.Apollo},{type:Array,decorators:[{type:o.Inject,args:[H]}]}]};var Q=function(){function r(){}return r.forRoot=function(){return{ngModule:r,providers:[{provide:i.DaffOrderDriver,useExisting:L}]}},r}();Q.decorators=[{type:o.NgModule,args:[{imports:[l.CommonModule]}]}],r.DaffMagentoExtraOrderFragments=H,r.DaffOrderMagentoDriverModule=Q,r.DaffOrderMagentoService=L,r.daffMagentoTransformOrder=v,r.getGuestOrders=z,r.orderAddressFragment=P,r.orderFragment=U,r.orderInvoiceFragment=R,r.orderItemFragment=N,r.orderPaymentFragment=M,r.orderShipmentFragment=B,r.orderShipmentItemFragment=C,r.orderShipmentTrackingFragment=$,Object.defineProperty(r,"__esModule",{value:!0})}));
|
16
|
-
//# sourceMappingURL=daffodil-order-driver-magento-2.4.0.umd.min.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../libs/order/driver/magento/2.4.0/src/transforms/responses/order.ts","../../../node_modules/tslib/tslib.es6.js","../../../libs/order/driver/magento/2.4.0/src/errors/codes.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-address.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-payment.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-item.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-shipment-item.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-invoice.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-shipment-tracking.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order-shipment.ts","../../../libs/order/driver/magento/2.4.0/src/queries/fragments/order.ts","../../../libs/order/driver/magento/2.4.0/src/queries/get-guest-orders.ts","../../../libs/order/driver/magento/2.4.0/src/injection-tokens/fragments/order.ts","../../../libs/order/driver/magento/2.4.0/src/errors/map.ts","../../../libs/order/driver/magento/2.4.0/src/validators/get-orders.ts","../../../libs/order/driver/magento/2.4.0/src/order.service.ts","../../../libs/order/driver/magento/2.4.0/src/errors/transform.ts","../../../libs/order/driver/magento/2.4.0/src/order-driver.module.ts"],"names":["transformTotals","totals","label","type","DaffOrderTotalTypeEnum","GrandTotal","value","grand_total","sort_order","Subtotal","subtotal","Shipping","shipping","Tax","tax","Discount","discount","transformItem","item","id","item_id","DaffOrderItemType","Simple","qty_ordered","qty_canceled","qty_fulfilled","qty","image","url","order_id","created_at","updated_at","product_id","String","parent_item_id","sku","name","weight","price","discount_percent","discount_amount","tax_percent","tax_amount","row_total","row_total_with_discount","row_weight","tax_before_discount","transformAddress","address","prefix","suffix","firstname","middlename","lastname","telephone","email","street","street2","city","region","region_id","country","country_code","postcode","transformShipmentItem","shipmentItem","transformShipmentTracking","tracking","tracking_number","tracking_url","carrier","title","carrier_logo","transformShipment","shipment","carrier_title","code","method","method_description","map","items","transformPayment","payment","payment_id","cc_type","cc_last4","cc_owner","cc_exp_month","cc_exp_year","transformInvoice","invoice","billing_address","shipping_address","shipping_method","daffMagentoTransformOrder","order","extra_attributes","order_number","customer_id","status","applied_codes","billing_addresses","shipping_addresses","shipments","invoices","credits","Object","create","__values","o","s","Symbol","iterator","m","i","call","length","next","done","TypeError","__read","n","r","e","ar","push","error","__spread","arguments","concat","__makeTemplateObject","cooked","raw","defineProperty","MagentoOrderGraphQlErrorCode","orderAddressFragment","gql","templateObject_1","orderPaymentFragment","templateObject_1$1","orderItemFragment","templateObject_1$2","orderShipmentItemFragment","templateObject_1$3","orderInvoiceFragment","templateObject_1$4","orderShipmentTrackingFragment","templateObject_1$5","orderShipmentFragment","templateObject_1$6","orderFragment","templateObject_1$7","getGuestOrders","extraOrderFragments","templateObject_1$8","daffBuildFragmentNameSpread","apply","daffBuildFragmentDefinition","DaffMagentoExtraOrderFragments","InjectionToken","factory","DaffOrderMagentoErrorMap","_a","CART_NOT_FOUND","DaffCartNotFoundError","validateGetOrdersResponse","response","_b","data","graycoreGuestOrders","orders","reduce","acc","DaffOrderInvalidAPIResponseError","DaffOrderMagentoService","apollo","this","prototype","list","cartId","query","variables","pipe","result","catchError","err","throwError","daffTransformMagentoError","get","orderId","orders_1","orders_1_1","DaffOrderNotFoundError","Injectable","args","providedIn","Apollo","Inject","DaffOrderMagentoDriverModule","forRoot","ngModule","providers","provide","DaffOrderDriver","useExisting","NgModule","imports","CommonModule"],"mappings":"ovCAyBA,SAASA,EAAgBC,GAOvB,MAAO,CACL,CACEC,MAAO,cACPC,KAAMC,EAAAA,uBAAuBC,WAC7BC,MAAOL,EAAOM,YACdC,WAAY,GAEd,CACEN,M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GAAIyF,EAAM5E,KAAO0K,EACf,OAAO9F,oGAKX,MAAM,IAAIiG,EAAAA,uBAAuB,mCAAmCH,gKAhC3EI,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,oDAjCLC,EAAAA,sCAsCJC,EAAAA,OAAMH,KAAA,CAACpC,yBE3BZ,SAAAwC,YACSA,EAAAC,QAAP,WACE,MAAO,CACLC,SAAUF,EACVG,UAAW,CACT,CACEC,QAASC,EAAAA,gBACTC,YAAa9B,+BAZtB+B,EAAAA,SAAQX,KAAA,CAAC,CACRY,QAAS,CACPC,EAAAA","sourcesContent":["import {\n DaffOrder,\n DaffOrderTotal,\n DaffOrderItem,\n DaffOrderAddress,\n DaffOrderShipment,\n DaffOrderShipmentItem,\n DaffOrderShipmentTracking,\n DaffOrderPayment,\n DaffOrderInvoice,\n DaffOrderTotalTypeEnum,\n DaffOrderItemType,\n} from '@daffodil/order';\n\nimport {\n MagentoGraycoreOrder,\n MagentoGraycoreOrderItem,\n MagentoGraycoreOrderShipment,\n MagentoGraycoreOrderAddress,\n MagentoGraycoreOrderShipmentItem,\n MagentoGraycoreOrderShipmentTracking,\n MagentoGraycoreOrderPayment,\n MagentoGraycoreOrderInvoice,\n} from '../../models/responses/public_api';\n\nfunction transformTotals(totals: {\n grand_total: number;\n subtotal: number;\n shipping: number;\n discount: number;\n tax: number;\n}): DaffOrderTotal[] {\n return [\n {\n label: 'Grand Total',\n type: DaffOrderTotalTypeEnum.GrandTotal,\n value: totals.grand_total,\n sort_order: 1,\n },\n {\n label: 'Subtotal',\n type: DaffOrderTotalTypeEnum.Subtotal,\n value: totals.subtotal,\n sort_order: 0,\n },\n {\n label: 'Shipping',\n type: DaffOrderTotalTypeEnum.Shipping,\n value: totals.shipping,\n sort_order: 2,\n },\n {\n label: 'Tax',\n type: DaffOrderTotalTypeEnum.Tax,\n value: totals.tax,\n sort_order: 3,\n },\n {\n label: 'Discount',\n type: DaffOrderTotalTypeEnum.Discount,\n value: totals.discount,\n sort_order: 4,\n },\n ];\n}\n\nfunction transformItem(item: MagentoGraycoreOrderItem): DaffOrderItem {\n return {\n id: null,\n item_id: null,\n type: DaffOrderItemType.Simple,\n qty_ordered: item.qty_ordered,\n qty_canceled: item.qty_canceled,\n qty_fulfilled: item.qty_fulfilled,\n qty: item.qty,\n image: {\n url: item.image,\n id: null,\n label: null,\n },\n order_id: item.order_id,\n created_at: item.created_at,\n updated_at: item.updated_at,\n product_id: String(item.product_id),\n parent_item_id: null,\n sku: item.sku,\n name: item.name,\n weight: item.weight,\n price: item.price,\n discount_percent: item.discount_percent,\n discount_amount: item.discount_amount,\n tax_percent: item.tax_percent,\n tax_amount: item.tax_amount,\n row_total: item.row_total,\n row_total_with_discount: item.row_total_with_discount,\n row_weight: item.row_weight,\n tax_before_discount: item.tax_before_discount,\n };\n}\n\nfunction transformAddress(address: MagentoGraycoreOrderAddress): DaffOrderAddress {\n return {\n order_id: String(address.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: address.email,\n street: address.street[0],\n street2: address.street[1],\n city: address.city,\n region: address.region_id,\n country: address.country_code,\n postcode: address.postcode,\n };\n}\n\nfunction transformShipmentItem(shipmentItem: MagentoGraycoreOrderShipmentItem): DaffOrderShipmentItem {\n return {\n item: transformItem(shipmentItem.item),\n qty: shipmentItem.qty,\n };\n}\n\nfunction transformShipmentTracking(tracking: MagentoGraycoreOrderShipmentTracking): DaffOrderShipmentTracking {\n return {\n tracking_number: tracking.tracking_number,\n tracking_url: null,\n carrier: tracking.carrier,\n title: tracking.title,\n carrier_logo: null,\n };\n}\n\nfunction transformShipment(shipment: MagentoGraycoreOrderShipment): DaffOrderShipment {\n return {\n carrier: null,\n carrier_title: null,\n code: null,\n method: null,\n method_description: null,\n tracking: shipment.tracking.map(transformShipmentTracking),\n items: shipment.items.map(transformShipmentItem),\n };\n}\n\nfunction transformPayment(payment: MagentoGraycoreOrderPayment): DaffOrderPayment {\n return {\n id: String(payment.payment_id),\n payment_id: String(payment.payment_id),\n order_id: String(payment.order_id),\n created_at: null,\n updated_at: null,\n method: payment.method,\n cc_type: payment.cc_type,\n cc_last4: payment.cc_last4,\n cc_owner: payment.cc_owner,\n cc_exp_month: payment.cc_exp_month,\n cc_exp_year: payment.cc_exp_year,\n };\n}\n\nfunction transformInvoice(invoice: MagentoGraycoreOrderInvoice): DaffOrderInvoice {\n return {\n totals: transformTotals(invoice),\n billing_address: transformAddress(invoice.billing_address),\n shipping_address: transformAddress(invoice.shipping_address),\n payment: transformPayment(invoice.payment),\n items: invoice.items.map(transformShipmentItem),\n shipping_method: null,\n };\n}\n\n/**\n * Transforms the MagentoGraycoreOrder from the magento order query into a DaffOrder.\n */\nexport function daffMagentoTransformOrder(order: MagentoGraycoreOrder): DaffOrder {\n return {\n extra_attributes: order,\n\n id: String(order.order_number),\n customer_id: String(order.customer_id),\n created_at: order.created_at,\n updated_at: order.updated_at,\n status: order.status,\n\n totals: transformTotals(order),\n applied_codes: order.applied_codes.map(code => ({ code })),\n items: order.items.map(transformItem),\n billing_addresses: [\n transformAddress(order.billing_address),\n ],\n shipping_addresses: [\n transformAddress(order.shipping_address),\n ],\n shipments: order.shipments.map(transformShipment),\n payment: transformPayment(order.payment),\n invoices: order.invoices.map(transformInvoice),\n credits: order.credits.map(transformInvoice),\n };\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","export enum MagentoOrderGraphQlErrorCode {\n\tCART_NOT_FOUND = 'graphql-no-such-entity',\n}\n","import { gql } from 'apollo-angular';\n\n\nexport const orderAddressFragment = gql`\n fragment orderAddress on GraycoreOrderAddress {\n order_id\n prefix\n suffix\n firstname\n middlename\n lastname\n telephone\n email\n street\n city\n region\n region_id\n country_code\n postcode\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderPaymentFragment = gql`\n fragment orderPayment on GraycoreOrderPayment {\n payment_id\n order_id\n method\n cc_type\n cc_last4\n cc_owner\n cc_exp_month\n cc_exp_year\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderItemFragment = gql`\n fragment orderItem on GraycoreOrderItem {\n qty_ordered\n image\n qty_canceled\n qty_fulfilled\n order_id\n created_at\n updated_at\n product_id\n sku\n name\n weight\n qty\n price\n discount_percent\n discount_amount\n tax_percent\n tax_amount\n row_total\n row_total_with_discount\n row_weight\n tax_before_discount\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderItemFragment } from './order-item';\n\nexport const orderShipmentItemFragment = gql`\n fragment orderShipmentItem on GraycoreOrderShipmentItem {\n qty\n item {\n ...orderItem\n }\n }\n ${orderItemFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderAddressFragment } from './order-address';\nimport { orderPaymentFragment } from './order-payment';\nimport { orderShipmentItemFragment } from './order-shipment-item';\n\nexport const orderInvoiceFragment = gql`\n fragment orderInvoice on GraycoreOrderInvoice {\n items {\n ...orderShipmentItem\n }\n grand_total\n subtotal\n shipping\n discount\n tax\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n\t\t}\n\t\tpayment {\n\t\t\t...orderPayment\n\t\t}\n }\n ${orderShipmentItemFragment}\n ${orderAddressFragment}\n ${orderPaymentFragment}\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const orderShipmentTrackingFragment = gql`\n fragment orderShipmentTracking on GraycoreOrderShipmentTracking {\n tracking_number\n carrier\n title\n }\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderShipmentItemFragment } from './order-shipment-item';\nimport { orderShipmentTrackingFragment } from './order-shipment-tracking';\n\nexport const orderShipmentFragment = gql`\n fragment orderShipment on GraycoreOrderShipment {\n tracking {\n ...orderShipmentTracking\n }\n items {\n ...orderShipmentItem\n }\n }\n ${orderShipmentItemFragment}\n ${orderShipmentTrackingFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { orderAddressFragment } from './order-address';\nimport { orderInvoiceFragment } from './order-invoice';\nimport { orderItemFragment } from './order-item';\nimport { orderPaymentFragment } from './order-payment';\nimport { orderShipmentFragment } from './order-shipment';\n\nexport const orderFragment = gql`\n fragment order on GraycoreOrder {\n id\n order_number\n customer_id\n created_at\n updated_at\n grand_total\n subtotal\n shipping\n discount\n tax\n status\n applied_codes\n items {\n ...orderItem\n }\n billing_address {\n ...orderAddress\n }\n shipping_address {\n ...orderAddress\n }\n shipments {\n ...orderShipment\n }\n payment {\n ...orderPayment\n }\n invoices {\n ...orderInvoice\n }\n credits {\n ...orderInvoice\n }\n }\n ${orderItemFragment}\n ${orderShipmentFragment}\n ${orderPaymentFragment}\n ${orderInvoiceFragment}\n ${orderAddressFragment}\n`;\n","import { gql } from '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 orders {\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","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 { 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?.orders) {\n if (response.data.graycoreGuestOrders.orders.reduce((acc, order) => acc && !!(\n order.billing_address\n && order.shipping_address\n && order.payment\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 '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.orders.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 { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffOrderMagentoErrorMap } from './map';\n\nexport function transformMagentoOrderError(error: any) {\n return daffTransformMagentoError(error, DaffOrderMagentoErrorMap);\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"]}
|