@medusajs/order 0.1.3 → 1.0.0-rc-20241003153304
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +6 -8
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -26
- package/dist/index.js.map +1 -1
- package/dist/joiner-config.d.ts +2 -5
- package/dist/joiner-config.d.ts.map +1 -0
- package/dist/joiner-config.js +21 -28
- package/dist/joiner-config.js.map +1 -1
- package/dist/migrations/Migration20240219102530.d.ts +1 -0
- package/dist/migrations/Migration20240219102530.d.ts.map +1 -0
- package/dist/migrations/Migration20240219102530.js +53 -19
- package/dist/migrations/Migration20240219102530.js.map +1 -1
- package/dist/migrations/Migration20240604100512.d.ts +5 -0
- package/dist/migrations/Migration20240604100512.d.ts.map +1 -0
- package/dist/migrations/Migration20240604100512.js +371 -0
- package/dist/migrations/Migration20240604100512.js.map +1 -0
- package/dist/migrations/Migration20240715102100.d.ts +5 -0
- package/dist/migrations/Migration20240715102100.d.ts.map +1 -0
- package/dist/migrations/Migration20240715102100.js +15 -0
- package/dist/migrations/Migration20240715102100.js.map +1 -0
- package/dist/migrations/Migration20240715174100.d.ts +5 -0
- package/dist/migrations/Migration20240715174100.d.ts.map +1 -0
- package/dist/migrations/Migration20240715174100.js +21 -0
- package/dist/migrations/Migration20240715174100.js.map +1 -0
- package/dist/migrations/Migration20240716081800.d.ts +5 -0
- package/dist/migrations/Migration20240716081800.d.ts.map +1 -0
- package/dist/migrations/Migration20240716081800.js +67 -0
- package/dist/migrations/Migration20240716081800.js.map +1 -0
- package/dist/migrations/Migration20240801085921.d.ts +5 -0
- package/dist/migrations/Migration20240801085921.d.ts.map +1 -0
- package/dist/migrations/Migration20240801085921.js +30 -0
- package/dist/migrations/Migration20240801085921.js.map +1 -0
- package/dist/migrations/Migration20240821164505.d.ts +6 -0
- package/dist/migrations/Migration20240821164505.d.ts.map +1 -0
- package/dist/migrations/Migration20240821164505.js +26 -0
- package/dist/migrations/Migration20240821164505.js.map +1 -0
- package/dist/migrations/Migration20240821170920.d.ts +6 -0
- package/dist/migrations/Migration20240821170920.d.ts.map +1 -0
- package/dist/migrations/Migration20240821170920.js +18 -0
- package/dist/migrations/Migration20240821170920.js.map +1 -0
- package/dist/migrations/Migration20240827133639.d.ts +6 -0
- package/dist/migrations/Migration20240827133639.d.ts.map +1 -0
- package/dist/migrations/Migration20240827133639.js +17 -0
- package/dist/migrations/Migration20240827133639.js.map +1 -0
- package/dist/migrations/Migration20240902195921.d.ts +6 -0
- package/dist/migrations/Migration20240902195921.d.ts.map +1 -0
- package/dist/migrations/Migration20240902195921.js +16 -0
- package/dist/migrations/Migration20240902195921.js.map +1 -0
- package/dist/migrations/Migration20240913092514.d.ts +6 -0
- package/dist/migrations/Migration20240913092514.d.ts.map +1 -0
- package/dist/migrations/Migration20240913092514.js +17 -0
- package/dist/migrations/Migration20240913092514.js.map +1 -0
- package/dist/models/address.d.ts +4 -3
- package/dist/models/address.d.ts.map +1 -0
- package/dist/models/address.js +22 -22
- package/dist/models/address.js.map +1 -1
- package/dist/models/adjustment-line.d.ts +5 -3
- package/dist/models/adjustment-line.d.ts.map +1 -0
- package/dist/models/adjustment-line.js +6 -1
- package/dist/models/adjustment-line.js.map +1 -1
- package/dist/models/claim-item-image.d.ts +19 -0
- package/dist/models/claim-item-image.d.ts.map +1 -0
- package/dist/models/claim-item-image.js +109 -0
- package/dist/models/claim-item-image.js.map +1 -0
- package/dist/models/claim-item.d.ts +29 -0
- package/dist/models/claim-item.d.ts.map +1 -0
- package/dist/models/claim-item.js +157 -0
- package/dist/models/claim-item.js.map +1 -0
- package/dist/models/claim.d.ts +37 -0
- package/dist/models/claim.d.ts.map +1 -0
- package/dist/models/claim.js +201 -0
- package/dist/models/claim.js.map +1 -0
- package/dist/models/exchange-item.d.ts +24 -0
- package/dist/models/exchange-item.d.ts.map +1 -0
- package/dist/models/exchange-item.js +138 -0
- package/dist/models/exchange-item.js.map +1 -0
- package/dist/models/exchange.d.ts +35 -0
- package/dist/models/exchange.d.ts.map +1 -0
- package/dist/models/exchange.js +194 -0
- package/dist/models/exchange.js.map +1 -0
- package/dist/models/index.d.ts +18 -9
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +26 -10
- package/dist/models/index.js.map +1 -1
- package/dist/models/line-item-adjustment.d.ts +5 -3
- package/dist/models/line-item-adjustment.d.ts.map +1 -0
- package/dist/models/line-item-adjustment.js +12 -12
- package/dist/models/line-item-adjustment.js.map +1 -1
- package/dist/models/line-item-tax-line.d.ts +5 -3
- package/dist/models/line-item-tax-line.d.ts.map +1 -0
- package/dist/models/line-item-tax-line.js +12 -12
- package/dist/models/line-item-tax-line.js.map +1 -1
- package/dist/models/line-item.d.ts +11 -8
- package/dist/models/line-item.d.ts.map +1 -0
- package/dist/models/line-item.js +58 -39
- package/dist/models/line-item.js.map +1 -1
- package/dist/models/order-change-action.d.ts +17 -6
- package/dist/models/order-change-action.d.ts.map +1 -0
- package/dist/models/order-change-action.js +110 -8
- package/dist/models/order-change-action.js.map +1 -1
- package/dist/models/order-change.d.ts +18 -6
- package/dist/models/order-change.d.ts.map +1 -0
- package/dist/models/order-change.js +108 -6
- package/dist/models/order-change.js.map +1 -1
- package/dist/models/order-item.d.ts +10 -7
- package/dist/models/order-item.d.ts.map +1 -0
- package/dist/models/order-item.js +29 -19
- package/dist/models/order-item.js.map +1 -1
- package/dist/models/order-shipping-method.d.ts +17 -7
- package/dist/models/order-shipping-method.d.ts.map +1 -0
- package/dist/models/order-shipping-method.js +113 -33
- package/dist/models/order-shipping-method.js.map +1 -1
- package/dist/models/order-summary.d.ts +7 -8
- package/dist/models/order-summary.d.ts.map +1 -0
- package/dist/models/order-summary.js +14 -10
- package/dist/models/order-summary.js.map +1 -1
- package/dist/models/order.d.ts +13 -11
- package/dist/models/order.d.ts.map +1 -0
- package/dist/models/order.js +12 -2
- package/dist/models/order.js.map +1 -1
- package/dist/models/return-item.d.ts +31 -0
- package/dist/models/return-item.d.ts.map +1 -0
- package/dist/models/return-item.js +180 -0
- package/dist/models/return-item.js.map +1 -0
- package/dist/models/return-reason.d.ts +22 -0
- package/dist/models/return-reason.d.ts.map +1 -0
- package/dist/models/return-reason.js +122 -0
- package/dist/models/return-reason.js.map +1 -0
- package/dist/models/return.d.ts +41 -0
- package/dist/models/return.d.ts.map +1 -0
- package/dist/models/return.js +227 -0
- package/dist/models/return.js.map +1 -0
- package/dist/models/shipping-method-adjustment.d.ts +5 -3
- package/dist/models/shipping-method-adjustment.d.ts.map +1 -0
- package/dist/models/shipping-method-adjustment.js +12 -12
- package/dist/models/shipping-method-adjustment.js.map +1 -1
- package/dist/models/shipping-method-tax-line.d.ts +5 -3
- package/dist/models/shipping-method-tax-line.d.ts.map +1 -0
- package/dist/models/shipping-method-tax-line.js +12 -12
- package/dist/models/shipping-method-tax-line.js.map +1 -1
- package/dist/models/shipping-method.d.ts +10 -7
- package/dist/models/shipping-method.d.ts.map +1 -0
- package/dist/models/shipping-method.js +42 -24
- package/dist/models/shipping-method.js.map +1 -1
- package/dist/models/tax-line.d.ts +4 -2
- package/dist/models/tax-line.d.ts.map +1 -0
- package/dist/models/tax-line.js +8 -1
- package/dist/models/tax-line.js.map +1 -1
- package/dist/models/transaction.d.ts +18 -6
- package/dist/models/transaction.d.ts.map +1 -0
- package/dist/models/transaction.js +133 -24
- package/dist/models/transaction.js.map +1 -1
- package/dist/repositories/claim.d.ts +9 -0
- package/dist/repositories/claim.d.ts.map +1 -0
- package/dist/repositories/claim.js +11 -0
- package/dist/repositories/claim.js.map +1 -0
- package/dist/repositories/exchange.d.ts +9 -0
- package/dist/repositories/exchange.d.ts.map +1 -0
- package/dist/repositories/exchange.js +11 -0
- package/dist/repositories/exchange.js.map +1 -0
- package/dist/repositories/index.d.ts +5 -2
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +8 -17
- package/dist/repositories/index.js.map +1 -1
- package/dist/repositories/order.d.ts +2 -4
- package/dist/repositories/order.d.ts.map +1 -0
- package/dist/repositories/order.js +3 -86
- package/dist/repositories/order.js.map +1 -1
- package/dist/repositories/return.d.ts +9 -0
- package/dist/repositories/return.d.ts.map +1 -0
- package/dist/repositories/return.js +11 -0
- package/dist/repositories/return.js.map +1 -0
- package/dist/schema/index.d.ts +3 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +556 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/services/actions/cancel-claim.d.ts +3 -0
- package/dist/services/actions/cancel-claim.d.ts.map +1 -0
- package/dist/services/actions/cancel-claim.js +85 -0
- package/dist/services/actions/cancel-claim.js.map +1 -0
- package/dist/services/actions/cancel-exchange.d.ts +3 -0
- package/dist/services/actions/cancel-exchange.d.ts.map +1 -0
- package/dist/services/actions/cancel-exchange.js +71 -0
- package/dist/services/actions/cancel-exchange.js.map +1 -0
- package/dist/services/actions/cancel-fulfillment.d.ts +3 -0
- package/dist/services/actions/cancel-fulfillment.d.ts.map +1 -0
- package/dist/services/actions/cancel-fulfillment.js +31 -0
- package/dist/services/actions/cancel-fulfillment.js.map +1 -0
- package/dist/services/actions/cancel-return.d.ts +3 -0
- package/dist/services/actions/cancel-return.d.ts.map +1 -0
- package/dist/services/actions/cancel-return.js +69 -0
- package/dist/services/actions/cancel-return.js.map +1 -0
- package/dist/services/actions/create-claim.d.ts +3 -0
- package/dist/services/actions/create-claim.d.ts.map +1 -0
- package/dist/services/actions/create-claim.js +225 -0
- package/dist/services/actions/create-claim.js.map +1 -0
- package/dist/services/actions/create-exchange.d.ts +3 -0
- package/dist/services/actions/create-exchange.d.ts.map +1 -0
- package/dist/services/actions/create-exchange.js +191 -0
- package/dist/services/actions/create-exchange.js.map +1 -0
- package/dist/services/actions/create-return.d.ts +3 -0
- package/dist/services/actions/create-return.d.ts.map +1 -0
- package/dist/services/actions/create-return.js +100 -0
- package/dist/services/actions/create-return.js.map +1 -0
- package/dist/services/actions/index.d.ts +12 -0
- package/dist/services/actions/index.d.ts.map +1 -0
- package/dist/services/actions/index.js +28 -0
- package/dist/services/actions/index.js.map +1 -0
- package/dist/services/actions/receive-return.d.ts +3 -0
- package/dist/services/actions/receive-return.d.ts.map +1 -0
- package/dist/services/actions/receive-return.js +71 -0
- package/dist/services/actions/receive-return.js.map +1 -0
- package/dist/services/actions/register-delivery.d.ts +3 -0
- package/dist/services/actions/register-delivery.d.ts.map +1 -0
- package/dist/services/actions/register-delivery.js +29 -0
- package/dist/services/actions/register-delivery.js.map +1 -0
- package/dist/services/actions/register-fulfillment.d.ts +3 -0
- package/dist/services/actions/register-fulfillment.d.ts.map +1 -0
- package/dist/services/actions/register-fulfillment.js +29 -0
- package/dist/services/actions/register-fulfillment.js.map +1 -0
- package/dist/services/actions/register-shipment.d.ts +3 -0
- package/dist/services/actions/register-shipment.d.ts.map +1 -0
- package/dist/services/actions/register-shipment.js +37 -0
- package/dist/services/actions/register-shipment.js.map +1 -0
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +1 -3
- package/dist/services/index.js.map +1 -1
- package/dist/services/order-module-service.d.ts +191 -109
- package/dist/services/order-module-service.d.ts.map +1 -0
- package/dist/services/order-module-service.js +1165 -425
- package/dist/services/order-module-service.js.map +1 -1
- package/dist/services/order-service.d.ts +6 -5
- package/dist/services/order-service.d.ts.map +1 -0
- package/dist/services/order-service.js +2 -2
- package/dist/services/order-service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/address.d.ts +2 -1
- package/dist/types/address.d.ts.map +1 -0
- package/dist/types/index.d.ts +5 -2
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/line-item-adjustment.d.ts +2 -1
- package/dist/types/line-item-adjustment.d.ts.map +1 -0
- package/dist/types/line-item-tax-line.d.ts +1 -0
- package/dist/types/line-item-tax-line.d.ts.map +1 -0
- package/dist/types/line-item.d.ts +2 -1
- package/dist/types/line-item.d.ts.map +1 -0
- package/dist/types/order-change.d.ts +4 -0
- package/dist/types/order-change.d.ts.map +1 -0
- package/dist/types/order-change.js +3 -0
- package/dist/types/order-change.js.map +1 -0
- package/dist/types/order-detail.d.ts +3 -2
- package/dist/types/order-detail.d.ts.map +1 -0
- package/dist/types/order.d.ts +4 -3
- package/dist/types/order.d.ts.map +1 -0
- package/dist/types/return-reason.d.ts +5 -0
- package/dist/types/return-reason.d.ts.map +1 -0
- package/dist/types/return-reason.js +3 -0
- package/dist/types/return-reason.js.map +1 -0
- package/dist/types/shipping-method-adjustment.d.ts +2 -1
- package/dist/types/shipping-method-adjustment.d.ts.map +1 -0
- package/dist/types/shipping-method-tax-line.d.ts +1 -0
- package/dist/types/shipping-method-tax-line.d.ts.map +1 -0
- package/dist/types/shipping-method.d.ts +5 -1
- package/dist/types/shipping-method.d.ts.map +1 -0
- package/dist/types/tax-line.d.ts +2 -1
- package/dist/types/tax-line.d.ts.map +1 -0
- package/dist/types/transaction.d.ts +2 -1
- package/dist/types/transaction.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +41 -23
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/index.js +0 -1
- package/dist/types/utils/index.js.map +1 -1
- package/dist/utils/actions/cancel-item-fulfillment.d.ts +2 -0
- package/dist/utils/actions/cancel-item-fulfillment.d.ts.map +1 -0
- package/dist/utils/actions/cancel-item-fulfillment.js +34 -0
- package/dist/utils/actions/cancel-item-fulfillment.js.map +1 -0
- package/dist/utils/actions/cancel-return.d.ts +1 -0
- package/dist/utils/actions/cancel-return.d.ts.map +1 -0
- package/dist/utils/actions/cancel-return.js +9 -16
- package/dist/utils/actions/cancel-return.js.map +1 -1
- package/dist/utils/actions/deliver-item.d.ts +2 -0
- package/dist/utils/actions/deliver-item.d.ts.map +1 -0
- package/dist/utils/actions/deliver-item.js +38 -0
- package/dist/utils/actions/deliver-item.js.map +1 -0
- package/dist/utils/actions/fulfill-item.d.ts +1 -0
- package/dist/utils/actions/fulfill-item.d.ts.map +1 -0
- package/dist/utils/actions/fulfill-item.js +8 -12
- package/dist/utils/actions/fulfill-item.js.map +1 -1
- package/dist/utils/actions/index.d.ts +7 -1
- package/dist/utils/actions/index.d.ts.map +1 -0
- package/dist/utils/actions/index.js +6 -1
- package/dist/utils/actions/index.js.map +1 -1
- package/dist/utils/actions/item-add.d.ts +1 -0
- package/dist/utils/actions/item-add.d.ts.map +1 -0
- package/dist/utils/actions/item-add.js +17 -26
- package/dist/utils/actions/item-add.js.map +1 -1
- package/dist/utils/actions/item-remove.d.ts +1 -0
- package/dist/utils/actions/item-remove.d.ts.map +1 -0
- package/dist/utils/actions/item-remove.js +10 -30
- package/dist/utils/actions/item-remove.js.map +1 -1
- package/dist/utils/actions/item-update.d.ts +2 -0
- package/dist/utils/actions/item-update.d.ts.map +1 -0
- package/dist/utils/actions/item-update.js +37 -0
- package/dist/utils/actions/item-update.js.map +1 -0
- package/dist/utils/actions/receive-damaged-return-item.d.ts +1 -0
- package/dist/utils/actions/receive-damaged-return-item.d.ts.map +1 -0
- package/dist/utils/actions/receive-damaged-return-item.js +11 -37
- package/dist/utils/actions/receive-damaged-return-item.js.map +1 -1
- package/dist/utils/actions/receive-return-item.d.ts +1 -0
- package/dist/utils/actions/receive-return-item.d.ts.map +1 -0
- package/dist/utils/actions/receive-return-item.js +9 -38
- package/dist/utils/actions/receive-return-item.js.map +1 -1
- package/dist/utils/actions/reinstate-item.d.ts +2 -0
- package/dist/utils/actions/reinstate-item.d.ts.map +1 -0
- package/dist/utils/actions/reinstate-item.js +32 -0
- package/dist/utils/actions/reinstate-item.js.map +1 -0
- package/dist/utils/actions/return-item.d.ts +1 -0
- package/dist/utils/actions/return-item.d.ts.map +1 -0
- package/dist/utils/actions/return-item.js +10 -15
- package/dist/utils/actions/return-item.js.map +1 -1
- package/dist/utils/actions/ship-item.d.ts +1 -0
- package/dist/utils/actions/ship-item.d.ts.map +1 -0
- package/dist/utils/actions/ship-item.js +8 -12
- package/dist/utils/actions/ship-item.js.map +1 -1
- package/dist/utils/actions/shipping-add.d.ts +1 -0
- package/dist/utils/actions/shipping-add.d.ts.map +1 -0
- package/dist/utils/actions/shipping-add.js +18 -18
- package/dist/utils/actions/shipping-add.js.map +1 -1
- package/dist/utils/actions/shipping-remove.d.ts +2 -0
- package/dist/utils/actions/shipping-remove.d.ts.map +1 -0
- package/dist/utils/actions/shipping-remove.js +22 -0
- package/dist/utils/actions/shipping-remove.js.map +1 -0
- package/dist/utils/actions/write-off-item.d.ts +1 -0
- package/dist/utils/actions/write-off-item.d.ts.map +1 -0
- package/dist/utils/actions/write-off-item.js +8 -12
- package/dist/utils/actions/write-off-item.js.map +1 -1
- package/dist/utils/apply-order-changes.d.ts +18 -0
- package/dist/utils/apply-order-changes.d.ts.map +1 -0
- package/dist/utils/apply-order-changes.js +98 -0
- package/dist/utils/apply-order-changes.js.map +1 -0
- package/dist/utils/base-repository-find.d.ts +3 -0
- package/dist/utils/base-repository-find.d.ts.map +1 -0
- package/dist/utils/base-repository-find.js +154 -0
- package/dist/utils/base-repository-find.js.map +1 -0
- package/dist/utils/calculate-order-change.d.ts +12 -6
- package/dist/utils/calculate-order-change.d.ts.map +1 -0
- package/dist/utils/calculate-order-change.js +56 -187
- package/dist/utils/calculate-order-change.js.map +1 -1
- package/dist/utils/index.d.ts +4 -1
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +3 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/set-action-reference.d.ts +2 -0
- package/dist/utils/set-action-reference.d.ts.map +1 -0
- package/dist/utils/set-action-reference.js +10 -0
- package/dist/utils/set-action-reference.js.map +1 -0
- package/dist/utils/transform-order.d.ts +5 -4
- package/dist/utils/transform-order.d.ts.map +1 -0
- package/dist/utils/transform-order.js +138 -21
- package/dist/utils/transform-order.js.map +1 -1
- package/package.json +25 -26
- package/dist/module-definition.d.ts +0 -2
- package/dist/module-definition.js +0 -59
- package/dist/module-definition.js.map +0 -1
- package/dist/scripts/bin/run-seed.d.ts +0 -3
- package/dist/scripts/bin/run-seed.js +0 -49
- package/dist/scripts/bin/run-seed.js.map +0 -1
- package/dist/services/order-change-service.d.ts +0 -15
- package/dist/services/order-change-service.js +0 -96
- package/dist/services/order-change-service.js.map +0 -1
- package/dist/utils/action-key.d.ts +0 -13
- package/dist/utils/action-key.js +0 -18
- package/dist/utils/action-key.js.map +0 -1
- package/dist/utils/actions/cancel.d.ts +0 -1
- package/dist/utils/actions/cancel.js +0 -8
- package/dist/utils/actions/cancel.js.map +0 -1
@@ -0,0 +1,3 @@
|
|
1
|
+
declare const _default: "\nenum ChangeActionType {\n CANCEL_RETURN_ITEM\n FULFILL_ITEM\n CANCEL_ITEM_FULFILLMENT\n ITEM_ADD\n ITEM_REMOVE\n ITEM_UPDATE\n RECEIVE_DAMAGED_RETURN_ITEM\n RECEIVE_RETURN_ITEM\n RETURN_ITEM\n SHIPPING_ADD\n SHIPPING_REMOVE\n SHIP_ITEM\n WRITE_OFF_ITEM\n REINSTATE_ITEM\n}\n\ntype OrderSummary {\n total: Float\n subtotal: Float\n total_tax: Float\n ordered_total: Float\n fulfilled_total: Float\n returned_total: Float\n return_request_total: Float\n write_off_total: Float\n projected_total: Float\n net_total: Float\n net_subtotal: Float\n net_total_tax: Float\n balance: Float\n paid_total: Float\n refunded_total: Float\n pending_difference: Float\n raw_pending_difference: JSON\n}\n\ntype OrderShippingMethodAdjustment {\n id: ID!\n code: String\n amount: Float\n order_id: String!\n description: String\n promotion_id: String\n provider_id: String\n created_at: DateTime\n updated_at: DateTime\n shipping_method: OrderShippingMethod\n shipping_method_id: String!\n}\n\ntype OrderLineItemAdjustment {\n id: ID!\n code: String\n amount: Float\n order_id: String!\n description: String\n promotion_id: String\n provider_id: String\n created_at: DateTime\n updated_at: DateTime\n item: OrderLineItem\n item_id: String!\n}\n\n\ntype OrderShippingMethodTaxLine {\n id: ID!\n description: String\n tax_rate_id: String\n code: String!\n rate: Float\n provider_id: String\n created_at: DateTime\n updated_at: DateTime\n shipping_method: OrderShippingMethod\n shipping_method_id: String!\n total: Float\n subtotal: Float\n raw_total: JSON\n raw_subtotal: JSON\n}\n\ntype OrderLineItemTaxLine {\n id: ID!\n description: String\n tax_rate_id: String\n code: String!\n rate: Float\n provider_id: String\n created_at: DateTime\n updated_at: DateTime\n item: OrderLineItem\n item_id: String!\n total: Float\n subtotal: Float\n raw_total: JSON\n raw_subtotal: JSON\n}\n\ntype OrderAddress {\n id: ID!\n customer_id: String\n first_name: String\n last_name: String\n phone: String\n company: String\n address_1: String\n address_2: String\n city: String\n country_code: String\n province: String\n postal_code: String\n metadata: JSON\n created_at: DateTime\n updated_at: DateTime\n}\n\ntype OrderShippingMethod {\n id: ID!\n order_id: String!\n name: String!\n description: String\n amount: Float\n raw_amount: JSON\n is_tax_inclusive: Boolean\n shipping_option_id: String\n data: JSON\n metadata: JSON\n tax_lines: [OrderShippingMethodTaxLine]\n adjustments: [OrderShippingMethodAdjustment]\n created_at: DateTime\n updated_at: DateTime\n original_total: Float\n original_subtotal: Float\n original_tax_total: Float\n total: Float\n subtotal: Float\n tax_total: Float\n discount_total: Float\n discount_tax_total: Float\n raw_original_total: JSON\n raw_original_subtotal: JSON\n raw_original_tax_total: JSON\n raw_total: JSON\n raw_subtotal: JSON\n raw_tax_total: JSON\n raw_discount_total: JSON\n raw_discount_tax_total: JSON\n}\n\ntype OrderLineItem {\n id: ID!\n title: String!\n subtitle: String\n thumbnail: String\n variant_id: String\n product_id: String\n product_title: String\n product_description: String\n product_subtitle: String\n product_type: String\n product_collection: String\n product_handle: String\n variant_sku: String\n variant_barcode: String\n variant_title: String\n variant_option_values: JSON\n requires_shipping: Boolean!\n is_discountable: Boolean!\n is_tax_inclusive: Boolean!\n compare_at_unit_price: Float\n raw_compare_at_unit_price: JSON\n unit_price: Float!\n raw_unit_price: JSON\n quantity: Int!\n raw_quantity: JSON\n tax_lines: [OrderLineItemTaxLine]\n adjustments: [OrderLineItemAdjustment]\n detail: OrderItem!\n created_at: DateTime!\n updated_at: DateTime!\n metadata: JSON\n original_total: Float\n original_subtotal: Float\n original_tax_total: Float\n item_total: Float\n item_subtotal: Float\n item_tax_total: Float\n total: Float\n subtotal: Float\n tax_total: Float\n discount_total: Float\n discount_tax_total: Float\n refundable_total: Float\n refundable_total_per_unit: Float\n raw_original_total: JSON\n raw_original_subtotal: JSON\n raw_original_tax_total: JSON\n raw_item_total: JSON\n raw_item_subtotal: JSON\n raw_item_tax_total: JSON\n raw_total: JSON\n raw_subtotal: JSON\n raw_tax_total: JSON\n raw_discount_total: JSON\n raw_discount_tax_total: JSON\n raw_refundable_total: JSON\n raw_refundable_total_per_unit: JSON\n}\n\ntype OrderItem {\n id: ID!\n item_id: String!\n item: OrderLineItem!\n quantity: Int!\n raw_quantity: JSON\n fulfilled_quantity: Int!\n raw_fulfilled_quantity: JSON\n shipped_quantity: Int!\n raw_shipped_quantity: JSON\n return_requested_quantity: Int!\n raw_return_requested_quantity: JSON\n return_received_quantity: Int!\n raw_return_received_quantity: JSON\n return_dismissed_quantity: Int!\n raw_return_dismissed_quantity: JSON\n written_off_quantity: Int!\n raw_written_off_quantity: JSON\n metadata: JSON\n created_at: DateTime!\n updated_at: DateTime!\n}\n\nenum OrderStatus {\n pending\n completed\n draft\n archived\n canceled\n requires_action\n}\n\ntype Order {\n id: ID!\n version: Int!\n order_change: OrderChange\n status: OrderStatus!\n region_id: String\n customer_id: String\n sales_channel_id: String\n email: String\n currency_code: String!\n shipping_address: OrderAddress\n billing_address: OrderAddress\n items: [OrderLineItem]\n shipping_methods: [OrderShippingMethod]\n transactions: [OrderTransaction]\n summary: OrderSummary\n metadata: JSON\n canceled_at: DateTime\n created_at: DateTime!\n updated_at: DateTime!\n original_item_total: Float!\n original_item_subtotal: Float!\n original_item_tax_total: Float!\n item_total: Float!\n item_subtotal: Float!\n item_tax_total: Float!\n original_total: Float!\n original_subtotal: Float!\n original_tax_total: Float!\n total: Float!\n subtotal: Float!\n tax_total: Float!\n discount_total: Float!\n discount_tax_total: Float!\n gift_card_total: Float!\n gift_card_tax_total: Float!\n shipping_total: Float!\n shipping_subtotal: Float!\n shipping_tax_total: Float!\n original_shipping_total: Float!\n original_shipping_subtotal: Float!\n original_shipping_tax_total: Float!\n raw_original_item_total: JSON\n raw_original_item_subtotal: JSON\n raw_original_item_tax_total: JSON\n raw_item_total: JSON\n raw_item_subtotal: JSON\n raw_item_tax_total: JSON\n raw_original_total: JSON\n raw_original_subtotal: JSON\n raw_original_tax_total: JSON\n raw_total: JSON\n raw_subtotal: JSON\n raw_tax_total: JSON\n raw_discount_total: JSON\n raw_discount_tax_total: JSON\n raw_gift_card_total: JSON\n raw_gift_card_tax_total: JSON\n raw_shipping_total: JSON\n raw_shipping_subtotal: JSON\n raw_shipping_tax_total: JSON\n raw_original_shipping_total: JSON\n raw_original_shipping_subtotal: JSON\n raw_original_shipping_tax_total: JSON\n}\n\nenum ReturnStatus {\n requested\n received\n partially_received\n canceled\n}\n\ntype Return {\n id: ID!\n status: ReturnStatus!\n refund_amount: Float\n order_id: String!\n items: [OrderReturnItem]!\n}\n\ntype OrderReturnItem {\n id: ID!\n return_id: String!\n order_id: String!\n item_id: String!\n reason_id: String\n quantity: Int!\n raw_quantity: JSON\n received_quantity: Int\n raw_received_quantity: JSON\n metadata: JSON\n created_at: DateTime\n updated_at: DateTime\n}\n\ntype OrderClaimItem {\n id: ID!\n claim_id: String!\n order_id: String!\n item_id: String!\n quantity: Int!\n reason: ClaimReason!\n images: [OrderClaimItemImage]\n raw_quantity: JSON\n metadata: JSON\n created_at: DateTime\n updated_at: DateTime\n}\n\ntype OrderClaimItemImage {\n id: ID!\n claim_item_id: String!\n item: OrderClaimItem!\n url: String\n metadata: JSON\n created_at: DateTime\n updated_at: DateTime\n}\n\ntype OrderExchangeItem {\n id: ID!\n exchange_id: String!\n order_id: String!\n item_id: String!\n quantity: Int!\n raw_quantity: JSON\n metadata: JSON\n created_at: DateTime\n updated_at: DateTime\n}\n\ntype OrderClaim {\n order_id: String!\n claim_items: [OrderClaimItem]!\n additional_items: [OrderClaimItem]!\n return: Return\n return_id: String\n no_notification: Boolean\n refund_amount: Float\n created_by: String\n}\n\ntype OrderExchange {\n order_id: String!\n return_items: [OrderReturnItem]!\n additional_items: [OrderExchangeItem]!\n no_notification: Boolean\n difference_due: Float\n return: Return\n return_id: String\n created_by: String\n}\n\nenum PaymentStatus {\n not_paid\n awaiting\n authorized\n partially_authorized\n captured\n partially_captured\n partially_refunded\n refunded\n canceled\n requires_action\n}\n\nenum FulfillmentStatus {\n not_fulfilled\n partially_fulfilled\n fulfilled\n partially_shipped\n shipped\n partially_delivered\n delivered\n canceled\n}\n\ntype OrderDetail {\n id: ID!\n version: Int!\n order_change: OrderChange\n status: OrderStatus!\n region_id: String\n customer_id: String\n sales_channel_id: String\n email: String\n currency_code: String!\n shipping_address: OrderAddress\n billing_address: OrderAddress\n items: [OrderLineItem]\n shipping_methods: [OrderShippingMethod]\n transactions: [OrderTransaction]\n summary: OrderSummary\n metadata: JSON\n canceled_at: DateTime\n created_at: DateTime!\n updated_at: DateTime!\n original_item_total: Float!\n original_item_subtotal: Float!\n original_item_tax_total: Float!\n item_total: Float!\n item_subtotal: Float!\n item_tax_total: Float!\n original_total: Float!\n original_subtotal: Float!\n original_tax_total: Float!\n total: Float!\n subtotal: Float!\n tax_total: Float!\n discount_total: Float!\n discount_tax_total: Float!\n gift_card_total: Float!\n gift_card_tax_total: Float!\n shipping_total: Float!\n shipping_subtotal: Float!\n shipping_tax_total: Float!\n original_shipping_total: Float!\n original_shipping_subtotal: Float!\n original_shipping_tax_total: Float!\n raw_original_item_total: JSON\n raw_original_item_subtotal: JSON\n raw_original_item_tax_total: JSON\n raw_item_total: JSON\n raw_item_subtotal: JSON\n raw_item_tax_total: JSON\n raw_original_total: JSON\n raw_original_subtotal: JSON\n raw_original_tax_total: JSON\n raw_total: JSON\n raw_subtotal: JSON\n raw_tax_total: JSON\n raw_discount_total: JSON\n raw_discount_tax_total: JSON\n raw_gift_card_total: JSON\n raw_gift_card_tax_total: JSON\n raw_shipping_total: JSON\n raw_shipping_subtotal: JSON\n raw_shipping_tax_total: JSON\n raw_original_shipping_total: JSON\n raw_original_shipping_subtotal: JSON\n raw_original_shipping_tax_total: JSON\n payment_collections: [PaymentCollection]\n payment_status: PaymentStatus!\n fulfillments: [Fulfillment]\n fulfillment_status: FulfillmentStatus!\n}\n\ntype OrderChange {\n id: ID!\n version: Int!\n change_type: String\n order_id: String!\n return_id: String\n exchange_id: String\n claim_id: String\n order: Order!\n return_order: Return\n exchange: OrderExchange\n claim: OrderClaim\n actions: [OrderChangeAction]!\n status: String!\n requested_by: String\n requested_at: DateTime\n confirmed_by: String\n confirmed_at: DateTime\n declined_by: String\n declined_reason: String\n metadata: JSON\n declined_at: DateTime\n canceled_by: String\n canceled_at: DateTime\n created_at: DateTime!\n updated_at: DateTime!\n}\n\ntype OrderChangeAction {\n id: ID!\n order_change_id: String\n order_change: OrderChange\n order_id: String\n return_id: String\n claim_id: String\n exchange_id: String\n order: Order\n reference: String!\n reference_id: String!\n action: ChangeActionType!\n details: JSON\n internal_note: String\n created_at: DateTime!\n updated_at: DateTime!\n}\n\ntype OrderTransaction {\n id: ID!\n order_id: String!\n order: Order!\n amount: Float!\n raw_amount: JSON\n currency_code: String!\n reference: String!\n reference_id: String!\n metadata: JSON\n created_at: DateTime!\n updated_at: DateTime!\n}\n\n";
|
2
|
+
export default _default;
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":";AAAA,wBAwiBC"}
|
@@ -0,0 +1,556 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.default = `
|
4
|
+
enum ChangeActionType {
|
5
|
+
CANCEL_RETURN_ITEM
|
6
|
+
FULFILL_ITEM
|
7
|
+
CANCEL_ITEM_FULFILLMENT
|
8
|
+
ITEM_ADD
|
9
|
+
ITEM_REMOVE
|
10
|
+
ITEM_UPDATE
|
11
|
+
RECEIVE_DAMAGED_RETURN_ITEM
|
12
|
+
RECEIVE_RETURN_ITEM
|
13
|
+
RETURN_ITEM
|
14
|
+
SHIPPING_ADD
|
15
|
+
SHIPPING_REMOVE
|
16
|
+
SHIP_ITEM
|
17
|
+
WRITE_OFF_ITEM
|
18
|
+
REINSTATE_ITEM
|
19
|
+
}
|
20
|
+
|
21
|
+
type OrderSummary {
|
22
|
+
total: Float
|
23
|
+
subtotal: Float
|
24
|
+
total_tax: Float
|
25
|
+
ordered_total: Float
|
26
|
+
fulfilled_total: Float
|
27
|
+
returned_total: Float
|
28
|
+
return_request_total: Float
|
29
|
+
write_off_total: Float
|
30
|
+
projected_total: Float
|
31
|
+
net_total: Float
|
32
|
+
net_subtotal: Float
|
33
|
+
net_total_tax: Float
|
34
|
+
balance: Float
|
35
|
+
paid_total: Float
|
36
|
+
refunded_total: Float
|
37
|
+
pending_difference: Float
|
38
|
+
raw_pending_difference: JSON
|
39
|
+
}
|
40
|
+
|
41
|
+
type OrderShippingMethodAdjustment {
|
42
|
+
id: ID!
|
43
|
+
code: String
|
44
|
+
amount: Float
|
45
|
+
order_id: String!
|
46
|
+
description: String
|
47
|
+
promotion_id: String
|
48
|
+
provider_id: String
|
49
|
+
created_at: DateTime
|
50
|
+
updated_at: DateTime
|
51
|
+
shipping_method: OrderShippingMethod
|
52
|
+
shipping_method_id: String!
|
53
|
+
}
|
54
|
+
|
55
|
+
type OrderLineItemAdjustment {
|
56
|
+
id: ID!
|
57
|
+
code: String
|
58
|
+
amount: Float
|
59
|
+
order_id: String!
|
60
|
+
description: String
|
61
|
+
promotion_id: String
|
62
|
+
provider_id: String
|
63
|
+
created_at: DateTime
|
64
|
+
updated_at: DateTime
|
65
|
+
item: OrderLineItem
|
66
|
+
item_id: String!
|
67
|
+
}
|
68
|
+
|
69
|
+
|
70
|
+
type OrderShippingMethodTaxLine {
|
71
|
+
id: ID!
|
72
|
+
description: String
|
73
|
+
tax_rate_id: String
|
74
|
+
code: String!
|
75
|
+
rate: Float
|
76
|
+
provider_id: String
|
77
|
+
created_at: DateTime
|
78
|
+
updated_at: DateTime
|
79
|
+
shipping_method: OrderShippingMethod
|
80
|
+
shipping_method_id: String!
|
81
|
+
total: Float
|
82
|
+
subtotal: Float
|
83
|
+
raw_total: JSON
|
84
|
+
raw_subtotal: JSON
|
85
|
+
}
|
86
|
+
|
87
|
+
type OrderLineItemTaxLine {
|
88
|
+
id: ID!
|
89
|
+
description: String
|
90
|
+
tax_rate_id: String
|
91
|
+
code: String!
|
92
|
+
rate: Float
|
93
|
+
provider_id: String
|
94
|
+
created_at: DateTime
|
95
|
+
updated_at: DateTime
|
96
|
+
item: OrderLineItem
|
97
|
+
item_id: String!
|
98
|
+
total: Float
|
99
|
+
subtotal: Float
|
100
|
+
raw_total: JSON
|
101
|
+
raw_subtotal: JSON
|
102
|
+
}
|
103
|
+
|
104
|
+
type OrderAddress {
|
105
|
+
id: ID!
|
106
|
+
customer_id: String
|
107
|
+
first_name: String
|
108
|
+
last_name: String
|
109
|
+
phone: String
|
110
|
+
company: String
|
111
|
+
address_1: String
|
112
|
+
address_2: String
|
113
|
+
city: String
|
114
|
+
country_code: String
|
115
|
+
province: String
|
116
|
+
postal_code: String
|
117
|
+
metadata: JSON
|
118
|
+
created_at: DateTime
|
119
|
+
updated_at: DateTime
|
120
|
+
}
|
121
|
+
|
122
|
+
type OrderShippingMethod {
|
123
|
+
id: ID!
|
124
|
+
order_id: String!
|
125
|
+
name: String!
|
126
|
+
description: String
|
127
|
+
amount: Float
|
128
|
+
raw_amount: JSON
|
129
|
+
is_tax_inclusive: Boolean
|
130
|
+
shipping_option_id: String
|
131
|
+
data: JSON
|
132
|
+
metadata: JSON
|
133
|
+
tax_lines: [OrderShippingMethodTaxLine]
|
134
|
+
adjustments: [OrderShippingMethodAdjustment]
|
135
|
+
created_at: DateTime
|
136
|
+
updated_at: DateTime
|
137
|
+
original_total: Float
|
138
|
+
original_subtotal: Float
|
139
|
+
original_tax_total: Float
|
140
|
+
total: Float
|
141
|
+
subtotal: Float
|
142
|
+
tax_total: Float
|
143
|
+
discount_total: Float
|
144
|
+
discount_tax_total: Float
|
145
|
+
raw_original_total: JSON
|
146
|
+
raw_original_subtotal: JSON
|
147
|
+
raw_original_tax_total: JSON
|
148
|
+
raw_total: JSON
|
149
|
+
raw_subtotal: JSON
|
150
|
+
raw_tax_total: JSON
|
151
|
+
raw_discount_total: JSON
|
152
|
+
raw_discount_tax_total: JSON
|
153
|
+
}
|
154
|
+
|
155
|
+
type OrderLineItem {
|
156
|
+
id: ID!
|
157
|
+
title: String!
|
158
|
+
subtitle: String
|
159
|
+
thumbnail: String
|
160
|
+
variant_id: String
|
161
|
+
product_id: String
|
162
|
+
product_title: String
|
163
|
+
product_description: String
|
164
|
+
product_subtitle: String
|
165
|
+
product_type: String
|
166
|
+
product_collection: String
|
167
|
+
product_handle: String
|
168
|
+
variant_sku: String
|
169
|
+
variant_barcode: String
|
170
|
+
variant_title: String
|
171
|
+
variant_option_values: JSON
|
172
|
+
requires_shipping: Boolean!
|
173
|
+
is_discountable: Boolean!
|
174
|
+
is_tax_inclusive: Boolean!
|
175
|
+
compare_at_unit_price: Float
|
176
|
+
raw_compare_at_unit_price: JSON
|
177
|
+
unit_price: Float!
|
178
|
+
raw_unit_price: JSON
|
179
|
+
quantity: Int!
|
180
|
+
raw_quantity: JSON
|
181
|
+
tax_lines: [OrderLineItemTaxLine]
|
182
|
+
adjustments: [OrderLineItemAdjustment]
|
183
|
+
detail: OrderItem!
|
184
|
+
created_at: DateTime!
|
185
|
+
updated_at: DateTime!
|
186
|
+
metadata: JSON
|
187
|
+
original_total: Float
|
188
|
+
original_subtotal: Float
|
189
|
+
original_tax_total: Float
|
190
|
+
item_total: Float
|
191
|
+
item_subtotal: Float
|
192
|
+
item_tax_total: Float
|
193
|
+
total: Float
|
194
|
+
subtotal: Float
|
195
|
+
tax_total: Float
|
196
|
+
discount_total: Float
|
197
|
+
discount_tax_total: Float
|
198
|
+
refundable_total: Float
|
199
|
+
refundable_total_per_unit: Float
|
200
|
+
raw_original_total: JSON
|
201
|
+
raw_original_subtotal: JSON
|
202
|
+
raw_original_tax_total: JSON
|
203
|
+
raw_item_total: JSON
|
204
|
+
raw_item_subtotal: JSON
|
205
|
+
raw_item_tax_total: JSON
|
206
|
+
raw_total: JSON
|
207
|
+
raw_subtotal: JSON
|
208
|
+
raw_tax_total: JSON
|
209
|
+
raw_discount_total: JSON
|
210
|
+
raw_discount_tax_total: JSON
|
211
|
+
raw_refundable_total: JSON
|
212
|
+
raw_refundable_total_per_unit: JSON
|
213
|
+
}
|
214
|
+
|
215
|
+
type OrderItem {
|
216
|
+
id: ID!
|
217
|
+
item_id: String!
|
218
|
+
item: OrderLineItem!
|
219
|
+
quantity: Int!
|
220
|
+
raw_quantity: JSON
|
221
|
+
fulfilled_quantity: Int!
|
222
|
+
raw_fulfilled_quantity: JSON
|
223
|
+
shipped_quantity: Int!
|
224
|
+
raw_shipped_quantity: JSON
|
225
|
+
return_requested_quantity: Int!
|
226
|
+
raw_return_requested_quantity: JSON
|
227
|
+
return_received_quantity: Int!
|
228
|
+
raw_return_received_quantity: JSON
|
229
|
+
return_dismissed_quantity: Int!
|
230
|
+
raw_return_dismissed_quantity: JSON
|
231
|
+
written_off_quantity: Int!
|
232
|
+
raw_written_off_quantity: JSON
|
233
|
+
metadata: JSON
|
234
|
+
created_at: DateTime!
|
235
|
+
updated_at: DateTime!
|
236
|
+
}
|
237
|
+
|
238
|
+
enum OrderStatus {
|
239
|
+
pending
|
240
|
+
completed
|
241
|
+
draft
|
242
|
+
archived
|
243
|
+
canceled
|
244
|
+
requires_action
|
245
|
+
}
|
246
|
+
|
247
|
+
type Order {
|
248
|
+
id: ID!
|
249
|
+
version: Int!
|
250
|
+
order_change: OrderChange
|
251
|
+
status: OrderStatus!
|
252
|
+
region_id: String
|
253
|
+
customer_id: String
|
254
|
+
sales_channel_id: String
|
255
|
+
email: String
|
256
|
+
currency_code: String!
|
257
|
+
shipping_address: OrderAddress
|
258
|
+
billing_address: OrderAddress
|
259
|
+
items: [OrderLineItem]
|
260
|
+
shipping_methods: [OrderShippingMethod]
|
261
|
+
transactions: [OrderTransaction]
|
262
|
+
summary: OrderSummary
|
263
|
+
metadata: JSON
|
264
|
+
canceled_at: DateTime
|
265
|
+
created_at: DateTime!
|
266
|
+
updated_at: DateTime!
|
267
|
+
original_item_total: Float!
|
268
|
+
original_item_subtotal: Float!
|
269
|
+
original_item_tax_total: Float!
|
270
|
+
item_total: Float!
|
271
|
+
item_subtotal: Float!
|
272
|
+
item_tax_total: Float!
|
273
|
+
original_total: Float!
|
274
|
+
original_subtotal: Float!
|
275
|
+
original_tax_total: Float!
|
276
|
+
total: Float!
|
277
|
+
subtotal: Float!
|
278
|
+
tax_total: Float!
|
279
|
+
discount_total: Float!
|
280
|
+
discount_tax_total: Float!
|
281
|
+
gift_card_total: Float!
|
282
|
+
gift_card_tax_total: Float!
|
283
|
+
shipping_total: Float!
|
284
|
+
shipping_subtotal: Float!
|
285
|
+
shipping_tax_total: Float!
|
286
|
+
original_shipping_total: Float!
|
287
|
+
original_shipping_subtotal: Float!
|
288
|
+
original_shipping_tax_total: Float!
|
289
|
+
raw_original_item_total: JSON
|
290
|
+
raw_original_item_subtotal: JSON
|
291
|
+
raw_original_item_tax_total: JSON
|
292
|
+
raw_item_total: JSON
|
293
|
+
raw_item_subtotal: JSON
|
294
|
+
raw_item_tax_total: JSON
|
295
|
+
raw_original_total: JSON
|
296
|
+
raw_original_subtotal: JSON
|
297
|
+
raw_original_tax_total: JSON
|
298
|
+
raw_total: JSON
|
299
|
+
raw_subtotal: JSON
|
300
|
+
raw_tax_total: JSON
|
301
|
+
raw_discount_total: JSON
|
302
|
+
raw_discount_tax_total: JSON
|
303
|
+
raw_gift_card_total: JSON
|
304
|
+
raw_gift_card_tax_total: JSON
|
305
|
+
raw_shipping_total: JSON
|
306
|
+
raw_shipping_subtotal: JSON
|
307
|
+
raw_shipping_tax_total: JSON
|
308
|
+
raw_original_shipping_total: JSON
|
309
|
+
raw_original_shipping_subtotal: JSON
|
310
|
+
raw_original_shipping_tax_total: JSON
|
311
|
+
}
|
312
|
+
|
313
|
+
enum ReturnStatus {
|
314
|
+
requested
|
315
|
+
received
|
316
|
+
partially_received
|
317
|
+
canceled
|
318
|
+
}
|
319
|
+
|
320
|
+
type Return {
|
321
|
+
id: ID!
|
322
|
+
status: ReturnStatus!
|
323
|
+
refund_amount: Float
|
324
|
+
order_id: String!
|
325
|
+
items: [OrderReturnItem]!
|
326
|
+
}
|
327
|
+
|
328
|
+
type OrderReturnItem {
|
329
|
+
id: ID!
|
330
|
+
return_id: String!
|
331
|
+
order_id: String!
|
332
|
+
item_id: String!
|
333
|
+
reason_id: String
|
334
|
+
quantity: Int!
|
335
|
+
raw_quantity: JSON
|
336
|
+
received_quantity: Int
|
337
|
+
raw_received_quantity: JSON
|
338
|
+
metadata: JSON
|
339
|
+
created_at: DateTime
|
340
|
+
updated_at: DateTime
|
341
|
+
}
|
342
|
+
|
343
|
+
type OrderClaimItem {
|
344
|
+
id: ID!
|
345
|
+
claim_id: String!
|
346
|
+
order_id: String!
|
347
|
+
item_id: String!
|
348
|
+
quantity: Int!
|
349
|
+
reason: ClaimReason!
|
350
|
+
images: [OrderClaimItemImage]
|
351
|
+
raw_quantity: JSON
|
352
|
+
metadata: JSON
|
353
|
+
created_at: DateTime
|
354
|
+
updated_at: DateTime
|
355
|
+
}
|
356
|
+
|
357
|
+
type OrderClaimItemImage {
|
358
|
+
id: ID!
|
359
|
+
claim_item_id: String!
|
360
|
+
item: OrderClaimItem!
|
361
|
+
url: String
|
362
|
+
metadata: JSON
|
363
|
+
created_at: DateTime
|
364
|
+
updated_at: DateTime
|
365
|
+
}
|
366
|
+
|
367
|
+
type OrderExchangeItem {
|
368
|
+
id: ID!
|
369
|
+
exchange_id: String!
|
370
|
+
order_id: String!
|
371
|
+
item_id: String!
|
372
|
+
quantity: Int!
|
373
|
+
raw_quantity: JSON
|
374
|
+
metadata: JSON
|
375
|
+
created_at: DateTime
|
376
|
+
updated_at: DateTime
|
377
|
+
}
|
378
|
+
|
379
|
+
type OrderClaim {
|
380
|
+
order_id: String!
|
381
|
+
claim_items: [OrderClaimItem]!
|
382
|
+
additional_items: [OrderClaimItem]!
|
383
|
+
return: Return
|
384
|
+
return_id: String
|
385
|
+
no_notification: Boolean
|
386
|
+
refund_amount: Float
|
387
|
+
created_by: String
|
388
|
+
}
|
389
|
+
|
390
|
+
type OrderExchange {
|
391
|
+
order_id: String!
|
392
|
+
return_items: [OrderReturnItem]!
|
393
|
+
additional_items: [OrderExchangeItem]!
|
394
|
+
no_notification: Boolean
|
395
|
+
difference_due: Float
|
396
|
+
return: Return
|
397
|
+
return_id: String
|
398
|
+
created_by: String
|
399
|
+
}
|
400
|
+
|
401
|
+
enum PaymentStatus {
|
402
|
+
not_paid
|
403
|
+
awaiting
|
404
|
+
authorized
|
405
|
+
partially_authorized
|
406
|
+
captured
|
407
|
+
partially_captured
|
408
|
+
partially_refunded
|
409
|
+
refunded
|
410
|
+
canceled
|
411
|
+
requires_action
|
412
|
+
}
|
413
|
+
|
414
|
+
enum FulfillmentStatus {
|
415
|
+
not_fulfilled
|
416
|
+
partially_fulfilled
|
417
|
+
fulfilled
|
418
|
+
partially_shipped
|
419
|
+
shipped
|
420
|
+
partially_delivered
|
421
|
+
delivered
|
422
|
+
canceled
|
423
|
+
}
|
424
|
+
|
425
|
+
type OrderDetail {
|
426
|
+
id: ID!
|
427
|
+
version: Int!
|
428
|
+
order_change: OrderChange
|
429
|
+
status: OrderStatus!
|
430
|
+
region_id: String
|
431
|
+
customer_id: String
|
432
|
+
sales_channel_id: String
|
433
|
+
email: String
|
434
|
+
currency_code: String!
|
435
|
+
shipping_address: OrderAddress
|
436
|
+
billing_address: OrderAddress
|
437
|
+
items: [OrderLineItem]
|
438
|
+
shipping_methods: [OrderShippingMethod]
|
439
|
+
transactions: [OrderTransaction]
|
440
|
+
summary: OrderSummary
|
441
|
+
metadata: JSON
|
442
|
+
canceled_at: DateTime
|
443
|
+
created_at: DateTime!
|
444
|
+
updated_at: DateTime!
|
445
|
+
original_item_total: Float!
|
446
|
+
original_item_subtotal: Float!
|
447
|
+
original_item_tax_total: Float!
|
448
|
+
item_total: Float!
|
449
|
+
item_subtotal: Float!
|
450
|
+
item_tax_total: Float!
|
451
|
+
original_total: Float!
|
452
|
+
original_subtotal: Float!
|
453
|
+
original_tax_total: Float!
|
454
|
+
total: Float!
|
455
|
+
subtotal: Float!
|
456
|
+
tax_total: Float!
|
457
|
+
discount_total: Float!
|
458
|
+
discount_tax_total: Float!
|
459
|
+
gift_card_total: Float!
|
460
|
+
gift_card_tax_total: Float!
|
461
|
+
shipping_total: Float!
|
462
|
+
shipping_subtotal: Float!
|
463
|
+
shipping_tax_total: Float!
|
464
|
+
original_shipping_total: Float!
|
465
|
+
original_shipping_subtotal: Float!
|
466
|
+
original_shipping_tax_total: Float!
|
467
|
+
raw_original_item_total: JSON
|
468
|
+
raw_original_item_subtotal: JSON
|
469
|
+
raw_original_item_tax_total: JSON
|
470
|
+
raw_item_total: JSON
|
471
|
+
raw_item_subtotal: JSON
|
472
|
+
raw_item_tax_total: JSON
|
473
|
+
raw_original_total: JSON
|
474
|
+
raw_original_subtotal: JSON
|
475
|
+
raw_original_tax_total: JSON
|
476
|
+
raw_total: JSON
|
477
|
+
raw_subtotal: JSON
|
478
|
+
raw_tax_total: JSON
|
479
|
+
raw_discount_total: JSON
|
480
|
+
raw_discount_tax_total: JSON
|
481
|
+
raw_gift_card_total: JSON
|
482
|
+
raw_gift_card_tax_total: JSON
|
483
|
+
raw_shipping_total: JSON
|
484
|
+
raw_shipping_subtotal: JSON
|
485
|
+
raw_shipping_tax_total: JSON
|
486
|
+
raw_original_shipping_total: JSON
|
487
|
+
raw_original_shipping_subtotal: JSON
|
488
|
+
raw_original_shipping_tax_total: JSON
|
489
|
+
payment_collections: [PaymentCollection]
|
490
|
+
payment_status: PaymentStatus!
|
491
|
+
fulfillments: [Fulfillment]
|
492
|
+
fulfillment_status: FulfillmentStatus!
|
493
|
+
}
|
494
|
+
|
495
|
+
type OrderChange {
|
496
|
+
id: ID!
|
497
|
+
version: Int!
|
498
|
+
change_type: String
|
499
|
+
order_id: String!
|
500
|
+
return_id: String
|
501
|
+
exchange_id: String
|
502
|
+
claim_id: String
|
503
|
+
order: Order!
|
504
|
+
return_order: Return
|
505
|
+
exchange: OrderExchange
|
506
|
+
claim: OrderClaim
|
507
|
+
actions: [OrderChangeAction]!
|
508
|
+
status: String!
|
509
|
+
requested_by: String
|
510
|
+
requested_at: DateTime
|
511
|
+
confirmed_by: String
|
512
|
+
confirmed_at: DateTime
|
513
|
+
declined_by: String
|
514
|
+
declined_reason: String
|
515
|
+
metadata: JSON
|
516
|
+
declined_at: DateTime
|
517
|
+
canceled_by: String
|
518
|
+
canceled_at: DateTime
|
519
|
+
created_at: DateTime!
|
520
|
+
updated_at: DateTime!
|
521
|
+
}
|
522
|
+
|
523
|
+
type OrderChangeAction {
|
524
|
+
id: ID!
|
525
|
+
order_change_id: String
|
526
|
+
order_change: OrderChange
|
527
|
+
order_id: String
|
528
|
+
return_id: String
|
529
|
+
claim_id: String
|
530
|
+
exchange_id: String
|
531
|
+
order: Order
|
532
|
+
reference: String!
|
533
|
+
reference_id: String!
|
534
|
+
action: ChangeActionType!
|
535
|
+
details: JSON
|
536
|
+
internal_note: String
|
537
|
+
created_at: DateTime!
|
538
|
+
updated_at: DateTime!
|
539
|
+
}
|
540
|
+
|
541
|
+
type OrderTransaction {
|
542
|
+
id: ID!
|
543
|
+
order_id: String!
|
544
|
+
order: Order!
|
545
|
+
amount: Float!
|
546
|
+
raw_amount: JSON
|
547
|
+
currency_code: String!
|
548
|
+
reference: String!
|
549
|
+
reference_id: String!
|
550
|
+
metadata: JSON
|
551
|
+
created_at: DateTime!
|
552
|
+
updated_at: DateTime!
|
553
|
+
}
|
554
|
+
|
555
|
+
`;
|
556
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":";;AAAA,kBAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwiBd,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cancel-claim.d.ts","sourceRoot":"","sources":["../../../src/services/actions/cancel-claim.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,aAAa,EACb,UAAU,EACX,MAAM,2BAA2B,CAAA;AA0BlC,wBAAsB,WAAW,CAC/B,IAAI,EAAE,GAAG,EACT,IAAI,EAAE,UAAU,CAAC,mBAAmB,EACpC,aAAa,CAAC,EAAE,OAAO,0BAuFxB"}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.cancelClaim = cancelClaim;
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
5
|
+
async function createOrderChange(service, data, claimOrder, actions, sharedContext) {
|
6
|
+
return await service.createOrderChange_({
|
7
|
+
order_id: claimOrder.order_id,
|
8
|
+
claim_id: claimOrder.id,
|
9
|
+
reference: "claim",
|
10
|
+
reference_id: claimOrder.id,
|
11
|
+
description: data.description,
|
12
|
+
internal_note: data.internal_note,
|
13
|
+
created_by: data.created_by,
|
14
|
+
metadata: data.metadata,
|
15
|
+
actions,
|
16
|
+
}, sharedContext);
|
17
|
+
}
|
18
|
+
async function cancelClaim(data, sharedContext) {
|
19
|
+
const claimOrder = (await this.retrieveOrderClaim(data.claim_id, {
|
20
|
+
select: [
|
21
|
+
"id",
|
22
|
+
"order_id",
|
23
|
+
"claim_items.item_id",
|
24
|
+
"claim_items.is_additional_item",
|
25
|
+
"claim_items.quantity",
|
26
|
+
"additional_items.id",
|
27
|
+
"additional_items.item_id",
|
28
|
+
"additional_items.quantity",
|
29
|
+
"additional_items.is_additional_item",
|
30
|
+
],
|
31
|
+
relations: ["claim_items", "additional_items", "shipping_methods"],
|
32
|
+
}, sharedContext));
|
33
|
+
const actions = [];
|
34
|
+
claimOrder.claim_items?.forEach((item) => {
|
35
|
+
actions.push({
|
36
|
+
action: utils_1.ChangeActionType.REINSTATE_ITEM,
|
37
|
+
claim_id: claimOrder.id,
|
38
|
+
reference: "claim",
|
39
|
+
reference_id: claimOrder.id,
|
40
|
+
details: {
|
41
|
+
reference_id: item.item_id,
|
42
|
+
quantity: item.quantity,
|
43
|
+
},
|
44
|
+
});
|
45
|
+
});
|
46
|
+
claimOrder.additional_items?.forEach((item) => {
|
47
|
+
actions.push({
|
48
|
+
action: utils_1.ChangeActionType.ITEM_REMOVE,
|
49
|
+
order_id: claimOrder.order_id,
|
50
|
+
claim_id: claimOrder.id,
|
51
|
+
reference: "claim",
|
52
|
+
reference_id: claimOrder.id,
|
53
|
+
details: {
|
54
|
+
reference_id: item.item_id,
|
55
|
+
quantity: item.quantity,
|
56
|
+
},
|
57
|
+
});
|
58
|
+
});
|
59
|
+
claimOrder.shipping_methods?.forEach((shipping) => {
|
60
|
+
actions.push({
|
61
|
+
action: utils_1.ChangeActionType.SHIPPING_REMOVE,
|
62
|
+
order_id: claimOrder.order_id,
|
63
|
+
claim_id: claimOrder.id,
|
64
|
+
reference: "claim",
|
65
|
+
reference_id: shipping.id,
|
66
|
+
amount: shipping.raw_amount ?? shipping.amount,
|
67
|
+
});
|
68
|
+
});
|
69
|
+
const [change] = await createOrderChange(this, data, claimOrder, actions, sharedContext);
|
70
|
+
await (0, utils_1.promiseAll)([
|
71
|
+
this.updateOrderClaims([
|
72
|
+
{
|
73
|
+
data: {
|
74
|
+
canceled_at: new Date(),
|
75
|
+
},
|
76
|
+
selector: {
|
77
|
+
id: claimOrder.id,
|
78
|
+
},
|
79
|
+
},
|
80
|
+
], sharedContext),
|
81
|
+
this.confirmOrderChange(change.id, sharedContext),
|
82
|
+
]);
|
83
|
+
return claimOrder;
|
84
|
+
}
|
85
|
+
//# sourceMappingURL=cancel-claim.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cancel-claim.js","sourceRoot":"","sources":["../../../src/services/actions/cancel-claim.ts"],"names":[],"mappings":";;AA+BA,kCA0FC;AAnHD,qDAAwE;AAExE,KAAK,UAAU,iBAAiB,CAC9B,OAAO,EACP,IAAI,EACJ,UAAU,EACV,OAAO,EACP,aAAa;IAEb,OAAO,MAAM,OAAO,CAAC,kBAAkB,CACrC;QACE,QAAQ,EAAE,UAAU,CAAC,QAAQ;QAC7B,QAAQ,EAAE,UAAU,CAAC,EAAE;QACvB,SAAS,EAAE,OAAO;QAClB,YAAY,EAAE,UAAU,CAAC,EAAE;QAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,OAAO;KACR,EACD,aAAa,CACd,CAAA;AACH,CAAC;AAEM,KAAK,UAAU,WAAW,CAE/B,IAAoC,EACpC,aAAuB;IAEvB,MAAM,UAAU,GAAG,CAAC,MAAM,IAAI,CAAC,kBAAkB,CAC/C,IAAI,CAAC,QAAQ,EACb;QACE,MAAM,EAAE;YACN,IAAI;YACJ,UAAU;YACV,qBAAqB;YACrB,gCAAgC;YAChC,sBAAsB;YACtB,qBAAqB;YACrB,0BAA0B;YAC1B,2BAA2B;YAC3B,qCAAqC;SACtC;QACD,SAAS,EAAE,CAAC,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,CAAC;KACnE,EACD,aAAa,CACd,CAAkB,CAAA;IAEnB,MAAM,OAAO,GAAiC,EAAE,CAAA;IAEhD,UAAU,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACvC,OAAO,CAAC,IAAI,CAAC;YACX,MAAM,EAAE,wBAAgB,CAAC,cAAc;YACvC,QAAQ,EAAE,UAAU,CAAC,EAAE;YACvB,SAAS,EAAE,OAAO;YAClB,YAAY,EAAE,UAAU,CAAC,EAAE;YAC3B,OAAO,EAAE;gBACP,YAAY,EAAE,IAAI,CAAC,OAAO;gBAC1B,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,UAAU,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC5C,OAAO,CAAC,IAAI,CAAC;YACX,MAAM,EAAE,wBAAgB,CAAC,WAAW;YACpC,QAAQ,EAAE,UAAU,CAAC,QAAQ;YAC7B,QAAQ,EAAE,UAAU,CAAC,EAAE;YACvB,SAAS,EAAE,OAAO;YAClB,YAAY,EAAE,UAAU,CAAC,EAAE;YAC3B,OAAO,EAAE;gBACP,YAAY,EAAE,IAAI,CAAC,OAAO;gBAC1B,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,UAAU,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAChD,OAAO,CAAC,IAAI,CAAC;YACX,MAAM,EAAE,wBAAgB,CAAC,eAAe;YACxC,QAAQ,EAAE,UAAU,CAAC,QAAQ;YAC7B,QAAQ,EAAE,UAAU,CAAC,EAAE;YACvB,SAAS,EAAE,OAAO;YAClB,YAAY,EAAE,QAAQ,CAAC,EAAE;YACzB,MAAM,EAAE,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,MAAM;SAC/C,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,iBAAiB,CACtC,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,OAAO,EACP,aAAa,CACd,CAAA;IAED,MAAM,IAAA,kBAAU,EAAC;QACf,IAAI,CAAC,iBAAiB,CACpB;YACE;gBACE,IAAI,EAAE;oBACJ,WAAW,EAAE,IAAI,IAAI,EAAE;iBACxB;gBACD,QAAQ,EAAE;oBACR,EAAE,EAAE,UAAU,CAAC,EAAE;iBAClB;aACF;SACF,EACD,aAAa,CACd;QACD,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,EAAE,aAAa,CAAC;KAClD,CAAC,CAAA;IAEF,OAAO,UAAU,CAAA;AACnB,CAAC"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { Context, OrderExchangeDTO, OrderTypes } from "@medusajs/framework/types";
|
2
|
+
export declare function cancelExchange(this: any, data: OrderTypes.CancelOrderExchangeDTO, sharedContext?: Context): Promise<OrderExchangeDTO>;
|
3
|
+
//# sourceMappingURL=cancel-exchange.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cancel-exchange.d.ts","sourceRoot":"","sources":["../../../src/services/actions/cancel-exchange.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,gBAAgB,EAChB,UAAU,EACX,MAAM,2BAA2B,CAAA;AA0BlC,wBAAsB,cAAc,CAClC,IAAI,EAAE,GAAG,EACT,IAAI,EAAE,UAAU,CAAC,sBAAsB,EACvC,aAAa,CAAC,EAAE,OAAO,6BAwExB"}
|