@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,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getOrderGroupsListWorkflow = exports.getOrderGroupsListWorkflowId = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
6
|
+
const core_flows_1 = require("@medusajs/medusa/core-flows");
|
|
7
|
+
const aggregate_status_1 = require("../utils/aggregate-status");
|
|
8
|
+
exports.getOrderGroupsListWorkflowId = "get-order-groups-list";
|
|
9
|
+
exports.getOrderGroupsListWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.getOrderGroupsListWorkflowId, (input) => {
|
|
10
|
+
const fields = (0, workflows_sdk_1.transform)(input, ({ fields }) => {
|
|
11
|
+
return (0, utils_1.deduplicate)([
|
|
12
|
+
...fields,
|
|
13
|
+
"id",
|
|
14
|
+
"orders.id",
|
|
15
|
+
"orders.status",
|
|
16
|
+
"orders.version",
|
|
17
|
+
"orders.currency_code",
|
|
18
|
+
"orders.items.*",
|
|
19
|
+
"orders.payment_collections.status",
|
|
20
|
+
"orders.payment_collections.amount",
|
|
21
|
+
"orders.payment_collections.captured_amount",
|
|
22
|
+
"orders.payment_collections.refunded_amount",
|
|
23
|
+
"orders.fulfillments.packed_at",
|
|
24
|
+
"orders.fulfillments.shipped_at",
|
|
25
|
+
"orders.fulfillments.delivered_at",
|
|
26
|
+
"orders.fulfillments.canceled_at",
|
|
27
|
+
]);
|
|
28
|
+
});
|
|
29
|
+
const { data: orderGroups, metadata } = (0, core_flows_1.useQueryGraphStep)({
|
|
30
|
+
entity: "order_group",
|
|
31
|
+
fields,
|
|
32
|
+
filters: input.variables,
|
|
33
|
+
pagination: {
|
|
34
|
+
skip: input.variables?.skip,
|
|
35
|
+
take: input.variables?.take,
|
|
36
|
+
order: input.variables?.order,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
const aggregatedOrderGroups = (0, workflows_sdk_1.transform)({ orderGroups, metadata, input }, ({ orderGroups, metadata, input }) => {
|
|
40
|
+
const fields = input.fields;
|
|
41
|
+
const requiredPaymentFields = fields.some((f) => f.includes("payment_collections"));
|
|
42
|
+
const requiredFulfillmentFields = fields.some((f) => f.includes("fulfillments"));
|
|
43
|
+
for (const group of orderGroups) {
|
|
44
|
+
if (!group.orders)
|
|
45
|
+
continue;
|
|
46
|
+
for (const order of group.orders) {
|
|
47
|
+
const order_ = order;
|
|
48
|
+
order_.payment_status = (0, aggregate_status_1.getLastPaymentStatus)(order_);
|
|
49
|
+
order_.fulfillment_status = (0, aggregate_status_1.getLastFulfillmentStatus)(order_);
|
|
50
|
+
if (!requiredPaymentFields) {
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
delete order_.payment_collections;
|
|
53
|
+
}
|
|
54
|
+
if (!requiredFulfillmentFields) {
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
delete order_.fulfillments;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
rows: orderGroups,
|
|
62
|
+
metadata,
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
return new workflows_sdk_1.WorkflowResponse(aggregatedOrderGroups);
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LW9yZGVyLWdyb3Vwcy1saXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3dvcmtmbG93cy9vcmRlci1ncm91cC93b3JrZmxvd3MvZ2V0LW9yZGVyLWdyb3Vwcy1saXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLHFEQUF1RDtBQUN2RCxxRUFLMEM7QUFDMUMsNERBQStEO0FBRS9ELGdFQUdrQztBQVlyQixRQUFBLDRCQUE0QixHQUFHLHVCQUF1QixDQUFBO0FBRXRELFFBQUEsMEJBQTBCLEdBQUcsSUFBQSw4QkFBYyxFQUN0RCxvQ0FBNEIsRUFDNUIsQ0FDRSxLQUFvRCxFQUNwRCxFQUFFO0lBQ0YsTUFBTSxNQUFNLEdBQUcsSUFBQS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0IsQ0FBQyxxQkFBNEIsQ0FBQyxDQUFBO0FBQzNELENBQUMsQ0FDRixDQUFBIn0=
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL3BheW91dC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsMENBQXVCO0FBQ3ZCLDhDQUEyQiJ9
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createOnboardingStep = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const types_1 = require("@mercurjs/types");
|
|
6
|
+
exports.createOnboardingStep = (0, workflows_sdk_1.createStep)("create-onboarding", async (input, { container }) => {
|
|
7
|
+
const service = container.resolve(types_1.MercurModules.PAYOUT);
|
|
8
|
+
const onboarding = await service.createOnboarding(input);
|
|
9
|
+
return new workflows_sdk_1.StepResponse(onboarding, onboarding.id);
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLW9uYm9hcmRpbmcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL3BheW91dC9zdGVwcy9jcmVhdGUtb25ib2FyZGluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxxRUFBNEU7QUFDNUUsMkNBQW1GO0FBSXRFLFFBQUEsb0JBQW9CLEdBQUcsSUFBQSwwQkFBVSxFQUM1QyxtQkFBbUIsRUFDbkIsS0FBSyxFQUFFLEtBQTBCLEVBQUUsRUFBRSxTQUFTLEVBQUUsRUFBRSxFQUFFO0lBQ2xELE1BQU0sT0FBTyxHQUFHLFNBQVMsQ0FBQyxPQUFPLENBQXNCLHFCQUFhLENBQUMsTUFBTSxDQUFDLENBQUE7SUFFNUUsTUFBTSxVQUFVLEdBQWtCLE1BQU0sT0FBTyxDQUFDLGdCQUFnQixDQUFDLEtBQUssQ0FBQyxDQUFBO0lBRXZFLE9BQU8sSUFBSSw0QkFBWSxDQUFDLFVBQVUsRUFBRSxVQUFVLENBQUMsRUFBRSxDQUFDLENBQUE7QUFDcEQsQ0FBQyxDQUNGLENBQUEifQ==
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createPayoutAccountStep = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const types_1 = require("@mercurjs/types");
|
|
6
|
+
exports.createPayoutAccountStep = (0, workflows_sdk_1.createStep)("create-payout-account", async (input, { container }) => {
|
|
7
|
+
const service = container.resolve(types_1.MercurModules.PAYOUT);
|
|
8
|
+
const payoutAccount = await service.createPayoutAccount(input);
|
|
9
|
+
return new workflows_sdk_1.StepResponse(payoutAccount, payoutAccount.id);
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLXBheW91dC1hY2NvdW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3dvcmtmbG93cy9wYXlvdXQvc3RlcHMvY3JlYXRlLXBheW91dC1hY2NvdW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFFQUE0RTtBQUM1RSwyQ0FBeUY7QUFJNUUsUUFBQSx1QkFBdUIsR0FBRyxJQUFBLDBCQUFVLEVBQy9DLHVCQUF1QixFQUN2QixLQUFLLEVBQUUsS0FBNkIsRUFBRSxFQUFFLFNBQVMsRUFBRSxFQUFFLEVBQUU7SUFDckQsTUFBTSxPQUFPLEdBQUcsU0FBUyxDQUFDLE9BQU8sQ0FBc0IscUJBQWEsQ0FBQyxNQUFNLENBQUMsQ0FBQTtJQUU1RSxNQUFNLGFBQWEsR0FBcUIsTUFBTSxPQUFPLENBQUMsbUJBQW1CLENBQUMsS0FBSyxDQUFDLENBQUE7SUFFaEYsT0FBTyxJQUFJLDRCQUFZLENBQUMsYUFBYSxFQUFFLGFBQWEsQ0FBQyxFQUFFLENBQUMsQ0FBQTtBQUMxRCxDQUFDLENBQ0YsQ0FBQSJ9
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createPayoutStep = exports.createPayoutStepId = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const types_1 = require("@mercurjs/types");
|
|
6
|
+
exports.createPayoutStepId = "create-payout-step";
|
|
7
|
+
exports.createPayoutStep = (0, workflows_sdk_1.createStep)(exports.createPayoutStepId, async (input, { container }) => {
|
|
8
|
+
const payoutService = container.resolve(types_1.MercurModules.PAYOUT);
|
|
9
|
+
const payout = await payoutService.createPayouts(input);
|
|
10
|
+
return new workflows_sdk_1.StepResponse(payout, payout.id);
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLXBheW91dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy93b3JrZmxvd3MvcGF5b3V0L3N0ZXBzL2NyZWF0ZS1wYXlvdXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscUVBQTRFO0FBQzVFLDJDQUFnRTtBQUluRCxRQUFBLGtCQUFrQixHQUFHLG9CQUFvQixDQUFBO0FBRXpDLFFBQUEsZ0JBQWdCLEdBQUcsSUFBQSwwQkFBVSxFQUN4QywwQkFBa0IsRUFDbEIsS0FBSyxFQUFFLEtBQXNCLEVBQUUsRUFBRSxTQUFTLEVBQUUsRUFBRSxFQUFFO0lBQzlDLE1BQU0sYUFBYSxHQUFHLFNBQVMsQ0FBQyxPQUFPLENBQXNCLHFCQUFhLENBQUMsTUFBTSxDQUFDLENBQUE7SUFFbEYsTUFBTSxNQUFNLEdBQUcsTUFBTSxhQUFhLENBQUMsYUFBYSxDQUFDLEtBQUssQ0FBQyxDQUFBO0lBRXZELE9BQU8sSUFBSSw0QkFBWSxDQUFDLE1BQU0sRUFBRSxNQUFNLENBQUMsRUFBRSxDQUFDLENBQUE7QUFDNUMsQ0FBQyxDQUNGLENBQUEifQ==
|
|
@@ -0,0 +1,23 @@
|
|
|
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-payout-account"), exports);
|
|
18
|
+
__exportStar(require("./create-onboarding"), exports);
|
|
19
|
+
__exportStar(require("./create-payout"), exports);
|
|
20
|
+
__exportStar(require("./update-payout-account"), exports);
|
|
21
|
+
__exportStar(require("./update-payout"), exports);
|
|
22
|
+
__exportStar(require("./validate-seller-payout-account"), exports);
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL3BheW91dC9zdGVwcy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsMERBQXVDO0FBQ3ZDLHNEQUFtQztBQUNuQyxrREFBK0I7QUFDL0IsMERBQXVDO0FBQ3ZDLGtEQUErQjtBQUMvQixtRUFBZ0QifQ==
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { UpdatePayoutAccountDTO } from "@mercurjs/types";
|
|
2
|
+
export declare const updatePayoutAccountStepId = "update-payout-account-step";
|
|
3
|
+
export declare const updatePayoutAccountStep: import("@medusajs/framework/workflows-sdk").StepFunction<UpdatePayoutAccountDTO, {
|
|
4
|
+
id: string;
|
|
5
|
+
status: import("@mercurjs/types").PayoutAccountStatus;
|
|
6
|
+
data: Record<string, unknown>;
|
|
7
|
+
context: Record<string, unknown> | null;
|
|
8
|
+
onboarding: {
|
|
9
|
+
id: string;
|
|
10
|
+
data: Record<string, unknown> | null;
|
|
11
|
+
context: Record<string, unknown> | null;
|
|
12
|
+
account: /*elided*/ any;
|
|
13
|
+
created_at: Date;
|
|
14
|
+
updated_at: Date;
|
|
15
|
+
deleted_at: Date | null;
|
|
16
|
+
account_id: string;
|
|
17
|
+
};
|
|
18
|
+
payouts: {
|
|
19
|
+
id: string;
|
|
20
|
+
display_id: number;
|
|
21
|
+
currency_code: string;
|
|
22
|
+
amount: number;
|
|
23
|
+
data: Record<string, unknown> | null;
|
|
24
|
+
account: /*elided*/ any;
|
|
25
|
+
status: import("@mercurjs/types").PayoutStatus;
|
|
26
|
+
raw_amount: Record<string, unknown>;
|
|
27
|
+
created_at: Date;
|
|
28
|
+
updated_at: Date;
|
|
29
|
+
deleted_at: Date | null;
|
|
30
|
+
account_id: string;
|
|
31
|
+
}[];
|
|
32
|
+
created_at: Date;
|
|
33
|
+
updated_at: Date;
|
|
34
|
+
deleted_at: Date | null;
|
|
35
|
+
}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updatePayoutAccountStep = exports.updatePayoutAccountStepId = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const types_1 = require("@mercurjs/types");
|
|
6
|
+
exports.updatePayoutAccountStepId = "update-payout-account-step";
|
|
7
|
+
exports.updatePayoutAccountStep = (0, workflows_sdk_1.createStep)(exports.updatePayoutAccountStepId, async (input, { container }) => {
|
|
8
|
+
const payoutService = container.resolve(types_1.MercurModules.PAYOUT);
|
|
9
|
+
const previousAccount = await payoutService.retrievePayoutAccount(input.id);
|
|
10
|
+
const updatedAccount = await payoutService.updatePayoutAccounts({
|
|
11
|
+
id: input.id,
|
|
12
|
+
status: input.status,
|
|
13
|
+
});
|
|
14
|
+
return new workflows_sdk_1.StepResponse(updatedAccount, {
|
|
15
|
+
id: input.id,
|
|
16
|
+
previousStatus: previousAccount.status,
|
|
17
|
+
});
|
|
18
|
+
}, async (rollbackData, { container }) => {
|
|
19
|
+
if (!rollbackData)
|
|
20
|
+
return;
|
|
21
|
+
const payoutService = container.resolve(types_1.MercurModules.PAYOUT);
|
|
22
|
+
await payoutService.updatePayoutAccounts({
|
|
23
|
+
id: rollbackData.id,
|
|
24
|
+
status: rollbackData.previousStatus,
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBkYXRlLXBheW91dC1hY2NvdW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3dvcmtmbG93cy9wYXlvdXQvc3RlcHMvdXBkYXRlLXBheW91dC1hY2NvdW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFFQUE0RTtBQUM1RSwyQ0FBdUU7QUFJMUQsUUFBQSx5QkFBeUIsR0FBRyw0QkFBNEIsQ0FBQTtBQUV4RCxRQUFBLHVCQUF1QixHQUFHLElBQUEsMEJBQVUsRUFDL0MsaUNBQXlCLEVBQ3pCLEtBQUssRUFBRSxLQUE2QixFQUFFLEVBQUUsU0FBUyxFQUFFLEVBQUUsRUFBRTtJQUNyRCxNQUFNLGFBQWEsR0FBRyxTQUFTLENBQUMsT0FBTyxDQUFzQixxQkFBYSxDQUFDLE1BQU0sQ0FBQyxDQUFBO0lBRWxGLE1BQU0sZUFBZSxHQUFHLE1BQU0sYUFBYSxDQUFDLHFCQUFxQixDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsQ0FBQTtJQUUzRSxNQUFNLGNBQWMsR0FBRyxNQUFNLGFBQWEsQ0FBQyxvQkFBb0IsQ0FBQztRQUM5RCxFQUFFLEVBQUUsS0FBSyxDQUFDLEVBQUU7UUFDWixNQUFNLEVBQUUsS0FBSyxDQUFDLE1BQU07S0FDckIsQ0FBQyxDQUFBO0lBRUYsT0FBTyxJQUFJLDRCQUFZLENBQUMsY0FBYyxFQUFFO1FBQ3RDLEVBQUUsRUFBRSxLQUFLLENBQUMsRUFBRTtRQUNaLGNBQWMsRUFBRSxlQUFlLENBQUMsTUFBTTtLQUN2QyxDQUFDLENBQUE7QUFDSixDQUFDLEVBQ0QsS0FBSyxFQUFFLFlBQVksRUFBRSxFQUFFLFNBQVMsRUFBRSxFQUFFLEVBQUU7SUFDcEMsSUFBSSxDQUFDLFlBQVk7UUFBRSxPQUFNO0lBRXpCLE1BQU0sYUFBYSxHQUFHLFNBQVMsQ0FBQyxPQUFPLENBQXNCLHFCQUFhLENBQUMsTUFBTSxDQUFDLENBQUE7SUFFbEYsTUFBTSxhQUFhLENBQUMsb0JBQW9CLENBQUM7UUFDdkMsRUFBRSxFQUFFLFlBQVksQ0FBQyxFQUFFO1FBQ25CLE1BQU0sRUFBRSxZQUFZLENBQUMsY0FBYztLQUNwQyxDQUFDLENBQUE7QUFDSixDQUFDLENBQ0YsQ0FBQSJ9
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { UpdatePayoutDTO } from "@mercurjs/types";
|
|
2
|
+
export declare const updatePayoutStepId = "update-payout-step";
|
|
3
|
+
export declare const updatePayoutStep: import("@medusajs/framework/workflows-sdk").StepFunction<UpdatePayoutDTO, {
|
|
4
|
+
id: string;
|
|
5
|
+
display_id: number;
|
|
6
|
+
currency_code: string;
|
|
7
|
+
amount: number;
|
|
8
|
+
data: Record<string, unknown> | null;
|
|
9
|
+
account: {
|
|
10
|
+
id: string;
|
|
11
|
+
status: import("@mercurjs/types").PayoutAccountStatus;
|
|
12
|
+
data: Record<string, unknown>;
|
|
13
|
+
context: Record<string, unknown> | null;
|
|
14
|
+
onboarding: {
|
|
15
|
+
id: string;
|
|
16
|
+
data: Record<string, unknown> | null;
|
|
17
|
+
context: Record<string, unknown> | null;
|
|
18
|
+
account: /*elided*/ any;
|
|
19
|
+
created_at: Date;
|
|
20
|
+
updated_at: Date;
|
|
21
|
+
deleted_at: Date | null;
|
|
22
|
+
account_id: string;
|
|
23
|
+
};
|
|
24
|
+
payouts: /*elided*/ any[];
|
|
25
|
+
created_at: Date;
|
|
26
|
+
updated_at: Date;
|
|
27
|
+
deleted_at: Date | null;
|
|
28
|
+
};
|
|
29
|
+
status: import("@mercurjs/types").PayoutStatus;
|
|
30
|
+
raw_amount: Record<string, unknown>;
|
|
31
|
+
created_at: Date;
|
|
32
|
+
updated_at: Date;
|
|
33
|
+
deleted_at: Date | null;
|
|
34
|
+
account_id: string;
|
|
35
|
+
}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updatePayoutStep = exports.updatePayoutStepId = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const types_1 = require("@mercurjs/types");
|
|
6
|
+
exports.updatePayoutStepId = "update-payout-step";
|
|
7
|
+
exports.updatePayoutStep = (0, workflows_sdk_1.createStep)(exports.updatePayoutStepId, async (input, { container }) => {
|
|
8
|
+
const payoutService = container.resolve(types_1.MercurModules.PAYOUT);
|
|
9
|
+
const previousPayout = await payoutService.retrievePayout(input.id);
|
|
10
|
+
const updatedPayout = await payoutService.updatePayouts({
|
|
11
|
+
id: input.id,
|
|
12
|
+
status: input.status,
|
|
13
|
+
});
|
|
14
|
+
return new workflows_sdk_1.StepResponse(updatedPayout, {
|
|
15
|
+
id: input.id,
|
|
16
|
+
previousStatus: previousPayout.status,
|
|
17
|
+
});
|
|
18
|
+
}, async (rollbackData, { container }) => {
|
|
19
|
+
if (!rollbackData)
|
|
20
|
+
return;
|
|
21
|
+
const payoutService = container.resolve(types_1.MercurModules.PAYOUT);
|
|
22
|
+
await payoutService.updatePayouts({
|
|
23
|
+
id: rollbackData.id,
|
|
24
|
+
status: rollbackData.previousStatus,
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBkYXRlLXBheW91dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy93b3JrZmxvd3MvcGF5b3V0L3N0ZXBzL3VwZGF0ZS1wYXlvdXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscUVBQTRFO0FBQzVFLDJDQUFnRTtBQUluRCxRQUFBLGtCQUFrQixHQUFHLG9CQUFvQixDQUFBO0FBRXpDLFFBQUEsZ0JBQWdCLEdBQUcsSUFBQSwwQkFBVSxFQUN4QywwQkFBa0IsRUFDbEIsS0FBSyxFQUFFLEtBQXNCLEVBQUUsRUFBRSxTQUFTLEVBQUUsRUFBRSxFQUFFO0lBQzlDLE1BQU0sYUFBYSxHQUFHLFNBQVMsQ0FBQyxPQUFPLENBQXNCLHFCQUFhLENBQUMsTUFBTSxDQUFDLENBQUE7SUFFbEYsTUFBTSxjQUFjLEdBQUcsTUFBTSxhQUFhLENBQUMsY0FBYyxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQUMsQ0FBQTtJQUVuRSxNQUFNLGFBQWEsR0FBRyxNQUFNLGFBQWEsQ0FBQyxhQUFhLENBQUM7UUFDdEQsRUFBRSxFQUFFLEtBQUssQ0FBQyxFQUFFO1FBQ1osTUFBTSxFQUFFLEtBQUssQ0FBQyxNQUFNO0tBQ3JCLENBQUMsQ0FBQTtJQUVGLE9BQU8sSUFBSSw0QkFBWSxDQUFDLGFBQWEsRUFBRTtRQUNyQyxFQUFFLEVBQUUsS0FBSyxDQUFDLEVBQUU7UUFDWixjQUFjLEVBQUUsY0FBYyxDQUFDLE1BQU07S0FDdEMsQ0FBQyxDQUFBO0FBQ0osQ0FBQyxFQUNELEtBQUssRUFBRSxZQUFZLEVBQUUsRUFBRSxTQUFTLEVBQUUsRUFBRSxFQUFFO0lBQ3BDLElBQUksQ0FBQyxZQUFZO1FBQUUsT0FBTTtJQUV6QixNQUFNLGFBQWEsR0FBRyxTQUFTLENBQUMsT0FBTyxDQUFzQixxQkFBYSxDQUFDLE1BQU0sQ0FBQyxDQUFBO0lBRWxGLE1BQU0sYUFBYSxDQUFDLGFBQWEsQ0FBQztRQUNoQyxFQUFFLEVBQUUsWUFBWSxDQUFDLEVBQUU7UUFDbkIsTUFBTSxFQUFFLFlBQVksQ0FBQyxjQUFjO0tBQ3BDLENBQUMsQ0FBQTtBQUNKLENBQUMsQ0FDRixDQUFBIn0=
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateSellerPayoutAccountStep = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const utils_2 = require("@medusajs/framework/utils");
|
|
6
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
7
|
+
exports.validateSellerPayoutAccountStep = (0, workflows_sdk_1.createStep)("validate-seller-payout-account", async (input, { container }) => {
|
|
8
|
+
const query = container.resolve(utils_2.ContainerRegistrationKeys.QUERY);
|
|
9
|
+
const { data } = await query.graph({
|
|
10
|
+
entity: "seller_payout_account",
|
|
11
|
+
filters: {
|
|
12
|
+
seller_id: input.seller_id,
|
|
13
|
+
},
|
|
14
|
+
fields: ["seller_id", "payout_account_id"],
|
|
15
|
+
});
|
|
16
|
+
if (data.length > 0) {
|
|
17
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, `Seller already has a payout account`);
|
|
18
|
+
}
|
|
19
|
+
return new workflows_sdk_1.StepResponse(void 0);
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGUtc2VsbGVyLXBheW91dC1hY2NvdW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3dvcmtmbG93cy9wYXlvdXQvc3RlcHMvdmFsaWRhdGUtc2VsbGVyLXBheW91dC1hY2NvdW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLHFEQUF1RDtBQUN2RCxxREFBcUU7QUFDckUscUVBQTRFO0FBTS9ELFFBQUEsK0JBQStCLEdBQUcsSUFBQSwwQkFBVSxFQUN2RCxnQ0FBZ0MsRUFDaEMsS0FBSyxFQUFFLEtBQXVDLEVBQUUsRUFBRSxTQUFTLEVBQUUsRUFBRSxFQUFFO0lBQy9ELE1BQU0sS0FBSyxHQUFHLFNBQVMsQ0FBQyxPQUFPLENBQVEsaUNBQXlCLENBQUMsS0FBSyxDQUFDLENBQUE7SUFFdkUsTUFBTSxFQUFFLElBQUksRUFBRSxHQUFHLE1BQU0sS0FBSyxDQUFDLEtBQUssQ0FBQztRQUNqQyxNQUFNLEVBQUUsdUJBQXVCO1FBQy9CLE9BQU8sRUFBRTtZQUNQLFNBQVMsRUFBRSxLQUFLLENBQUMsU0FBUztTQUMzQjtRQUNELE1BQU0sRUFBRSxDQUFDLFdBQVcsRUFBRSxtQkFBbUIsQ0FBQztLQUMzQyxDQUFDLENBQUE7SUFFRixJQUFJLElBQUksQ0FBQyxNQUFNLEdBQUcsQ0FBQyxFQUFFLENBQUM7UUFDcEIsTUFBTSxJQUFJLG1CQUFXLENBQ25CLG1CQUFXLENBQUMsS0FBSyxDQUFDLFlBQVksRUFDOUIscUNBQXFDLENBQ3RDLENBQUE7SUFDSCxDQUFDO0lBRUQsT0FBTyxJQUFJLDRCQUFZLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQTtBQUNqQyxDQUFDLENBQ0YsQ0FBQSJ9
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createOnboardingWorkflow = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const steps_1 = require("../steps");
|
|
6
|
+
exports.createOnboardingWorkflow = (0, workflows_sdk_1.createWorkflow)("create-onboarding", function (input) {
|
|
7
|
+
const onboarding = (0, steps_1.createOnboardingStep)(input);
|
|
8
|
+
return new workflows_sdk_1.WorkflowResponse(onboarding);
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLW9uYm9hcmRpbmcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL3BheW91dC93b3JrZmxvd3MvY3JlYXRlLW9uYm9hcmRpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscUVBQW9GO0FBR3BGLG9DQUErQztBQUVsQyxRQUFBLHdCQUF3QixHQUFHLElBQUEsOEJBQWMsRUFDcEQsbUJBQW1CLEVBQ25CLFVBQVUsS0FBMEI7SUFDbEMsTUFBTSxVQUFVLEdBQUcsSUFBQSw0QkFBb0IsRUFBQyxLQUFLLENBQUMsQ0FBQTtJQUU5QyxPQUFPLElBQUksZ0NBQWdCLENBQUMsVUFBVSxDQUFDLENBQUE7QUFDekMsQ0FBQyxDQUNGLENBQUEifQ==
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CreatePayoutAccountDTO } from "@mercurjs/types";
|
|
2
|
+
interface CreatePayoutAccountInput extends CreatePayoutAccountDTO {
|
|
3
|
+
seller_id: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const createPayoutAccountWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<CreatePayoutAccountInput, import("@mercurjs/types").PayoutAccountDTO, []>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createPayoutAccountWorkflow = void 0;
|
|
4
|
+
const core_flows_1 = require("@medusajs/medusa/core-flows");
|
|
5
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
6
|
+
const types_1 = require("@mercurjs/types");
|
|
7
|
+
const steps_1 = require("../steps");
|
|
8
|
+
exports.createPayoutAccountWorkflow = (0, workflows_sdk_1.createWorkflow)("create-payout-account-for-seller", function (input) {
|
|
9
|
+
(0, steps_1.validateSellerPayoutAccountStep)({
|
|
10
|
+
seller_id: input.seller_id,
|
|
11
|
+
});
|
|
12
|
+
const payoutAccount = (0, steps_1.createPayoutAccountStep)({
|
|
13
|
+
context: input.context,
|
|
14
|
+
data: input.data,
|
|
15
|
+
});
|
|
16
|
+
(0, core_flows_1.createRemoteLinkStep)([
|
|
17
|
+
{
|
|
18
|
+
[types_1.MercurModules.SELLER]: {
|
|
19
|
+
seller_id: input.seller_id,
|
|
20
|
+
},
|
|
21
|
+
[types_1.MercurModules.PAYOUT]: {
|
|
22
|
+
payout_account_id: payoutAccount.id,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
]);
|
|
26
|
+
return new workflows_sdk_1.WorkflowResponse(payoutAccount);
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWx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+
};
|
|
4
|
+
export declare const createPayoutWorkflowId = "create-payout";
|
|
5
|
+
export declare const createPayoutWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<CreatePayoutWorkflowInput, import("@mercurjs/types").PayoutDTO, []>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createPayoutWorkflow = exports.createPayoutWorkflowId = void 0;
|
|
4
|
+
const core_flows_1 = require("@medusajs/medusa/core-flows");
|
|
5
|
+
const core_flows_2 = require("@medusajs/medusa/core-flows");
|
|
6
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
7
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
8
|
+
const types_1 = require("@mercurjs/types");
|
|
9
|
+
const steps_1 = require("../steps");
|
|
10
|
+
exports.createPayoutWorkflowId = "create-payout";
|
|
11
|
+
exports.createPayoutWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.createPayoutWorkflowId, function (input) {
|
|
12
|
+
const order = core_flows_2.getOrderDetailWorkflow.runAsStep({
|
|
13
|
+
input: {
|
|
14
|
+
order_id: input.order_id,
|
|
15
|
+
fields: [
|
|
16
|
+
'id',
|
|
17
|
+
'currency_code',
|
|
18
|
+
'total',
|
|
19
|
+
'seller.*',
|
|
20
|
+
'seller.payout_account.*',
|
|
21
|
+
'items.*',
|
|
22
|
+
'items.commission_lines.*',
|
|
23
|
+
],
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const payoutInput = (0, workflows_sdk_1.transform)({ order }, ({ order }) => {
|
|
27
|
+
const payoutAccountId = order.seller?.payout_account?.id;
|
|
28
|
+
const sellerId = order.seller?.id;
|
|
29
|
+
if (!payoutAccountId) {
|
|
30
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Seller does not have a payout account`);
|
|
31
|
+
}
|
|
32
|
+
const totalCommission = (order.items ?? []).reduce((acc, item) => {
|
|
33
|
+
const commissionAmount = item.commission_line?.amount ?? 0;
|
|
34
|
+
return utils_1.MathBN.add(acc, commissionAmount);
|
|
35
|
+
}, 0);
|
|
36
|
+
const amount = utils_1.MathBN.sub(order.total, totalCommission);
|
|
37
|
+
return {
|
|
38
|
+
account_id: payoutAccountId,
|
|
39
|
+
seller_id: sellerId,
|
|
40
|
+
amount,
|
|
41
|
+
currency_code: order.currency_code,
|
|
42
|
+
data: {
|
|
43
|
+
order_id: order.id,
|
|
44
|
+
seller_id: sellerId
|
|
45
|
+
},
|
|
46
|
+
context: {
|
|
47
|
+
idempotency_key: order.id,
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
const payout = (0, steps_1.createPayoutStep)({
|
|
52
|
+
account_id: payoutInput.account_id,
|
|
53
|
+
amount: payoutInput.amount,
|
|
54
|
+
currency_code: payoutInput.currency_code,
|
|
55
|
+
data: payoutInput.data,
|
|
56
|
+
context: payoutInput.context,
|
|
57
|
+
});
|
|
58
|
+
(0, core_flows_1.createRemoteLinkStep)([
|
|
59
|
+
{
|
|
60
|
+
[types_1.MercurModules.PAYOUT]: {
|
|
61
|
+
payout_id: payout.id,
|
|
62
|
+
},
|
|
63
|
+
[types_1.MercurModules.SELLER]: {
|
|
64
|
+
seller_id: payoutInput.seller_id,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
]);
|
|
68
|
+
return new workflows_sdk_1.WorkflowResponse(payout);
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlLXBheW91dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy93b3JrZmxvd3MvcGF5b3V0L3dvcmtmbG93cy9jcmVhdGUtcGF5b3V0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozt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BQyxFQUFFO2dCQUN0QixTQUFTLEVBQUUsTUFBTSxDQUFDLEVBQUU7YUFDckI7WUFDRCxDQUFDLHFCQUFhLENBQUMsTUFBTSxDQUFDLEVBQUU7Z0JBQ3RCLFNBQVMsRUFBRSxXQUFXLENBQUMsU0FBUzthQUNqQztTQUNGO0tBQ0YsQ0FBQyxDQUFBO0lBRUYsT0FBTyxJQUFJLGdDQUFnQixDQUFDLE1BQU0sQ0FBQyxDQUFBO0FBQ3JDLENBQUMsQ0FDRixDQUFBIn0=
|
|
@@ -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("./create-payout-account"), exports);
|
|
18
|
+
__exportStar(require("./create-onboarding"), exports);
|
|
19
|
+
__exportStar(require("./create-payout"), exports);
|
|
20
|
+
__exportStar(require("./process-payout-for-webhook"), exports);
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL3BheW91dC93b3JrZmxvd3MvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDBEQUF1QztBQUN2QyxzREFBbUM7QUFDbkMsa0RBQStCO0FBQy9CLCtEQUE0QyJ9
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PayoutWebhookResult } from "@mercurjs/types";
|
|
2
|
+
export interface ProcessPayoutForWebhookWorkflowInput extends PayoutWebhookResult {
|
|
3
|
+
}
|
|
4
|
+
export declare const processPayoutForWebhookWorkflowId = "process-payout-for-webhook";
|
|
5
|
+
export declare const processPayoutForWebhookWorkflow: import("@medusajs/framework/workflows-sdk").ReturnWorkflow<ProcessPayoutForWebhookWorkflowInput, unknown, any[]>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.processPayoutForWebhookWorkflow = exports.processPayoutForWebhookWorkflowId = void 0;
|
|
4
|
+
const workflows_sdk_1 = require("@medusajs/framework/workflows-sdk");
|
|
5
|
+
const types_1 = require("@mercurjs/types");
|
|
6
|
+
const update_payout_account_1 = require("../steps/update-payout-account");
|
|
7
|
+
const update_payout_1 = require("../steps/update-payout");
|
|
8
|
+
exports.processPayoutForWebhookWorkflowId = "process-payout-for-webhook";
|
|
9
|
+
exports.processPayoutForWebhookWorkflow = (0, workflows_sdk_1.createWorkflow)(exports.processPayoutForWebhookWorkflowId, (input) => {
|
|
10
|
+
(0, workflows_sdk_1.when)({ input }, ({ input }) => {
|
|
11
|
+
return input.action === "account.activated" && !!input.data?.id;
|
|
12
|
+
}).then(() => {
|
|
13
|
+
(0, update_payout_account_1.updatePayoutAccountStep)({
|
|
14
|
+
id: input.data.id,
|
|
15
|
+
status: types_1.PayoutAccountStatus.ACTIVE,
|
|
16
|
+
}).config({ name: "activate-payout-account" });
|
|
17
|
+
});
|
|
18
|
+
(0, workflows_sdk_1.when)({ input }, ({ input }) => {
|
|
19
|
+
return input.action === "account.restricted" && !!input.data?.id;
|
|
20
|
+
}).then(() => {
|
|
21
|
+
(0, update_payout_account_1.updatePayoutAccountStep)({
|
|
22
|
+
id: input.data.id,
|
|
23
|
+
status: types_1.PayoutAccountStatus.RESTRICTED,
|
|
24
|
+
}).config({ name: "restrict-payout-account" });
|
|
25
|
+
});
|
|
26
|
+
(0, workflows_sdk_1.when)({ input }, ({ input }) => {
|
|
27
|
+
return input.action === "account.rejected" && !!input.data?.id;
|
|
28
|
+
}).then(() => {
|
|
29
|
+
(0, update_payout_account_1.updatePayoutAccountStep)({
|
|
30
|
+
id: input.data.id,
|
|
31
|
+
status: types_1.PayoutAccountStatus.REJECTED,
|
|
32
|
+
}).config({ name: "reject-payout-account" });
|
|
33
|
+
});
|
|
34
|
+
(0, workflows_sdk_1.when)({ input }, ({ input }) => {
|
|
35
|
+
return input.action === "payout.processing" && !!input.data?.id;
|
|
36
|
+
}).then(() => {
|
|
37
|
+
(0, update_payout_1.updatePayoutStep)({
|
|
38
|
+
id: input.data.id,
|
|
39
|
+
status: types_1.PayoutStatus.PROCESSING,
|
|
40
|
+
}).config({ name: "processing-payout" });
|
|
41
|
+
});
|
|
42
|
+
(0, workflows_sdk_1.when)({ input }, ({ input }) => {
|
|
43
|
+
return input.action === "payout.paid" && !!input.data?.id;
|
|
44
|
+
}).then(() => {
|
|
45
|
+
(0, update_payout_1.updatePayoutStep)({
|
|
46
|
+
id: input.data.id,
|
|
47
|
+
status: types_1.PayoutStatus.PAID,
|
|
48
|
+
}).config({ name: "paid-payout" });
|
|
49
|
+
});
|
|
50
|
+
(0, workflows_sdk_1.when)({ input }, ({ input }) => {
|
|
51
|
+
return input.action === "payout.failed" && !!input.data?.id;
|
|
52
|
+
}).then(() => {
|
|
53
|
+
(0, update_payout_1.updatePayoutStep)({
|
|
54
|
+
id: input.data.id,
|
|
55
|
+
status: types_1.PayoutStatus.FAILED,
|
|
56
|
+
}).config({ name: "failed-payout" });
|
|
57
|
+
});
|
|
58
|
+
(0, workflows_sdk_1.when)({ input }, ({ input }) => {
|
|
59
|
+
return input.action === "payout.canceled" && !!input.data?.id;
|
|
60
|
+
}).then(() => {
|
|
61
|
+
(0, update_payout_1.updatePayoutStep)({
|
|
62
|
+
id: input.data.id,
|
|
63
|
+
status: types_1.PayoutStatus.CANCELED,
|
|
64
|
+
}).config({ name: "canceled-payout" });
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvY2Vzcy1wYXlvdXQtZm9yLXdlYmhvb2suanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL3BheW91dC93b3JrZmxvd3MvcHJvY2Vzcy1wYXlvdXQtZm9yLXdlYmhvb2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscUVBQXdFO0FBQ3hFLDJDQUl3QjtBQUV4QiwwRUFBd0U7QUFDeEUsMERBQXlEO0FBSTVDLFFBQUEsaUNBQWlDLEdBQUcsNEJBQTRCLENBQUE7QUFFaEUsUUFBQSwrQkFBK0IsR0FBRyxJQUFBLDhCQUFjLEVBQzNELHlDQUFpQyxFQUNqQyxDQUFDLEtBQTJDLEVBQUUsRUFBRTtJQUM5QyxJQUFBLG9CQUFJLEVBQUMsRUFBRSxLQUFLLEVBQUUsRUFBRSxDQUFDLEVBQUUsS0FBSyxFQUFFLEVBQUUsRUFBRTtRQUM1QixPQUFPLEtBQUssQ0FBQyxNQUFNLEtBQUssbUJBQW1CLElBQUksQ0FBQyxDQUFDLEtBQUssQ0FBQyxJQUFJLEVBQUUsRUFBRSxDQUFBO0lBQ2pFLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLEVBQUU7UUFDWCxJ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FDLENBQUMsTUFBTSxDQUFDLEVBQUUsSUFBSSxFQUFFLGlCQUFpQixFQUFFLENBQUMsQ0FBQTtJQUN4QyxDQUFDLENBQUMsQ0FBQTtBQUNKLENBQUMsQ0FDRixDQUFBIn0=
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvd29ya2Zsb3dzL3ByaWNlLWxpc3QvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDBDQUF1QjtBQUN2Qiw4Q0FBMkIifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./link-seller-price-list";
|