@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,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DELETE = exports.POST = exports.GET = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const core_flows_1 = require("@medusajs/core-flows");
|
|
6
|
+
const helpers_1 = require("../helpers");
|
|
7
|
+
const GET = async (req, res) => {
|
|
8
|
+
const { id } = req.params;
|
|
9
|
+
await (0, helpers_1.validateSellerCampaign)(req.scope, req.auth_context.actor_id, id);
|
|
10
|
+
const campaign = await (0, helpers_1.refetchCampaign)(id, req.scope, req.queryConfig.fields);
|
|
11
|
+
if (!campaign) {
|
|
12
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Campaign with id: ${id} was not found`);
|
|
13
|
+
}
|
|
14
|
+
res.json({ campaign });
|
|
15
|
+
};
|
|
16
|
+
exports.GET = GET;
|
|
17
|
+
const POST = async (req, res) => {
|
|
18
|
+
const { id } = req.params;
|
|
19
|
+
await (0, helpers_1.validateSellerCampaign)(req.scope, req.auth_context.actor_id, id);
|
|
20
|
+
await (0, core_flows_1.updateCampaignsWorkflow)(req.scope).run({
|
|
21
|
+
input: {
|
|
22
|
+
campaignsData: [{ id, ...req.validatedBody }],
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
const campaign = await (0, helpers_1.refetchCampaign)(id, req.scope, req.queryConfig.fields);
|
|
26
|
+
res.json({ campaign });
|
|
27
|
+
};
|
|
28
|
+
exports.POST = POST;
|
|
29
|
+
const DELETE = async (req, res) => {
|
|
30
|
+
const { id } = req.params;
|
|
31
|
+
await (0, helpers_1.validateSellerCampaign)(req.scope, req.auth_context.actor_id, id);
|
|
32
|
+
await (0, core_flows_1.deleteCampaignsWorkflow)(req.scope).run({
|
|
33
|
+
input: { ids: [id] },
|
|
34
|
+
});
|
|
35
|
+
res.json({
|
|
36
|
+
id,
|
|
37
|
+
object: "campaign",
|
|
38
|
+
deleted: true,
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
exports.DELETE = DELETE;
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9jYW1wYWlnbnMvW2lkXS9yb3V0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFJQSxxREFBdUQ7QUFDdkQscURBRzZCO0FBRzdCLHdDQUFvRTtBQUc3RCxNQUFNLEdBQUcsR0FBRyxL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|
1
|
+
import { MedusaContainer } from "@medusajs/framework";
|
|
2
|
+
export declare const refetchCampaign: (campaignId: string, scope: MedusaContainer, fields: string[]) => Promise<any>;
|
|
3
|
+
export declare const validateSellerCampaign: (scope: MedusaContainer, sellerId: string, campaignId: string) => Promise<void>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateSellerCampaign = exports.refetchCampaign = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const refetchCampaign = async (campaignId, scope, fields) => {
|
|
6
|
+
const query = scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
7
|
+
const { data: [campaign], } = await query.graph({
|
|
8
|
+
entity: "campaign",
|
|
9
|
+
filters: { id: campaignId },
|
|
10
|
+
fields,
|
|
11
|
+
});
|
|
12
|
+
return campaign;
|
|
13
|
+
};
|
|
14
|
+
exports.refetchCampaign = refetchCampaign;
|
|
15
|
+
const validateSellerCampaign = async (scope, sellerId, campaignId) => {
|
|
16
|
+
const query = scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
17
|
+
const { data: [sellerCampaign], } = await query.graph({
|
|
18
|
+
entity: "campaign_seller",
|
|
19
|
+
filters: {
|
|
20
|
+
seller_id: sellerId,
|
|
21
|
+
campaign_id: campaignId,
|
|
22
|
+
},
|
|
23
|
+
fields: ["seller_id"],
|
|
24
|
+
});
|
|
25
|
+
if (!sellerCampaign) {
|
|
26
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Campaign with id: ${campaignId} was not found`);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.validateSellerCampaign = validateSellerCampaign;
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL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FdBQVcsQ0FBQztLQUN0QixDQUFDLENBQUE7SUFFRixJQUFJLENBQUMsY0FBYyxFQUFFLENBQUM7UUFDcEIsTUFBTSxJQUFJLG1CQUFXLENBQ25CLG1CQUFXLENBQUMsS0FBSyxDQUFDLFNBQVMsRUFDM0IscUJBQXFCLFVBQVUsZ0JBQWdCLENBQ2hELENBQUE7SUFDSCxDQUFDO0FBQ0gsQ0FBQyxDQUFBO0FBeEJZLFFBQUEsc0JBQXNCLDBCQXdCbEMifQ==
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.vendorCampaignsMiddlewares = void 0;
|
|
4
|
+
const http_1 = require("@medusajs/framework/http");
|
|
5
|
+
const framework_1 = require("@medusajs/framework");
|
|
6
|
+
const validators_1 = require("@medusajs/medusa/api/utils/validators");
|
|
7
|
+
const query_config_1 = require("./query-config");
|
|
8
|
+
const validators_2 = require("./validators");
|
|
9
|
+
const applySellerCampaignLinkFilter = (req, res, next) => {
|
|
10
|
+
req.filterableFields.seller_id = req.auth_context.actor_id;
|
|
11
|
+
return (0, http_1.maybeApplyLinkFilter)({
|
|
12
|
+
entryPoint: "campaign_seller",
|
|
13
|
+
resourceId: "campaign_id",
|
|
14
|
+
filterableField: "seller_id",
|
|
15
|
+
})(req, res, next);
|
|
16
|
+
};
|
|
17
|
+
exports.vendorCampaignsMiddlewares = [
|
|
18
|
+
{
|
|
19
|
+
method: ["GET"],
|
|
20
|
+
matcher: "/vendor/campaigns",
|
|
21
|
+
middlewares: [
|
|
22
|
+
(0, framework_1.validateAndTransformQuery)(validators_2.VendorGetCampaignsParams, query_config_1.vendorCampaignQueryConfig.list),
|
|
23
|
+
applySellerCampaignLinkFilter,
|
|
24
|
+
],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
method: ["POST"],
|
|
28
|
+
matcher: "/vendor/campaigns",
|
|
29
|
+
middlewares: [
|
|
30
|
+
(0, framework_1.validateAndTransformBody)(validators_2.VendorCreateCampaign),
|
|
31
|
+
(0, framework_1.validateAndTransformQuery)(validators_2.VendorGetCampaignParams, query_config_1.vendorCampaignQueryConfig.retrieve),
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
method: ["GET"],
|
|
36
|
+
matcher: "/vendor/campaigns/:id",
|
|
37
|
+
middlewares: [
|
|
38
|
+
(0, framework_1.validateAndTransformQuery)(validators_2.VendorGetCampaignParams, query_config_1.vendorCampaignQueryConfig.retrieve),
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
method: ["POST"],
|
|
43
|
+
matcher: "/vendor/campaigns/:id",
|
|
44
|
+
middlewares: [
|
|
45
|
+
(0, framework_1.validateAndTransformBody)(validators_2.VendorUpdateCampaign),
|
|
46
|
+
(0, framework_1.validateAndTransformQuery)(validators_2.VendorGetCampaignParams, query_config_1.vendorCampaignQueryConfig.retrieve),
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
method: ["DELETE"],
|
|
51
|
+
matcher: "/vendor/campaigns/:id",
|
|
52
|
+
middlewares: [],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
method: ["POST"],
|
|
56
|
+
matcher: "/vendor/campaigns/:id/promotions",
|
|
57
|
+
middlewares: [
|
|
58
|
+
(0, framework_1.validateAndTransformBody)((0, validators_1.createLinkBody)()),
|
|
59
|
+
(0, framework_1.validateAndTransformQuery)(validators_2.VendorGetCampaignParams, query_config_1.vendorCampaignQueryConfig.retrieve),
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlkZGxld2FyZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9jYW1wYWlnbn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QUFFLENBQUMsS0FBSyxDQUFDO1FBQ2YsT0FBTyxFQUFFLHVCQUF1QjtRQUNoQyxXQUFXLEVBQUU7WUFDWCxJQUFBLHFDQUF5QixFQUN2QixvQ0FBdUIsRUFDdkIsd0NBQXlCLENBQUMsUUFBUSxDQUNuQztTQUNGO0tBQ0Y7SUFDRDtRQUNFLE1BQU0sRUFBRSxDQUFDLE1BQU0sQ0FBQztRQUNoQixPQUFPLEVBQUUsdUJBQXVCO1FBQ2hDLFdBQVcsRUFBRTtZQUNYLElBQUEsb0NBQXdCLEVBQUMsaUNBQW9CLENBQUM7WUFDOUMsSUFBQSxxQ0FBeUIsRUFDdkIsb0NBQXVCLEVBQ3ZCLHdDQUF5QixDQUFDLFFBQVEsQ0FDbkM7U0FDRjtLQUNGO0lBQ0Q7UUFDRSxNQUFNLEVBQUUsQ0FBQyxRQUFRLENBQUM7UUFDbEIsT0FBTyxFQUFFLHVCQUF1QjtRQUNoQyxXQUFXLEVBQUUsRUFBRTtLQUNoQjtJQUNEO1FBQ0UsTUFBTSxFQUFFLENBQUMsTUFBTSxDQUFDO1FBQ2hCLE9BQU8sRUFBRSxrQ0FBa0M7UUFDM0MsV0FBVyxFQUFFO1lBQ1gsSUFBQSxvQ0FBd0IsRUFBQyxJQUFBLDJCQUFjLEdBQUUsQ0FBQztZQUMxQyxJQUFBLHFDQUF5QixFQUN2QixvQ0FBdUIsRUFDdkIsd0NBQXlCLENBQUMsUUFBUSxDQUNuQztTQUNGO0tBQ0Y7Q0FDRixDQUFBIn0=
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.vendorCampaignQueryConfig = exports.defaultVendorCampaignFields = void 0;
|
|
4
|
+
exports.defaultVendorCampaignFields = [
|
|
5
|
+
"id",
|
|
6
|
+
"name",
|
|
7
|
+
"description",
|
|
8
|
+
"currency",
|
|
9
|
+
"campaign_identifier",
|
|
10
|
+
"*budget",
|
|
11
|
+
"starts_at",
|
|
12
|
+
"ends_at",
|
|
13
|
+
"created_at",
|
|
14
|
+
"updated_at",
|
|
15
|
+
"deleted_at",
|
|
16
|
+
];
|
|
17
|
+
exports.vendorCampaignQueryConfig = {
|
|
18
|
+
list: {
|
|
19
|
+
defaults: exports.defaultVendorCampaignFields,
|
|
20
|
+
isList: true,
|
|
21
|
+
},
|
|
22
|
+
retrieve: {
|
|
23
|
+
defaults: exports.defaultVendorCampaignFields,
|
|
24
|
+
isList: false,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwaS92ZW5kb3IvY2FtcGFpZ25zL3F1ZXJ5LWNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLDJCQUEyQixHQUFHO0lBQ3pDLElBQUk7SUFDSixNQUFNO0lBQ04sYUFBYTtJQUNiLFVBQVU7SUFDVixxQkFBcUI7SUFDckIsU0FBUztJQUNULFdBQVc7SUFDWCxTQUFTO0lBQ1QsWUFBWTtJQUNaLFlBQVk7SUFDWixZQUFZO0NBQ2IsQ0FBQTtBQUVZLFFBQUEseUJBQXlCLEdBQUc7SUFDdkMsSUFBSSxFQUFFO1FBQ0osUUFBUSxFQUFFLG1DQUEyQjtRQUNyQyxNQUFNLEVBQUUsSUFBSTtLQUNiO0lBQ0QsUUFBUSxFQUFFO1FBQ1IsUUFBUSxFQUFFLG1DQUEyQjtRQUNyQyxNQUFNLEVBQUUsS0FBSztLQUNkO0NBQ0YsQ0FBQSJ9
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework/http";
|
|
2
|
+
import { HttpTypes } from "@mercurjs/types";
|
|
3
|
+
import { VendorCreateCampaignType, VendorGetCampaignsParamsType } from "./validators";
|
|
4
|
+
export declare const GET: (req: AuthenticatedMedusaRequest<VendorGetCampaignsParamsType>, res: MedusaResponse<HttpTypes.VendorCampaignListResponse>) => Promise<void>;
|
|
5
|
+
export declare const POST: (req: AuthenticatedMedusaRequest<VendorCreateCampaignType>, res: MedusaResponse<HttpTypes.VendorCampaignResponse>) => Promise<void>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.POST = exports.GET = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const campaign_1 = require("../../../workflows/campaign");
|
|
6
|
+
const helpers_1 = require("./helpers");
|
|
7
|
+
const GET = async (req, res) => {
|
|
8
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
9
|
+
const { data: campaigns, metadata } = await query.graph({
|
|
10
|
+
entity: "campaign",
|
|
11
|
+
fields: req.queryConfig.fields,
|
|
12
|
+
filters: req.filterableFields,
|
|
13
|
+
pagination: req.queryConfig.pagination,
|
|
14
|
+
});
|
|
15
|
+
res.json({
|
|
16
|
+
campaigns,
|
|
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
|
+
const sellerId = req.auth_context.actor_id;
|
|
25
|
+
const { result } = await (0, campaign_1.createSellerCampaignsWorkflow)(req.scope).run({
|
|
26
|
+
input: {
|
|
27
|
+
seller_id: sellerId,
|
|
28
|
+
campaigns: [req.validatedBody],
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
const campaign = await (0, helpers_1.refetchCampaign)(result[0].id, req.scope, req.queryConfig.fields);
|
|
32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tBQW5CWSxRQUFBLEdBQUcsT0FtQmY7QUFFTSxNQUFNLElBQUksR0FBRyxLQUFLLEVBQ3ZCLEdBQXlELEVBQ3pELEdBQXFELEVBQ3JELEVBQUU7SUFDRixNQUFNLFFBQVEsR0FBRyxHQUFHLENBQUMsWUFBWSxDQUFDLFFBQVEsQ0FBQTtJQUUxQyxNQUFNLEVBQUUsTUFBTSxFQUFFLEdBQUcsTUFBTSxJQUFBLHdDQUE2QixFQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsQ0FBQyxHQUFHLENBQUM7UUFDcEUsS0FBSyxFQUFFO1lBQ0wsU0FBUyxFQUFFLFFBQVE7WUFDbkIsU0FBUyxFQUFFLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQztTQUMvQjtLQUNGLENBQUMsQ0FBQTtJQUVGLE1BQU0sUUFBUSxHQUFHLE1BQU0sSUFBQSx5QkFBZSxFQUNwQyxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxFQUNaLEdBQUcsQ0FBQyxLQUFLLEVBQ1QsR0FBRyxDQUFDLFdBQVcsQ0FBQyxNQUFNLENBQ3ZCLENBQUE7SUFFRCxHQUFHLENBQUMsSUFBSSxDQUFDLEVBQUUsUUFBUSxFQUFFLENBQUMsQ0FBQTtBQUN4QixDQUFDLENBQUE7QUFwQlksUUFBQSxJQUFJLFFBb0JoQiJ9
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { CampaignBudgetType } from "@medusajs/framework/utils";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export declare const VendorGetCampaignParams: z.ZodObject<{
|
|
4
|
+
fields: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
fields?: string | undefined;
|
|
7
|
+
}, {
|
|
8
|
+
fields?: string | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const VendorGetCampaignsParamsFields: z.ZodObject<{
|
|
11
|
+
q: z.ZodOptional<z.ZodString>;
|
|
12
|
+
campaign_identifier: z.ZodOptional<z.ZodString>;
|
|
13
|
+
budget: z.ZodOptional<z.ZodObject<{
|
|
14
|
+
currency_code: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
currency_code?: string | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
currency_code?: string | undefined;
|
|
19
|
+
}>>;
|
|
20
|
+
}, "strict", z.ZodTypeAny, {
|
|
21
|
+
q?: string | undefined;
|
|
22
|
+
campaign_identifier?: string | undefined;
|
|
23
|
+
budget?: {
|
|
24
|
+
currency_code?: string | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
q?: string | undefined;
|
|
28
|
+
campaign_identifier?: string | undefined;
|
|
29
|
+
budget?: {
|
|
30
|
+
currency_code?: string | undefined;
|
|
31
|
+
} | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
export type VendorGetCampaignsParamsType = z.infer<typeof VendorGetCampaignsParams>;
|
|
34
|
+
export declare const VendorGetCampaignsParams: z.ZodObject<{
|
|
35
|
+
fields: z.ZodOptional<z.ZodString>;
|
|
36
|
+
} & {
|
|
37
|
+
offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
38
|
+
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
39
|
+
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
40
|
+
with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
|
|
41
|
+
} & {
|
|
42
|
+
q: z.ZodOptional<z.ZodString>;
|
|
43
|
+
campaign_identifier: z.ZodOptional<z.ZodString>;
|
|
44
|
+
budget: z.ZodOptional<z.ZodObject<{
|
|
45
|
+
currency_code: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
currency_code?: string | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
currency_code?: string | undefined;
|
|
50
|
+
}>>;
|
|
51
|
+
}, "strict", z.ZodTypeAny, {
|
|
52
|
+
offset: number;
|
|
53
|
+
limit: number;
|
|
54
|
+
q?: string | undefined;
|
|
55
|
+
fields?: string | undefined;
|
|
56
|
+
order?: string | undefined;
|
|
57
|
+
with_deleted?: boolean | undefined;
|
|
58
|
+
campaign_identifier?: string | undefined;
|
|
59
|
+
budget?: {
|
|
60
|
+
currency_code?: string | undefined;
|
|
61
|
+
} | undefined;
|
|
62
|
+
}, {
|
|
63
|
+
offset?: unknown;
|
|
64
|
+
limit?: unknown;
|
|
65
|
+
q?: string | undefined;
|
|
66
|
+
fields?: string | undefined;
|
|
67
|
+
order?: string | undefined;
|
|
68
|
+
with_deleted?: unknown;
|
|
69
|
+
campaign_identifier?: string | undefined;
|
|
70
|
+
budget?: {
|
|
71
|
+
currency_code?: string | undefined;
|
|
72
|
+
} | undefined;
|
|
73
|
+
}>;
|
|
74
|
+
export declare const VendorUpdateCampaignBudget: z.ZodObject<{
|
|
75
|
+
limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
76
|
+
}, "strict", z.ZodTypeAny, {
|
|
77
|
+
limit?: number | null | undefined;
|
|
78
|
+
}, {
|
|
79
|
+
limit?: number | null | undefined;
|
|
80
|
+
}>;
|
|
81
|
+
export type VendorCreateCampaignType = z.infer<typeof VendorCreateCampaign>;
|
|
82
|
+
export declare const VendorCreateCampaign: z.ZodObject<{
|
|
83
|
+
name: z.ZodString;
|
|
84
|
+
campaign_identifier: z.ZodString;
|
|
85
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
86
|
+
budget: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
87
|
+
type: z.ZodNativeEnum<typeof CampaignBudgetType>;
|
|
88
|
+
limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
89
|
+
currency_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
+
attribute: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
91
|
+
}, "strict", z.ZodTypeAny, {
|
|
92
|
+
type: CampaignBudgetType;
|
|
93
|
+
limit?: number | null | undefined;
|
|
94
|
+
currency_code?: string | null | undefined;
|
|
95
|
+
attribute?: string | null | undefined;
|
|
96
|
+
}, {
|
|
97
|
+
type: CampaignBudgetType;
|
|
98
|
+
limit?: number | null | undefined;
|
|
99
|
+
currency_code?: string | null | undefined;
|
|
100
|
+
attribute?: string | null | undefined;
|
|
101
|
+
}>, {
|
|
102
|
+
type: CampaignBudgetType;
|
|
103
|
+
limit?: number | null | undefined;
|
|
104
|
+
currency_code?: string | null | undefined;
|
|
105
|
+
attribute?: string | null | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
type: CampaignBudgetType;
|
|
108
|
+
limit?: number | null | undefined;
|
|
109
|
+
currency_code?: string | null | undefined;
|
|
110
|
+
attribute?: string | null | undefined;
|
|
111
|
+
}>, {
|
|
112
|
+
type: CampaignBudgetType;
|
|
113
|
+
limit?: number | null | undefined;
|
|
114
|
+
currency_code?: string | null | undefined;
|
|
115
|
+
attribute?: string | null | undefined;
|
|
116
|
+
}, {
|
|
117
|
+
type: CampaignBudgetType;
|
|
118
|
+
limit?: number | null | undefined;
|
|
119
|
+
currency_code?: string | null | undefined;
|
|
120
|
+
attribute?: string | null | undefined;
|
|
121
|
+
}>, {
|
|
122
|
+
type: CampaignBudgetType;
|
|
123
|
+
limit?: number | null | undefined;
|
|
124
|
+
currency_code?: string | null | undefined;
|
|
125
|
+
attribute?: string | null | undefined;
|
|
126
|
+
}, {
|
|
127
|
+
type: CampaignBudgetType;
|
|
128
|
+
limit?: number | null | undefined;
|
|
129
|
+
currency_code?: string | null | undefined;
|
|
130
|
+
attribute?: string | null | undefined;
|
|
131
|
+
}>>>;
|
|
132
|
+
starts_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
133
|
+
ends_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
134
|
+
}, "strict", z.ZodTypeAny, {
|
|
135
|
+
name: string;
|
|
136
|
+
campaign_identifier: string;
|
|
137
|
+
description?: string | null | undefined;
|
|
138
|
+
starts_at?: Date | null | undefined;
|
|
139
|
+
ends_at?: Date | null | undefined;
|
|
140
|
+
budget?: {
|
|
141
|
+
type: CampaignBudgetType;
|
|
142
|
+
limit?: number | null | undefined;
|
|
143
|
+
currency_code?: string | null | undefined;
|
|
144
|
+
attribute?: string | null | undefined;
|
|
145
|
+
} | null | undefined;
|
|
146
|
+
}, {
|
|
147
|
+
name: string;
|
|
148
|
+
campaign_identifier: string;
|
|
149
|
+
description?: string | null | undefined;
|
|
150
|
+
starts_at?: Date | null | undefined;
|
|
151
|
+
ends_at?: Date | null | undefined;
|
|
152
|
+
budget?: {
|
|
153
|
+
type: CampaignBudgetType;
|
|
154
|
+
limit?: number | null | undefined;
|
|
155
|
+
currency_code?: string | null | undefined;
|
|
156
|
+
attribute?: string | null | undefined;
|
|
157
|
+
} | null | undefined;
|
|
158
|
+
}>;
|
|
159
|
+
export type VendorUpdateCampaignType = z.infer<typeof VendorUpdateCampaign>;
|
|
160
|
+
export declare const VendorUpdateCampaign: z.ZodObject<{
|
|
161
|
+
name: z.ZodOptional<z.ZodString>;
|
|
162
|
+
campaign_identifier: z.ZodOptional<z.ZodString>;
|
|
163
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
164
|
+
budget: z.ZodOptional<z.ZodObject<{
|
|
165
|
+
limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
166
|
+
}, "strict", z.ZodTypeAny, {
|
|
167
|
+
limit?: number | null | undefined;
|
|
168
|
+
}, {
|
|
169
|
+
limit?: number | null | undefined;
|
|
170
|
+
}>>;
|
|
171
|
+
starts_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
172
|
+
ends_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
173
|
+
}, "strip", z.ZodTypeAny, {
|
|
174
|
+
name?: string | undefined;
|
|
175
|
+
description?: string | null | undefined;
|
|
176
|
+
campaign_identifier?: string | undefined;
|
|
177
|
+
starts_at?: Date | null | undefined;
|
|
178
|
+
ends_at?: Date | null | undefined;
|
|
179
|
+
budget?: {
|
|
180
|
+
limit?: number | null | undefined;
|
|
181
|
+
} | undefined;
|
|
182
|
+
}, {
|
|
183
|
+
name?: string | undefined;
|
|
184
|
+
description?: string | null | undefined;
|
|
185
|
+
campaign_identifier?: string | undefined;
|
|
186
|
+
starts_at?: Date | null | undefined;
|
|
187
|
+
ends_at?: Date | null | undefined;
|
|
188
|
+
budget?: {
|
|
189
|
+
limit?: number | null | undefined;
|
|
190
|
+
} | undefined;
|
|
191
|
+
}>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VendorUpdateCampaign = exports.VendorCreateCampaign = exports.VendorUpdateCampaignBudget = exports.VendorGetCampaignsParams = exports.VendorGetCampaignsParamsFields = exports.VendorGetCampaignParams = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const validators_1 = require("@medusajs/medusa/api/utils/validators");
|
|
7
|
+
exports.VendorGetCampaignParams = (0, validators_1.createSelectParams)();
|
|
8
|
+
exports.VendorGetCampaignsParamsFields = zod_1.z
|
|
9
|
+
.object({
|
|
10
|
+
q: zod_1.z.string().optional(),
|
|
11
|
+
campaign_identifier: zod_1.z.string().optional(),
|
|
12
|
+
budget: zod_1.z
|
|
13
|
+
.object({
|
|
14
|
+
currency_code: zod_1.z.string().optional(),
|
|
15
|
+
})
|
|
16
|
+
.optional(),
|
|
17
|
+
})
|
|
18
|
+
.strict();
|
|
19
|
+
exports.VendorGetCampaignsParams = (0, validators_1.createFindParams)({
|
|
20
|
+
offset: 0,
|
|
21
|
+
limit: 50,
|
|
22
|
+
}).merge(exports.VendorGetCampaignsParamsFields);
|
|
23
|
+
const VendorCreateCampaignBudget = zod_1.z
|
|
24
|
+
.object({
|
|
25
|
+
type: zod_1.z.nativeEnum(utils_1.CampaignBudgetType),
|
|
26
|
+
limit: zod_1.z.number().nullish(),
|
|
27
|
+
currency_code: zod_1.z.string().nullish(),
|
|
28
|
+
attribute: zod_1.z.string().nullish(),
|
|
29
|
+
})
|
|
30
|
+
.strict()
|
|
31
|
+
.refine((data) => data.type !== utils_1.CampaignBudgetType.SPEND || (0, utils_1.isPresent)(data.currency_code), {
|
|
32
|
+
path: ["currency_code"],
|
|
33
|
+
message: `currency_code is required when budget type is ${utils_1.CampaignBudgetType.SPEND}`,
|
|
34
|
+
})
|
|
35
|
+
.refine((data) => data.type !== utils_1.CampaignBudgetType.USAGE || !(0, utils_1.isPresent)(data.currency_code), {
|
|
36
|
+
path: ["currency_code"],
|
|
37
|
+
message: `currency_code should not be present when budget type is ${utils_1.CampaignBudgetType.USAGE}`,
|
|
38
|
+
})
|
|
39
|
+
.refine((data) => (0, utils_1.isPresent)(data.attribute) ||
|
|
40
|
+
![
|
|
41
|
+
utils_1.CampaignBudgetType.USE_BY_ATTRIBUTE,
|
|
42
|
+
utils_1.CampaignBudgetType.SPEND_BY_ATTRIBUTE,
|
|
43
|
+
].includes(data.type), (data) => ({
|
|
44
|
+
path: ["attribute"],
|
|
45
|
+
message: `campaign budget attribute is required when budget type is ${data.type}`,
|
|
46
|
+
}));
|
|
47
|
+
exports.VendorUpdateCampaignBudget = zod_1.z
|
|
48
|
+
.object({
|
|
49
|
+
limit: zod_1.z.number().nullish(),
|
|
50
|
+
})
|
|
51
|
+
.strict();
|
|
52
|
+
exports.VendorCreateCampaign = zod_1.z
|
|
53
|
+
.object({
|
|
54
|
+
name: zod_1.z.string(),
|
|
55
|
+
campaign_identifier: zod_1.z.string(),
|
|
56
|
+
description: zod_1.z.string().nullish(),
|
|
57
|
+
budget: VendorCreateCampaignBudget.nullish(),
|
|
58
|
+
starts_at: zod_1.z.coerce.date().nullish(),
|
|
59
|
+
ends_at: zod_1.z.coerce.date().nullish(),
|
|
60
|
+
})
|
|
61
|
+
.strict();
|
|
62
|
+
exports.VendorUpdateCampaign = zod_1.z.object({
|
|
63
|
+
name: zod_1.z.string().optional(),
|
|
64
|
+
campaign_identifier: zod_1.z.string().optional(),
|
|
65
|
+
description: zod_1.z.string().nullish(),
|
|
66
|
+
budget: exports.VendorUpdateCampaignBudget.optional(),
|
|
67
|
+
starts_at: zod_1.z.coerce.date().nullish(),
|
|
68
|
+
ends_at: zod_1.z.coerce.date().nullish(),
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9ycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcGkvdmVuZG9yL2NhbXBhaWducy92YWxpZGF0b3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFEQUF5RTtBQUN6RSw2QkFBdUI7QUFDdkIsc0VBRzhDO0FBRWpDLFFBQUEsdUJBQXVCLEdBQUcsSUFBQSwrQkFBa0IsR0FBRSxDQUFBO0FBRTlDLFFBQUEsOEJBQThCLEdBQUcsT0FBQztLQUM1QyxNQUFNLENBQUM7SUFDTixDQUFDLEVBQUUsT0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUN4QixtQkFBbUIsRUFBRSxPQUFDLENBQUMsTUFBTSxFQUFFLENBQUMsUUFBUSxFQUFFO0lBQzFDLE1BQU0sRUFBRSxPQUFDO1NBQ04sTUFBTSxDQUFDO1FBQ04sYUFBYSxFQUFFLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxRQUFRLEVBQUU7S0FDckMsQ0FBQztTQ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FFO0lBQ3BDLE9BQU8sRUFBRSxPQUFDLENBQUMsTUFBTSxDQUFDLElBQUksRUFBRSxDQUFDLE9BQU8sRUFBRTtDQUNuQyxDQUFDO0tBQ0QsTUFBTSxFQUFFLENBQUE7QUFHRSxRQUFBLG9CQUFvQixHQUFHLE9BQUMsQ0FBQyxNQUFNLENBQUM7SUFDM0MsSUFBSSxFQUFFLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxRQUFRLEVBQUU7SUFDM0IsbUJBQW1CLEVBQUUsT0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUMxQyxXQUFXLEVBQUUsT0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDLE9BQU8sRUFBRTtJQUNqQyxNQUFNLEVBQUUsa0NBQTBCLENBQUMsUUFBUSxFQUFFO0lBQzdDLFNBQVMsRUFBRSxPQUFDLENBQUMsTUFBTSxDQUFDLElBQUksRUFBRSxDQUFDLE9BQU8sRUFBRTtJQUNwQyxPQUFPLEVBQUUsT0FBQyxDQUFDLE1BQU0sQ0FBQyxJQUFJLEVBQUUsQ0FBQyxPQUFPLEVBQUU7Q0FDbkMsQ0FBQyxDQUFBIn0=
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { HttpTypes } from "@medusajs/framework/types";
|
|
2
|
+
import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework/http";
|
|
3
|
+
export declare const POST: (req: AuthenticatedMedusaRequest<HttpTypes.AdminBatchLink, HttpTypes.AdminCollectionParams>, res: MedusaResponse<HttpTypes.AdminCollectionResponse>) => Promise<void>;
|
|
@@ -0,0 +1,23 @@
|
|
|
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 POST = async (req, res) => {
|
|
7
|
+
const id = req.params.id;
|
|
8
|
+
const { add = [], remove = [] } = req.validatedBody;
|
|
9
|
+
const workflow = (0, core_flows_1.batchLinkProductsToCollectionWorkflow)(req.scope);
|
|
10
|
+
await workflow.run({
|
|
11
|
+
input: {
|
|
12
|
+
id,
|
|
13
|
+
add,
|
|
14
|
+
remove,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
const collection = await (0, helpers_1.refetchCollection)(req.params.id, req.scope, req.queryConfig.fields);
|
|
18
|
+
res.status(200).json({
|
|
19
|
+
collection,
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
exports.POST = POST;
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9jb2xsZWN0aW9ucy9baWRdL3Byb2R1Y3RzL3JvdXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFEQUE0RTtBQU81RSwyQ0FBaUQ7QUFFMUMsTUFBTSxJQUFJLEdBQUcsS0FBSyxFQUN2QixHQUdDLEVBQ0QsR0FBc0QsRUFDdEQsRUFBRTtJQUNGLE1BQU0sRUFBRSxHQUFHLEdBQUcsQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFBO0lBQ3hCLE1BQU0sRUFBRSxHQUFHLEdBQUcsRUFBRSxFQUFFLE1BQU0sR0FBRyxFQUFFLEVBQUUsR0FBRyxHQUFHLENBQUMsYUFBYSxDQUFBO0lBRW5ELE1BQU0sUUFBUSxHQUFHLElBQUEsa0RBQXFDLEVBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFBO0lBQ2pFLE1BQU0sUUFBUSxDQUFDLEdBQUcsQ0FBQztRQUNqQixLQUFLLEVBQUU7WUFDTCxFQUFFO1lBQ0YsR0FBRztZQUNILE1BQU07U0FDUDtLQUNGLENBQUMsQ0FBQTtJQUVGLE1BQU0sVUFBVSxHQUFHLE1BQU0sSUFBQSwyQkFBaUIsRUFDeEMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxFQUFFLEVBQ2IsR0FBRyxDQUFDLEtBQUssRUFDVCxHQUFHLENBQUMsV0FBVyxDQUFDLE1BQU0sQ0FDdkIsQ0FBQTtJQUVELEdBQUcsQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDO1FBQ25CLFVBQVU7S0FDWCxDQUFDLENBQUE7QUFDSixDQUFDLENBQUE7QUE1QlksUUFBQSxJQUFJLFFBNEJoQiJ9
|
|
@@ -0,0 +1,25 @@
|
|
|
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 helpers_1 = require("../helpers");
|
|
6
|
+
const GET = async (req, res) => {
|
|
7
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
8
|
+
const withProducts = req.queryConfig.fields.some((field) => field.includes("products"));
|
|
9
|
+
const { data: [collection], } = await query.graph({
|
|
10
|
+
entity: "product_collection",
|
|
11
|
+
fields: req.queryConfig.fields.filter(field => !field.includes("products")),
|
|
12
|
+
filters: {
|
|
13
|
+
id: req.params.id,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
if (!collection) {
|
|
17
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Collection with id ${req.params.id} was not found`);
|
|
18
|
+
}
|
|
19
|
+
if (withProducts) {
|
|
20
|
+
await (0, helpers_1.wrapCollectionsWithProducts)([collection], req);
|
|
21
|
+
}
|
|
22
|
+
res.json({ collection });
|
|
23
|
+
};
|
|
24
|
+
exports.GET = GET;
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIj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sS0FBSyxDQUFDLFNBQVMsRUFDM0Isc0JBQXNCLEdBQUcsQ0FBQyxNQUFNLENBQUMsRUFBRSxnQkFBZ0IsQ0FDcEQsQ0FBQTtJQUNILENBQUM7SUFFRCxJQUFJLFlBQVksRUFBRSxDQUFDO1FBQ2pCLE1BQU0sSUFBQSxxQ0FBMkIsRUFBQyxDQUFDLFVBQVUsQ0FBQyxFQUFFLEdBQUcsQ0FBQyxDQUFBO0lBQ3RELENBQUM7SUFFRCxHQUFHLENBQUMsSUFBSSxDQUFDLEVBQUUsVUFBVSxFQUFFLENBQUMsQ0FBQTtBQUMxQixDQUFDLENBQUE7QUFoQ1ksUUFBQSxHQUFHLE9BZ0NmIn0=
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AuthenticatedMedusaRequest, MedusaContainer } from "@medusajs/framework";
|
|
2
|
+
import { ProductCollectionDTO } from "@medusajs/types";
|
|
3
|
+
export declare const refetchCollection: (id: string, scope: MedusaContainer, fields: string[]) => Promise<any>;
|
|
4
|
+
export declare const wrapCollectionsWithProducts: (collections: ProductCollectionDTO[], req: AuthenticatedMedusaRequest) => Promise<void>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wrapCollectionsWithProducts = exports.refetchCollection = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const refetchCollection = async (id, scope, fields) => {
|
|
6
|
+
const query = scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
7
|
+
const { data: [collection], } = await query.graph({
|
|
8
|
+
entity: "product_collection",
|
|
9
|
+
fields,
|
|
10
|
+
filters: { id },
|
|
11
|
+
});
|
|
12
|
+
return collection;
|
|
13
|
+
};
|
|
14
|
+
exports.refetchCollection = refetchCollection;
|
|
15
|
+
const wrapCollectionsWithProducts = async (collections, req) => {
|
|
16
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
17
|
+
const { data: sellerProducts } = await query.graph({
|
|
18
|
+
entity: "product_seller",
|
|
19
|
+
filters: {
|
|
20
|
+
seller_id: req.auth_context.actor_id,
|
|
21
|
+
},
|
|
22
|
+
fields: ["product.*"],
|
|
23
|
+
});
|
|
24
|
+
collections.forEach(collection => {
|
|
25
|
+
collection.products = sellerProducts.filter(({ product }) => product.collection_id === collection.id).map(({ product }) => product);
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
exports.wrapCollectionsWithProducts = wrapCollectionsWithProducts;
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcGkvdmVuZG9yL2NvbGxlY3Rpb25zL2hlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EscURBQXFFO0FBRzlELE1BQU0saUJBQWlCLEdBQUcsS0FBSyxFQUNwQyxFQUFVLEVBQ1YsS0FBc0IsRUFDdEIsTUFBZ0IsRUFDaEIsRUFBRTtJQUNGLE1BQU0sS0FBSyxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsaUNBQXlCLENBQUMsS0FBSyxDQUFDLENBQUE7SUFFNUQsTUFBTSxFQUNKLElBQUksRUFBRSxDQUFDLFVBQVUsQ0FBQyxHQUNuQixHQUFHLE1BQU0sS0FBSyxDQUFDLEtBQUssQ0FBQztRQUNwQixNQUFNLEVBQUUsb0JBQW9CO1FBQzVCLE1BQU07UUFDTixPQUFPLEVBQUUsRUFBRSxFQUFFLEVBQUU7S0FDaEIsQ0FBQyxDQUFBO0lBRUYsT0FBTyxVQUFVLENBQUE7QUFDbkIsQ0FBQyxDQUFBO0FBaEJZLFFBQUEsaUJBQWlCLHFCQWdCN0I7QUFHTSxNQUFNLDJCQUEyQixHQUFHLEtBQUssRUFBRSxXQUFtQyxFQUFFLEdBQStCLEVBQUUsRUFBRTtJQUN4SCxNQUFNLEtBQUssR0FBRyxHQUFHLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxpQ0FBeUIsQ0FBQyxLQUFLLENBQUMsQ0FBQTtJQUVoRSxNQUFNLEVBQUUsSUFBSSxFQUFFLGNBQWMsRUFBRSxHQUFHLE1BQU0sS0FBSyxDQUFDLEtBQUssQ0FBQztRQUNqRCxNQUFNLEVBQUUsZ0JBQWdCO1FBQ3hCLE9BQU8sRUFBRTtZQUNQLFNBQVMsRUFBRSxHQUFHLENBQUMsWUFBWSxDQUFDLFFBQVE7U0FDckM7UUFDRCxNQUFNLEVBQUUsQ0FBQyxXQUFXLENBQUM7S0FDdEIsQ0FBQyxDQUFBO0lBRUYsV0FBVyxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsRUFBRTtRQUMvQixVQUFVLENBQUMsUUFBUSxHQUFHLGNBQWMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxFQUFFLE9BQU8sRUFBRSxFQUFFLEVBQUUsQ0FBQyxPQUFPLENBQUMsYUFBYSxLQUFLLFVBQVUsQ0FBQyxFQUFFLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxFQUFFLE9BQU8sRUFBRSxFQUFFLEVBQUUsQ0FBQyxPQUFPLENBQUMsQ0FBQTtJQUNySSxDQUFDLENBQUMsQ0FBQTtBQUNKLENBQUMsQ0FBQTtBQWRZLFFBQUEsMkJBQTJCLCtCQWN2QyJ9
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.vendorCollectionsMiddlewares = void 0;
|
|
4
|
+
const framework_1 = require("@medusajs/framework");
|
|
5
|
+
const query_config_1 = require("./query-config");
|
|
6
|
+
const validators_1 = require("./validators");
|
|
7
|
+
const validators_2 = require("@medusajs/medusa/api/utils/validators");
|
|
8
|
+
exports.vendorCollectionsMiddlewares = [
|
|
9
|
+
{
|
|
10
|
+
method: ["GET"],
|
|
11
|
+
matcher: "/vendor/collections",
|
|
12
|
+
middlewares: [
|
|
13
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.VendorGetCollectionsParams, query_config_1.listTransformQueryConfig),
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
method: ["GET"],
|
|
18
|
+
matcher: "/vendor/collections/:id",
|
|
19
|
+
middlewares: [
|
|
20
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.VendorGetCollectionParams, query_config_1.retrieveTransformQueryConfig),
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
method: ["POST"],
|
|
25
|
+
matcher: "/vendor/collections/:id/products",
|
|
26
|
+
middlewares: [
|
|
27
|
+
(0, framework_1.validateAndTransformBody)((0, validators_2.createLinkBody)()),
|
|
28
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.VendorGetCollectionParams, query_config_1.retrieveTransformQueryConfig),
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlkZGxld2FyZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9jb2xsZWN0aW9ucy9taWRkbGV3YXJlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSxtREFHNEI7QUFFNUIsaURBR3VCO0FBQ3ZCLDZDQUdxQjtBQUNyQixzRUFBc0U7QUFFekQsUUFBQSw0QkFBNEIsR0FBc0I7SUFDN0Q7UUFDRSxNQUFNLEVBQUUsQ0FBQyxLQUFLLENBQUM7UUFDZixPQUFPLEVBQUUscUJBQXFCO1FBQzlCLFdBQVcsRUFBRTtZQUNYLElBQUEscUNBQXlCLEVBQ3ZCLHVDQUEwQixFQUMxQix1Q0FBd0IsQ0FDekI7U0FDRjtLQUNGO0lBQ0Q7UUFDRSxNQUFNLEVBQUUsQ0FBQyxLQUFLLENBQUM7UUFDZixPQUFPLEVBQUUseUJBQXlCO1FBQ2xDLFdBQVcsRUFBRTtZQUNYLElBQUEscUNBQXlCLEVBQ3ZCLHNDQUF5QixFQUN6QiwyQ0FBNEIsQ0FDN0I7U0FDRjtLQUNGO0lBQ0Q7UUFDRSxNQUFNLEVBQUUsQ0FBQyxNQUFNLENBQUM7UUFDaEIsT0FBTyxFQUFFLGtDQUFrQztRQUMzQyxXQUFXLEVBQUU7WUFDWCxJQUFBLG9DQUF3QixFQUFDLElBQUEsMkJBQWMsR0FBRSxDQUFDO1lBQzFDLElBQUEscUNBQXlCLEVBQ3ZCLHNDQUF5QixFQUN6QiwyQ0FBNEIsQ0FDN0I7U0FDRjtLQUNGO0NBQ0YsQ0FBQSJ9
|