@medusajs/order 0.1.3 → 1.0.0-rc-20241001083650
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 +20 -21
- 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
package/dist/index.d.ts
CHANGED
@@ -1,8 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
export
|
6
|
-
|
7
|
-
export declare const revertMigration: ((options: import("@medusajs/modules-sdk").LoaderOptions<any>, moduleDeclaration?: import("@medusajs/modules-sdk").InternalModuleDeclaration | undefined) => Promise<void>) | undefined;
|
8
|
-
export default moduleDefinition;
|
1
|
+
import { OrderModuleService } from "./services";
|
2
|
+
declare const _default: import("@medusajs/types").ModuleExports<typeof OrderModuleService> & {
|
3
|
+
linkable: Record<string, any>;
|
4
|
+
};
|
5
|
+
export default _default;
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;;;;AAE9C,wBAEE"}
|
package/dist/index.js
CHANGED
@@ -1,30 +1,8 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
|
18
|
-
const
|
19
|
-
|
20
|
-
|
21
|
-
__exportStar(require("./services"), exports);
|
22
|
-
__exportStar(require("./types"), exports);
|
23
|
-
exports.initialize = (0, modules_sdk_1.initializeFactory)({
|
24
|
-
moduleName: modules_sdk_1.Modules.ORDER,
|
25
|
-
moduleDefinition: module_definition_1.moduleDefinition,
|
3
|
+
const utils_1 = require("@medusajs/framework/utils");
|
4
|
+
const _services_1 = require("./services");
|
5
|
+
exports.default = (0, utils_1.Module)(utils_1.Modules.ORDER, {
|
6
|
+
service: _services_1.OrderModuleService,
|
26
7
|
});
|
27
|
-
exports.runMigrations = module_definition_1.moduleDefinition.runMigrations;
|
28
|
-
exports.revertMigration = module_definition_1.moduleDefinition.revertMigration;
|
29
|
-
exports.default = module_definition_1.moduleDefinition;
|
30
8
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,qDAA2D;AAC3D,yCAA8C;AAE9C,kBAAe,IAAA,cAAM,EAAC,eAAO,CAAC,KAAK,EAAE;IACnC,OAAO,EAAE,8BAAkB;CAC5B,CAAC,CAAA"}
|
package/dist/joiner-config.d.ts
CHANGED
@@ -1,5 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
export declare const LinkableKeys: Record<string, string>;
|
4
|
-
export declare const entityNameToLinkableKeysMap: MapToConfig;
|
5
|
-
export declare const joinerConfig: ModuleJoinerConfig;
|
1
|
+
export declare const joinerConfig: Omit<import("@medusajs/types").ModuleJoinerConfig, "serviceName" | "primaryKeys" | "alias" | "linkableKeys"> & Required<Pick<import("@medusajs/types").ModuleJoinerConfig, "serviceName" | "primaryKeys" | "alias" | "linkableKeys">>;
|
2
|
+
//# sourceMappingURL=joiner-config.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"joiner-config.d.ts","sourceRoot":"","sources":["../src/joiner-config.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,YAAY,uOAkBvB,CAAA"}
|
package/dist/joiner-config.js
CHANGED
@@ -3,34 +3,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.joinerConfig =
|
7
|
-
const
|
6
|
+
exports.joinerConfig = void 0;
|
7
|
+
const utils_1 = require("@medusajs/framework/utils");
|
8
8
|
const _models_1 = require("./models");
|
9
|
-
const
|
10
|
-
exports.
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
alias: [
|
28
|
-
{
|
29
|
-
name: ["order", "orders"],
|
30
|
-
args: {
|
31
|
-
entity: order_1.default.name,
|
32
|
-
},
|
33
|
-
},
|
9
|
+
const schema_1 = __importDefault(require("./schema"));
|
10
|
+
exports.joinerConfig = (0, utils_1.defineJoinerConfig)(utils_1.Modules.ORDER, {
|
11
|
+
schema: schema_1.default,
|
12
|
+
linkableKeys: {
|
13
|
+
claim_id: "OrderClaim",
|
14
|
+
exchange_id: "OrderExchange",
|
15
|
+
},
|
16
|
+
models: [
|
17
|
+
_models_1.Order,
|
18
|
+
_models_1.OrderAddress,
|
19
|
+
_models_1.OrderChange,
|
20
|
+
_models_1.OrderClaim,
|
21
|
+
_models_1.OrderExchange,
|
22
|
+
_models_1.OrderLineItem,
|
23
|
+
_models_1.OrderShippingMethod,
|
24
|
+
_models_1.OrderTransaction,
|
25
|
+
_models_1.Return,
|
26
|
+
_models_1.ReturnReason,
|
34
27
|
],
|
35
|
-
};
|
28
|
+
});
|
36
29
|
//# sourceMappingURL=joiner-config.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"joiner-config.js","sourceRoot":"","sources":["../src/joiner-config.ts"],"names":[],"mappings":";;;;;;AAAA,
|
1
|
+
{"version":3,"file":"joiner-config.js","sourceRoot":"","sources":["../src/joiner-config.ts"],"names":[],"mappings":";;;;;;AAAA,qDAAuE;AACvE,qCAWgB;AAChB,sDAA4C;AAE/B,QAAA,YAAY,GAAG,IAAA,0BAAkB,EAAC,eAAO,CAAC,KAAK,EAAE;IAC5D,MAAM,EAAN,gBAAM;IACN,YAAY,EAAE;QACZ,QAAQ,EAAE,YAAY;QACtB,WAAW,EAAE,eAAe;KAC7B;IACD,MAAM,EAAE;QACN,eAAK;QACL,sBAAY;QACZ,qBAAW;QACX,oBAAU;QACV,uBAAa;QACb,uBAAa;QACb,6BAAmB;QACnB,0BAAgB;QAChB,gBAAM;QACN,sBAAY;KACb;CACF,CAAC,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Migration20240219102530.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240219102530.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CAijB1B"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.Migration20240219102530 = void 0;
|
4
|
-
const utils_1 = require("@medusajs/utils");
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
5
5
|
const migrations_1 = require("@mikro-orm/migrations");
|
6
6
|
class Migration20240219102530 extends migrations_1.Migration {
|
7
7
|
async up() {
|
@@ -32,6 +32,7 @@ class Migration20240219102530 extends migrations_1.Migration {
|
|
32
32
|
CREATE TABLE IF NOT EXISTS "order" (
|
33
33
|
"id" TEXT NOT NULL,
|
34
34
|
"region_id" TEXT NULL,
|
35
|
+
"display_id" SERIAL,
|
35
36
|
"customer_id" TEXT NULL,
|
36
37
|
"version" INTEGER NOT NULL DEFAULT 1,
|
37
38
|
"sales_channel_id" TEXT NULL,
|
@@ -109,35 +110,40 @@ class Migration20240219102530 extends migrations_1.Migration {
|
|
109
110
|
|
110
111
|
${(0, utils_1.generatePostgresAlterColummnIfExistStatement)("order", ["fulfillment_status", "payment_status", "display_id"], "DROP NOT NULL")}
|
111
112
|
|
113
|
+
CREATE INDEX IF NOT EXISTS "IDX_order_display_id" ON "order" (
|
114
|
+
display_id
|
115
|
+
)
|
116
|
+
WHERE deleted_at IS NULL;
|
117
|
+
|
112
118
|
CREATE INDEX IF NOT EXISTS "IDX_order_region_id" ON "order" (
|
113
119
|
region_id
|
114
120
|
)
|
115
|
-
WHERE deleted_at IS
|
121
|
+
WHERE deleted_at IS NULL;
|
116
122
|
|
117
123
|
CREATE INDEX IF NOT EXISTS "IDX_order_customer_id" ON "order" (
|
118
124
|
customer_id
|
119
125
|
)
|
120
|
-
WHERE deleted_at IS
|
126
|
+
WHERE deleted_at IS NULL;
|
121
127
|
|
122
128
|
CREATE INDEX IF NOT EXISTS "IDX_order_customer_id" ON "order" (
|
123
129
|
customer_id
|
124
130
|
)
|
125
|
-
WHERE deleted_at IS
|
131
|
+
WHERE deleted_at IS NULL;
|
126
132
|
|
127
133
|
CREATE INDEX IF NOT EXISTS "IDX_order_currency_code" ON "order" (
|
128
134
|
currency_code
|
129
135
|
)
|
130
|
-
WHERE deleted_at IS
|
136
|
+
WHERE deleted_at IS NULL;
|
131
137
|
|
132
138
|
CREATE INDEX IF NOT EXISTS "IDX_order_shipping_address_id" ON "order" (
|
133
139
|
shipping_address_id
|
134
140
|
)
|
135
|
-
WHERE deleted_at IS
|
141
|
+
WHERE deleted_at IS NULL;
|
136
142
|
|
137
143
|
CREATE INDEX IF NOT EXISTS "IDX_order_billing_address_id" ON "order" (
|
138
144
|
billing_address_id
|
139
145
|
)
|
140
|
-
WHERE deleted_at IS
|
146
|
+
WHERE deleted_at IS NULL;
|
141
147
|
|
142
148
|
CREATE INDEX IF NOT EXISTS "IDX_order_deleted_at" ON "order" (
|
143
149
|
deleted_at
|
@@ -146,7 +152,7 @@ class Migration20240219102530 extends migrations_1.Migration {
|
|
146
152
|
CREATE INDEX IF NOT EXISTS "IDX_order_is_draft_order" ON "order" (
|
147
153
|
is_draft_order
|
148
154
|
)
|
149
|
-
WHERE deleted_at IS
|
155
|
+
WHERE deleted_at IS NULL;
|
150
156
|
|
151
157
|
|
152
158
|
CREATE TABLE IF NOT EXISTS "order_summary" (
|
@@ -164,7 +170,7 @@ class Migration20240219102530 extends migrations_1.Migration {
|
|
164
170
|
order_id,
|
165
171
|
version
|
166
172
|
)
|
167
|
-
WHERE deleted_at IS
|
173
|
+
WHERE deleted_at IS NULL;
|
168
174
|
|
169
175
|
CREATE TABLE IF NOT EXISTS "order_change" (
|
170
176
|
"id" TEXT NOT NULL,
|
@@ -268,18 +274,18 @@ class Migration20240219102530 extends migrations_1.Migration {
|
|
268
274
|
CREATE INDEX IF NOT EXISTS "IDX_order_item_order_id" ON "order_item" (
|
269
275
|
order_id
|
270
276
|
)
|
271
|
-
WHERE deleted_at IS
|
277
|
+
WHERE deleted_at IS NULL;
|
272
278
|
|
273
279
|
CREATE INDEX IF NOT EXISTS "IDX_order_item_order_id_version" ON "order_item" (
|
274
280
|
order_id,
|
275
281
|
version
|
276
282
|
)
|
277
|
-
WHERE deleted_at IS
|
283
|
+
WHERE deleted_at IS NULL;
|
278
284
|
|
279
285
|
CREATE INDEX IF NOT EXISTS "IDX_order_item_item_id" ON "order_item" (
|
280
286
|
item_id
|
281
287
|
)
|
282
|
-
WHERE deleted_at IS
|
288
|
+
WHERE deleted_at IS NULL;
|
283
289
|
|
284
290
|
CREATE TABLE IF NOT EXISTS "order_shipping" (
|
285
291
|
"id" TEXT NOT NULL,
|
@@ -295,18 +301,18 @@ class Migration20240219102530 extends migrations_1.Migration {
|
|
295
301
|
CREATE INDEX IF NOT EXISTS "IDX_order_shipping_order_id" ON "order_shipping" (
|
296
302
|
order_id
|
297
303
|
)
|
298
|
-
WHERE deleted_at IS
|
304
|
+
WHERE deleted_at IS NULL;
|
299
305
|
|
300
306
|
CREATE INDEX IF NOT EXISTS "IDX_order_shipping_order_id_version" ON "order_shipping" (
|
301
307
|
order_id,
|
302
308
|
version
|
303
309
|
)
|
304
|
-
WHERE deleted_at IS
|
310
|
+
WHERE deleted_at IS NULL;
|
305
311
|
|
306
312
|
CREATE INDEX IF NOT EXISTS "IDX_order_shipping_item_id" ON "order_shipping" (
|
307
313
|
shipping_method_id
|
308
314
|
)
|
309
|
-
WHERE deleted_at IS
|
315
|
+
WHERE deleted_at IS NULL;
|
310
316
|
|
311
317
|
CREATE TABLE IF NOT EXISTS "order_line_item" (
|
312
318
|
"id" TEXT NOT NULL,
|
@@ -437,6 +443,7 @@ class Migration20240219102530 extends migrations_1.Migration {
|
|
437
443
|
CREATE TABLE IF NOT EXISTS "order_transaction" (
|
438
444
|
"id" TEXT NOT NULL,
|
439
445
|
"order_id" TEXT NOT NULL,
|
446
|
+
"version" INTEGER NOT NULL DEFAULT 1,
|
440
447
|
"amount" NUMERIC NOT NULL,
|
441
448
|
"raw_amount" JSONB NOT NULL,
|
442
449
|
"currency_code" TEXT NOT NULL,
|
@@ -444,21 +451,48 @@ class Migration20240219102530 extends migrations_1.Migration {
|
|
444
451
|
"reference_id" TEXT NULL,
|
445
452
|
"created_at" TIMESTAMPTZ NOT NULL DEFAULT Now(),
|
446
453
|
"updated_at" TIMESTAMPTZ NOT NULL DEFAULT Now(),
|
454
|
+
"deleted_at" timestamptz NULL,
|
447
455
|
CONSTRAINT "order_transaction_pkey" PRIMARY KEY ("id")
|
448
456
|
);
|
449
457
|
|
450
|
-
CREATE INDEX IF NOT EXISTS "
|
451
|
-
order_id
|
452
|
-
|
458
|
+
CREATE INDEX IF NOT EXISTS "IDX_order_transaction_order_id_version" ON "order_transaction" (
|
459
|
+
order_id,
|
460
|
+
version
|
461
|
+
)
|
462
|
+
WHERE deleted_at IS NULL;
|
453
463
|
|
454
464
|
CREATE INDEX IF NOT EXISTS "IDX_order_transaction_currency_code" ON "order_transaction" (
|
455
465
|
currency_code
|
456
|
-
)
|
466
|
+
)
|
467
|
+
WHERE deleted_at IS NULL;
|
457
468
|
|
458
469
|
CREATE INDEX IF NOT EXISTS "IDX_order_transaction_reference_id" ON "order_transaction" (
|
459
470
|
reference_id
|
471
|
+
)
|
472
|
+
WHERE deleted_at IS NULL;
|
473
|
+
|
474
|
+
CREATE TABLE IF NOT EXISTS "return_reason"
|
475
|
+
(
|
476
|
+
id character varying NOT NULL,
|
477
|
+
value character varying NOT NULL,
|
478
|
+
label character varying NOT NULL,
|
479
|
+
description character varying,
|
480
|
+
metadata JSONB NULL,
|
481
|
+
parent_return_reason_id character varying,
|
482
|
+
created_at timestamp with time zone NOT NULL DEFAULT now(),
|
483
|
+
updated_at timestamp with time zone NOT NULL DEFAULT now(),
|
484
|
+
deleted_at timestamp with time zone,
|
485
|
+
CONSTRAINT "return_reason_pkey" PRIMARY KEY (id),
|
486
|
+
CONSTRAINT "return_reason_parent_return_reason_id_foreign" FOREIGN KEY (parent_return_reason_id)
|
487
|
+
REFERENCES "return_reason" (id) MATCH SIMPLE
|
488
|
+
ON UPDATE NO ACTION
|
489
|
+
ON DELETE NO ACTION
|
460
490
|
);
|
461
491
|
|
492
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "IDX_return_reason_value" ON "return_reason" USING btree (value ASC NULLS LAST)
|
493
|
+
WHERE deleted_at IS NULL;
|
494
|
+
|
495
|
+
|
462
496
|
ALTER TABLE if exists "order"
|
463
497
|
ADD CONSTRAINT "order_shipping_address_id_foreign" FOREIGN KEY ("shipping_address_id") REFERENCES "order_address" ("id") ON
|
464
498
|
UPDATE CASCADE ON
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Migration20240219102530.js","sourceRoot":"","sources":["../../src/migrations/Migration20240219102530.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"Migration20240219102530.js","sourceRoot":"","sources":["../../src/migrations/Migration20240219102530.ts"],"names":[],"mappings":";;;AAAA,qDAAwF;AACxF,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAuGR,IAAA,oDAA4C,EAC5C,OAAO,EACP,CAAC,oBAAoB,EAAE,gBAAgB,EAAE,YAAY,CAAC,EACtD,eAAe,CAChB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAicF,CAAA;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAClB,CAAC;CACF;AAljBD,0DAkjBC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Migration20240604100512.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240604100512.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CA2W1B"}
|