@mercurjs/core-plugin 2.0.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.medusa/server/src/api/admin/commission-rates/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/admin/commission-rates/[id]/route.js +43 -0
- package/.medusa/server/src/api/admin/commission-rates/[id]/rules/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/commission-rates/[id]/rules/route.js +21 -0
- package/.medusa/server/src/api/admin/commission-rates/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/commission-rates/middlewares.js +51 -0
- package/.medusa/server/src/api/admin/commission-rates/query-config.d.ts +11 -0
- package/.medusa/server/src/api/admin/commission-rates/query-config.js +32 -0
- package/.medusa/server/src/api/admin/commission-rates/route.d.ts +5 -0
- package/.medusa/server/src/api/admin/commission-rates/route.js +35 -0
- package/.medusa/server/src/api/admin/commission-rates/validators.d.ts +271 -0
- package/.medusa/server/src/api/admin/commission-rates/validators.js +61 -0
- package/.medusa/server/src/api/admin/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/middlewares.js +14 -0
- package/.medusa/server/src/api/admin/order-groups/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/order-groups/[id]/route.js +20 -0
- package/.medusa/server/src/api/admin/order-groups/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/order-groups/middlewares.js +23 -0
- package/.medusa/server/src/api/admin/order-groups/query-config.d.ts +11 -0
- package/.medusa/server/src/api/admin/order-groups/query-config.js +22 -0
- package/.medusa/server/src/api/admin/order-groups/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/order-groups/route.js +21 -0
- package/.medusa/server/src/api/admin/order-groups/validators.d.ts +133 -0
- package/.medusa/server/src/api/admin/order-groups/validators.js +20 -0
- package/.medusa/server/src/api/admin/payouts/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/payouts/[id]/route.js +18 -0
- package/.medusa/server/src/api/admin/payouts/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/payouts/middlewares.js +23 -0
- package/.medusa/server/src/api/admin/payouts/query-config.d.ts +11 -0
- package/.medusa/server/src/api/admin/payouts/query-config.js +29 -0
- package/.medusa/server/src/api/admin/payouts/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/payouts/route.js +21 -0
- package/.medusa/server/src/api/admin/payouts/validators.d.ts +124 -0
- package/.medusa/server/src/api/admin/payouts/validators.js +17 -0
- package/.medusa/server/src/api/admin/sellers/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/sellers/[id]/route.js +18 -0
- package/.medusa/server/src/api/admin/sellers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/sellers/middlewares.js +23 -0
- package/.medusa/server/src/api/admin/sellers/query-config.d.ts +11 -0
- package/.medusa/server/src/api/admin/sellers/query-config.js +38 -0
- package/.medusa/server/src/api/admin/sellers/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/sellers/route.js +21 -0
- package/.medusa/server/src/api/admin/sellers/validators.d.ts +133 -0
- package/.medusa/server/src/api/admin/sellers/validators.js +20 -0
- package/.medusa/server/src/api/hooks/payout/route.d.ts +2 -0
- package/.medusa/server/src/api/hooks/payout/route.js +26 -0
- package/.medusa/server/src/api/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/middlewares.js +10 -0
- package/.medusa/server/src/api/store/carts/[id]/complete/query-config.d.ts +5 -0
- package/.medusa/server/src/api/store/carts/[id]/complete/query-config.js +17 -0
- package/.medusa/server/src/api/store/carts/[id]/complete/route.d.ts +4 -0
- package/.medusa/server/src/api/store/carts/[id]/complete/route.js +50 -0
- package/.medusa/server/src/api/store/carts/[id]/complete/validators.d.ts +9 -0
- package/.medusa/server/src/api/store/carts/[id]/complete/validators.js +6 -0
- package/.medusa/server/src/api/store/carts/[id]/promotions/route.d.ts +3 -0
- package/.medusa/server/src/api/store/carts/[id]/promotions/route.js +23 -0
- package/.medusa/server/src/api/store/carts/[id]/shipping-methods/route.d.ts +3 -0
- package/.medusa/server/src/api/store/carts/[id]/shipping-methods/route.js +19 -0
- package/.medusa/server/src/api/store/carts/helpers.d.ts +3 -0
- package/.medusa/server/src/api/store/carts/helpers.js +147 -0
- package/.medusa/server/src/api/store/carts/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/carts/middlewares.js +16 -0
- package/.medusa/server/src/api/store/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/middlewares.js +12 -0
- package/.medusa/server/src/api/store/order-groups/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/store/order-groups/[id]/route.js +22 -0
- package/.medusa/server/src/api/store/order-groups/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/order-groups/middlewares.js +25 -0
- package/.medusa/server/src/api/store/order-groups/query-config.d.ts +13 -0
- package/.medusa/server/src/api/store/order-groups/query-config.js +32 -0
- package/.medusa/server/src/api/store/order-groups/route.d.ts +3 -0
- package/.medusa/server/src/api/store/order-groups/route.js +25 -0
- package/.medusa/server/src/api/store/order-groups/validators.d.ts +118 -0
- package/.medusa/server/src/api/store/order-groups/validators.js +15 -0
- package/.medusa/server/src/api/store/sellers/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/store/sellers/[id]/route.js +22 -0
- package/.medusa/server/src/api/store/sellers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/sellers/middlewares.js +23 -0
- package/.medusa/server/src/api/store/sellers/query-config.d.ts +13 -0
- package/.medusa/server/src/api/store/sellers/query-config.js +31 -0
- package/.medusa/server/src/api/store/sellers/route.d.ts +3 -0
- package/.medusa/server/src/api/store/sellers/route.js +25 -0
- package/.medusa/server/src/api/store/sellers/validators.d.ts +127 -0
- package/.medusa/server/src/api/store/sellers/validators.js +18 -0
- package/.medusa/server/src/api/store/shipping-options/route.d.ts +4 -0
- package/.medusa/server/src/api/store/shipping-options/route.js +17 -0
- package/.medusa/server/src/api/utils/index.d.ts +1 -0
- package/.medusa/server/src/api/utils/index.js +18 -0
- package/.medusa/server/src/api/utils/unless-base-url.d.ts +10 -0
- package/.medusa/server/src/api/utils/unless-base-url.js +20 -0
- package/.medusa/server/src/api/vendor/campaigns/[id]/promotions/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/campaigns/[id]/promotions/route.js +21 -0
- package/.medusa/server/src/api/vendor/campaigns/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/campaigns/[id]/route.js +42 -0
- package/.medusa/server/src/api/vendor/campaigns/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/campaigns/helpers.js +30 -0
- package/.medusa/server/src/api/vendor/campaigns/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/campaigns/middlewares.js +63 -0
- package/.medusa/server/src/api/vendor/campaigns/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/campaigns/query-config.js +27 -0
- package/.medusa/server/src/api/vendor/campaigns/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/campaigns/route.js +35 -0
- package/.medusa/server/src/api/vendor/campaigns/validators.d.ts +191 -0
- package/.medusa/server/src/api/vendor/campaigns/validators.js +70 -0
- package/.medusa/server/src/api/vendor/collections/[id]/products/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/collections/[id]/products/route.js +23 -0
- package/.medusa/server/src/api/vendor/collections/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/collections/[id]/route.js +25 -0
- package/.medusa/server/src/api/vendor/collections/helpers.d.ts +4 -0
- package/.medusa/server/src/api/vendor/collections/helpers.js +29 -0
- package/.medusa/server/src/api/vendor/collections/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/collections/middlewares.js +32 -0
- package/.medusa/server/src/api/vendor/collections/query-config.d.ts +9 -0
- package/.medusa/server/src/api/vendor/collections/query-config.js +20 -0
- package/.medusa/server/src/api/vendor/collections/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/collections/route.js +26 -0
- package/.medusa/server/src/api/vendor/collections/validators.d.ts +169 -0
- package/.medusa/server/src/api/vendor/collections/validators.js +19 -0
- package/.medusa/server/src/api/vendor/currencies/[code]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/currencies/[code]/route.js +19 -0
- package/.medusa/server/src/api/vendor/currencies/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/currencies/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/currencies/query-config.d.ts +12 -0
- package/.medusa/server/src/api/vendor/currencies/query-config.js +23 -0
- package/.medusa/server/src/api/vendor/currencies/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/currencies/route.js +21 -0
- package/.medusa/server/src/api/vendor/currencies/validators.d.ts +46 -0
- package/.medusa/server/src/api/vendor/currencies/validators.js +15 -0
- package/.medusa/server/src/api/vendor/customers/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/customers/[id]/route.js +21 -0
- package/.medusa/server/src/api/vendor/customers/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/customers/helpers.js +20 -0
- package/.medusa/server/src/api/vendor/customers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/customers/middlewares.js +33 -0
- package/.medusa/server/src/api/vendor/customers/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/customers/query-config.js +28 -0
- package/.medusa/server/src/api/vendor/customers/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/customers/route.js +21 -0
- package/.medusa/server/src/api/vendor/customers/validators.d.ts +127 -0
- package/.medusa/server/src/api/vendor/customers/validators.js +18 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/middlewares.js +16 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/query-config.d.ts +7 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/query-config.js +11 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/route.js +21 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/validators.d.ts +35 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/validators.js +17 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/[id]/service-zones/[zone_id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/[id]/service-zones/[zone_id]/route.js +61 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/[id]/service-zones/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/[id]/service-zones/route.js +25 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/helpers.js +40 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/middlewares.js +44 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/query-config.d.ts +13 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/query-config.js +34 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/validators.d.ts +365 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/validators.js +56 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/location-levels/[location_id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/location-levels/[location_id]/route.js +48 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/location-levels/batch/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/location-levels/batch/route.js +30 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/location-levels/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/location-levels/route.js +42 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/route.js +42 -0
- package/.medusa/server/src/api/vendor/inventory-items/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/inventory-items/helpers.js +30 -0
- package/.medusa/server/src/api/vendor/inventory-items/location-levels/batch/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/inventory-items/location-levels/batch/route.js +22 -0
- package/.medusa/server/src/api/vendor/inventory-items/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/inventory-items/middlewares.js +100 -0
- package/.medusa/server/src/api/vendor/inventory-items/query-config.d.ts +22 -0
- package/.medusa/server/src/api/vendor/inventory-items/query-config.js +58 -0
- package/.medusa/server/src/api/vendor/inventory-items/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/inventory-items/route.js +35 -0
- package/.medusa/server/src/api/vendor/inventory-items/validators.d.ts +773 -0
- package/.medusa/server/src/api/vendor/inventory-items/validators.js +117 -0
- package/.medusa/server/src/api/vendor/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/middlewares.js +105 -0
- package/.medusa/server/src/api/vendor/orders/[id]/cancel/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/cancel/route.js +26 -0
- package/.medusa/server/src/api/vendor/orders/[id]/changes/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/changes/route.js +21 -0
- package/.medusa/server/src/api/vendor/orders/[id]/complete/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/complete/route.js +25 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/cancel/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/cancel/route.js +27 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/mark-as-delivered/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/mark-as-delivered/route.js +26 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/shipments/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/shipments/route.js +28 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/route.js +20 -0
- package/.medusa/server/src/api/vendor/orders/[id]/preview/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/preview/route.js +15 -0
- package/.medusa/server/src/api/vendor/orders/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/route.js +19 -0
- package/.medusa/server/src/api/vendor/orders/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/orders/helpers.js +23 -0
- package/.medusa/server/src/api/vendor/orders/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/orders/middlewares.js +88 -0
- package/.medusa/server/src/api/vendor/orders/query-config.d.ts +18 -0
- package/.medusa/server/src/api/vendor/orders/query-config.js +58 -0
- package/.medusa/server/src/api/vendor/orders/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/route.js +29 -0
- package/.medusa/server/src/api/vendor/orders/validators.d.ts +225 -0
- package/.medusa/server/src/api/vendor/orders/validators.js +45 -0
- package/.medusa/server/src/api/vendor/payments/[id]/capture/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/payments/[id]/capture/route.js +21 -0
- package/.medusa/server/src/api/vendor/payments/[id]/refund/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/payments/[id]/refund/route.js +21 -0
- package/.medusa/server/src/api/vendor/payments/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payments/[id]/route.js +12 -0
- package/.medusa/server/src/api/vendor/payments/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payments/helpers.js +30 -0
- package/.medusa/server/src/api/vendor/payments/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/payments/middlewares.js +56 -0
- package/.medusa/server/src/api/vendor/payments/payment-providers/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payments/payment-providers/route.js +21 -0
- package/.medusa/server/src/api/vendor/payments/query-config.d.ts +18 -0
- package/.medusa/server/src/api/vendor/payments/query-config.js +37 -0
- package/.medusa/server/src/api/vendor/payments/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payments/route.js +21 -0
- package/.medusa/server/src/api/vendor/payments/validators.d.ts +174 -0
- package/.medusa/server/src/api/vendor/payments/validators.js +37 -0
- package/.medusa/server/src/api/vendor/payout-accounts/[id]/onboarding/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/payout-accounts/[id]/onboarding/route.js +26 -0
- package/.medusa/server/src/api/vendor/payout-accounts/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payout-accounts/[id]/route.js +18 -0
- package/.medusa/server/src/api/vendor/payout-accounts/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/payout-accounts/helpers.js +20 -0
- package/.medusa/server/src/api/vendor/payout-accounts/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/payout-accounts/middlewares.js +49 -0
- package/.medusa/server/src/api/vendor/payout-accounts/query-config.d.ts +18 -0
- package/.medusa/server/src/api/vendor/payout-accounts/query-config.js +40 -0
- package/.medusa/server/src/api/vendor/payout-accounts/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/payout-accounts/route.js +40 -0
- package/.medusa/server/src/api/vendor/payout-accounts/validators.d.ts +52 -0
- package/.medusa/server/src/api/vendor/payout-accounts/validators.js +23 -0
- package/.medusa/server/src/api/vendor/payouts/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payouts/[id]/route.js +21 -0
- package/.medusa/server/src/api/vendor/payouts/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/payouts/helpers.js +20 -0
- package/.medusa/server/src/api/vendor/payouts/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/payouts/middlewares.js +33 -0
- package/.medusa/server/src/api/vendor/payouts/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/payouts/query-config.js +24 -0
- package/.medusa/server/src/api/vendor/payouts/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payouts/route.js +21 -0
- package/.medusa/server/src/api/vendor/payouts/validators.d.ts +118 -0
- package/.medusa/server/src/api/vendor/payouts/validators.js +15 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/prices/batch/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/prices/batch/route.js +48 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/prices/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/prices/route.js +27 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/products/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/products/route.js +31 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/route.js +40 -0
- package/.medusa/server/src/api/vendor/price-lists/helpers.d.ts +5 -0
- package/.medusa/server/src/api/vendor/price-lists/helpers.js +71 -0
- package/.medusa/server/src/api/vendor/price-lists/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/price-lists/middlewares.js +111 -0
- package/.medusa/server/src/api/vendor/price-lists/query-config.d.ts +14 -0
- package/.medusa/server/src/api/vendor/price-lists/query-config.js +44 -0
- package/.medusa/server/src/api/vendor/price-lists/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/price-lists/route.js +40 -0
- package/.medusa/server/src/api/vendor/price-lists/validators.d.ts +285 -0
- package/.medusa/server/src/api/vendor/price-lists/validators.js +58 -0
- package/.medusa/server/src/api/vendor/price-preferences/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/price-preferences/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/price-preferences/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/price-preferences/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/price-preferences/query-config.d.ts +10 -0
- package/.medusa/server/src/api/vendor/price-preferences/query-config.js +21 -0
- package/.medusa/server/src/api/vendor/price-preferences/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/price-preferences/route.js +21 -0
- package/.medusa/server/src/api/vendor/price-preferences/validators.d.ts +43 -0
- package/.medusa/server/src/api/vendor/price-preferences/validators.js +16 -0
- package/.medusa/server/src/api/vendor/product-categories/[id]/products/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-categories/[id]/products/route.js +27 -0
- package/.medusa/server/src/api/vendor/product-categories/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-categories/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/product-categories/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/product-categories/helpers.js +24 -0
- package/.medusa/server/src/api/vendor/product-categories/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/product-categories/middlewares.js +65 -0
- package/.medusa/server/src/api/vendor/product-categories/query-config.d.ts +9 -0
- package/.medusa/server/src/api/vendor/product-categories/query-config.js +27 -0
- package/.medusa/server/src/api/vendor/product-categories/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-categories/route.js +21 -0
- package/.medusa/server/src/api/vendor/product-categories/validators.d.ts +58 -0
- package/.medusa/server/src/api/vendor/product-categories/validators.js +22 -0
- package/.medusa/server/src/api/vendor/product-tags/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-tags/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/product-tags/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/product-tags/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/product-tags/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/product-tags/query-config.js +21 -0
- package/.medusa/server/src/api/vendor/product-tags/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-tags/route.js +21 -0
- package/.medusa/server/src/api/vendor/product-tags/validators.d.ts +60 -0
- package/.medusa/server/src/api/vendor/product-tags/validators.js +19 -0
- package/.medusa/server/src/api/vendor/product-types/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-types/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/product-types/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/product-types/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/product-types/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/product-types/query-config.js +21 -0
- package/.medusa/server/src/api/vendor/product-types/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-types/route.js +21 -0
- package/.medusa/server/src/api/vendor/product-types/validators.d.ts +40 -0
- package/.medusa/server/src/api/vendor/product-types/validators.js +15 -0
- package/.medusa/server/src/api/vendor/product-variants/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/product-variants/middlewares.js +26 -0
- package/.medusa/server/src/api/vendor/product-variants/query-config.d.ts +12 -0
- package/.medusa/server/src/api/vendor/product-variants/query-config.js +41 -0
- package/.medusa/server/src/api/vendor/product-variants/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-variants/route.js +21 -0
- package/.medusa/server/src/api/vendor/product-variants/validators.d.ts +128 -0
- package/.medusa/server/src/api/vendor/product-variants/validators.js +20 -0
- package/.medusa/server/src/api/vendor/products/[id]/options/[option_id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/products/[id]/options/[option_id]/route.js +43 -0
- package/.medusa/server/src/api/vendor/products/[id]/options/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/products/[id]/options/route.js +34 -0
- package/.medusa/server/src/api/vendor/products/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/products/[id]/route.js +58 -0
- package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/route.js +57 -0
- package/.medusa/server/src/api/vendor/products/[id]/variants/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/products/[id]/variants/route.js +55 -0
- package/.medusa/server/src/api/vendor/products/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/products/helpers.js +20 -0
- package/.medusa/server/src/api/vendor/products/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/products/middlewares.js +112 -0
- package/.medusa/server/src/api/vendor/products/query-config.d.ts +22 -0
- package/.medusa/server/src/api/vendor/products/query-config.js +61 -0
- package/.medusa/server/src/api/vendor/products/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/products/route.js +43 -0
- package/.medusa/server/src/api/vendor/products/validators.d.ts +2192 -0
- package/.medusa/server/src/api/vendor/products/validators.js +168 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/[rule_type]/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/[rule_type]/route.js +103 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/buy-rules/batch/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/buy-rules/batch/route.js +23 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/route.js +42 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/rules/batch/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/rules/batch/route.js +23 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/target-rules/batch/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/target-rules/batch/route.js +23 -0
- package/.medusa/server/src/api/vendor/promotions/helpers.d.ts +13 -0
- package/.medusa/server/src/api/vendor/promotions/helpers.js +70 -0
- package/.medusa/server/src/api/vendor/promotions/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/promotions/middlewares.js +100 -0
- package/.medusa/server/src/api/vendor/promotions/query-config.d.ts +29 -0
- package/.medusa/server/src/api/vendor/promotions/query-config.js +60 -0
- package/.medusa/server/src/api/vendor/promotions/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/promotions/route.js +35 -0
- package/.medusa/server/src/api/vendor/promotions/rule-attribute-options/[rule_type]/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/promotions/rule-attribute-options/[rule_type]/route.js +18 -0
- package/.medusa/server/src/api/vendor/promotions/rule-value-options/[rule_type]/[rule_attribute_id]/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/promotions/rule-value-options/[rule_type]/[rule_attribute_id]/route.js +54 -0
- package/.medusa/server/src/api/vendor/promotions/utils/index.d.ts +5 -0
- package/.medusa/server/src/api/vendor/promotions/utils/index.js +22 -0
- package/.medusa/server/src/api/vendor/promotions/utils/operators-map.d.ts +18 -0
- package/.medusa/server/src/api/vendor/promotions/utils/operators-map.js +22 -0
- package/.medusa/server/src/api/vendor/promotions/utils/rule-attributes-map.d.ts +11 -0
- package/.medusa/server/src/api/vendor/promotions/utils/rule-attributes-map.js +155 -0
- package/.medusa/server/src/api/vendor/promotions/utils/rule-query-configuration.d.ts +5 -0
- package/.medusa/server/src/api/vendor/promotions/utils/rule-query-configuration.js +61 -0
- package/.medusa/server/src/api/vendor/promotions/utils/validate-rule-attribute.d.ts +8 -0
- package/.medusa/server/src/api/vendor/promotions/utils/validate-rule-attribute.js +18 -0
- package/.medusa/server/src/api/vendor/promotions/utils/validate-rule-type.d.ts +1 -0
- package/.medusa/server/src/api/vendor/promotions/utils/validate-rule-type.js +12 -0
- package/.medusa/server/src/api/vendor/promotions/validators.d.ts +1082 -0
- package/.medusa/server/src/api/vendor/promotions/validators.js +134 -0
- package/.medusa/server/src/api/vendor/refund-reasons/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/refund-reasons/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/refund-reasons/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/refund-reasons/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/refund-reasons/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/refund-reasons/query-config.js +22 -0
- package/.medusa/server/src/api/vendor/refund-reasons/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/refund-reasons/route.js +21 -0
- package/.medusa/server/src/api/vendor/refund-reasons/validators.d.ts +121 -0
- package/.medusa/server/src/api/vendor/refund-reasons/validators.js +16 -0
- package/.medusa/server/src/api/vendor/regions/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/regions/[id]/route.js +18 -0
- package/.medusa/server/src/api/vendor/regions/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/regions/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/regions/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/regions/query-config.js +24 -0
- package/.medusa/server/src/api/vendor/regions/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/regions/route.js +21 -0
- package/.medusa/server/src/api/vendor/regions/validators.d.ts +127 -0
- package/.medusa/server/src/api/vendor/regions/validators.js +18 -0
- package/.medusa/server/src/api/vendor/return-reasons/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/return-reasons/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/return-reasons/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/return-reasons/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/return-reasons/query-config.d.ts +12 -0
- package/.medusa/server/src/api/vendor/return-reasons/query-config.js +28 -0
- package/.medusa/server/src/api/vendor/return-reasons/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/return-reasons/route.js +21 -0
- package/.medusa/server/src/api/vendor/return-reasons/validators.d.ts +133 -0
- package/.medusa/server/src/api/vendor/return-reasons/validators.js +22 -0
- package/.medusa/server/src/api/vendor/returns/[id]/cancel/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/returns/[id]/cancel/route.js +19 -0
- package/.medusa/server/src/api/vendor/returns/[id]/dismiss-items/[action_id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/[id]/dismiss-items/[action_id]/route.js +56 -0
- package/.medusa/server/src/api/vendor/returns/[id]/dismiss-items/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/returns/[id]/dismiss-items/route.js +28 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive/confirm/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive/confirm/route.js +31 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive/route.js +51 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive-items/[action_id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive-items/[action_id]/route.js +56 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive-items/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive-items/route.js +28 -0
- package/.medusa/server/src/api/vendor/returns/[id]/request/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/[id]/request/route.js +46 -0
- package/.medusa/server/src/api/vendor/returns/[id]/request-items/[action_id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/[id]/request-items/[action_id]/route.js +56 -0
- package/.medusa/server/src/api/vendor/returns/[id]/request-items/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/returns/[id]/request-items/route.js +28 -0
- package/.medusa/server/src/api/vendor/returns/[id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/[id]/route.js +45 -0
- package/.medusa/server/src/api/vendor/returns/[id]/shipping-method/[action_id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/[id]/shipping-method/[action_id]/route.js +56 -0
- package/.medusa/server/src/api/vendor/returns/[id]/shipping-method/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/returns/[id]/shipping-method/route.js +28 -0
- package/.medusa/server/src/api/vendor/returns/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/returns/helpers.js +21 -0
- package/.medusa/server/src/api/vendor/returns/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/returns/middlewares.js +189 -0
- package/.medusa/server/src/api/vendor/returns/query-config.d.ts +12 -0
- package/.medusa/server/src/api/vendor/returns/query-config.js +38 -0
- package/.medusa/server/src/api/vendor/returns/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/route.js +52 -0
- package/.medusa/server/src/api/vendor/returns/validators.d.ts +439 -0
- package/.medusa/server/src/api/vendor/returns/validators.js +91 -0
- package/.medusa/server/src/api/vendor/sales-channels/[id]/products/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/sales-channels/[id]/products/route.js +24 -0
- package/.medusa/server/src/api/vendor/sales-channels/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/sales-channels/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/sales-channels/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/sales-channels/helpers.js +14 -0
- package/.medusa/server/src/api/vendor/sales-channels/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/sales-channels/middlewares.js +32 -0
- package/.medusa/server/src/api/vendor/sales-channels/query-config.d.ts +10 -0
- package/.medusa/server/src/api/vendor/sales-channels/query-config.js +22 -0
- package/.medusa/server/src/api/vendor/sales-channels/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/sales-channels/route.js +21 -0
- package/.medusa/server/src/api/vendor/sales-channels/validators.d.ts +43 -0
- package/.medusa/server/src/api/vendor/sales-channels/validators.js +16 -0
- package/.medusa/server/src/api/vendor/sellers/me/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/sellers/me/route.js +32 -0
- package/.medusa/server/src/api/vendor/sellers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/sellers/middlewares.js +32 -0
- package/.medusa/server/src/api/vendor/sellers/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/sellers/query-config.js +32 -0
- package/.medusa/server/src/api/vendor/sellers/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/sellers/route.js +22 -0
- package/.medusa/server/src/api/vendor/sellers/validators.d.ts +112 -0
- package/.medusa/server/src/api/vendor/sellers/validators.js +43 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/[id]/route.js +14 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/helpers.js +15 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/query-config.d.ts +12 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/query-config.js +23 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/route.js +21 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/validators.d.ts +130 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/validators.js +19 -0
- package/.medusa/server/src/api/vendor/shipping-options/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/shipping-options/[id]/route.js +46 -0
- package/.medusa/server/src/api/vendor/shipping-options/[id]/rules/batch/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/shipping-options/[id]/rules/batch/route.js +26 -0
- package/.medusa/server/src/api/vendor/shipping-options/helpers.d.ts +12 -0
- package/.medusa/server/src/api/vendor/shipping-options/helpers.js +64 -0
- package/.medusa/server/src/api/vendor/shipping-options/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/shipping-options/middlewares.js +63 -0
- package/.medusa/server/src/api/vendor/shipping-options/query-config.d.ts +22 -0
- package/.medusa/server/src/api/vendor/shipping-options/query-config.js +47 -0
- package/.medusa/server/src/api/vendor/shipping-options/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/shipping-options/route.js +35 -0
- package/.medusa/server/src/api/vendor/shipping-options/validators.d.ts +860 -0
- package/.medusa/server/src/api/vendor/shipping-options/validators.js +130 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/[id]/route.js +38 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/helpers.js +30 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/middlewares.js +54 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/query-config.js +22 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/route.js +35 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/validators.d.ts +155 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/validators.js +32 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/fulfillment-providers/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/fulfillment-providers/route.js +30 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/fulfillment-sets/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/fulfillment-sets/route.js +23 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/route.js +43 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/sales-channels/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/sales-channels/route.js +22 -0
- package/.medusa/server/src/api/vendor/stock-locations/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/stock-locations/helpers.js +30 -0
- package/.medusa/server/src/api/vendor/stock-locations/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/stock-locations/middlewares.js +79 -0
- package/.medusa/server/src/api/vendor/stock-locations/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/stock-locations/query-config.js +30 -0
- package/.medusa/server/src/api/vendor/stock-locations/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/stock-locations/route.js +35 -0
- package/.medusa/server/src/api/vendor/stock-locations/validators.d.ts +287 -0
- package/.medusa/server/src/api/vendor/stock-locations/validators.js +47 -0
- package/.medusa/server/src/api/vendor/stores/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/stores/middlewares.js +16 -0
- package/.medusa/server/src/api/vendor/stores/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/stores/query-config.js +26 -0
- package/.medusa/server/src/api/vendor/stores/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/stores/route.js +21 -0
- package/.medusa/server/src/api/vendor/stores/validators.d.ts +40 -0
- package/.medusa/server/src/api/vendor/stores/validators.js +15 -0
- package/.medusa/server/src/api/vendor/uploads/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/uploads/middlewares.js +16 -0
- package/.medusa/server/src/api/vendor/uploads/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/uploads/route.js +24 -0
- package/.medusa/server/src/links/campaign-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/campaign-seller-link.js +10 -0
- package/.medusa/server/src/links/inventory-item-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/inventory-item-seller-link.js +10 -0
- package/.medusa/server/src/links/line-item-commission-line-link.d.ts +2 -0
- package/.medusa/server/src/links/line-item-commission-line-link.js +21 -0
- package/.medusa/server/src/links/order-group-cart-link.d.ts +2 -0
- package/.medusa/server/src/links/order-group-cart-link.js +15 -0
- package/.medusa/server/src/links/order-group-order-link.d.ts +2 -0
- package/.medusa/server/src/links/order-group-order-link.js +14 -0
- package/.medusa/server/src/links/order-payout-link.d.ts +2 -0
- package/.medusa/server/src/links/order-payout-link.js +13 -0
- package/.medusa/server/src/links/order-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/order-seller-link.js +10 -0
- package/.medusa/server/src/links/payout-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/payout-seller-link.js +13 -0
- package/.medusa/server/src/links/price-list-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/price-list-seller-link.js +10 -0
- package/.medusa/server/src/links/product-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/product-seller-link.js +10 -0
- package/.medusa/server/src/links/promotion-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/promotion-seller-link.js +10 -0
- package/.medusa/server/src/links/seller-customer-link.d.ts +2 -0
- package/.medusa/server/src/links/seller-customer-link.js +10 -0
- package/.medusa/server/src/links/seller-payout-account-link.d.ts +2 -0
- package/.medusa/server/src/links/seller-payout-account-link.js +10 -0
- package/.medusa/server/src/links/shipping-option-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/shipping-option-seller-link.js +10 -0
- package/.medusa/server/src/links/shipping-profile-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/shipping-profile-seller-link.js +10 -0
- package/.medusa/server/src/links/stock-location-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/stock-location-seller-link.js +10 -0
- package/.medusa/server/src/modules/commission/index.d.ts +49 -0
- package/.medusa/server/src/modules/commission/index.js +12 -0
- package/.medusa/server/src/modules/commission/migrations/Migration20260130132817.d.ts +5 -0
- package/.medusa/server/src/modules/commission/migrations/Migration20260130132817.js +26 -0
- package/.medusa/server/src/modules/commission/models/commission-line.d.ts +10 -0
- package/.medusa/server/src/modules/commission/models/commission-line.js +14 -0
- package/.medusa/server/src/modules/commission/models/commission-rate.d.ts +21 -0
- package/.medusa/server/src/modules/commission/models/commission-rate.js +26 -0
- package/.medusa/server/src/modules/commission/models/commission-rule.d.ts +20 -0
- package/.medusa/server/src/modules/commission/models/commission-rule.js +17 -0
- package/.medusa/server/src/modules/commission/models/index.d.ts +3 -0
- package/.medusa/server/src/modules/commission/models/index.js +13 -0
- package/.medusa/server/src/modules/commission/service.d.ts +63 -0
- package/.medusa/server/src/modules/commission/service.js +184 -0
- package/.medusa/server/src/modules/payout/index.d.ts +77 -0
- package/.medusa/server/src/modules/payout/index.js +14 -0
- package/.medusa/server/src/modules/payout/loaders/provider.d.ts +5 -0
- package/.medusa/server/src/modules/payout/loaders/provider.js +28 -0
- package/.medusa/server/src/modules/payout/migrations/Migration20260130132816.d.ts +5 -0
- package/.medusa/server/src/modules/payout/migrations/Migration20260130132816.js +42 -0
- package/.medusa/server/src/modules/payout/migrations/Migration20260216152209.d.ts +5 -0
- package/.medusa/server/src/modules/payout/migrations/Migration20260216152209.js +14 -0
- package/.medusa/server/src/modules/payout/models/balance.d.ts +53 -0
- package/.medusa/server/src/modules/payout/models/balance.js +35 -0
- package/.medusa/server/src/modules/payout/models/index.d.ts +5 -0
- package/.medusa/server/src/modules/payout/models/index.js +14 -0
- package/.medusa/server/src/modules/payout/models/onboarding.d.ts +35 -0
- package/.medusa/server/src/modules/payout/models/onboarding.js +14 -0
- package/.medusa/server/src/modules/payout/models/payout-account.d.ts +41 -0
- package/.medusa/server/src/modules/payout/models/payout-account.js +28 -0
- package/.medusa/server/src/modules/payout/models/payout.d.ts +41 -0
- package/.medusa/server/src/modules/payout/models/payout.js +18 -0
- package/.medusa/server/src/modules/payout/models/transaction.d.ts +40 -0
- package/.medusa/server/src/modules/payout/models/transaction.js +26 -0
- package/.medusa/server/src/modules/payout/providers/index.d.ts +1 -0
- package/.medusa/server/src/modules/payout/providers/index.js +6 -0
- package/.medusa/server/src/modules/payout/providers/system.d.ts +8 -0
- package/.medusa/server/src/modules/payout/providers/system.js +32 -0
- package/.medusa/server/src/modules/payout/services/index.d.ts +2 -0
- package/.medusa/server/src/modules/payout/services/index.js +24 -0
- package/.medusa/server/src/modules/payout/services/payout-module-service.d.ts +220 -0
- package/.medusa/server/src/modules/payout/services/payout-module-service.js +278 -0
- package/.medusa/server/src/modules/payout/services/provider-service.d.ts +17 -0
- package/.medusa/server/src/modules/payout/services/provider-service.js +32 -0
- package/.medusa/server/src/modules/payout/utils/calculate-payout-transactions.d.ts +10 -0
- package/.medusa/server/src/modules/payout/utils/calculate-payout-transactions.js +17 -0
- package/.medusa/server/src/modules/payout/utils/index.d.ts +1 -0
- package/.medusa/server/src/modules/payout/utils/index.js +18 -0
- package/.medusa/server/src/modules/seller/index.d.ts +35 -0
- package/.medusa/server/src/modules/seller/index.js +12 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260123112516.d.ts +5 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260123112516.js +20 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260126130937.d.ts +5 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260126130937.js +18 -0
- package/.medusa/server/src/modules/seller/models/index.d.ts +2 -0
- package/.medusa/server/src/modules/seller/models/index.js +11 -0
- package/.medusa/server/src/modules/seller/models/order-group.d.ts +8 -0
- package/.medusa/server/src/modules/seller/models/order-group.js +12 -0
- package/.medusa/server/src/modules/seller/models/seller.d.ts +18 -0
- package/.medusa/server/src/modules/seller/models/seller.js +22 -0
- package/.medusa/server/src/modules/seller/repositories/index.d.ts +1 -0
- package/.medusa/server/src/modules/seller/repositories/index.js +6 -0
- package/.medusa/server/src/modules/seller/repositories/order-group.d.ts +17 -0
- package/.medusa/server/src/modules/seller/repositories/order-group.js +179 -0
- package/.medusa/server/src/modules/seller/service.d.ts +80 -0
- package/.medusa/server/src/modules/seller/service.js +129 -0
- package/.medusa/server/src/subscribers/payout-webhook.d.ts +4 -0
- package/.medusa/server/src/subscribers/payout-webhook.js +27 -0
- package/.medusa/server/src/workflows/campaign/index.d.ts +2 -0
- package/.medusa/server/src/workflows/campaign/index.js +19 -0
- package/.medusa/server/src/workflows/campaign/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/campaign/steps/index.js +18 -0
- package/.medusa/server/src/workflows/campaign/steps/link-seller-campaign.d.ts +6 -0
- package/.medusa/server/src/workflows/campaign/steps/link-seller-campaign.js +36 -0
- package/.medusa/server/src/workflows/campaign/workflows/create-seller-campaigns.d.ts +7 -0
- package/.medusa/server/src/workflows/campaign/workflows/create-seller-campaigns.js +20 -0
- package/.medusa/server/src/workflows/campaign/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/campaign/workflows/index.js +18 -0
- package/.medusa/server/src/workflows/cart/index.d.ts +2 -0
- package/.medusa/server/src/workflows/cart/index.js +19 -0
- package/.medusa/server/src/workflows/cart/steps/index.d.ts +2 -0
- package/.medusa/server/src/workflows/cart/steps/index.js +19 -0
- package/.medusa/server/src/workflows/cart/steps/prepare-adjustments-from-promotion-actions.d.ts +6 -0
- package/.medusa/server/src/workflows/cart/steps/prepare-adjustments-from-promotion-actions.js +106 -0
- package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-items.d.ts +15 -0
- package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-items.js +17 -0
- package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-shipping.d.ts +18 -0
- package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-shipping.js +18 -0
- package/.medusa/server/src/workflows/cart/utils/fields.d.ts +3 -0
- package/.medusa/server/src/workflows/cart/utils/fields.js +154 -0
- package/.medusa/server/src/workflows/cart/utils/index.d.ts +4 -0
- package/.medusa/server/src/workflows/cart/utils/index.js +21 -0
- package/.medusa/server/src/workflows/cart/utils/prepare-confirm-inventory-input.d.ts +28 -0
- package/.medusa/server/src/workflows/cart/utils/prepare-confirm-inventory-input.js +165 -0
- package/.medusa/server/src/workflows/cart/utils/prepare-line-item-data.d.ts +71 -0
- package/.medusa/server/src/workflows/cart/utils/prepare-line-item-data.js +90 -0
- package/.medusa/server/src/workflows/cart/utils/schemas.d.ts +3 -0
- package/.medusa/server/src/workflows/cart/utils/schemas.js +7 -0
- package/.medusa/server/src/workflows/cart/workflows/add-seller-shipping-method-to-cart.d.ts +7 -0
- package/.medusa/server/src/workflows/cart/workflows/add-seller-shipping-method-to-cart.js +130 -0
- package/.medusa/server/src/workflows/cart/workflows/complete-cart-with-split-orders.d.ts +13 -0
- package/.medusa/server/src/workflows/cart/workflows/complete-cart-with-split-orders.js +379 -0
- package/.medusa/server/src/workflows/cart/workflows/index.d.ts +4 -0
- package/.medusa/server/src/workflows/cart/workflows/index.js +21 -0
- package/.medusa/server/src/workflows/cart/workflows/list-seller-shipping-options-for-cart.d.ts +21 -0
- package/.medusa/server/src/workflows/cart/workflows/list-seller-shipping-options-for-cart.js +217 -0
- package/.medusa/server/src/workflows/cart/workflows/update-cart-seller-promotions.d.ts +5 -0
- package/.medusa/server/src/workflows/cart/workflows/update-cart-seller-promotions.js +74 -0
- package/.medusa/server/src/workflows/commission/index.d.ts +2 -0
- package/.medusa/server/src/workflows/commission/index.js +19 -0
- package/.medusa/server/src/workflows/commission/steps/create-commission-rates.d.ts +30 -0
- package/.medusa/server/src/workflows/commission/steps/create-commission-rates.js +17 -0
- package/.medusa/server/src/workflows/commission/steps/create-commission-rules.d.ts +34 -0
- package/.medusa/server/src/workflows/commission/steps/create-commission-rules.js +21 -0
- package/.medusa/server/src/workflows/commission/steps/delete-commission-rates.d.ts +2 -0
- package/.medusa/server/src/workflows/commission/steps/delete-commission-rates.js +17 -0
- package/.medusa/server/src/workflows/commission/steps/delete-commission-rules.d.ts +2 -0
- package/.medusa/server/src/workflows/commission/steps/delete-commission-rules.js +24 -0
- package/.medusa/server/src/workflows/commission/steps/get-commission-lines.d.ts +3 -0
- package/.medusa/server/src/workflows/commission/steps/get-commission-lines.js +15 -0
- package/.medusa/server/src/workflows/commission/steps/index.d.ts +8 -0
- package/.medusa/server/src/workflows/commission/steps/index.js +25 -0
- package/.medusa/server/src/workflows/commission/steps/update-commission-rates.d.ts +30 -0
- package/.medusa/server/src/workflows/commission/steps/update-commission-rates.js +17 -0
- package/.medusa/server/src/workflows/commission/steps/update-commission-rules.d.ts +30 -0
- package/.medusa/server/src/workflows/commission/steps/update-commission-rules.js +24 -0
- package/.medusa/server/src/workflows/commission/steps/upsert-commission-lines.d.ts +7 -0
- package/.medusa/server/src/workflows/commission/steps/upsert-commission-lines.js +12 -0
- package/.medusa/server/src/workflows/commission/workflows/batch-commission-rules.d.ts +9 -0
- package/.medusa/server/src/workflows/commission/workflows/batch-commission-rules.js +19 -0
- package/.medusa/server/src/workflows/commission/workflows/create-commission-rates.d.ts +30 -0
- package/.medusa/server/src/workflows/commission/workflows/create-commission-rates.js +11 -0
- package/.medusa/server/src/workflows/commission/workflows/delete-commission-rates.d.ts +8 -0
- package/.medusa/server/src/workflows/commission/workflows/delete-commission-rates.js +16 -0
- package/.medusa/server/src/workflows/commission/workflows/index.d.ts +5 -0
- package/.medusa/server/src/workflows/commission/workflows/index.js +22 -0
- package/.medusa/server/src/workflows/commission/workflows/refresh-order-commission-lines.d.ts +6 -0
- package/.medusa/server/src/workflows/commission/workflows/refresh-order-commission-lines.js +79 -0
- package/.medusa/server/src/workflows/commission/workflows/update-commission-rates.d.ts +30 -0
- package/.medusa/server/src/workflows/commission/workflows/update-commission-rates.js +11 -0
- package/.medusa/server/src/workflows/events.d.ts +17 -0
- package/.medusa/server/src/workflows/events.js +21 -0
- package/.medusa/server/src/workflows/hooks/product-created.d.ts +1 -0
- package/.medusa/server/src/workflows/hooks/product-created.js +68 -0
- package/.medusa/server/src/workflows/hooks/product-variant-created.d.ts +1 -0
- package/.medusa/server/src/workflows/hooks/product-variant-created.js +50 -0
- package/.medusa/server/src/workflows/index.d.ts +13 -0
- package/.medusa/server/src/workflows/index.js +30 -0
- package/.medusa/server/src/workflows/inventory-item/index.d.ts +2 -0
- package/.medusa/server/src/workflows/inventory-item/index.js +19 -0
- package/.medusa/server/src/workflows/inventory-item/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/inventory-item/steps/index.js +18 -0
- package/.medusa/server/src/workflows/inventory-item/steps/link-seller-inventory-item.d.ts +6 -0
- package/.medusa/server/src/workflows/inventory-item/steps/link-seller-inventory-item.js +36 -0
- package/.medusa/server/src/workflows/inventory-item/workflows/create-seller-inventory-items.d.ts +7 -0
- package/.medusa/server/src/workflows/inventory-item/workflows/create-seller-inventory-items.js +20 -0
- package/.medusa/server/src/workflows/inventory-item/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/inventory-item/workflows/index.js +18 -0
- package/.medusa/server/src/workflows/order-group/index.d.ts +1 -0
- package/.medusa/server/src/workflows/order-group/index.js +18 -0
- package/.medusa/server/src/workflows/order-group/steps/create-order-group.d.ts +11 -0
- package/.medusa/server/src/workflows/order-group/steps/create-order-group.js +17 -0
- package/.medusa/server/src/workflows/order-group/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/order-group/steps/index.js +18 -0
- package/.medusa/server/src/workflows/payout/index.d.ts +2 -0
- package/.medusa/server/src/workflows/payout/index.js +19 -0
- package/.medusa/server/src/workflows/payout/steps/add-payout-transactions.d.ts +11 -0
- package/.medusa/server/src/workflows/payout/steps/add-payout-transactions.js +24 -0
- package/.medusa/server/src/workflows/payout/steps/create-onboarding.d.ts +2 -0
- package/.medusa/server/src/workflows/payout/steps/create-onboarding.js +11 -0
- package/.medusa/server/src/workflows/payout/steps/create-payout-account.d.ts +2 -0
- package/.medusa/server/src/workflows/payout/steps/create-payout-account.js +11 -0
- package/.medusa/server/src/workflows/payout/steps/create-payout.d.ts +3 -0
- package/.medusa/server/src/workflows/payout/steps/create-payout.js +12 -0
- package/.medusa/server/src/workflows/payout/steps/index.d.ts +6 -0
- package/.medusa/server/src/workflows/payout/steps/index.js +23 -0
- package/.medusa/server/src/workflows/payout/steps/update-payout-account.d.ts +58 -0
- package/.medusa/server/src/workflows/payout/steps/update-payout-account.js +27 -0
- package/.medusa/server/src/workflows/payout/steps/update-payout.d.ts +58 -0
- package/.medusa/server/src/workflows/payout/steps/update-payout.js +27 -0
- package/.medusa/server/src/workflows/payout/workflows/create-onboarding.d.ts +2 -0
- package/.medusa/server/src/workflows/payout/workflows/create-onboarding.js +10 -0
- package/.medusa/server/src/workflows/payout/workflows/create-payout-account.d.ts +6 -0
- package/.medusa/server/src/workflows/payout/workflows/create-payout-account.js +25 -0
- package/.medusa/server/src/workflows/payout/workflows/create-payout.d.ts +3 -0
- package/.medusa/server/src/workflows/payout/workflows/create-payout.js +50 -0
- package/.medusa/server/src/workflows/payout/workflows/credit-order-to-payout-account.d.ts +9 -0
- package/.medusa/server/src/workflows/payout/workflows/credit-order-to-payout-account.js +45 -0
- package/.medusa/server/src/workflows/payout/workflows/index.d.ts +5 -0
- package/.medusa/server/src/workflows/payout/workflows/index.js +22 -0
- package/.medusa/server/src/workflows/payout/workflows/process-payout.d.ts +5 -0
- package/.medusa/server/src/workflows/payout/workflows/process-payout.js +67 -0
- package/.medusa/server/src/workflows/price-list/index.d.ts +2 -0
- package/.medusa/server/src/workflows/price-list/index.js +19 -0
- package/.medusa/server/src/workflows/price-list/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/price-list/steps/index.js +18 -0
- package/.medusa/server/src/workflows/price-list/steps/link-seller-price-list.d.ts +6 -0
- package/.medusa/server/src/workflows/price-list/steps/link-seller-price-list.js +36 -0
- package/.medusa/server/src/workflows/price-list/workflows/create-seller-price-lists.d.ts +7 -0
- package/.medusa/server/src/workflows/price-list/workflows/create-seller-price-lists.js +20 -0
- package/.medusa/server/src/workflows/price-list/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/price-list/workflows/index.js +18 -0
- package/.medusa/server/src/workflows/promotion/index.d.ts +2 -0
- package/.medusa/server/src/workflows/promotion/index.js +19 -0
- package/.medusa/server/src/workflows/promotion/steps/index.d.ts +2 -0
- package/.medusa/server/src/workflows/promotion/steps/index.js +19 -0
- package/.medusa/server/src/workflows/promotion/steps/link-seller-promotion.d.ts +6 -0
- package/.medusa/server/src/workflows/promotion/steps/link-seller-promotion.js +36 -0
- package/.medusa/server/src/workflows/promotion/steps/register-usage.d.ts +11 -0
- package/.medusa/server/src/workflows/promotion/steps/register-usage.js +27 -0
- package/.medusa/server/src/workflows/promotion/workflows/create-seller-promotions.d.ts +7 -0
- package/.medusa/server/src/workflows/promotion/workflows/create-seller-promotions.js +20 -0
- package/.medusa/server/src/workflows/promotion/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/promotion/workflows/index.js +18 -0
- package/.medusa/server/src/workflows/seller/index.d.ts +2 -0
- package/.medusa/server/src/workflows/seller/index.js +19 -0
- package/.medusa/server/src/workflows/seller/steps/create-seller.d.ts +2 -0
- package/.medusa/server/src/workflows/seller/steps/create-seller.js +17 -0
- package/.medusa/server/src/workflows/seller/steps/index.d.ts +2 -0
- package/.medusa/server/src/workflows/seller/steps/index.js +19 -0
- package/.medusa/server/src/workflows/seller/steps/update-seller.d.ts +2 -0
- package/.medusa/server/src/workflows/seller/steps/update-seller.js +20 -0
- package/.medusa/server/src/workflows/seller/workflows/create-seller.d.ts +7 -0
- package/.medusa/server/src/workflows/seller/workflows/create-seller.js +16 -0
- package/.medusa/server/src/workflows/seller/workflows/index.d.ts +2 -0
- package/.medusa/server/src/workflows/seller/workflows/index.js +19 -0
- package/.medusa/server/src/workflows/seller/workflows/update-seller.d.ts +2 -0
- package/.medusa/server/src/workflows/seller/workflows/update-seller.js +9 -0
- package/.medusa/server/src/workflows/shipping-option/index.d.ts +2 -0
- package/.medusa/server/src/workflows/shipping-option/index.js +19 -0
- package/.medusa/server/src/workflows/shipping-option/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/shipping-option/steps/index.js +18 -0
- package/.medusa/server/src/workflows/shipping-option/steps/link-seller-shipping-option.d.ts +6 -0
- package/.medusa/server/src/workflows/shipping-option/steps/link-seller-shipping-option.js +36 -0
- package/.medusa/server/src/workflows/shipping-option/workflows/create-seller-shipping-options.d.ts +7 -0
- package/.medusa/server/src/workflows/shipping-option/workflows/create-seller-shipping-options.js +18 -0
- package/.medusa/server/src/workflows/shipping-option/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/shipping-option/workflows/index.js +18 -0
- package/.medusa/server/src/workflows/shipping-profile/index.d.ts +2 -0
- package/.medusa/server/src/workflows/shipping-profile/index.js +19 -0
- package/.medusa/server/src/workflows/shipping-profile/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/shipping-profile/steps/index.js +18 -0
- package/.medusa/server/src/workflows/shipping-profile/steps/link-seller-shipping-profile.d.ts +6 -0
- package/.medusa/server/src/workflows/shipping-profile/steps/link-seller-shipping-profile.js +36 -0
- package/.medusa/server/src/workflows/shipping-profile/workflows/create-seller-shipping-profiles.d.ts +7 -0
- package/.medusa/server/src/workflows/shipping-profile/workflows/create-seller-shipping-profiles.js +20 -0
- package/.medusa/server/src/workflows/shipping-profile/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/shipping-profile/workflows/index.js +18 -0
- package/.medusa/server/src/workflows/stock-location/index.d.ts +2 -0
- package/.medusa/server/src/workflows/stock-location/index.js +19 -0
- package/.medusa/server/src/workflows/stock-location/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/stock-location/steps/index.js +18 -0
- package/.medusa/server/src/workflows/stock-location/steps/link-seller-stock-location.d.ts +6 -0
- package/.medusa/server/src/workflows/stock-location/steps/link-seller-stock-location.js +36 -0
- package/.medusa/server/src/workflows/stock-location/workflows/create-seller-stock-locations.d.ts +7 -0
- package/.medusa/server/src/workflows/stock-location/workflows/create-seller-stock-locations.js +20 -0
- package/.medusa/server/src/workflows/stock-location/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/stock-location/workflows/index.js +18 -0
- package/package.json +78 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.POST = exports.GET = void 0;
|
|
4
|
+
const core_flows_1 = require("@medusajs/core-flows");
|
|
5
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
6
|
+
const helpers_1 = require("../orders/helpers");
|
|
7
|
+
const GET = async (req, res) => {
|
|
8
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
9
|
+
const { data: returns, metadata } = await query.graph({
|
|
10
|
+
entity: "return",
|
|
11
|
+
fields: req.queryConfig.fields,
|
|
12
|
+
filters: req.filterableFields,
|
|
13
|
+
pagination: req.queryConfig.pagination,
|
|
14
|
+
});
|
|
15
|
+
res.json({
|
|
16
|
+
returns,
|
|
17
|
+
count: metadata?.count ?? 0,
|
|
18
|
+
offset: metadata?.skip ?? 0,
|
|
19
|
+
limit: metadata?.take ?? 0,
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
exports.GET = GET;
|
|
23
|
+
const POST = async (req, res) => {
|
|
24
|
+
await (0, helpers_1.validateSellerOrder)(req.scope, req.auth_context.actor_id, req.validatedBody.order_id);
|
|
25
|
+
const input = {
|
|
26
|
+
...req.validatedBody,
|
|
27
|
+
created_by: req.auth_context.actor_id,
|
|
28
|
+
};
|
|
29
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
30
|
+
const orderModuleService = req.scope.resolve(utils_1.Modules.ORDER);
|
|
31
|
+
const workflow = (0, core_flows_1.beginReturnOrderWorkflow)(req.scope);
|
|
32
|
+
const { result } = await workflow.run({
|
|
33
|
+
input,
|
|
34
|
+
});
|
|
35
|
+
const [order, { data: returnData }] = await (0, utils_1.promiseAll)([
|
|
36
|
+
orderModuleService.retrieveOrder(result.order_id),
|
|
37
|
+
query.graph({
|
|
38
|
+
entity: "return",
|
|
39
|
+
fields: req.queryConfig.fields,
|
|
40
|
+
filters: {
|
|
41
|
+
id: result.return_id,
|
|
42
|
+
...req.filterableFields,
|
|
43
|
+
},
|
|
44
|
+
}),
|
|
45
|
+
]);
|
|
46
|
+
res.json({
|
|
47
|
+
order,
|
|
48
|
+
return: returnData[0],
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
exports.POST = POST;
|
|
52
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9yZXR1cm5zL3JvdXRlLnRzIl0sIm5hbWVzIjpbXSwibWF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UFBTSxFQUFFLFVBQVUsQ0FBQyxDQUFDLENBQUM7S0FDdEIsQ0FBQyxDQUFBO0FBQ0osQ0FBQyxDQUFBO0FBdkNZLFFBQUEsSUFBSSxRQXVDaEIifQ==
|
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export type VendorGetReturnParamsType = z.infer<typeof VendorGetReturnParams>;
|
|
3
|
+
export declare const VendorGetReturnParams: z.ZodObject<{
|
|
4
|
+
fields: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
fields?: string | undefined;
|
|
7
|
+
}, {
|
|
8
|
+
fields?: string | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
export type VendorGetReturnsParamsType = z.infer<typeof VendorGetReturnsParams>;
|
|
11
|
+
export declare const VendorGetReturnsParams: z.ZodObject<{
|
|
12
|
+
fields: z.ZodOptional<z.ZodString>;
|
|
13
|
+
} & {
|
|
14
|
+
offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
15
|
+
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
16
|
+
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
17
|
+
with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
|
|
18
|
+
} & {
|
|
19
|
+
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
20
|
+
order_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
21
|
+
status: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
22
|
+
created_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
23
|
+
$eq: any;
|
|
24
|
+
$ne: any;
|
|
25
|
+
$in: any;
|
|
26
|
+
$nin: any;
|
|
27
|
+
$like: any;
|
|
28
|
+
$ilike: any;
|
|
29
|
+
$re: any;
|
|
30
|
+
$contains: any;
|
|
31
|
+
$gt: any;
|
|
32
|
+
$gte: any;
|
|
33
|
+
$lt: any;
|
|
34
|
+
$lte: any;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
$eq?: any;
|
|
37
|
+
$ne?: any;
|
|
38
|
+
$in?: any;
|
|
39
|
+
$nin?: any;
|
|
40
|
+
$like?: any;
|
|
41
|
+
$ilike?: any;
|
|
42
|
+
$re?: any;
|
|
43
|
+
$contains?: any;
|
|
44
|
+
$gt?: any;
|
|
45
|
+
$gte?: any;
|
|
46
|
+
$lt?: any;
|
|
47
|
+
$lte?: any;
|
|
48
|
+
}, {
|
|
49
|
+
$eq?: any;
|
|
50
|
+
$ne?: any;
|
|
51
|
+
$in?: any;
|
|
52
|
+
$nin?: any;
|
|
53
|
+
$like?: any;
|
|
54
|
+
$ilike?: any;
|
|
55
|
+
$re?: any;
|
|
56
|
+
$contains?: any;
|
|
57
|
+
$gt?: any;
|
|
58
|
+
$gte?: any;
|
|
59
|
+
$lt?: any;
|
|
60
|
+
$lte?: any;
|
|
61
|
+
}>]>>;
|
|
62
|
+
updated_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
63
|
+
$eq: any;
|
|
64
|
+
$ne: any;
|
|
65
|
+
$in: any;
|
|
66
|
+
$nin: any;
|
|
67
|
+
$like: any;
|
|
68
|
+
$ilike: any;
|
|
69
|
+
$re: any;
|
|
70
|
+
$contains: any;
|
|
71
|
+
$gt: any;
|
|
72
|
+
$gte: any;
|
|
73
|
+
$lt: any;
|
|
74
|
+
$lte: any;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
$eq?: any;
|
|
77
|
+
$ne?: any;
|
|
78
|
+
$in?: any;
|
|
79
|
+
$nin?: any;
|
|
80
|
+
$like?: any;
|
|
81
|
+
$ilike?: any;
|
|
82
|
+
$re?: any;
|
|
83
|
+
$contains?: any;
|
|
84
|
+
$gt?: any;
|
|
85
|
+
$gte?: any;
|
|
86
|
+
$lt?: any;
|
|
87
|
+
$lte?: any;
|
|
88
|
+
}, {
|
|
89
|
+
$eq?: any;
|
|
90
|
+
$ne?: any;
|
|
91
|
+
$in?: any;
|
|
92
|
+
$nin?: any;
|
|
93
|
+
$like?: any;
|
|
94
|
+
$ilike?: any;
|
|
95
|
+
$re?: any;
|
|
96
|
+
$contains?: any;
|
|
97
|
+
$gt?: any;
|
|
98
|
+
$gte?: any;
|
|
99
|
+
$lt?: any;
|
|
100
|
+
$lte?: any;
|
|
101
|
+
}>]>>;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
offset: number;
|
|
104
|
+
limit: number;
|
|
105
|
+
id?: string | string[] | undefined;
|
|
106
|
+
created_at?: any;
|
|
107
|
+
updated_at?: any;
|
|
108
|
+
status?: string | string[] | undefined;
|
|
109
|
+
fields?: string | undefined;
|
|
110
|
+
order?: string | undefined;
|
|
111
|
+
with_deleted?: boolean | undefined;
|
|
112
|
+
order_id?: string | string[] | undefined;
|
|
113
|
+
}, {
|
|
114
|
+
id?: string | string[] | undefined;
|
|
115
|
+
created_at?: any;
|
|
116
|
+
updated_at?: any;
|
|
117
|
+
status?: string | string[] | undefined;
|
|
118
|
+
offset?: unknown;
|
|
119
|
+
limit?: unknown;
|
|
120
|
+
fields?: string | undefined;
|
|
121
|
+
order?: string | undefined;
|
|
122
|
+
with_deleted?: unknown;
|
|
123
|
+
order_id?: string | string[] | undefined;
|
|
124
|
+
}>;
|
|
125
|
+
export declare const VendorGetReturnsOrderParams: z.ZodObject<{
|
|
126
|
+
fields: z.ZodOptional<z.ZodString>;
|
|
127
|
+
} & {
|
|
128
|
+
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
129
|
+
status: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
130
|
+
created_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
131
|
+
$eq: any;
|
|
132
|
+
$ne: any;
|
|
133
|
+
$in: any;
|
|
134
|
+
$nin: any;
|
|
135
|
+
$like: any;
|
|
136
|
+
$ilike: any;
|
|
137
|
+
$re: any;
|
|
138
|
+
$contains: any;
|
|
139
|
+
$gt: any;
|
|
140
|
+
$gte: any;
|
|
141
|
+
$lt: any;
|
|
142
|
+
$lte: any;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
$eq?: any;
|
|
145
|
+
$ne?: any;
|
|
146
|
+
$in?: any;
|
|
147
|
+
$nin?: any;
|
|
148
|
+
$like?: any;
|
|
149
|
+
$ilike?: any;
|
|
150
|
+
$re?: any;
|
|
151
|
+
$contains?: any;
|
|
152
|
+
$gt?: any;
|
|
153
|
+
$gte?: any;
|
|
154
|
+
$lt?: any;
|
|
155
|
+
$lte?: any;
|
|
156
|
+
}, {
|
|
157
|
+
$eq?: any;
|
|
158
|
+
$ne?: any;
|
|
159
|
+
$in?: any;
|
|
160
|
+
$nin?: any;
|
|
161
|
+
$like?: any;
|
|
162
|
+
$ilike?: any;
|
|
163
|
+
$re?: any;
|
|
164
|
+
$contains?: any;
|
|
165
|
+
$gt?: any;
|
|
166
|
+
$gte?: any;
|
|
167
|
+
$lt?: any;
|
|
168
|
+
$lte?: any;
|
|
169
|
+
}>]>>;
|
|
170
|
+
updated_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
171
|
+
$eq: any;
|
|
172
|
+
$ne: any;
|
|
173
|
+
$in: any;
|
|
174
|
+
$nin: any;
|
|
175
|
+
$like: any;
|
|
176
|
+
$ilike: any;
|
|
177
|
+
$re: any;
|
|
178
|
+
$contains: any;
|
|
179
|
+
$gt: any;
|
|
180
|
+
$gte: any;
|
|
181
|
+
$lt: any;
|
|
182
|
+
$lte: any;
|
|
183
|
+
}, "strip", z.ZodTypeAny, {
|
|
184
|
+
$eq?: any;
|
|
185
|
+
$ne?: any;
|
|
186
|
+
$in?: any;
|
|
187
|
+
$nin?: any;
|
|
188
|
+
$like?: any;
|
|
189
|
+
$ilike?: any;
|
|
190
|
+
$re?: any;
|
|
191
|
+
$contains?: any;
|
|
192
|
+
$gt?: any;
|
|
193
|
+
$gte?: any;
|
|
194
|
+
$lt?: any;
|
|
195
|
+
$lte?: any;
|
|
196
|
+
}, {
|
|
197
|
+
$eq?: any;
|
|
198
|
+
$ne?: any;
|
|
199
|
+
$in?: any;
|
|
200
|
+
$nin?: any;
|
|
201
|
+
$like?: any;
|
|
202
|
+
$ilike?: any;
|
|
203
|
+
$re?: any;
|
|
204
|
+
$contains?: any;
|
|
205
|
+
$gt?: any;
|
|
206
|
+
$gte?: any;
|
|
207
|
+
$lt?: any;
|
|
208
|
+
$lte?: any;
|
|
209
|
+
}>]>>;
|
|
210
|
+
}, "strip", z.ZodTypeAny, {
|
|
211
|
+
id?: string | string[] | undefined;
|
|
212
|
+
created_at?: any;
|
|
213
|
+
updated_at?: any;
|
|
214
|
+
status?: string | string[] | undefined;
|
|
215
|
+
fields?: string | undefined;
|
|
216
|
+
}, {
|
|
217
|
+
id?: string | string[] | undefined;
|
|
218
|
+
created_at?: any;
|
|
219
|
+
updated_at?: any;
|
|
220
|
+
status?: string | string[] | undefined;
|
|
221
|
+
fields?: string | undefined;
|
|
222
|
+
}>;
|
|
223
|
+
export type VendorGetReturnsOrderParamsType = z.infer<typeof VendorGetReturnsOrderParams>;
|
|
224
|
+
export type VendorPostReturnsReqType = z.infer<typeof VendorPostReturnsReq>;
|
|
225
|
+
export declare const VendorPostReturnsReq: z.ZodObject<{
|
|
226
|
+
order_id: z.ZodString;
|
|
227
|
+
location_id: z.ZodOptional<z.ZodString>;
|
|
228
|
+
description: z.ZodOptional<z.ZodString>;
|
|
229
|
+
internal_note: z.ZodOptional<z.ZodString>;
|
|
230
|
+
no_notification: z.ZodOptional<z.ZodBoolean>;
|
|
231
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
232
|
+
}, "strip", z.ZodTypeAny, {
|
|
233
|
+
order_id: string;
|
|
234
|
+
description?: string | undefined;
|
|
235
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
236
|
+
location_id?: string | undefined;
|
|
237
|
+
no_notification?: boolean | undefined;
|
|
238
|
+
internal_note?: string | undefined;
|
|
239
|
+
}, {
|
|
240
|
+
order_id: string;
|
|
241
|
+
description?: string | undefined;
|
|
242
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
243
|
+
location_id?: string | undefined;
|
|
244
|
+
no_notification?: boolean | undefined;
|
|
245
|
+
internal_note?: string | undefined;
|
|
246
|
+
}>;
|
|
247
|
+
export type VendorPostReturnsReturnReqType = z.infer<typeof VendorPostReturnsReturnReq>;
|
|
248
|
+
export declare const VendorPostReturnsReturnReq: z.ZodObject<{
|
|
249
|
+
location_id: z.ZodOptional<z.ZodString>;
|
|
250
|
+
no_notification: z.ZodOptional<z.ZodBoolean>;
|
|
251
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
252
|
+
}, "strip", z.ZodTypeAny, {
|
|
253
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
254
|
+
location_id?: string | undefined;
|
|
255
|
+
no_notification?: boolean | undefined;
|
|
256
|
+
}, {
|
|
257
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
258
|
+
location_id?: string | undefined;
|
|
259
|
+
no_notification?: boolean | undefined;
|
|
260
|
+
}>;
|
|
261
|
+
export type VendorPostCancelReturnReqType = z.infer<typeof VendorPostCancelReturnReq>;
|
|
262
|
+
export declare const VendorPostCancelReturnReq: z.ZodObject<{
|
|
263
|
+
no_notification: z.ZodOptional<z.ZodBoolean>;
|
|
264
|
+
}, "strip", z.ZodTypeAny, {
|
|
265
|
+
no_notification?: boolean | undefined;
|
|
266
|
+
}, {
|
|
267
|
+
no_notification?: boolean | undefined;
|
|
268
|
+
}>;
|
|
269
|
+
export type VendorPostReturnsRequestItemsReqType = z.infer<typeof VendorPostReturnsRequestItemsReq>;
|
|
270
|
+
export declare const VendorPostReturnsRequestItemsReq: z.ZodObject<{
|
|
271
|
+
items: z.ZodArray<z.ZodObject<{
|
|
272
|
+
id: z.ZodString;
|
|
273
|
+
quantity: z.ZodNumber;
|
|
274
|
+
description: z.ZodOptional<z.ZodString>;
|
|
275
|
+
internal_note: z.ZodOptional<z.ZodString>;
|
|
276
|
+
reason_id: z.ZodOptional<z.ZodString>;
|
|
277
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
278
|
+
}, "strip", z.ZodTypeAny, {
|
|
279
|
+
id: string;
|
|
280
|
+
quantity: number;
|
|
281
|
+
description?: string | undefined;
|
|
282
|
+
metadata?: Record<string, unknown> | undefined;
|
|
283
|
+
internal_note?: string | undefined;
|
|
284
|
+
reason_id?: string | undefined;
|
|
285
|
+
}, {
|
|
286
|
+
id: string;
|
|
287
|
+
quantity: number;
|
|
288
|
+
description?: string | undefined;
|
|
289
|
+
metadata?: Record<string, unknown> | undefined;
|
|
290
|
+
internal_note?: string | undefined;
|
|
291
|
+
reason_id?: string | undefined;
|
|
292
|
+
}>, "many">;
|
|
293
|
+
}, "strip", z.ZodTypeAny, {
|
|
294
|
+
items: {
|
|
295
|
+
id: string;
|
|
296
|
+
quantity: number;
|
|
297
|
+
description?: string | undefined;
|
|
298
|
+
metadata?: Record<string, unknown> | undefined;
|
|
299
|
+
internal_note?: string | undefined;
|
|
300
|
+
reason_id?: string | undefined;
|
|
301
|
+
}[];
|
|
302
|
+
}, {
|
|
303
|
+
items: {
|
|
304
|
+
id: string;
|
|
305
|
+
quantity: number;
|
|
306
|
+
description?: string | undefined;
|
|
307
|
+
metadata?: Record<string, unknown> | undefined;
|
|
308
|
+
internal_note?: string | undefined;
|
|
309
|
+
reason_id?: string | undefined;
|
|
310
|
+
}[];
|
|
311
|
+
}>;
|
|
312
|
+
export type VendorPostReturnsRequestItemsActionReqType = z.infer<typeof VendorPostReturnsRequestItemsActionReq>;
|
|
313
|
+
export declare const VendorPostReturnsRequestItemsActionReq: z.ZodObject<{
|
|
314
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
315
|
+
internal_note: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
316
|
+
reason_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
317
|
+
metadata: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
|
|
318
|
+
}, "strip", z.ZodTypeAny, {
|
|
319
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
320
|
+
quantity?: number | undefined;
|
|
321
|
+
internal_note?: string | null | undefined;
|
|
322
|
+
reason_id?: string | null | undefined;
|
|
323
|
+
}, {
|
|
324
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
325
|
+
quantity?: number | undefined;
|
|
326
|
+
internal_note?: string | null | undefined;
|
|
327
|
+
reason_id?: string | null | undefined;
|
|
328
|
+
}>;
|
|
329
|
+
export type VendorPostReturnsShippingReqType = z.infer<typeof VendorPostReturnsShippingReq>;
|
|
330
|
+
export declare const VendorPostReturnsShippingReq: z.ZodObject<{
|
|
331
|
+
shipping_option_id: z.ZodString;
|
|
332
|
+
custom_amount: z.ZodOptional<z.ZodNumber>;
|
|
333
|
+
description: z.ZodOptional<z.ZodString>;
|
|
334
|
+
internal_note: z.ZodOptional<z.ZodString>;
|
|
335
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
336
|
+
}, "strip", z.ZodTypeAny, {
|
|
337
|
+
shipping_option_id: string;
|
|
338
|
+
description?: string | undefined;
|
|
339
|
+
metadata?: Record<string, unknown> | undefined;
|
|
340
|
+
internal_note?: string | undefined;
|
|
341
|
+
custom_amount?: number | undefined;
|
|
342
|
+
}, {
|
|
343
|
+
shipping_option_id: string;
|
|
344
|
+
description?: string | undefined;
|
|
345
|
+
metadata?: Record<string, unknown> | undefined;
|
|
346
|
+
internal_note?: string | undefined;
|
|
347
|
+
custom_amount?: number | undefined;
|
|
348
|
+
}>;
|
|
349
|
+
export type VendorPostReturnsShippingActionReqType = z.infer<typeof VendorPostReturnsShippingActionReq>;
|
|
350
|
+
export declare const VendorPostReturnsShippingActionReq: z.ZodObject<{
|
|
351
|
+
custom_amount: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
352
|
+
internal_note: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
353
|
+
metadata: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
|
|
354
|
+
}, "strip", z.ZodTypeAny, {
|
|
355
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
356
|
+
internal_note?: string | null | undefined;
|
|
357
|
+
custom_amount?: number | null | undefined;
|
|
358
|
+
}, {
|
|
359
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
360
|
+
internal_note?: string | null | undefined;
|
|
361
|
+
custom_amount?: number | null | undefined;
|
|
362
|
+
}>;
|
|
363
|
+
export type VendorPostReturnsConfirmRequestReqType = z.infer<typeof VendorPostReturnsConfirmRequestReq>;
|
|
364
|
+
export declare const VendorPostReturnsConfirmRequestReq: z.ZodObject<{
|
|
365
|
+
no_notification: z.ZodOptional<z.ZodBoolean>;
|
|
366
|
+
}, "strip", z.ZodTypeAny, {
|
|
367
|
+
no_notification?: boolean | undefined;
|
|
368
|
+
}, {
|
|
369
|
+
no_notification?: boolean | undefined;
|
|
370
|
+
}>;
|
|
371
|
+
export type VendorPostReceiveReturnsReqType = z.infer<typeof VendorPostReceiveReturnsReq>;
|
|
372
|
+
export declare const VendorPostReceiveReturnsReq: z.ZodObject<{
|
|
373
|
+
internal_note: z.ZodOptional<z.ZodString>;
|
|
374
|
+
description: z.ZodOptional<z.ZodString>;
|
|
375
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
376
|
+
}, "strip", z.ZodTypeAny, {
|
|
377
|
+
description?: string | undefined;
|
|
378
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
379
|
+
internal_note?: string | undefined;
|
|
380
|
+
}, {
|
|
381
|
+
description?: string | undefined;
|
|
382
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
383
|
+
internal_note?: string | undefined;
|
|
384
|
+
}>;
|
|
385
|
+
export type VendorPostReturnsReceiveItemsReqType = z.infer<typeof VendorPostReturnsReceiveItemsReq>;
|
|
386
|
+
export declare const VendorPostReturnsReceiveItemsReq: z.ZodObject<{
|
|
387
|
+
items: z.ZodArray<z.ZodObject<{
|
|
388
|
+
id: z.ZodString;
|
|
389
|
+
quantity: z.ZodNumber;
|
|
390
|
+
description: z.ZodOptional<z.ZodString>;
|
|
391
|
+
internal_note: z.ZodOptional<z.ZodString>;
|
|
392
|
+
}, "strip", z.ZodTypeAny, {
|
|
393
|
+
id: string;
|
|
394
|
+
quantity: number;
|
|
395
|
+
description?: string | undefined;
|
|
396
|
+
internal_note?: string | undefined;
|
|
397
|
+
}, {
|
|
398
|
+
id: string;
|
|
399
|
+
quantity: number;
|
|
400
|
+
description?: string | undefined;
|
|
401
|
+
internal_note?: string | undefined;
|
|
402
|
+
}>, "many">;
|
|
403
|
+
}, "strip", z.ZodTypeAny, {
|
|
404
|
+
items: {
|
|
405
|
+
id: string;
|
|
406
|
+
quantity: number;
|
|
407
|
+
description?: string | undefined;
|
|
408
|
+
internal_note?: string | undefined;
|
|
409
|
+
}[];
|
|
410
|
+
}, {
|
|
411
|
+
items: {
|
|
412
|
+
id: string;
|
|
413
|
+
quantity: number;
|
|
414
|
+
description?: string | undefined;
|
|
415
|
+
internal_note?: string | undefined;
|
|
416
|
+
}[];
|
|
417
|
+
}>;
|
|
418
|
+
export type VendorPostReturnsReceiveItemsActionReqType = z.infer<typeof VendorPostReturnsReceiveItemsActionReq>;
|
|
419
|
+
export declare const VendorPostReturnsReceiveItemsActionReq: z.ZodObject<{
|
|
420
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
421
|
+
internal_note: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
422
|
+
}, "strip", z.ZodTypeAny, {
|
|
423
|
+
quantity?: number | undefined;
|
|
424
|
+
internal_note?: string | null | undefined;
|
|
425
|
+
}, {
|
|
426
|
+
quantity?: number | undefined;
|
|
427
|
+
internal_note?: string | null | undefined;
|
|
428
|
+
}>;
|
|
429
|
+
export type VendorPostReturnsDismissItemsActionReqType = z.infer<typeof VendorPostReturnsDismissItemsActionReq>;
|
|
430
|
+
export declare const VendorPostReturnsDismissItemsActionReq: z.ZodObject<{
|
|
431
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
432
|
+
internal_note: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
433
|
+
}, "strip", z.ZodTypeAny, {
|
|
434
|
+
quantity?: number | undefined;
|
|
435
|
+
internal_note?: string | null | undefined;
|
|
436
|
+
}, {
|
|
437
|
+
quantity?: number | undefined;
|
|
438
|
+
internal_note?: string | null | undefined;
|
|
439
|
+
}>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VendorPostReturnsDismissItemsActionReq = exports.VendorPostReturnsReceiveItemsActionReq = exports.VendorPostReturnsReceiveItemsReq = exports.VendorPostReceiveReturnsReq = exports.VendorPostReturnsConfirmRequestReq = exports.VendorPostReturnsShippingActionReq = exports.VendorPostReturnsShippingReq = exports.VendorPostReturnsRequestItemsActionReq = exports.VendorPostReturnsRequestItemsReq = exports.VendorPostCancelReturnReq = exports.VendorPostReturnsReturnReq = exports.VendorPostReturnsReq = exports.VendorGetReturnsOrderParams = exports.VendorGetReturnsParams = exports.VendorGetReturnParams = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const validators_1 = require("@medusajs/medusa/api/utils/validators");
|
|
6
|
+
exports.VendorGetReturnParams = (0, validators_1.createSelectParams)();
|
|
7
|
+
exports.VendorGetReturnsParams = (0, validators_1.createFindParams)({
|
|
8
|
+
limit: 20,
|
|
9
|
+
offset: 0,
|
|
10
|
+
}).merge(zod_1.z.object({
|
|
11
|
+
id: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
12
|
+
order_id: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
13
|
+
status: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
14
|
+
created_at: (0, validators_1.createOperatorMap)().optional(),
|
|
15
|
+
updated_at: (0, validators_1.createOperatorMap)().optional(),
|
|
16
|
+
}));
|
|
17
|
+
exports.VendorGetReturnsOrderParams = (0, validators_1.createSelectParams)().merge(zod_1.z.object({
|
|
18
|
+
id: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
19
|
+
status: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
20
|
+
created_at: (0, validators_1.createOperatorMap)().optional(),
|
|
21
|
+
updated_at: (0, validators_1.createOperatorMap)().optional(),
|
|
22
|
+
}));
|
|
23
|
+
exports.VendorPostReturnsReq = zod_1.z.object({
|
|
24
|
+
order_id: zod_1.z.string(),
|
|
25
|
+
location_id: zod_1.z.string().optional(),
|
|
26
|
+
description: zod_1.z.string().optional(),
|
|
27
|
+
internal_note: zod_1.z.string().optional(),
|
|
28
|
+
no_notification: zod_1.z.boolean().optional(),
|
|
29
|
+
metadata: zod_1.z.record(zod_1.z.unknown()).nullish(),
|
|
30
|
+
});
|
|
31
|
+
exports.VendorPostReturnsReturnReq = zod_1.z.object({
|
|
32
|
+
location_id: zod_1.z.string().optional(),
|
|
33
|
+
no_notification: zod_1.z.boolean().optional(),
|
|
34
|
+
metadata: zod_1.z.record(zod_1.z.unknown()).nullish(),
|
|
35
|
+
});
|
|
36
|
+
exports.VendorPostCancelReturnReq = zod_1.z.object({
|
|
37
|
+
no_notification: zod_1.z.boolean().optional(),
|
|
38
|
+
});
|
|
39
|
+
exports.VendorPostReturnsRequestItemsReq = zod_1.z.object({
|
|
40
|
+
items: zod_1.z.array(zod_1.z.object({
|
|
41
|
+
id: zod_1.z.string(),
|
|
42
|
+
quantity: zod_1.z.number(),
|
|
43
|
+
description: zod_1.z.string().optional(),
|
|
44
|
+
internal_note: zod_1.z.string().optional(),
|
|
45
|
+
reason_id: zod_1.z.string().optional(),
|
|
46
|
+
metadata: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
47
|
+
})),
|
|
48
|
+
});
|
|
49
|
+
exports.VendorPostReturnsRequestItemsActionReq = zod_1.z.object({
|
|
50
|
+
quantity: zod_1.z.number().optional(),
|
|
51
|
+
internal_note: zod_1.z.string().nullish().optional(),
|
|
52
|
+
reason_id: zod_1.z.string().nullish().optional(),
|
|
53
|
+
metadata: zod_1.z.record(zod_1.z.unknown()).nullish().optional(),
|
|
54
|
+
});
|
|
55
|
+
exports.VendorPostReturnsShippingReq = zod_1.z.object({
|
|
56
|
+
shipping_option_id: zod_1.z.string(),
|
|
57
|
+
custom_amount: zod_1.z.number().optional(),
|
|
58
|
+
description: zod_1.z.string().optional(),
|
|
59
|
+
internal_note: zod_1.z.string().optional(),
|
|
60
|
+
metadata: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
61
|
+
});
|
|
62
|
+
exports.VendorPostReturnsShippingActionReq = zod_1.z.object({
|
|
63
|
+
custom_amount: zod_1.z.number().nullish().optional(),
|
|
64
|
+
internal_note: zod_1.z.string().nullish().optional(),
|
|
65
|
+
metadata: zod_1.z.record(zod_1.z.unknown()).nullish().optional(),
|
|
66
|
+
});
|
|
67
|
+
exports.VendorPostReturnsConfirmRequestReq = zod_1.z.object({
|
|
68
|
+
no_notification: zod_1.z.boolean().optional(),
|
|
69
|
+
});
|
|
70
|
+
exports.VendorPostReceiveReturnsReq = zod_1.z.object({
|
|
71
|
+
internal_note: zod_1.z.string().optional(),
|
|
72
|
+
description: zod_1.z.string().optional(),
|
|
73
|
+
metadata: zod_1.z.record(zod_1.z.unknown()).nullish(),
|
|
74
|
+
});
|
|
75
|
+
exports.VendorPostReturnsReceiveItemsReq = zod_1.z.object({
|
|
76
|
+
items: zod_1.z.array(zod_1.z.object({
|
|
77
|
+
id: zod_1.z.string(),
|
|
78
|
+
quantity: zod_1.z.number(),
|
|
79
|
+
description: zod_1.z.string().optional(),
|
|
80
|
+
internal_note: zod_1.z.string().optional(),
|
|
81
|
+
})),
|
|
82
|
+
});
|
|
83
|
+
exports.VendorPostReturnsReceiveItemsActionReq = zod_1.z.object({
|
|
84
|
+
quantity: zod_1.z.number().optional(),
|
|
85
|
+
internal_note: zod_1.z.string().nullish().optional(),
|
|
86
|
+
});
|
|
87
|
+
exports.VendorPostReturnsDismissItemsActionReq = zod_1.z.object({
|
|
88
|
+
quantity: zod_1.z.number().optional(),
|
|
89
|
+
internal_note: zod_1.z.string().nullish().optional(),
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9ycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcGkvdmVuZG9yL3JldHVybnMvdmFsaWRhdG9ycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2QkFBdUI7QUFDdkIsc0VBSThDO0FBR2pDLFFBQUEscUJBQXFCLEdBQUcsSUFBQSwrQkFBa0IsR0FBRSxDQUFBO0FBRzVDLFFBQUEsc0JBQXNCLEdBQUcsSUFBQSw2QkFBZ0IsRUFBQztJQUNyR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RCxRQUFRLEVBQUUsT0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUMvQixhQUFhLEVBQUUsT0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDLE9BQU8sRUFBRSxDQUFDLFFBQVEsRUFBRTtDQUMvQyxDQUFDLENBQUE7QUFLVyxRQUFBLHNDQUFzQyxHQUFHLE9BQUMsQ0FBQyxNQUFNLENBQUM7SUFDN0QsUUFBUSxFQUFFLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxRQUFRLEVBQUU7SUFDL0IsYUFBYSxFQUFFLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxRQUFRLEVBQUU7Q0FDL0MsQ0FBQyxDQUFBIn0=
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { HttpTypes } from "@medusajs/framework/types";
|
|
2
|
+
import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework/http";
|
|
3
|
+
import { HttpTypes as VendorHttpTypes } from "@mercurjs/types";
|
|
4
|
+
export declare const POST: (req: AuthenticatedMedusaRequest<HttpTypes.AdminBatchLink>, res: MedusaResponse<VendorHttpTypes.VendorSalesChannelResponse>) => Promise<void>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.POST = void 0;
|
|
4
|
+
const core_flows_1 = require("@medusajs/core-flows");
|
|
5
|
+
const helpers_1 = require("../../helpers");
|
|
6
|
+
const helpers_2 = require("../../../product-categories/helpers");
|
|
7
|
+
const POST = async (req, res) => {
|
|
8
|
+
const { id } = req.params;
|
|
9
|
+
const sellerId = req.auth_context.actor_id;
|
|
10
|
+
const { add, remove } = req.validatedBody;
|
|
11
|
+
const productIdsToValidate = [...(add || []), ...(remove || [])];
|
|
12
|
+
await (0, helpers_2.validateSellerProducts)(req.scope, sellerId, productIdsToValidate);
|
|
13
|
+
await (0, core_flows_1.linkProductsToSalesChannelWorkflow)(req.scope).run({
|
|
14
|
+
input: {
|
|
15
|
+
id,
|
|
16
|
+
add,
|
|
17
|
+
remove,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
const sales_channel = await (0, helpers_1.refetchSalesChannel)(id, req.scope, req.queryConfig.fields);
|
|
21
|
+
res.status(200).json({ sales_channel });
|
|
22
|
+
};
|
|
23
|
+
exports.POST = POST;
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9zYWxlcy1jaGFubmVscy9baWRdL3Byb2R1Y3RzL3JvdXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFEQUF5RTtBQVF6RSwyQ0FBbUQ7QUFDbkQsaUVBQTRFO0FBRXJFLE1BQU0sSUFBSSxHQUFHLEtBQUssRUFDdkIsR0FBeUQsRUFDekQsR0FBK0QsRUFDL0QsRUFBRTtJQUNGLE1BQU0sRUFBRSxFQUFFLEVBQUUsR0FBRyxHQUFHLENBQUMsTUFBTSxDQUFBO0lBQ3pCLE1BQU0sUUFBUSxHQUFHLEdBQUcsQ0FBQyxZQUFZLENBQUMsUUFBUSxDQUFBO0lBQzFDLE1BQU0sRUFBRSxHQUFHLEVBQUUsTUFBTSxFQUFFLEdBQUcsR0FBRyxDQUFDLGFBQWEsQ0FBQTtJQUV6QyxNQUFNLG9CQUFvQixHQUFHLENBQUMsR0FBRyxDQUFDLEdBQUcsSUFBSSxFQUFFLENBQUMsRUFBRSxHQUFHLENBQUMsTUFBTSxJQUFJLEVBQUUsQ0FBQyxDQUFDLENBQUE7SUFFaEUsTUFBTSxJQUFBLGdDQUFzQixFQUFDLEdBQUcsQ0FBQyxLQUFLLEVBQUUsUUFBUSxFQUFFLG9CQUFvQixDQUFDLENBQUE7SUFFdkUsTUFBTSxJQUFBLCtDQUFrQyxFQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsQ0FBQyxHQUFHLENBQUM7UUFDdEQsS0FBSyxFQUFFO1lBQ0wsRUFBRTtZQUNGLEdBQUc7WUFDSCxNQUFNO1NBQ1A7S0FDRixDQUFDLENBQUE7SUFFRixNQUFNLGFBQWEsR0FBRyxNQUFNLElBQUEsNkJBQW1CLEVBQzdDLEVBQUUsRUFDRixHQUFHLENBQUMsS0FBSyxFQUNULEdBQUcsQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUN2QixDQUFBO0lBRUQsR0FBRyxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQyxJQUFJLENBQUMsRUFBRSxhQUFhLEVBQUUsQ0FBQyxDQUFBO0FBQ3pDLENBQUMsQ0FBQTtBQTNCWSxRQUFBLElBQUksUUEyQmhCIn0=
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GET = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const GET = async (req, res) => {
|
|
6
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
7
|
+
const { data: [sales_channel], } = await query.graph({
|
|
8
|
+
entity: "sales_channel",
|
|
9
|
+
fields: req.queryConfig.fields,
|
|
10
|
+
filters: {
|
|
11
|
+
id: req.params.id,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
if (!sales_channel) {
|
|
15
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Sales channel with id ${req.params.id} was not found`);
|
|
16
|
+
}
|
|
17
|
+
res.json({ sales_channel });
|
|
18
|
+
};
|
|
19
|
+
exports.GET = GET;
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2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";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.refetchSalesChannel = void 0;
|
|
4
|
+
const http_1 = require("@medusajs/framework/http");
|
|
5
|
+
const refetchSalesChannel = async (id, scope, fields) => {
|
|
6
|
+
return await (0, http_1.refetchEntity)({
|
|
7
|
+
entity: "sales_channel",
|
|
8
|
+
idOrFilter: id,
|
|
9
|
+
scope,
|
|
10
|
+
fields,
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
exports.refetchSalesChannel = refetchSalesChannel;
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcGkvdmVuZG9yL3NhbGVzLWNoYW5uZWxzL2hlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsbURBQXdEO0FBRWpELE1BQU0sbUJBQW1CLEdBQUcsS0FBSyxFQUN0QyxFQUFVLEVBQ1YsS0FBc0IsRUFDdEIsTUFBZ0IsRUFDaEIsRUFBRTtJQUNGLE9BQU8sTUFBTSxJQUFBLG9CQUFhLEVBQUM7UUFDekIsTUFBTSxFQUFFLGVBQWU7UUFDdkIsVUFBVSxFQUFFLEVBQUU7UUFDZCxLQUFLO1FBQ0wsTUFBTTtLQUNQLENBQUMsQ0FBQTtBQUNKLENBQUMsQ0FBQTtBQVhZLFFBQUEsbUJBQW1CLHVCQVcvQiJ9
|