@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,657 +0,0 @@
|
|
1
|
-
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(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')) :
|
3
|
-
typeof define === 'function' && 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'], factory) :
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.daffodil = global.daffodil || {}, global.daffodil.order = global.daffodil.order || {}, global.daffodil.order.driver = global.daffodil.order.driver || {}, global.daffodil.order.driver.magento = global.daffodil.order.driver.magento || {}, global.daffodil.order.driver.magento['2'] = global.daffodil.order.driver.magento['2'] || {}, global.daffodil.order.driver.magento['2']['4'] = global.daffodil.order.driver.magento['2']['4'] || {}, global.daffodil.order.driver.magento['2']['4']['0'] = {}), global.daffodil.order, global.i1, global.graphql, global.ng.core, global.rxjs, global.rxjs.operators, global.daffodil.order.driver, global.magento, global.driver, global.ng.common));
|
5
|
-
}(this, (function (exports, order, i1, graphql, i0, rxjs, operators, driver$1, magento, driver, common) { 'use strict';
|
6
|
-
|
7
|
-
function transformTotals(totals) {
|
8
|
-
return [
|
9
|
-
{
|
10
|
-
label: 'Grand Total',
|
11
|
-
type: order.DaffOrderTotalTypeEnum.GrandTotal,
|
12
|
-
value: totals.grand_total,
|
13
|
-
sort_order: 1,
|
14
|
-
},
|
15
|
-
{
|
16
|
-
label: 'Subtotal',
|
17
|
-
type: order.DaffOrderTotalTypeEnum.Subtotal,
|
18
|
-
value: totals.subtotal,
|
19
|
-
sort_order: 0,
|
20
|
-
},
|
21
|
-
{
|
22
|
-
label: 'Shipping',
|
23
|
-
type: order.DaffOrderTotalTypeEnum.Shipping,
|
24
|
-
value: totals.shipping,
|
25
|
-
sort_order: 2,
|
26
|
-
},
|
27
|
-
{
|
28
|
-
label: 'Tax',
|
29
|
-
type: order.DaffOrderTotalTypeEnum.Tax,
|
30
|
-
value: totals.tax,
|
31
|
-
sort_order: 3,
|
32
|
-
},
|
33
|
-
{
|
34
|
-
label: 'Discount',
|
35
|
-
type: order.DaffOrderTotalTypeEnum.Discount,
|
36
|
-
value: totals.discount,
|
37
|
-
sort_order: 4,
|
38
|
-
},
|
39
|
-
];
|
40
|
-
}
|
41
|
-
function transformItem(item) {
|
42
|
-
return {
|
43
|
-
id: null,
|
44
|
-
item_id: null,
|
45
|
-
type: order.DaffOrderItemType.Simple,
|
46
|
-
qty_ordered: item.qty_ordered,
|
47
|
-
qty_canceled: item.qty_canceled,
|
48
|
-
qty_fulfilled: item.qty_fulfilled,
|
49
|
-
qty: item.qty,
|
50
|
-
image: {
|
51
|
-
url: item.image,
|
52
|
-
id: null,
|
53
|
-
label: null,
|
54
|
-
},
|
55
|
-
order_id: item.order_id,
|
56
|
-
created_at: item.created_at,
|
57
|
-
updated_at: item.updated_at,
|
58
|
-
product_id: String(item.product_id),
|
59
|
-
parent_item_id: null,
|
60
|
-
sku: item.sku,
|
61
|
-
name: item.name,
|
62
|
-
weight: item.weight,
|
63
|
-
price: item.price,
|
64
|
-
discount_percent: item.discount_percent,
|
65
|
-
discount_amount: item.discount_amount,
|
66
|
-
tax_percent: item.tax_percent,
|
67
|
-
tax_amount: item.tax_amount,
|
68
|
-
row_total: item.row_total,
|
69
|
-
row_total_with_discount: item.row_total_with_discount,
|
70
|
-
row_weight: item.row_weight,
|
71
|
-
tax_before_discount: item.tax_before_discount,
|
72
|
-
};
|
73
|
-
}
|
74
|
-
function transformAddress(address) {
|
75
|
-
return {
|
76
|
-
order_id: String(address.order_id),
|
77
|
-
prefix: address.prefix,
|
78
|
-
suffix: address.suffix,
|
79
|
-
firstname: address.firstname,
|
80
|
-
middlename: address.middlename,
|
81
|
-
lastname: address.lastname,
|
82
|
-
telephone: address.telephone,
|
83
|
-
email: address.email,
|
84
|
-
street: address.street[0],
|
85
|
-
street2: address.street[1],
|
86
|
-
city: address.city,
|
87
|
-
region: address.region_id,
|
88
|
-
country: address.country_code,
|
89
|
-
postcode: address.postcode,
|
90
|
-
};
|
91
|
-
}
|
92
|
-
function transformShipmentItem(shipmentItem) {
|
93
|
-
return {
|
94
|
-
item: transformItem(shipmentItem.item),
|
95
|
-
qty: shipmentItem.qty,
|
96
|
-
};
|
97
|
-
}
|
98
|
-
function transformShipmentTracking(tracking) {
|
99
|
-
return {
|
100
|
-
tracking_number: tracking.tracking_number,
|
101
|
-
tracking_url: null,
|
102
|
-
carrier: tracking.carrier,
|
103
|
-
title: tracking.title,
|
104
|
-
carrier_logo: null,
|
105
|
-
};
|
106
|
-
}
|
107
|
-
function transformShipment(shipment) {
|
108
|
-
return {
|
109
|
-
carrier: null,
|
110
|
-
carrier_title: null,
|
111
|
-
code: null,
|
112
|
-
method: null,
|
113
|
-
method_description: null,
|
114
|
-
tracking: shipment.tracking.map(transformShipmentTracking),
|
115
|
-
items: shipment.items.map(transformShipmentItem),
|
116
|
-
};
|
117
|
-
}
|
118
|
-
function transformPayment(payment) {
|
119
|
-
return {
|
120
|
-
id: String(payment.payment_id),
|
121
|
-
payment_id: String(payment.payment_id),
|
122
|
-
order_id: String(payment.order_id),
|
123
|
-
created_at: null,
|
124
|
-
updated_at: null,
|
125
|
-
method: payment.method,
|
126
|
-
cc_type: payment.cc_type,
|
127
|
-
cc_last4: payment.cc_last4,
|
128
|
-
cc_owner: payment.cc_owner,
|
129
|
-
cc_exp_month: payment.cc_exp_month,
|
130
|
-
cc_exp_year: payment.cc_exp_year,
|
131
|
-
};
|
132
|
-
}
|
133
|
-
function transformInvoice(invoice) {
|
134
|
-
return {
|
135
|
-
totals: transformTotals(invoice),
|
136
|
-
billing_address: transformAddress(invoice.billing_address),
|
137
|
-
shipping_address: transformAddress(invoice.shipping_address),
|
138
|
-
payment: transformPayment(invoice.payment),
|
139
|
-
items: invoice.items.map(transformShipmentItem),
|
140
|
-
shipping_method: null,
|
141
|
-
};
|
142
|
-
}
|
143
|
-
/**
|
144
|
-
* Transforms the MagentoGraycoreOrder from the magento order query into a DaffOrder.
|
145
|
-
*/
|
146
|
-
function daffMagentoTransformOrder(order) {
|
147
|
-
return {
|
148
|
-
extra_attributes: order,
|
149
|
-
id: String(order.order_number),
|
150
|
-
customer_id: String(order.customer_id),
|
151
|
-
created_at: order.created_at,
|
152
|
-
updated_at: order.updated_at,
|
153
|
-
status: order.status,
|
154
|
-
totals: transformTotals(order),
|
155
|
-
applied_codes: order.applied_codes.map(function (code) { return ({ code: code }); }),
|
156
|
-
items: order.items.map(transformItem),
|
157
|
-
billing_addresses: [
|
158
|
-
transformAddress(order.billing_address),
|
159
|
-
],
|
160
|
-
shipping_addresses: [
|
161
|
-
transformAddress(order.shipping_address),
|
162
|
-
],
|
163
|
-
shipments: order.shipments.map(transformShipment),
|
164
|
-
payment: transformPayment(order.payment),
|
165
|
-
invoices: order.invoices.map(transformInvoice),
|
166
|
-
credits: order.credits.map(transformInvoice),
|
167
|
-
};
|
168
|
-
}
|
169
|
-
|
170
|
-
/*! *****************************************************************************
|
171
|
-
Copyright (c) Microsoft Corporation.
|
172
|
-
|
173
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
174
|
-
purpose with or without fee is hereby granted.
|
175
|
-
|
176
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
177
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
178
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
179
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
180
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
181
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
182
|
-
PERFORMANCE OF THIS SOFTWARE.
|
183
|
-
***************************************************************************** */
|
184
|
-
/* global Reflect, Promise */
|
185
|
-
var extendStatics = function (d, b) {
|
186
|
-
extendStatics = Object.setPrototypeOf ||
|
187
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
188
|
-
function (d, b) { for (var p in b)
|
189
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
190
|
-
d[p] = b[p]; };
|
191
|
-
return extendStatics(d, b);
|
192
|
-
};
|
193
|
-
function __extends(d, b) {
|
194
|
-
if (typeof b !== "function" && b !== null)
|
195
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
196
|
-
extendStatics(d, b);
|
197
|
-
function __() { this.constructor = d; }
|
198
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
199
|
-
}
|
200
|
-
var __assign = function () {
|
201
|
-
__assign = Object.assign || function __assign(t) {
|
202
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
203
|
-
s = arguments[i];
|
204
|
-
for (var p in s)
|
205
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
206
|
-
t[p] = s[p];
|
207
|
-
}
|
208
|
-
return t;
|
209
|
-
};
|
210
|
-
return __assign.apply(this, arguments);
|
211
|
-
};
|
212
|
-
function __rest(s, e) {
|
213
|
-
var t = {};
|
214
|
-
for (var p in s)
|
215
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
216
|
-
t[p] = s[p];
|
217
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
218
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
219
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
220
|
-
t[p[i]] = s[p[i]];
|
221
|
-
}
|
222
|
-
return t;
|
223
|
-
}
|
224
|
-
function __decorate(decorators, target, key, desc) {
|
225
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
226
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
227
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
228
|
-
else
|
229
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
230
|
-
if (d = decorators[i])
|
231
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
232
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
233
|
-
}
|
234
|
-
function __param(paramIndex, decorator) {
|
235
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
236
|
-
}
|
237
|
-
function __metadata(metadataKey, metadataValue) {
|
238
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
239
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
240
|
-
}
|
241
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
242
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
243
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
244
|
-
function fulfilled(value) { try {
|
245
|
-
step(generator.next(value));
|
246
|
-
}
|
247
|
-
catch (e) {
|
248
|
-
reject(e);
|
249
|
-
} }
|
250
|
-
function rejected(value) { try {
|
251
|
-
step(generator["throw"](value));
|
252
|
-
}
|
253
|
-
catch (e) {
|
254
|
-
reject(e);
|
255
|
-
} }
|
256
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
257
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
258
|
-
});
|
259
|
-
}
|
260
|
-
function __generator(thisArg, body) {
|
261
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
262
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
263
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
264
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
265
|
-
function step(op) {
|
266
|
-
if (f)
|
267
|
-
throw new TypeError("Generator is already executing.");
|
268
|
-
while (_)
|
269
|
-
try {
|
270
|
-
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)
|
271
|
-
return t;
|
272
|
-
if (y = 0, t)
|
273
|
-
op = [op[0] & 2, t.value];
|
274
|
-
switch (op[0]) {
|
275
|
-
case 0:
|
276
|
-
case 1:
|
277
|
-
t = op;
|
278
|
-
break;
|
279
|
-
case 4:
|
280
|
-
_.label++;
|
281
|
-
return { value: op[1], done: false };
|
282
|
-
case 5:
|
283
|
-
_.label++;
|
284
|
-
y = op[1];
|
285
|
-
op = [0];
|
286
|
-
continue;
|
287
|
-
case 7:
|
288
|
-
op = _.ops.pop();
|
289
|
-
_.trys.pop();
|
290
|
-
continue;
|
291
|
-
default:
|
292
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
293
|
-
_ = 0;
|
294
|
-
continue;
|
295
|
-
}
|
296
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
297
|
-
_.label = op[1];
|
298
|
-
break;
|
299
|
-
}
|
300
|
-
if (op[0] === 6 && _.label < t[1]) {
|
301
|
-
_.label = t[1];
|
302
|
-
t = op;
|
303
|
-
break;
|
304
|
-
}
|
305
|
-
if (t && _.label < t[2]) {
|
306
|
-
_.label = t[2];
|
307
|
-
_.ops.push(op);
|
308
|
-
break;
|
309
|
-
}
|
310
|
-
if (t[2])
|
311
|
-
_.ops.pop();
|
312
|
-
_.trys.pop();
|
313
|
-
continue;
|
314
|
-
}
|
315
|
-
op = body.call(thisArg, _);
|
316
|
-
}
|
317
|
-
catch (e) {
|
318
|
-
op = [6, e];
|
319
|
-
y = 0;
|
320
|
-
}
|
321
|
-
finally {
|
322
|
-
f = t = 0;
|
323
|
-
}
|
324
|
-
if (op[0] & 5)
|
325
|
-
throw op[1];
|
326
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
327
|
-
}
|
328
|
-
}
|
329
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
330
|
-
if (k2 === undefined)
|
331
|
-
k2 = k;
|
332
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
333
|
-
}) : (function (o, m, k, k2) {
|
334
|
-
if (k2 === undefined)
|
335
|
-
k2 = k;
|
336
|
-
o[k2] = m[k];
|
337
|
-
});
|
338
|
-
function __exportStar(m, o) {
|
339
|
-
for (var p in m)
|
340
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
341
|
-
__createBinding(o, m, p);
|
342
|
-
}
|
343
|
-
function __values(o) {
|
344
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
345
|
-
if (m)
|
346
|
-
return m.call(o);
|
347
|
-
if (o && typeof o.length === "number")
|
348
|
-
return {
|
349
|
-
next: function () {
|
350
|
-
if (o && i >= o.length)
|
351
|
-
o = void 0;
|
352
|
-
return { value: o && o[i++], done: !o };
|
353
|
-
}
|
354
|
-
};
|
355
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
356
|
-
}
|
357
|
-
function __read(o, n) {
|
358
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
359
|
-
if (!m)
|
360
|
-
return o;
|
361
|
-
var i = m.call(o), r, ar = [], e;
|
362
|
-
try {
|
363
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
364
|
-
ar.push(r.value);
|
365
|
-
}
|
366
|
-
catch (error) {
|
367
|
-
e = { error: error };
|
368
|
-
}
|
369
|
-
finally {
|
370
|
-
try {
|
371
|
-
if (r && !r.done && (m = i["return"]))
|
372
|
-
m.call(i);
|
373
|
-
}
|
374
|
-
finally {
|
375
|
-
if (e)
|
376
|
-
throw e.error;
|
377
|
-
}
|
378
|
-
}
|
379
|
-
return ar;
|
380
|
-
}
|
381
|
-
/** @deprecated */
|
382
|
-
function __spread() {
|
383
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
384
|
-
ar = ar.concat(__read(arguments[i]));
|
385
|
-
return ar;
|
386
|
-
}
|
387
|
-
/** @deprecated */
|
388
|
-
function __spreadArrays() {
|
389
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
390
|
-
s += arguments[i].length;
|
391
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
392
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
393
|
-
r[k] = a[j];
|
394
|
-
return r;
|
395
|
-
}
|
396
|
-
function __spreadArray(to, from, pack) {
|
397
|
-
if (pack || arguments.length === 2)
|
398
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
399
|
-
if (ar || !(i in from)) {
|
400
|
-
if (!ar)
|
401
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
402
|
-
ar[i] = from[i];
|
403
|
-
}
|
404
|
-
}
|
405
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
406
|
-
}
|
407
|
-
function __await(v) {
|
408
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
409
|
-
}
|
410
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
411
|
-
if (!Symbol.asyncIterator)
|
412
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
413
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
414
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
415
|
-
function verb(n) { if (g[n])
|
416
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
417
|
-
function resume(n, v) { try {
|
418
|
-
step(g[n](v));
|
419
|
-
}
|
420
|
-
catch (e) {
|
421
|
-
settle(q[0][3], e);
|
422
|
-
} }
|
423
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
424
|
-
function fulfill(value) { resume("next", value); }
|
425
|
-
function reject(value) { resume("throw", value); }
|
426
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
427
|
-
resume(q[0][0], q[0][1]); }
|
428
|
-
}
|
429
|
-
function __asyncDelegator(o) {
|
430
|
-
var i, p;
|
431
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
432
|
-
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; }
|
433
|
-
}
|
434
|
-
function __asyncValues(o) {
|
435
|
-
if (!Symbol.asyncIterator)
|
436
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
437
|
-
var m = o[Symbol.asyncIterator], i;
|
438
|
-
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);
|
439
|
-
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); }); }; }
|
440
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
441
|
-
}
|
442
|
-
function __makeTemplateObject(cooked, raw) {
|
443
|
-
if (Object.defineProperty) {
|
444
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
445
|
-
}
|
446
|
-
else {
|
447
|
-
cooked.raw = raw;
|
448
|
-
}
|
449
|
-
return cooked;
|
450
|
-
}
|
451
|
-
;
|
452
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
453
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
454
|
-
}) : function (o, v) {
|
455
|
-
o["default"] = v;
|
456
|
-
};
|
457
|
-
function __importStar(mod) {
|
458
|
-
if (mod && mod.__esModule)
|
459
|
-
return mod;
|
460
|
-
var result = {};
|
461
|
-
if (mod != null)
|
462
|
-
for (var k in mod)
|
463
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
464
|
-
__createBinding(result, mod, k);
|
465
|
-
__setModuleDefault(result, mod);
|
466
|
-
return result;
|
467
|
-
}
|
468
|
-
function __importDefault(mod) {
|
469
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
470
|
-
}
|
471
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
472
|
-
if (kind === "a" && !f)
|
473
|
-
throw new TypeError("Private accessor was defined without a getter");
|
474
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
475
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
476
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
477
|
-
}
|
478
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
479
|
-
if (kind === "m")
|
480
|
-
throw new TypeError("Private method is not writable");
|
481
|
-
if (kind === "a" && !f)
|
482
|
-
throw new TypeError("Private accessor was defined without a setter");
|
483
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
484
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
485
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
486
|
-
}
|
487
|
-
|
488
|
-
var orderAddressFragment = i1.gql(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\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"])));
|
489
|
-
var templateObject_1;
|
490
|
-
|
491
|
-
var orderPaymentFragment = i1.gql(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\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"])));
|
492
|
-
var templateObject_1$1;
|
493
|
-
|
494
|
-
var orderItemFragment = i1.gql(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\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"])));
|
495
|
-
var templateObject_1$2;
|
496
|
-
|
497
|
-
var orderShipmentItemFragment = i1.gql(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\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"])), orderItemFragment);
|
498
|
-
var templateObject_1$3;
|
499
|
-
|
500
|
-
var orderInvoiceFragment = i1.gql(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\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"])), orderShipmentItemFragment, orderAddressFragment, orderPaymentFragment);
|
501
|
-
var templateObject_1$4;
|
502
|
-
|
503
|
-
var orderShipmentTrackingFragment = i1.gql(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\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"])));
|
504
|
-
var templateObject_1$5;
|
505
|
-
|
506
|
-
var orderShipmentFragment = i1.gql(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\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"])), orderShipmentItemFragment, orderShipmentTrackingFragment);
|
507
|
-
var templateObject_1$6;
|
508
|
-
|
509
|
-
var orderFragment = i1.gql(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\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"])), orderItemFragment, orderShipmentFragment, orderPaymentFragment, orderInvoiceFragment, orderAddressFragment);
|
510
|
-
var templateObject_1$7;
|
511
|
-
|
512
|
-
var getGuestOrders = function (extraOrderFragments) {
|
513
|
-
if (extraOrderFragments === void 0) { extraOrderFragments = []; }
|
514
|
-
return i1.gql(templateObject_1$8 || (templateObject_1$8 = __makeTemplateObject(["\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"])), graphql.daffBuildFragmentNameSpread.apply(void 0, __spread(extraOrderFragments)), orderFragment, graphql.daffBuildFragmentDefinition.apply(void 0, __spread(extraOrderFragments)));
|
515
|
-
};
|
516
|
-
var templateObject_1$8;
|
517
|
-
|
518
|
-
/**
|
519
|
-
* An multi-provider injection token for providing extra GraphQL fragments that will be spread into order queries.
|
520
|
-
* This can be used to retrieve additional data that is not covered by the standard Daffodil interfaces.
|
521
|
-
* The data will appear in DaffOrder#extra_attributes.
|
522
|
-
*
|
523
|
-
* Fragment structure is platform-specific and this feature should be used with care.
|
524
|
-
*/
|
525
|
-
var DaffMagentoExtraOrderFragments = new i0.InjectionToken('DaffMagentoExtraOrderFragments', { factory: function () { return []; } });
|
526
|
-
|
527
|
-
var MagentoOrderGraphQlErrorCode;
|
528
|
-
(function (MagentoOrderGraphQlErrorCode) {
|
529
|
-
MagentoOrderGraphQlErrorCode["CART_NOT_FOUND"] = "graphql-no-such-entity";
|
530
|
-
})(MagentoOrderGraphQlErrorCode || (MagentoOrderGraphQlErrorCode = {}));
|
531
|
-
|
532
|
-
var _a;
|
533
|
-
var DaffOrderMagentoErrorMap = (_a = {},
|
534
|
-
_a[MagentoOrderGraphQlErrorCode.CART_NOT_FOUND] = driver.DaffCartNotFoundError,
|
535
|
-
_a);
|
536
|
-
|
537
|
-
function transformMagentoOrderError(error) {
|
538
|
-
return magento.daffTransformMagentoError(error, DaffOrderMagentoErrorMap);
|
539
|
-
}
|
540
|
-
|
541
|
-
var validateGetOrdersResponse = function (response) {
|
542
|
-
var _a, _b;
|
543
|
-
if ((_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.graycoreGuestOrders) === null || _b === void 0 ? void 0 : _b.orders) {
|
544
|
-
if (response.data.graycoreGuestOrders.orders.reduce(function (acc, order) { return acc && !!(order.billing_address
|
545
|
-
&& order.shipping_address
|
546
|
-
&& order.payment); }, true)) {
|
547
|
-
return response;
|
548
|
-
}
|
549
|
-
else {
|
550
|
-
throw new driver$1.DaffOrderInvalidAPIResponseError('One of the orders does not contain required fields.');
|
551
|
-
}
|
552
|
-
}
|
553
|
-
else {
|
554
|
-
throw new driver$1.DaffOrderInvalidAPIResponseError('Get orders response does not contain a valid list of orders.');
|
555
|
-
}
|
556
|
-
};
|
557
|
-
|
558
|
-
/**
|
559
|
-
* A service for making Magento GraphQL queries for orders.
|
560
|
-
*
|
561
|
-
* @inheritdoc
|
562
|
-
*/
|
563
|
-
var DaffOrderMagentoService = /** @class */ (function () {
|
564
|
-
function DaffOrderMagentoService(apollo, extraOrderFragments) {
|
565
|
-
this.apollo = apollo;
|
566
|
-
this.extraOrderFragments = extraOrderFragments;
|
567
|
-
}
|
568
|
-
DaffOrderMagentoService.prototype.list = function (cartId) {
|
569
|
-
return this.apollo.query({
|
570
|
-
query: getGuestOrders(this.extraOrderFragments),
|
571
|
-
variables: {
|
572
|
-
cartId: cartId,
|
573
|
-
},
|
574
|
-
}).pipe(operators.map(validateGetOrdersResponse), operators.map(function (result) { return result.data.graycoreGuestOrders.orders.map(daffMagentoTransformOrder); }), operators.catchError(function (err) { return rxjs.throwError(transformMagentoOrderError(err)); }));
|
575
|
-
};
|
576
|
-
DaffOrderMagentoService.prototype.get = function (orderId, cartId) {
|
577
|
-
return this.list(cartId).pipe(operators.map(function (orders) {
|
578
|
-
var e_1, _a;
|
579
|
-
try {
|
580
|
-
for (var orders_1 = __values(orders), orders_1_1 = orders_1.next(); !orders_1_1.done; orders_1_1 = orders_1.next()) {
|
581
|
-
var order = orders_1_1.value;
|
582
|
-
if (order.id === orderId) {
|
583
|
-
return order;
|
584
|
-
}
|
585
|
-
}
|
586
|
-
}
|
587
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
588
|
-
finally {
|
589
|
-
try {
|
590
|
-
if (orders_1_1 && !orders_1_1.done && (_a = orders_1.return)) _a.call(orders_1);
|
591
|
-
}
|
592
|
-
finally { if (e_1) throw e_1.error; }
|
593
|
-
}
|
594
|
-
// order not found
|
595
|
-
throw new driver$1.DaffOrderNotFoundError("Could not find an order with ID " + orderId);
|
596
|
-
}));
|
597
|
-
};
|
598
|
-
return DaffOrderMagentoService;
|
599
|
-
}());
|
600
|
-
/** @nocollapse */ DaffOrderMagentoService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DaffOrderMagentoService_Factory() { return new DaffOrderMagentoService(i0.ɵɵinject(i1.Apollo), i0.ɵɵinject(DaffMagentoExtraOrderFragments)); }, token: DaffOrderMagentoService, providedIn: "root" });
|
601
|
-
DaffOrderMagentoService.decorators = [
|
602
|
-
{ type: i0.Injectable, args: [{
|
603
|
-
providedIn: 'root',
|
604
|
-
},] }
|
605
|
-
];
|
606
|
-
/** @nocollapse */
|
607
|
-
DaffOrderMagentoService.ctorParameters = function () { return [
|
608
|
-
{ type: i1.Apollo },
|
609
|
-
{ type: Array, decorators: [{ type: i0.Inject, args: [DaffMagentoExtraOrderFragments,] }] }
|
610
|
-
]; };
|
611
|
-
|
612
|
-
var DaffOrderMagentoDriverModule = /** @class */ (function () {
|
613
|
-
function DaffOrderMagentoDriverModule() {
|
614
|
-
}
|
615
|
-
DaffOrderMagentoDriverModule.forRoot = function () {
|
616
|
-
return {
|
617
|
-
ngModule: DaffOrderMagentoDriverModule,
|
618
|
-
providers: [
|
619
|
-
{
|
620
|
-
provide: driver$1.DaffOrderDriver,
|
621
|
-
useExisting: DaffOrderMagentoService,
|
622
|
-
},
|
623
|
-
],
|
624
|
-
};
|
625
|
-
};
|
626
|
-
return DaffOrderMagentoDriverModule;
|
627
|
-
}());
|
628
|
-
DaffOrderMagentoDriverModule.decorators = [
|
629
|
-
{ type: i0.NgModule, args: [{
|
630
|
-
imports: [
|
631
|
-
common.CommonModule,
|
632
|
-
],
|
633
|
-
},] }
|
634
|
-
];
|
635
|
-
|
636
|
-
/**
|
637
|
-
* Generated bundle index. Do not edit.
|
638
|
-
*/
|
639
|
-
|
640
|
-
exports.DaffMagentoExtraOrderFragments = DaffMagentoExtraOrderFragments;
|
641
|
-
exports.DaffOrderMagentoDriverModule = DaffOrderMagentoDriverModule;
|
642
|
-
exports.DaffOrderMagentoService = DaffOrderMagentoService;
|
643
|
-
exports.daffMagentoTransformOrder = daffMagentoTransformOrder;
|
644
|
-
exports.getGuestOrders = getGuestOrders;
|
645
|
-
exports.orderAddressFragment = orderAddressFragment;
|
646
|
-
exports.orderFragment = orderFragment;
|
647
|
-
exports.orderInvoiceFragment = orderInvoiceFragment;
|
648
|
-
exports.orderItemFragment = orderItemFragment;
|
649
|
-
exports.orderPaymentFragment = orderPaymentFragment;
|
650
|
-
exports.orderShipmentFragment = orderShipmentFragment;
|
651
|
-
exports.orderShipmentItemFragment = orderShipmentItemFragment;
|
652
|
-
exports.orderShipmentTrackingFragment = orderShipmentTrackingFragment;
|
653
|
-
|
654
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
655
|
-
|
656
|
-
})));
|
657
|
-
//# sourceMappingURL=daffodil-order-driver-magento-2.4.0.umd.js.map
|