@mercurjs/core 2.1.0-canary.4
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/attributes/[id]/route.d.ts +5 -0
- package/.medusa/server/src/api/admin/attributes/[id]/route.js +68 -0
- package/.medusa/server/src/api/admin/attributes/[id]/values/[value_id]/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/attributes/[id]/values/[value_id]/route.js +40 -0
- package/.medusa/server/src/api/admin/attributes/[id]/values/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/attributes/[id]/values/route.js +44 -0
- package/.medusa/server/src/api/admin/attributes/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/attributes/middlewares.js +102 -0
- package/.medusa/server/src/api/admin/attributes/query-config.d.ts +20 -0
- package/.medusa/server/src/api/admin/attributes/query-config.js +41 -0
- package/.medusa/server/src/api/admin/attributes/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/attributes/route.js +51 -0
- package/.medusa/server/src/api/admin/attributes/validators.d.ts +793 -0
- package/.medusa/server/src/api/admin/attributes/validators.js +92 -0
- 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 +65 -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 +15 -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 +26 -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/orders/[id]/order-group/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/orders/[id]/order-group/route.js +28 -0
- package/.medusa/server/src/api/admin/orders/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/orders/route.js +3 -0
- package/.medusa/server/src/api/admin/orders/validators.d.ts +289 -0
- package/.medusa/server/src/api/admin/orders/validators.js +34 -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/products/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/products/route.js +3 -0
- package/.medusa/server/src/api/admin/products/validators.d.ts +828 -0
- package/.medusa/server/src/api/admin/products/validators.js +9 -0
- package/.medusa/server/src/api/admin/sellers/[id]/address/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/sellers/[id]/address/route.js +22 -0
- package/.medusa/server/src/api/admin/sellers/[id]/approve/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/sellers/[id]/approve/route.js +21 -0
- package/.medusa/server/src/api/admin/sellers/[id]/members/[member_id]/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/sellers/[id]/members/[member_id]/route.js +19 -0
- package/.medusa/server/src/api/admin/sellers/[id]/members/invite/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/sellers/[id]/members/invite/route.js +18 -0
- package/.medusa/server/src/api/admin/sellers/[id]/members/invites/route.d.ts +2 -0
- package/.medusa/server/src/api/admin/sellers/[id]/members/invites/route.js +23 -0
- package/.medusa/server/src/api/admin/sellers/[id]/members/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/sellers/[id]/members/route.js +35 -0
- package/.medusa/server/src/api/admin/sellers/[id]/payment-details/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/sellers/[id]/payment-details/route.js +22 -0
- package/.medusa/server/src/api/admin/sellers/[id]/products/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/sellers/[id]/products/route.js +40 -0
- package/.medusa/server/src/api/admin/sellers/[id]/professional-details/route.d.ts +5 -0
- package/.medusa/server/src/api/admin/sellers/[id]/professional-details/route.js +37 -0
- package/.medusa/server/src/api/admin/sellers/[id]/route.d.ts +5 -0
- package/.medusa/server/src/api/admin/sellers/[id]/route.js +38 -0
- package/.medusa/server/src/api/admin/sellers/[id]/suspend/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/sellers/[id]/suspend/route.js +22 -0
- package/.medusa/server/src/api/admin/sellers/[id]/terminate/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/sellers/[id]/terminate/route.js +22 -0
- package/.medusa/server/src/api/admin/sellers/[id]/unsuspend/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/sellers/[id]/unsuspend/route.js +21 -0
- package/.medusa/server/src/api/admin/sellers/[id]/unterminate/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/sellers/[id]/unterminate/route.js +21 -0
- package/.medusa/server/src/api/admin/sellers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/sellers/middlewares.js +166 -0
- package/.medusa/server/src/api/admin/sellers/query-config.d.ts +34 -0
- package/.medusa/server/src/api/admin/sellers/query-config.js +95 -0
- package/.medusa/server/src/api/admin/sellers/route.d.ts +5 -0
- package/.medusa/server/src/api/admin/sellers/route.js +37 -0
- package/.medusa/server/src/api/admin/sellers/validators.d.ts +496 -0
- package/.medusa/server/src/api/admin/sellers/validators.js +116 -0
- package/.medusa/server/src/api/admin/subscription-plans/[id]/overrides/[override_id]/route.d.ts +6 -0
- package/.medusa/server/src/api/admin/subscription-plans/[id]/overrides/[override_id]/route.js +43 -0
- package/.medusa/server/src/api/admin/subscription-plans/[id]/overrides/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/subscription-plans/[id]/overrides/route.js +24 -0
- package/.medusa/server/src/api/admin/subscription-plans/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/admin/subscription-plans/[id]/route.js +43 -0
- package/.medusa/server/src/api/admin/subscription-plans/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/subscription-plans/middlewares.js +81 -0
- package/.medusa/server/src/api/admin/subscription-plans/query-config.d.ts +17 -0
- package/.medusa/server/src/api/admin/subscription-plans/query-config.js +43 -0
- package/.medusa/server/src/api/admin/subscription-plans/route.d.ts +5 -0
- package/.medusa/server/src/api/admin/subscription-plans/route.js +35 -0
- package/.medusa/server/src/api/admin/subscription-plans/validators.d.ts +117 -0
- package/.medusa/server/src/api/admin/subscription-plans/validators.js +42 -0
- package/.medusa/server/src/api/hooks/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/hooks/middlewares.js +11 -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 +40 -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 +4 -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 +66 -0
- package/.medusa/server/src/api/store/sellers/query-config.d.ts +8 -0
- package/.medusa/server/src/api/store/sellers/query-config.js +30 -0
- package/.medusa/server/src/api/store/sellers/route.d.ts +4 -0
- package/.medusa/server/src/api/store/sellers/route.js +21 -0
- package/.medusa/server/src/api/store/sellers/validators.d.ts +130 -0
- package/.medusa/server/src/api/store/sellers/validators.js +20 -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/ensure-seller-middleware.d.ts +2 -0
- package/.medusa/server/src/api/utils/ensure-seller-middleware.js +38 -0
- package/.medusa/server/src/api/utils/filter-by-seller-id.d.ts +2 -0
- package/.medusa/server/src/api/utils/filter-by-seller-id.js +10 -0
- package/.medusa/server/src/api/utils/index.d.ts +5 -0
- package/.medusa/server/src/api/utils/index.js +22 -0
- package/.medusa/server/src/api/utils/scan-unauthenticated-routes.d.ts +1 -0
- package/.medusa/server/src/api/utils/scan-unauthenticated-routes.js +65 -0
- package/.medusa/server/src/api/utils/unless-base-url.d.ts +10 -0
- package/.medusa/server/src/api/utils/unless-base-url.js +22 -0
- package/.medusa/server/src/api/utils/vendor-cors-middleware.d.ts +2 -0
- package/.medusa/server/src/api/utils/vendor-cors-middleware.js +18 -0
- package/.medusa/server/src/api/vendor/attributes/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/attributes/middlewares.js +32 -0
- package/.medusa/server/src/api/vendor/attributes/route.d.ts +2 -0
- package/.medusa/server/src/api/vendor/attributes/route.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 +19 -0
- package/.medusa/server/src/api/vendor/feature-flags/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/feature-flags/route.js +16 -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 +18 -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/members/invites/accept/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/members/invites/accept/route.js +16 -0
- package/.medusa/server/src/api/vendor/members/me/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/members/me/route.js +24 -0
- package/.medusa/server/src/api/vendor/members/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/members/middlewares.js +38 -0
- package/.medusa/server/src/api/vendor/members/validators.d.ts +9 -0
- package/.medusa/server/src/api/vendor/members/validators.js +8 -0
- package/.medusa/server/src/api/vendor/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/middlewares.js +112 -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 +21 -0
- package/.medusa/server/src/api/vendor/products/[id]/attributes/[attribute_id]/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/products/[id]/attributes/[attribute_id]/route.js +149 -0
- package/.medusa/server/src/api/vendor/products/[id]/attributes/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/products/[id]/attributes/route.js +111 -0
- package/.medusa/server/src/api/vendor/products/[id]/attributes/utils.d.ts +7 -0
- package/.medusa/server/src/api/vendor/products/[id]/attributes/utils.js +16 -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 +74 -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 +62 -0
- package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/media/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/media/route.js +20 -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 +142 -0
- package/.medusa/server/src/api/vendor/products/query-config.d.ts +22 -0
- package/.medusa/server/src/api/vendor/products/query-config.js +64 -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/utils/transform-product-attributes.d.ts +34 -0
- package/.medusa/server/src/api/vendor/products/utils/transform-product-attributes.js +71 -0
- package/.medusa/server/src/api/vendor/products/validators.d.ts +2352 -0
- package/.medusa/server/src/api/vendor/products/validators.js +213 -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 +17 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/address/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/address/route.js +22 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/members/[member_id]/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/members/[member_id]/route.js +29 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/members/invites/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/members/invites/route.js +24 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/members/me/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/members/me/route.js +22 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/members/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/members/route.js +35 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/payment-details/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/payment-details/route.js +22 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/professional-details/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/professional-details/route.js +37 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/sellers/[id]/route.js +35 -0
- package/.medusa/server/src/api/vendor/sellers/me/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/sellers/me/route.js +27 -0
- package/.medusa/server/src/api/vendor/sellers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/sellers/middlewares.js +259 -0
- package/.medusa/server/src/api/vendor/sellers/query-config.d.ts +25 -0
- package/.medusa/server/src/api/vendor/sellers/query-config.js +73 -0
- package/.medusa/server/src/api/vendor/sellers/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/sellers/route.js +50 -0
- package/.medusa/server/src/api/vendor/sellers/select/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/sellers/select/route.js +24 -0
- package/.medusa/server/src/api/vendor/sellers/validators.d.ts +324 -0
- package/.medusa/server/src/api/vendor/sellers/validators.js +103 -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/subscription/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/subscription/middlewares.js +28 -0
- package/.medusa/server/src/api/vendor/subscription/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/subscription/route.js +31 -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/feature-flags/seller-registration.d.ts +3 -0
- package/.medusa/server/src/feature-flags/seller-registration.js +10 -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/category-attribute-link.d.ts +2 -0
- package/.medusa/server/src/links/category-attribute-link.js +16 -0
- package/.medusa/server/src/links/fulfillment-set-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/fulfillment-set-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-attribute-value-link.d.ts +2 -0
- package/.medusa/server/src/links/product-attribute-value-link.js +16 -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/product-vendor-product-attribute-link.d.ts +2 -0
- package/.medusa/server/src/links/product-vendor-product-attribute-link.js +16 -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-attribute-link.d.ts +2 -0
- package/.medusa/server/src/links/seller-attribute-link.js +13 -0
- package/.medusa/server/src/links/seller-attribute-value-link.d.ts +2 -0
- package/.medusa/server/src/links/seller-attribute-value-link.js +13 -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-member-rbac-role.d.ts +2 -0
- package/.medusa/server/src/links/seller-member-rbac-role.js +13 -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/seller-vendor-product-attribute-link.d.ts +2 -0
- package/.medusa/server/src/links/seller-vendor-product-attribute-link.js +13 -0
- package/.medusa/server/src/links/service-zone-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/service-zone-seller-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/admin-ui/index.d.ts +5 -0
- package/.medusa/server/src/modules/admin-ui/index.js +12 -0
- package/.medusa/server/src/modules/admin-ui/services/admin-ui-module-service.d.ts +6 -0
- package/.medusa/server/src/modules/admin-ui/services/admin-ui-module-service.js +14 -0
- package/.medusa/server/src/modules/attribute/index.d.ts +51 -0
- package/.medusa/server/src/modules/attribute/index.js +15 -0
- package/.medusa/server/src/modules/attribute/migrations/Migration20260325000000.d.ts +5 -0
- package/.medusa/server/src/modules/attribute/migrations/Migration20260325000000.js +32 -0
- package/.medusa/server/src/modules/attribute/models/attribute-possible-value.d.ts +27 -0
- package/.medusa/server/src/modules/attribute/models/attribute-possible-value.js +26 -0
- package/.medusa/server/src/modules/attribute/models/attribute-value.d.ts +27 -0
- package/.medusa/server/src/modules/attribute/models/attribute-value.js +26 -0
- package/.medusa/server/src/modules/attribute/models/attribute.d.ts +28 -0
- package/.medusa/server/src/modules/attribute/models/attribute.js +36 -0
- package/.medusa/server/src/modules/attribute/models/index.d.ts +3 -0
- package/.medusa/server/src/modules/attribute/models/index.js +13 -0
- package/.medusa/server/src/modules/attribute/service.d.ts +105 -0
- package/.medusa/server/src/modules/attribute/service.js +74 -0
- package/.medusa/server/src/modules/codegen/index.d.ts +5 -0
- package/.medusa/server/src/modules/codegen/index.js +12 -0
- package/.medusa/server/src/modules/codegen/services/codegen-module-service.d.ts +13 -0
- package/.medusa/server/src/modules/codegen/services/codegen-module-service.js +51 -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/custom-fields/index.d.ts +8 -0
- package/.medusa/server/src/modules/custom-fields/index.js +15 -0
- package/.medusa/server/src/modules/custom-fields/loaders.d.ts +2 -0
- package/.medusa/server/src/modules/custom-fields/loaders.js +129 -0
- package/.medusa/server/src/modules/custom-fields/services/custom-fields-module-service.d.ts +27 -0
- package/.medusa/server/src/modules/custom-fields/services/custom-fields-module-service.js +139 -0
- package/.medusa/server/src/modules/custom-fields/utils/generate-entity.d.ts +13 -0
- package/.medusa/server/src/modules/custom-fields/utils/generate-entity.js +111 -0
- package/.medusa/server/src/modules/payout/index.d.ts +49 -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/migrations/Migration20260317000000.d.ts +5 -0
- package/.medusa/server/src/modules/payout/migrations/Migration20260317000000.js +26 -0
- package/.medusa/server/src/modules/payout/migrations/Migration20260323170925.d.ts +5 -0
- package/.medusa/server/src/modules/payout/migrations/Migration20260323170925.js +24 -0
- package/.medusa/server/src/modules/payout/models/index.d.ts +3 -0
- package/.medusa/server/src/modules/payout/models/index.js +10 -0
- package/.medusa/server/src/modules/payout/models/onboarding.d.ts +21 -0
- package/.medusa/server/src/modules/payout/models/onboarding.js +14 -0
- package/.medusa/server/src/modules/payout/models/payout-account.d.ts +27 -0
- package/.medusa/server/src/modules/payout/models/payout-account.js +20 -0
- package/.medusa/server/src/modules/payout/models/payout.d.ts +27 -0
- package/.medusa/server/src/modules/payout/models/payout.js +18 -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 +106 -0
- package/.medusa/server/src/modules/payout/services/payout-module-service.js +156 -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/seller/index.d.ts +119 -0
- package/.medusa/server/src/modules/seller/index.js +14 -0
- package/.medusa/server/src/modules/seller/loaders/register-feature-flags.d.ts +8 -0
- package/.medusa/server/src/modules/seller/loaders/register-feature-flags.js +18 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260324104737.d.ts +5 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260324104737.js +67 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260330093053.d.ts +5 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260330093053.js +16 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260331113435.d.ts +5 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260331113435.js +15 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260401093720.d.ts +5 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260401093720.js +16 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260410120000.d.ts +5 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260410120000.js +16 -0
- package/.medusa/server/src/modules/seller/models/address.d.ts +71 -0
- package/.medusa/server/src/modules/seller/models/address.js +26 -0
- package/.medusa/server/src/modules/seller/models/index.d.ts +8 -0
- package/.medusa/server/src/modules/seller/models/index.js +23 -0
- package/.medusa/server/src/modules/seller/models/member-invite.d.ts +71 -0
- package/.medusa/server/src/modules/seller/models/member-invite.js +33 -0
- package/.medusa/server/src/modules/seller/models/member.d.ts +71 -0
- package/.medusa/server/src/modules/seller/models/member.js +29 -0
- package/.medusa/server/src/modules/seller/models/order-group.d.ts +9 -0
- package/.medusa/server/src/modules/seller/models/order-group.js +13 -0
- package/.medusa/server/src/modules/seller/models/payment-details.d.ts +71 -0
- package/.medusa/server/src/modules/seller/models/payment-details.js +22 -0
- package/.medusa/server/src/modules/seller/models/professional-details.d.ts +71 -0
- package/.medusa/server/src/modules/seller/models/professional-details.js +18 -0
- package/.medusa/server/src/modules/seller/models/seller-member.d.ts +147 -0
- package/.medusa/server/src/modules/seller/models/seller-member.js +29 -0
- package/.medusa/server/src/modules/seller/models/seller.d.ts +72 -0
- package/.medusa/server/src/modules/seller/models/seller.js +83 -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 +18 -0
- package/.medusa/server/src/modules/seller/repositories/order-group.js +179 -0
- package/.medusa/server/src/modules/seller/service.d.ts +603 -0
- package/.medusa/server/src/modules/seller/service.js +252 -0
- package/.medusa/server/src/modules/subscription/index.d.ts +35 -0
- package/.medusa/server/src/modules/subscription/index.js +12 -0
- package/.medusa/server/src/modules/subscription/migrations/Migration20260324135903.d.ts +5 -0
- package/.medusa/server/src/modules/subscription/migrations/Migration20260324135903.js +24 -0
- package/.medusa/server/src/modules/subscription/models/index.d.ts +2 -0
- package/.medusa/server/src/modules/subscription/models/index.js +11 -0
- package/.medusa/server/src/modules/subscription/models/subscription-override.d.ts +20 -0
- package/.medusa/server/src/modules/subscription/models/subscription-override.js +36 -0
- package/.medusa/server/src/modules/subscription/models/subscription-plan.d.ts +20 -0
- package/.medusa/server/src/modules/subscription/models/subscription-plan.js +32 -0
- package/.medusa/server/src/modules/subscription/service.d.ts +49 -0
- package/.medusa/server/src/modules/subscription/service.js +17 -0
- package/.medusa/server/src/modules/vendor-product-attribute/index.d.ts +23 -0
- package/.medusa/server/src/modules/vendor-product-attribute/index.js +15 -0
- package/.medusa/server/src/modules/vendor-product-attribute/migrations/Migration20260325000000.d.ts +5 -0
- package/.medusa/server/src/modules/vendor-product-attribute/migrations/Migration20260325000000.js +16 -0
- package/.medusa/server/src/modules/vendor-product-attribute/models/vendor-product-attribute.d.ts +11 -0
- package/.medusa/server/src/modules/vendor-product-attribute/models/vendor-product-attribute.js +24 -0
- package/.medusa/server/src/modules/vendor-product-attribute/service.d.ts +14 -0
- package/.medusa/server/src/modules/vendor-product-attribute/service.js +13 -0
- package/.medusa/server/src/modules/vendor-ui/index.d.ts +5 -0
- package/.medusa/server/src/modules/vendor-ui/index.js +12 -0
- package/.medusa/server/src/modules/vendor-ui/services/vendor-ui-module-service.d.ts +6 -0
- package/.medusa/server/src/modules/vendor-ui/services/vendor-ui-module-service.js +14 -0
- package/.medusa/server/src/policies/seller.d.ts +1 -0
- package/.medusa/server/src/policies/seller.js +22 -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/types/seller-context.d.ts +11 -0
- package/.medusa/server/src/types/seller-context.js +3 -0
- package/.medusa/server/src/utils/dashboard/dashboard-base.d.ts +31 -0
- package/.medusa/server/src/utils/dashboard/dashboard-base.js +141 -0
- package/.medusa/server/src/with-mercur.d.ts +11 -0
- package/.medusa/server/src/with-mercur.js +44 -0
- package/.medusa/server/src/workflows/attribute/index.d.ts +2 -0
- package/.medusa/server/src/workflows/attribute/index.js +19 -0
- package/.medusa/server/src/workflows/attribute/steps/create-attribute-possible-values.d.ts +40 -0
- package/.medusa/server/src/workflows/attribute/steps/create-attribute-possible-values.js +18 -0
- package/.medusa/server/src/workflows/attribute/steps/create-attributes.d.ts +5 -0
- package/.medusa/server/src/workflows/attribute/steps/create-attributes.js +32 -0
- package/.medusa/server/src/workflows/attribute/steps/delete-attribute.d.ts +6 -0
- package/.medusa/server/src/workflows/attribute/steps/delete-attribute.js +31 -0
- package/.medusa/server/src/workflows/attribute/steps/index.d.ts +7 -0
- package/.medusa/server/src/workflows/attribute/steps/index.js +24 -0
- package/.medusa/server/src/workflows/attribute/steps/update-attribute-possible-value.d.ts +39 -0
- package/.medusa/server/src/workflows/attribute/steps/update-attribute-possible-value.js +18 -0
- package/.medusa/server/src/workflows/attribute/steps/update-attributes.d.ts +21 -0
- package/.medusa/server/src/workflows/attribute/steps/update-attributes.js +37 -0
- package/.medusa/server/src/workflows/attribute/steps/validate-attribute-delete.d.ts +6 -0
- package/.medusa/server/src/workflows/attribute/steps/validate-attribute-delete.js +50 -0
- package/.medusa/server/src/workflows/attribute/steps/validate-possible-values-removal.d.ts +7 -0
- package/.medusa/server/src/workflows/attribute/steps/validate-possible-values-removal.js +70 -0
- package/.medusa/server/src/workflows/attribute/workflows/create-attribute-possible-values.d.ts +39 -0
- package/.medusa/server/src/workflows/attribute/workflows/create-attribute-possible-values.js +11 -0
- package/.medusa/server/src/workflows/attribute/workflows/create-attributes.d.ts +7 -0
- package/.medusa/server/src/workflows/attribute/workflows/create-attributes.js +40 -0
- package/.medusa/server/src/workflows/attribute/workflows/delete-attribute.d.ts +6 -0
- package/.medusa/server/src/workflows/attribute/workflows/delete-attribute.js +11 -0
- package/.medusa/server/src/workflows/attribute/workflows/index.d.ts +5 -0
- package/.medusa/server/src/workflows/attribute/workflows/index.js +22 -0
- package/.medusa/server/src/workflows/attribute/workflows/update-attribute-possible-value.d.ts +39 -0
- package/.medusa/server/src/workflows/attribute/workflows/update-attribute-possible-value.js +11 -0
- package/.medusa/server/src/workflows/attribute/workflows/update-attributes.d.ts +24 -0
- package/.medusa/server/src/workflows/attribute/workflows/update-attributes.js +69 -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/custom-fields/index.d.ts +1 -0
- package/.medusa/server/src/workflows/custom-fields/index.js +18 -0
- package/.medusa/server/src/workflows/custom-fields/steps/delete-custom-fields.d.ts +6 -0
- package/.medusa/server/src/workflows/custom-fields/steps/delete-custom-fields.js +11 -0
- package/.medusa/server/src/workflows/custom-fields/steps/index.d.ts +2 -0
- package/.medusa/server/src/workflows/custom-fields/steps/index.js +19 -0
- package/.medusa/server/src/workflows/custom-fields/steps/upsert-custom-fields.d.ts +15 -0
- package/.medusa/server/src/workflows/custom-fields/steps/upsert-custom-fields.js +11 -0
- package/.medusa/server/src/workflows/events.d.ts +36 -0
- package/.medusa/server/src/workflows/events.js +40 -0
- package/.medusa/server/src/workflows/hooks/product-created.d.ts +1 -0
- package/.medusa/server/src/workflows/hooks/product-created.js +75 -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 +15 -0
- package/.medusa/server/src/workflows/index.js +32 -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 +3 -0
- package/.medusa/server/src/workflows/order-group/index.js +20 -0
- package/.medusa/server/src/workflows/order-group/steps/create-order-group.d.ts +12 -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/order-group/utils/aggregate-status.d.ts +3 -0
- package/.medusa/server/src/workflows/order-group/utils/aggregate-status.js +141 -0
- package/.medusa/server/src/workflows/order-group/workflows/get-order-group-detail.d.ts +6 -0
- package/.medusa/server/src/workflows/order-group/workflows/get-order-group-detail.js +61 -0
- package/.medusa/server/src/workflows/order-group/workflows/get-order-groups-list.d.ts +10 -0
- package/.medusa/server/src/workflows/order-group/workflows/get-order-groups-list.js +67 -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/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 +35 -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 +35 -0
- package/.medusa/server/src/workflows/payout/steps/update-payout.js +27 -0
- package/.medusa/server/src/workflows/payout/steps/validate-seller-payout-account.d.ts +5 -0
- package/.medusa/server/src/workflows/payout/steps/validate-seller-payout-account.js +21 -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 +28 -0
- package/.medusa/server/src/workflows/payout/workflows/create-payout.d.ts +6 -0
- package/.medusa/server/src/workflows/payout/workflows/create-payout.js +70 -0
- package/.medusa/server/src/workflows/payout/workflows/index.d.ts +4 -0
- package/.medusa/server/src/workflows/payout/workflows/index.js +21 -0
- package/.medusa/server/src/workflows/payout/workflows/process-payout-for-webhook.d.ts +5 -0
- package/.medusa/server/src/workflows/payout/workflows/process-payout-for-webhook.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/product-attribute/steps/create-attribute-value.d.ts +39 -0
- package/.medusa/server/src/workflows/product-attribute/steps/create-attribute-value.js +21 -0
- package/.medusa/server/src/workflows/product-attribute/steps/create-attribute-values.d.ts +12 -0
- package/.medusa/server/src/workflows/product-attribute/steps/create-attribute-values.js +24 -0
- package/.medusa/server/src/workflows/product-attribute/steps/create-vendor-product-attribute.d.ts +14 -0
- package/.medusa/server/src/workflows/product-attribute/steps/create-vendor-product-attribute.js +18 -0
- package/.medusa/server/src/workflows/product-attribute/steps/delete-attribute-value.d.ts +2 -0
- package/.medusa/server/src/workflows/product-attribute/steps/delete-attribute-value.js +18 -0
- package/.medusa/server/src/workflows/product-attribute/steps/index.d.ts +7 -0
- package/.medusa/server/src/workflows/product-attribute/steps/index.js +24 -0
- package/.medusa/server/src/workflows/product-attribute/steps/restore-variant-image-associations.d.ts +10 -0
- package/.medusa/server/src/workflows/product-attribute/steps/restore-variant-image-associations.js +49 -0
- package/.medusa/server/src/workflows/product-attribute/steps/save-variant-image-associations.d.ts +8 -0
- package/.medusa/server/src/workflows/product-attribute/steps/save-variant-image-associations.js +29 -0
- package/.medusa/server/src/workflows/product-attribute/steps/validate-attribute-value.d.ts +3 -0
- package/.medusa/server/src/workflows/product-attribute/steps/validate-attribute-value.js +59 -0
- package/.medusa/server/src/workflows/product-attribute/utils/find-or-create-vendor-attribute.d.ts +13 -0
- package/.medusa/server/src/workflows/product-attribute/utils/find-or-create-vendor-attribute.js +56 -0
- package/.medusa/server/src/workflows/product-attribute/utils/get-applicable-attributes.d.ts +2 -0
- package/.medusa/server/src/workflows/product-attribute/utils/get-applicable-attributes.js +58 -0
- package/.medusa/server/src/workflows/product-attribute/utils/products-created-handler.d.ts +8 -0
- package/.medusa/server/src/workflows/product-attribute/utils/products-created-handler.js +100 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/convert-attribute-to-option.d.ts +3 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/convert-attribute-to-option.js +46 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/convert-option-to-attribute.d.ts +3 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/convert-option-to-attribute.js +29 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/create-and-link-attribute-values.d.ts +16 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/create-and-link-attribute-values.js +72 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/create-attribute-value.d.ts +39 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/create-attribute-value.js +35 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/create-vendor-product-attribute.d.ts +24 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/create-vendor-product-attribute.js +42 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/delete-attribute-value.d.ts +3 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/delete-attribute-value.js +59 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/index.d.ts +8 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/index.js +25 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/sync-product-attribute-values.d.ts +20 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/sync-product-attribute-values.js +67 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/update-product-with-variant-images.d.ts +11 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/update-product-with-variant-images.js +34 -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-member-invites.d.ts +8 -0
- package/.medusa/server/src/workflows/seller/steps/create-member-invites.js +17 -0
- package/.medusa/server/src/workflows/seller/steps/create-seller-default-roles.d.ts +2 -0
- package/.medusa/server/src/workflows/seller/steps/create-seller-default-roles.js +88 -0
- package/.medusa/server/src/workflows/seller/steps/create-seller-member.d.ts +200 -0
- package/.medusa/server/src/workflows/seller/steps/create-seller-member.js +17 -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/delete-member-invite.d.ts +1 -0
- package/.medusa/server/src/workflows/seller/steps/delete-member-invite.js +11 -0
- package/.medusa/server/src/workflows/seller/steps/delete-seller-member.d.ts +1 -0
- package/.medusa/server/src/workflows/seller/steps/delete-seller-member.js +11 -0
- package/.medusa/server/src/workflows/seller/steps/delete-seller-professional-details.d.ts +3 -0
- package/.medusa/server/src/workflows/seller/steps/delete-seller-professional-details.js +28 -0
- package/.medusa/server/src/workflows/seller/steps/delete-seller.d.ts +1 -0
- package/.medusa/server/src/workflows/seller/steps/delete-seller.js +17 -0
- package/.medusa/server/src/workflows/seller/steps/index.d.ts +23 -0
- package/.medusa/server/src/workflows/seller/steps/index.js +40 -0
- package/.medusa/server/src/workflows/seller/steps/send-invitation-email.d.ts +6 -0
- package/.medusa/server/src/workflows/seller/steps/send-invitation-email.js +62 -0
- package/.medusa/server/src/workflows/seller/steps/update-payment-details.d.ts +5 -0
- package/.medusa/server/src/workflows/seller/steps/update-payment-details.js +36 -0
- package/.medusa/server/src/workflows/seller/steps/update-seller-address.d.ts +5 -0
- package/.medusa/server/src/workflows/seller/steps/update-seller-address.js +36 -0
- package/.medusa/server/src/workflows/seller/steps/update-seller-member.d.ts +200 -0
- package/.medusa/server/src/workflows/seller/steps/update-seller-member.js +19 -0
- package/.medusa/server/src/workflows/seller/steps/update-seller-professional-details.d.ts +5 -0
- package/.medusa/server/src/workflows/seller/steps/update-seller-professional-details.js +36 -0
- package/.medusa/server/src/workflows/seller/steps/update-seller.d.ts +7 -0
- package/.medusa/server/src/workflows/seller/steps/update-seller.js +18 -0
- package/.medusa/server/src/workflows/seller/steps/upsert-member.d.ts +3 -0
- package/.medusa/server/src/workflows/seller/steps/upsert-member.js +11 -0
- package/.medusa/server/src/workflows/seller/steps/validate-approve-seller.d.ts +4 -0
- package/.medusa/server/src/workflows/seller/steps/validate-approve-seller.js +12 -0
- package/.medusa/server/src/workflows/seller/steps/validate-member-invite-token.d.ts +1 -0
- package/.medusa/server/src/workflows/seller/steps/validate-member-invite-token.js +11 -0
- package/.medusa/server/src/workflows/seller/steps/validate-not-owner.d.ts +1 -0
- package/.medusa/server/src/workflows/seller/steps/validate-not-owner.js +14 -0
- package/.medusa/server/src/workflows/seller/steps/validate-remove-seller-member.d.ts +3 -0
- package/.medusa/server/src/workflows/seller/steps/validate-remove-seller-member.js +14 -0
- package/.medusa/server/src/workflows/seller/steps/validate-suspend-seller.d.ts +4 -0
- package/.medusa/server/src/workflows/seller/steps/validate-suspend-seller.js +15 -0
- package/.medusa/server/src/workflows/seller/steps/validate-terminate-seller.d.ts +4 -0
- package/.medusa/server/src/workflows/seller/steps/validate-terminate-seller.js +15 -0
- package/.medusa/server/src/workflows/seller/steps/validate-unsuspend-seller.d.ts +4 -0
- package/.medusa/server/src/workflows/seller/steps/validate-unsuspend-seller.js +12 -0
- package/.medusa/server/src/workflows/seller/steps/validate-unterminate-seller.d.ts +4 -0
- package/.medusa/server/src/workflows/seller/steps/validate-unterminate-seller.js +12 -0
- package/.medusa/server/src/workflows/seller/workflows/accept-member-invite.d.ts +8 -0
- package/.medusa/server/src/workflows/seller/workflows/accept-member-invite.js +32 -0
- package/.medusa/server/src/workflows/seller/workflows/add-seller-member.d.ts +202 -0
- package/.medusa/server/src/workflows/seller/workflows/add-seller-member.js +25 -0
- package/.medusa/server/src/workflows/seller/workflows/approve-seller.d.ts +8 -0
- package/.medusa/server/src/workflows/seller/workflows/approve-seller.js +36 -0
- package/.medusa/server/src/workflows/seller/workflows/create-member-invites.d.ts +8 -0
- package/.medusa/server/src/workflows/seller/workflows/create-member-invites.js +17 -0
- package/.medusa/server/src/workflows/seller/workflows/create-seller-account.d.ts +15 -0
- package/.medusa/server/src/workflows/seller/workflows/create-seller-account.js +72 -0
- package/.medusa/server/src/workflows/seller/workflows/create-seller-defaults.d.ts +2 -0
- package/.medusa/server/src/workflows/seller/workflows/create-seller-defaults.js +11 -0
- package/.medusa/server/src/workflows/seller/workflows/create-sellers.d.ts +3 -0
- package/.medusa/server/src/workflows/seller/workflows/create-sellers.js +31 -0
- package/.medusa/server/src/workflows/seller/workflows/delete-seller-professional-details.d.ts +8 -0
- package/.medusa/server/src/workflows/seller/workflows/delete-seller-professional-details.js +17 -0
- package/.medusa/server/src/workflows/seller/workflows/delete-seller.d.ts +6 -0
- package/.medusa/server/src/workflows/seller/workflows/delete-seller.js +18 -0
- package/.medusa/server/src/workflows/seller/workflows/index.d.ts +20 -0
- package/.medusa/server/src/workflows/seller/workflows/index.js +37 -0
- package/.medusa/server/src/workflows/seller/workflows/invite-seller.d.ts +6 -0
- package/.medusa/server/src/workflows/seller/workflows/invite-seller.js +10 -0
- package/.medusa/server/src/workflows/seller/workflows/remove-seller-member.d.ts +7 -0
- package/.medusa/server/src/workflows/seller/workflows/remove-seller-member.js +21 -0
- package/.medusa/server/src/workflows/seller/workflows/suspend-seller.d.ts +9 -0
- package/.medusa/server/src/workflows/seller/workflows/suspend-seller.js +36 -0
- package/.medusa/server/src/workflows/seller/workflows/terminate-seller.d.ts +9 -0
- package/.medusa/server/src/workflows/seller/workflows/terminate-seller.js +36 -0
- package/.medusa/server/src/workflows/seller/workflows/unsuspend-seller.d.ts +8 -0
- package/.medusa/server/src/workflows/seller/workflows/unsuspend-seller.js +36 -0
- package/.medusa/server/src/workflows/seller/workflows/unterminate-seller.d.ts +8 -0
- package/.medusa/server/src/workflows/seller/workflows/unterminate-seller.js +36 -0
- package/.medusa/server/src/workflows/seller/workflows/update-member-role.d.ts +7 -0
- package/.medusa/server/src/workflows/seller/workflows/update-member-role.js +22 -0
- package/.medusa/server/src/workflows/seller/workflows/update-seller-address.d.ts +3 -0
- package/.medusa/server/src/workflows/seller/workflows/update-seller-address.js +17 -0
- package/.medusa/server/src/workflows/seller/workflows/update-seller-payment-details.d.ts +3 -0
- package/.medusa/server/src/workflows/seller/workflows/update-seller-payment-details.js +17 -0
- package/.medusa/server/src/workflows/seller/workflows/update-seller-professional-details.d.ts +3 -0
- package/.medusa/server/src/workflows/seller/workflows/update-seller-professional-details.js +17 -0
- package/.medusa/server/src/workflows/seller/workflows/update-seller.d.ts +3 -0
- package/.medusa/server/src/workflows/seller/workflows/update-seller.js +22 -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 +9 -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/.medusa/server/src/workflows/subscription/index.d.ts +2 -0
- package/.medusa/server/src/workflows/subscription/index.js +19 -0
- package/.medusa/server/src/workflows/subscription/steps/create-subscription-overrides.d.ts +31 -0
- package/.medusa/server/src/workflows/subscription/steps/create-subscription-overrides.js +17 -0
- package/.medusa/server/src/workflows/subscription/steps/create-subscription-plans.d.ts +31 -0
- package/.medusa/server/src/workflows/subscription/steps/create-subscription-plans.js +17 -0
- package/.medusa/server/src/workflows/subscription/steps/delete-subscription-overrides.d.ts +2 -0
- package/.medusa/server/src/workflows/subscription/steps/delete-subscription-overrides.js +17 -0
- package/.medusa/server/src/workflows/subscription/steps/delete-subscription-plans.d.ts +2 -0
- package/.medusa/server/src/workflows/subscription/steps/delete-subscription-plans.js +17 -0
- package/.medusa/server/src/workflows/subscription/steps/index.d.ts +6 -0
- package/.medusa/server/src/workflows/subscription/steps/index.js +23 -0
- package/.medusa/server/src/workflows/subscription/steps/update-subscription-overrides.d.ts +31 -0
- package/.medusa/server/src/workflows/subscription/steps/update-subscription-overrides.js +17 -0
- package/.medusa/server/src/workflows/subscription/steps/update-subscription-plans.d.ts +31 -0
- package/.medusa/server/src/workflows/subscription/steps/update-subscription-plans.js +17 -0
- package/.medusa/server/src/workflows/subscription/workflows/create-subscription-overrides.d.ts +31 -0
- package/.medusa/server/src/workflows/subscription/workflows/create-subscription-overrides.js +11 -0
- package/.medusa/server/src/workflows/subscription/workflows/create-subscription-plans.d.ts +31 -0
- package/.medusa/server/src/workflows/subscription/workflows/create-subscription-plans.js +11 -0
- package/.medusa/server/src/workflows/subscription/workflows/delete-subscription-overrides.d.ts +5 -0
- package/.medusa/server/src/workflows/subscription/workflows/delete-subscription-overrides.js +11 -0
- package/.medusa/server/src/workflows/subscription/workflows/delete-subscription-plans.d.ts +5 -0
- package/.medusa/server/src/workflows/subscription/workflows/delete-subscription-plans.js +11 -0
- package/.medusa/server/src/workflows/subscription/workflows/index.d.ts +6 -0
- package/.medusa/server/src/workflows/subscription/workflows/index.js +23 -0
- package/.medusa/server/src/workflows/subscription/workflows/update-subscription-overrides.d.ts +31 -0
- package/.medusa/server/src/workflows/subscription/workflows/update-subscription-overrides.js +11 -0
- package/.medusa/server/src/workflows/subscription/workflows/update-subscription-plans.d.ts +31 -0
- package/.medusa/server/src/workflows/subscription/workflows/update-subscription-plans.js +11 -0
- package/package.json +98 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./steps"), exports);
|
|
18
|
+
__exportStar(require("./workflows"), exports);
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL2NhbXBhaWduL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSwwQ0FBdUI7QUFDdkIsOENBQTJCIn0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./link-seller-campaign";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./link-seller-campaign"), exports);
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL2NhbXBhaWduL3N0ZXBzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSx5REFBc0MifQ==
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.linkSellerCampaignStep = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
6
|
+
const types_1 = require("@mercurjs/types");
|
|
7
|
+
exports.linkSellerCampaignStep = (0, workflows_sdk_1.createStep)("link-seller-campaign", async (input, { container }) => {
|
|
8
|
+
const remoteLink = container.resolve(utils_1.ContainerRegistrationKeys.LINK);
|
|
9
|
+
const links = input.campaign_ids.map((campaignId) => ({
|
|
10
|
+
[utils_1.Modules.PROMOTION]: {
|
|
11
|
+
campaign_id: campaignId,
|
|
12
|
+
},
|
|
13
|
+
[types_1.MercurModules.SELLER]: {
|
|
14
|
+
seller_id: input.seller_id,
|
|
15
|
+
},
|
|
16
|
+
}));
|
|
17
|
+
await remoteLink.create(links);
|
|
18
|
+
return new workflows_sdk_1.StepResponse(undefined, {
|
|
19
|
+
seller_id: input.seller_id,
|
|
20
|
+
campaign_ids: input.campaign_ids,
|
|
21
|
+
});
|
|
22
|
+
}, async (data, { container }) => {
|
|
23
|
+
if (!data)
|
|
24
|
+
return;
|
|
25
|
+
const remoteLink = container.resolve(utils_1.ContainerRegistrationKeys.REMOTE_LINK);
|
|
26
|
+
const links = data.campaign_ids.map((campaignId) => ({
|
|
27
|
+
[utils_1.Modules.PROMOTION]: {
|
|
28
|
+
campaign_id: campaignId,
|
|
29
|
+
},
|
|
30
|
+
[types_1.MercurModules.SELLER]: {
|
|
31
|
+
seller_id: data.seller_id,
|
|
32
|
+
},
|
|
33
|
+
}));
|
|
34
|
+
await remoteLink.dismiss(links);
|
|
35
|
+
});
|
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGluay1zZWxsZXItY2FtcGFpZ24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL2NhbXBhaWduL3N0ZXBzL2xpbmstc2VsbGVyLWNhbXBhaWduLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFFQUE0RTtBQUM1RSxxREFBOEU7QUFFOUUsMkNBQStDO0FBT2xDLFFBQUEsc0JBQXNCLEdBQUcsSUFBQSwwQkFBVSxFQUM5QyxzQkFBc0IsRUFDdEIsS0FBSyxFQUFFLEtBQWtDLEVBQUUsRUFBRSxTQUFTLEVBQUUsRUFBRSxFQUFFO0lBQzFELE1BQU0sVUFBVSxHQUFTLFNBQVMsQ0FBQyxPQUFPLENBQUMsaUNBQXlCLENBQUMsSUFBSSxDQUFDLENBQUE7SUFFMUUsTUFBTSxLQUFLLEdBQUcsS0FBSyxDQUFDLFlBQVksQ0FBQyxHQUFHLENBQUMsQ0FBQyxVQUFVLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDcEQsQ0FB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@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CreateCampaignDTO } from "@medusajs/framework/types";
|
|
2
|
+
type CreateSellerCampaignsWorkflowInput = {
|
|
3
|
+
campaigns: CreateCampaignDTO[];
|
|
4
|
+
seller_id: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const createSellerCampaignsWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<CreateSellerCampaignsWorkflowInput, import("@medusajs/framework/types").CampaignDTO[], []>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createSellerCampaignsWorkflow = void 0;
|
|
4
|
+
const core_flows_1 = require("@medusajs/core-flows");
|
|
5
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
6
|
+
const steps_1 = require("../steps");
|
|
7
|
+
exports.createSellerCampaignsWorkflow = (0, workflows_sdk_1.createWorkflow)("create-seller-campaigns", function (input) {
|
|
8
|
+
const createdCampaigns = core_flows_1.createCampaignsWorkflow.runAsStep({
|
|
9
|
+
input: {
|
|
10
|
+
campaignsData: input.campaigns,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
const campaignIds = (0, workflows_sdk_1.transform)(createdCampaigns, (campaigns) => campaigns.map((c) => c.id));
|
|
14
|
+
(0, steps_1.linkSellerCampaignStep)({
|
|
15
|
+
seller_id: input.seller_id,
|
|
16
|
+
campaign_ids: campaignIds,
|
|
17
|
+
});
|
|
18
|
+
return new workflows_sdk_1.WorkflowResponse(createdCampaigns);
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLXNlbGxlci1jYW1wYWlnbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL2NhbXBhaWduL3dvcmtmbG93cy9jcmVhdGUtc2VsbGVyLWNhbXBhaWducy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxxREFBOEQ7QUFDOUQscUVBSTBDO0FBRzFDLG9DQUFpRDtBQU9wQyxRQUFBLDZCQUE2QixHQUFHLElBQUEsOEJBQWMsRUFDekQseUJBQXlCLEVBQ3pCLFVBQVUsS0FBeUM7SUFDakQsTUFBTSxnQkFBZ0IsR0FBRyxvQ0FBdUIsQ0FBQyxTQUFTLENBQUM7UUFDekQsS0FBSyxFQUFFO1lBQ0wsYUFBYSxFQUFFLEtBQUssQ0FBQyxTQUFTO1NBQy9CO0tBQ0YsQ0FBQyxDQUFBO0lBRUYsTUFBTSxXQUFXLEdBQUcsSUFBQSx5QkFBUyxFQUMzQixnQkFBZ0IsRUFDaEIsQ0FBQyxTQUFTLEVBQUUsRUFBRSxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FDMUMsQ0FBQTtJQUVELElBQUEsOEJBQXNCLEVBQUM7UUFDckIsU0FBUyxFQUFFLEtBQUssQ0FBQyxTQUFTO1FBQzFCLFlBQVksRUFBRSxXQUFXO0tBQzFCLENBQUMsQ0FBQTtJQUVGLE9BQU8sSUFBSSxnQ0FBZ0IsQ0FBQyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQy9DLENBQUMsQ0FDRixDQUFBIn0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./create-seller-campaigns";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./create-seller-campaigns"), exports);
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL2NhbXBhaWduL3dvcmtmbG93cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsNERBQXlDIn0=
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./steps"), exports);
|
|
18
|
+
__exportStar(require("./workflows"), exports);
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL2NhcnQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDBDQUF1QjtBQUN2Qiw4Q0FBMkIifQ==
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./validate-seller-cart-items"), exports);
|
|
18
|
+
__exportStar(require("./validate-seller-cart-shipping"), exports);
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL2NhcnQvc3RlcHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLCtEQUE0QztBQUM1QyxrRUFBK0MifQ==
|
package/.medusa/server/src/workflows/cart/steps/prepare-adjustments-from-promotion-actions.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComputeActions } from "@medusajs/framework/types";
|
|
2
|
+
import { PrepareAdjustmentsFromPromotionActionsStepOutput } from "@medusajs/medusa/core-flows";
|
|
3
|
+
export interface PrepareSellerAdjustmentsFromPromotionActionsStepInput {
|
|
4
|
+
actions: ComputeActions[];
|
|
5
|
+
}
|
|
6
|
+
export declare const prepareSellerAdjustmentsFromPromotionActionsStep: import("@medusajs/framework/workflows-sdk").StepFunction<PrepareSellerAdjustmentsFromPromotionActionsStepInput, PrepareAdjustmentsFromPromotionActionsStepOutput>;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prepareSellerAdjustmentsFromPromotionActionsStep = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
6
|
+
exports.prepareSellerAdjustmentsFromPromotionActionsStep = (0, workflows_sdk_1.createStep)("prepare-seller-adjustments-from-promotion-actions", async (data, { container }) => {
|
|
7
|
+
const query = container.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
8
|
+
const { actions = [] } = data;
|
|
9
|
+
if (!actions.length) {
|
|
10
|
+
return new workflows_sdk_1.StepResponse({
|
|
11
|
+
lineItemAdjustmentsToCreate: [],
|
|
12
|
+
lineItemAdjustmentIdsToRemove: [],
|
|
13
|
+
shippingMethodAdjustmentsToCreate: [],
|
|
14
|
+
shippingMethodAdjustmentIdsToRemove: [],
|
|
15
|
+
computedPromotionCodes: [],
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
const [{ data: promotions }, { data: lineItems }, { data: shippingMethods }] = await (0, utils_1.promiseAll)([query.graph({
|
|
19
|
+
entity: "promotion",
|
|
20
|
+
fields: ["id", "code", 'seller.id'],
|
|
21
|
+
filters: { code: actions.map((a) => a.code) },
|
|
22
|
+
}, { cache: { enable: true } }), query.graph({
|
|
23
|
+
entity: "line_item",
|
|
24
|
+
fields: ['id', 'variant.id', 'variant.product.id', 'variant.product.seller.id'],
|
|
25
|
+
filters: { id: actions.filter((a) => a.action === utils_1.ComputedActions.ADD_ITEM_ADJUSTMENT).map((a) => a.item_id) },
|
|
26
|
+
}, { cache: { enable: true } }), query.graph({
|
|
27
|
+
entity: "shipping_method",
|
|
28
|
+
fields: ['id', 'shipping_option_id'],
|
|
29
|
+
filters: { id: actions.filter((a) => a.action === utils_1.ComputedActions.ADD_SHIPPING_METHOD_ADJUSTMENT).map((a) => a.shipping_method_id) },
|
|
30
|
+
}, { cache: { enable: true } })]);
|
|
31
|
+
const { data: shippingOptions } = await query.graph({
|
|
32
|
+
entity: "shipping_option",
|
|
33
|
+
fields: ['id', 'seller.id'],
|
|
34
|
+
filters: { id: shippingMethods.map((sm) => sm.shipping_option_id) },
|
|
35
|
+
}, { cache: { enable: true } });
|
|
36
|
+
const promotionsMap = new Map(promotions.map((promotion) => [promotion.code, promotion]));
|
|
37
|
+
const shippingMethodsMap = new Map(shippingMethods.map((shippingMethod) => [shippingMethod.id, shippingMethod]));
|
|
38
|
+
const shippingOptionsMap = new Map(shippingOptions.map((shippingOption) => [shippingOption.id, shippingOption]));
|
|
39
|
+
const lineItemsMap = new Map(lineItems.map((lineItem) => [lineItem.id, lineItem]));
|
|
40
|
+
const lineItemAdjustmentsToCreate = [];
|
|
41
|
+
const lineItemAdjustmentIdsToRemove = [];
|
|
42
|
+
const shippingMethodAdjustmentsToCreate = [];
|
|
43
|
+
const shippingMethodAdjustmentIdsToRemove = [];
|
|
44
|
+
for (const action of actions) {
|
|
45
|
+
switch (action.action) {
|
|
46
|
+
case utils_1.ComputedActions.ADD_ITEM_ADJUSTMENT:
|
|
47
|
+
const itemAction = action;
|
|
48
|
+
const promotion = promotionsMap.get(itemAction.code);
|
|
49
|
+
const lineItem = lineItemsMap.get(itemAction.item_id);
|
|
50
|
+
if (promotion && lineItem) {
|
|
51
|
+
const promotionSellerId = promotion.seller?.id;
|
|
52
|
+
const itemSellerId = lineItem.variant?.product?.seller?.id;
|
|
53
|
+
// If promotion has no seller, add adjustment for all items
|
|
54
|
+
// If promotion has a seller, only add if it matches the item's seller
|
|
55
|
+
if (!promotionSellerId || promotionSellerId === itemSellerId) {
|
|
56
|
+
lineItemAdjustmentsToCreate.push({
|
|
57
|
+
code: action.code,
|
|
58
|
+
amount: itemAction.amount,
|
|
59
|
+
is_tax_inclusive: itemAction.is_tax_inclusive,
|
|
60
|
+
item_id: itemAction.item_id,
|
|
61
|
+
promotion_id: promotion.id,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
break;
|
|
66
|
+
case utils_1.ComputedActions.REMOVE_ITEM_ADJUSTMENT:
|
|
67
|
+
lineItemAdjustmentIdsToRemove.push(action.adjustment_id);
|
|
68
|
+
break;
|
|
69
|
+
case utils_1.ComputedActions.ADD_SHIPPING_METHOD_ADJUSTMENT:
|
|
70
|
+
const shippingAction = action;
|
|
71
|
+
const shippingMethod = shippingMethodsMap.get(shippingAction.shipping_method_id);
|
|
72
|
+
const shippingOption = shippingOptionsMap.get(shippingMethod?.shipping_option_id);
|
|
73
|
+
const shippingPromotion = promotionsMap.get(action.code);
|
|
74
|
+
if (shippingMethod && shippingPromotion) {
|
|
75
|
+
const promotionSellerId = shippingPromotion.seller?.id;
|
|
76
|
+
const shippingMethodSellerId = shippingOption?.seller?.id;
|
|
77
|
+
// If promotion has no seller, add adjustment for all shipping methods
|
|
78
|
+
// If promotion has a seller, only add if it matches the shipping method's seller
|
|
79
|
+
if (!promotionSellerId || promotionSellerId === shippingMethodSellerId) {
|
|
80
|
+
shippingMethodAdjustmentsToCreate.push({
|
|
81
|
+
code: action.code,
|
|
82
|
+
amount: shippingAction.amount,
|
|
83
|
+
shipping_method_id: shippingAction.shipping_method_id,
|
|
84
|
+
promotion_id: shippingPromotion.id,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
break;
|
|
89
|
+
case utils_1.ComputedActions.REMOVE_SHIPPING_METHOD_ADJUSTMENT:
|
|
90
|
+
shippingMethodAdjustmentIdsToRemove.push(action.adjustment_id);
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
const computedPromotionCodes = [
|
|
95
|
+
...lineItemAdjustmentsToCreate,
|
|
96
|
+
...shippingMethodAdjustmentsToCreate,
|
|
97
|
+
].map((adjustment) => adjustment.code);
|
|
98
|
+
return new workflows_sdk_1.StepResponse({
|
|
99
|
+
lineItemAdjustmentsToCreate,
|
|
100
|
+
lineItemAdjustmentIdsToRemove,
|
|
101
|
+
shippingMethodAdjustmentsToCreate,
|
|
102
|
+
shippingMethodAdjustmentIdsToRemove,
|
|
103
|
+
computedPromotionCodes,
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlcGFyZS1hZGp1c3RtZW50cy1mcm9tLXByb21vdGlvbi1hY3Rpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3dvcmtmbG93cy9jYXJ0L3N0ZXBzL3ByZXBhcmUtYWRqdXN0bWVudHMtZnJvbS1wcm9tb3Rpb24tYWN0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmd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QyxDQUFDLElBQUksQ0FBQzs0QkFDbkMsSUFBSSxFQUFFLE1BQU0sQ0FBQyxJQUFJOzRCQUNqQixNQUFNLEVBQUUsY0FBYyxDQUFDLE1BQWdCOzRCQUN2QyxrQkFBa0IsRUFBRSxjQUFjLENBQUMsa0JBQWtCOzRCQUNyRCxZQUFZLEVBQUUsaUJBQWlCLENBQUMsRUFBRTt5QkFDckMsQ0FBQyxDQUFBO29CQUNOLENBQUM7Z0JBQ0wsQ0FBQztnQkFDRCxNQUFLO1lBQ1QsS0FBSyx1QkFBZSxDQUFDLGlDQUFpQztnQkFDbEQsbUNBQW1DLENBQUMsSUFBSSxDQUNuQyxNQUF5QyxDQUFDLGFBQWEsQ0FDM0QsQ0FBQTtnQkFDRCxNQUFLO1FBQ2IsQ0FBQztJQUNMLENBQUM7SUFFRCxNQUFNLHNCQUFzQixHQUFHO1FBQzNCLEdBQUcsMkJBQTJCO1FBQzlCLEdBQUcsaUNBQWlDO0tBQ3ZDLENBQUMsR0FBRyxDQUFDLENBQUMsVUFBVSxFQUFFLEVBQUUsQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLENBQUE7SUFFdEMsT0FBTyxJQUFJLDRCQUFZLENBQUM7UUFDcEIsMkJBQTJCO1FBQzNCLDZCQUE2QjtRQUM3QixpQ0FBaUM7UUFDakMsbUNBQW1DO1FBQ25DLHNCQUFzQjtLQUMyQixDQUFDLENBQUE7QUFDMUQsQ0FBQyxDQUNKLENBQUEifQ==
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CartLineItemDTO, CartWorkflowDTO, ProductDTO, ProductVariantDTO } from "@medusajs/framework/types";
|
|
2
|
+
import { SellerDTO } from "@mercurjs/types";
|
|
3
|
+
type ValidateSellerCartItemsStepInput = {
|
|
4
|
+
cart: Omit<CartWorkflowDTO, "items"> & {
|
|
5
|
+
items: (CartLineItemDTO & {
|
|
6
|
+
variant: ProductVariantDTO & {
|
|
7
|
+
product: ProductDTO & {
|
|
8
|
+
seller: SellerDTO;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
})[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare const validateSellerCartItemsStep: import("@medusajs/framework/workflows-sdk").StepFunction<ValidateSellerCartItemsStepInput, undefined>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateSellerCartItemsStep = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
6
|
+
exports.validateSellerCartItemsStep = (0, workflows_sdk_1.createStep)("validate-seller-cart-items", (input, { container }) => {
|
|
7
|
+
const logger = container.resolve(utils_1.ContainerRegistrationKeys.LOGGER);
|
|
8
|
+
const itemsWithMissingSellers = input.cart.items.filter((item) => {
|
|
9
|
+
return !item.variant.product.seller?.id;
|
|
10
|
+
});
|
|
11
|
+
if (itemsWithMissingSellers.length > 0) {
|
|
12
|
+
logger.warn(`The cart items required to be assigned to a seller but some of them are missing: ${itemsWithMissingSellers.map((item) => item.variant.product_id).join(", ")}`);
|
|
13
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, `The cart items required to be assigned to a seller but some of them are missing`);
|
|
14
|
+
}
|
|
15
|
+
return new workflows_sdk_1.StepResponse(void 0);
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGUtc2VsbGVyLWNhcnQtaXRlbXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL2NhcnQvc3RlcHMvdmFsaWRhdGUtc2VsbGVyLWNhcnQtaXRlbXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ij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from "@medusajs/framework/types";
|
|
2
|
+
import { SellerDTO } from "@mercurjs/types";
|
|
3
|
+
type ValidateSellerCartShippingStepInput = {
|
|
4
|
+
cart: Omit<CartWorkflowDTO, "items"> & {
|
|
5
|
+
items: (CartLineItemDTO & {
|
|
6
|
+
variant: ProductVariantDTO & {
|
|
7
|
+
product: ProductDTO & {
|
|
8
|
+
seller: SellerDTO;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
})[];
|
|
12
|
+
};
|
|
13
|
+
shippingOptions: ShippingOptionDTO & {
|
|
14
|
+
seller: SellerDTO;
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
export declare const validateSellerCartShippingStep: import("@medusajs/framework/workflows-sdk").StepFunction<ValidateSellerCartShippingStepInput, undefined>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateSellerCartShippingStep = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
6
|
+
exports.validateSellerCartShippingStep = (0, workflows_sdk_1.createStep)("validate-seller-shipping", (input) => {
|
|
7
|
+
const { cart, shippingOptions } = input;
|
|
8
|
+
const sellersWithShippingOptions = new Set(shippingOptions.map((so) => so.seller.id));
|
|
9
|
+
const itemsWithMissingShippingOptions = cart.items.filter((item) => {
|
|
10
|
+
const sellerId = item.variant.product.seller.id;
|
|
11
|
+
return item.requires_shipping && !sellersWithShippingOptions.has(sellerId);
|
|
12
|
+
});
|
|
13
|
+
if (itemsWithMissingShippingOptions.length > 0) {
|
|
14
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, "No shipping method selected but the cart contains seller items that require shipping.");
|
|
15
|
+
}
|
|
16
|
+
return new workflows_sdk_1.StepResponse(void 0);
|
|
17
|
+
});
|
|
18
|
+
//#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IsbUJBQVcsQ0FBQyxLQUFLLENBQUMsWUFBWSxFQUM5Qix1RkFBdUYsQ0FDMUYsQ0FBQTtJQUNMLENBQUM7SUFFRCxPQUFPLElBQUksNEJBQVksQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFBO0FBQ25DLENBQUMsQ0FDSixDQUFBIn0=
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cartFieldsForPricingContext = exports.completeCartFields = exports.cartFieldsForRefreshSteps = void 0;
|
|
4
|
+
// Always ensure that cartFieldsForPricingContext is present in cartFieldsForRefreshSteps
|
|
5
|
+
// Always ensure that cartFieldsForCalculateShippingOptionsPrices is present in cartFieldsForRefreshSteps
|
|
6
|
+
exports.cartFieldsForRefreshSteps = [
|
|
7
|
+
"id",
|
|
8
|
+
"email",
|
|
9
|
+
"currency_code",
|
|
10
|
+
"quantity",
|
|
11
|
+
"subtotal",
|
|
12
|
+
"item_total",
|
|
13
|
+
"locale",
|
|
14
|
+
"total",
|
|
15
|
+
"item_subtotal",
|
|
16
|
+
"shipping_subtotal",
|
|
17
|
+
"region_id",
|
|
18
|
+
"metadata",
|
|
19
|
+
"completed_at",
|
|
20
|
+
"sales_channel_id",
|
|
21
|
+
"region.*",
|
|
22
|
+
"items.*",
|
|
23
|
+
"items.product.id",
|
|
24
|
+
"items.product.is_giftcard",
|
|
25
|
+
"items.product.collection_id",
|
|
26
|
+
"items.product.categories.id",
|
|
27
|
+
"items.product.tags.id",
|
|
28
|
+
"items.product.type_id",
|
|
29
|
+
"items.variant.id",
|
|
30
|
+
"items.variant.product.id",
|
|
31
|
+
"items.variant.weight",
|
|
32
|
+
"items.variant.length",
|
|
33
|
+
"items.variant.height",
|
|
34
|
+
"items.variant.width",
|
|
35
|
+
"items.variant.material",
|
|
36
|
+
"items.adjustments.*",
|
|
37
|
+
"items.tax_lines.*",
|
|
38
|
+
"shipping_address.*",
|
|
39
|
+
"shipping_methods.*",
|
|
40
|
+
"shipping_methods.adjustments.*",
|
|
41
|
+
"shipping_methods.tax_lines.*",
|
|
42
|
+
"shipping_methods.shipping_option.shipping_option_type_id",
|
|
43
|
+
"customer.*",
|
|
44
|
+
"customer.groups.*",
|
|
45
|
+
"promotions.id",
|
|
46
|
+
"promotions.code",
|
|
47
|
+
"payment_collection.id",
|
|
48
|
+
"payment_collection.raw_amount",
|
|
49
|
+
"payment_collection.amount",
|
|
50
|
+
"payment_collection.currency_code",
|
|
51
|
+
"payment_collection.payment_sessions.id",
|
|
52
|
+
];
|
|
53
|
+
exports.completeCartFields = [
|
|
54
|
+
"metadata",
|
|
55
|
+
"id",
|
|
56
|
+
"currency_code",
|
|
57
|
+
"email",
|
|
58
|
+
"locale",
|
|
59
|
+
"created_at",
|
|
60
|
+
"updated_at",
|
|
61
|
+
"completed_at",
|
|
62
|
+
"total",
|
|
63
|
+
"subtotal",
|
|
64
|
+
"tax_total",
|
|
65
|
+
"discount_total",
|
|
66
|
+
"discount_tax_total",
|
|
67
|
+
"original_total",
|
|
68
|
+
"original_tax_total",
|
|
69
|
+
"item_total",
|
|
70
|
+
"item_subtotal",
|
|
71
|
+
"item_tax_total",
|
|
72
|
+
"sales_channel_id",
|
|
73
|
+
"original_item_total",
|
|
74
|
+
"original_item_subtotal",
|
|
75
|
+
"original_item_tax_total",
|
|
76
|
+
"shipping_total",
|
|
77
|
+
"shipping_subtotal",
|
|
78
|
+
"shipping_tax_total",
|
|
79
|
+
"original_shipping_tax_total",
|
|
80
|
+
"original_shipping_subtotal",
|
|
81
|
+
"original_shipping_total",
|
|
82
|
+
"raw_total",
|
|
83
|
+
"raw_subtotal",
|
|
84
|
+
"raw_tax_total",
|
|
85
|
+
"raw_discount_total",
|
|
86
|
+
"raw_discount_tax_total",
|
|
87
|
+
"raw_original_total",
|
|
88
|
+
"raw_original_tax_total",
|
|
89
|
+
"raw_item_total",
|
|
90
|
+
"raw_item_subtotal",
|
|
91
|
+
"raw_item_tax_total",
|
|
92
|
+
"raw_sales_channel_id",
|
|
93
|
+
"raw_original_item_total",
|
|
94
|
+
"raw_original_item_subtotal",
|
|
95
|
+
"raw_original_item_tax_total",
|
|
96
|
+
"raw_shipping_total",
|
|
97
|
+
"raw_shipping_subtotal",
|
|
98
|
+
"raw_shipping_tax_total",
|
|
99
|
+
"raw_original_shipping_tax_total",
|
|
100
|
+
"raw_original_shipping_subtotal",
|
|
101
|
+
"raw_original_shipping_total",
|
|
102
|
+
"items.*",
|
|
103
|
+
"items.tax_lines.*",
|
|
104
|
+
"items.adjustments.*",
|
|
105
|
+
"customer.id",
|
|
106
|
+
"customer.email",
|
|
107
|
+
"shipping_methods.*",
|
|
108
|
+
"shipping_methods.tax_lines.*",
|
|
109
|
+
"shipping_methods.adjustments.*",
|
|
110
|
+
"shipping_address.*",
|
|
111
|
+
"billing_address.*",
|
|
112
|
+
"region.*",
|
|
113
|
+
"credit_lines.*",
|
|
114
|
+
"payment_collection.*",
|
|
115
|
+
"payment_collection.payment_sessions.*",
|
|
116
|
+
"promotions.id",
|
|
117
|
+
'promotions.seller.id',
|
|
118
|
+
"items.variant.id",
|
|
119
|
+
"items.variant.product.id",
|
|
120
|
+
"items.variant.product.seller.id",
|
|
121
|
+
"items.variant.product.is_giftcard",
|
|
122
|
+
"items.variant.product.shipping_profile.id",
|
|
123
|
+
"items.variant.manage_inventory",
|
|
124
|
+
"items.variant.allow_backorder",
|
|
125
|
+
"items.variant.inventory_items.inventory_item_id",
|
|
126
|
+
"items.variant.inventory_items.required_quantity",
|
|
127
|
+
"items.variant.inventory_items.inventory.requires_shipping",
|
|
128
|
+
"items.variant.inventory_items.inventory.location_levels.stocked_quantity",
|
|
129
|
+
"items.variant.inventory_items.inventory.location_levels.reserved_quantity",
|
|
130
|
+
"items.variant.inventory_items.inventory.location_levels.raw_stocked_quantity",
|
|
131
|
+
"items.variant.inventory_items.inventory.location_levels.raw_reserved_quantity",
|
|
132
|
+
"items.variant.inventory_items.inventory.location_levels.location_id",
|
|
133
|
+
"items.variant.inventory_items.inventory.location_levels.stock_locations.id",
|
|
134
|
+
"items.variant.inventory_items.inventory.location_levels.stock_locations.name",
|
|
135
|
+
"items.variant.inventory_items.inventory.location_levels.stock_locations.sales_channels.id",
|
|
136
|
+
"items.variant.inventory_items.inventory.location_levels.stock_locations.sales_channels.name",
|
|
137
|
+
];
|
|
138
|
+
exports.cartFieldsForPricingContext = [
|
|
139
|
+
"id",
|
|
140
|
+
"sales_channel_id",
|
|
141
|
+
"currency_code",
|
|
142
|
+
"region_id",
|
|
143
|
+
"shipping_address.city",
|
|
144
|
+
"shipping_address.country_code",
|
|
145
|
+
"shipping_address.province",
|
|
146
|
+
"shipping_address.postal_code",
|
|
147
|
+
"item_total",
|
|
148
|
+
"total",
|
|
149
|
+
"locale",
|
|
150
|
+
"customer.id",
|
|
151
|
+
"email",
|
|
152
|
+
"customer.groups.id",
|
|
153
|
+
];
|
|
154
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmllbGRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3dvcmtmbG93cy9jYXJ0L3V0aWxzL2ZpZWxkcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RkFBeUY7QUFDekYseUdBQXlHO0FBQzVGLFFBQUEseUJBQXlCLEdBQUc7SUFDckMsSUFBSTtJQUNKLE9BQU87SUFDUCxlQUFlO0lBQ2YsVUFBVTtJQUNWLFVBQVU7SUFDVixZQUFZO0lBQ1osUUFBUTtJQUNSLE9BQU87SUFDUCxlQUFlO0lBQ2YsbUJBQW1CO0lBQ25CLFdBQVc7SUFDWCxVQUFVO0lBQ1YsY0FBYztJQUNkLGtCQUFrQjtJQUNsQixVQUFVO0lBQ1YsU0FBUztJQUNULGtCQUFrQjtJQUNsQiwyQkFBMkI7SUFDM0I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UFPO0lBQ1AsUUFBUTtJQUNSLGFBQWE7SUFDYixPQUFPO0lBQ1Asb0JBQW9CO0NBQ3ZCLENBQUEifQ==
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./fields"), exports);
|
|
18
|
+
__exportStar(require("./prepare-line-item-data"), exports);
|
|
19
|
+
__exportStar(require("./prepare-confirm-inventory-input"), exports);
|
|
20
|
+
__exportStar(require("./schemas"), exports);
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL2NhcnQvdXRpbHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDJDQUF3QjtBQUN4QiwyREFBd0M7QUFDeEMsb0VBQWlEO0FBQ2pELDRDQUF5QiJ9
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BigNumberInput, ConfirmVariantInventoryWorkflowInputDTO } from "@medusajs/framework/types";
|
|
2
|
+
export declare const requiredOrderFieldsForInventoryConfirmation: string[];
|
|
3
|
+
export declare const requiredVariantFieldsForInventoryConfirmation: string[];
|
|
4
|
+
interface ConfirmInventoryItem {
|
|
5
|
+
id?: string;
|
|
6
|
+
inventory_item_id: string;
|
|
7
|
+
required_quantity: number;
|
|
8
|
+
allow_backorder: boolean;
|
|
9
|
+
quantity: BigNumberInput;
|
|
10
|
+
location_ids: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* This function prepares the input for the confirm inventory workflow.
|
|
14
|
+
* In essesnce, it maps a list of cart items to a list of inventory items,
|
|
15
|
+
* serving as a bridge between the cart and inventory domains.
|
|
16
|
+
*
|
|
17
|
+
* @throws {MedusaError} INVALID_DATA if any cart item is for a variant that has no inventory items.
|
|
18
|
+
* @throws {MedusaError} INVALID_DATA if any cart item is for a variant with no stock locations in the input.sales_channel_id. An exception is made for variants with allow_backorder set to true.
|
|
19
|
+
*
|
|
20
|
+
* @returns {ConfirmInventoryPreparationInput}
|
|
21
|
+
* A list of inventory items to confirm. Only inventory items for variants with managed inventory are included.
|
|
22
|
+
*/
|
|
23
|
+
export declare const prepareConfirmInventoryInput: (data: {
|
|
24
|
+
input: ConfirmVariantInventoryWorkflowInputDTO;
|
|
25
|
+
}) => {
|
|
26
|
+
items: ConfirmInventoryItem[];
|
|
27
|
+
};
|
|
28
|
+
export {};
|