@mercurjs/core-plugin 2.0.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.medusa/server/src/api/admin/commission-rates/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/admin/commission-rates/[id]/route.js +43 -0
- package/.medusa/server/src/api/admin/commission-rates/[id]/rules/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/commission-rates/[id]/rules/route.js +21 -0
- package/.medusa/server/src/api/admin/commission-rates/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/commission-rates/middlewares.js +51 -0
- package/.medusa/server/src/api/admin/commission-rates/query-config.d.ts +11 -0
- package/.medusa/server/src/api/admin/commission-rates/query-config.js +32 -0
- package/.medusa/server/src/api/admin/commission-rates/route.d.ts +5 -0
- package/.medusa/server/src/api/admin/commission-rates/route.js +35 -0
- package/.medusa/server/src/api/admin/commission-rates/validators.d.ts +271 -0
- package/.medusa/server/src/api/admin/commission-rates/validators.js +61 -0
- package/.medusa/server/src/api/admin/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/middlewares.js +14 -0
- package/.medusa/server/src/api/admin/order-groups/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/order-groups/[id]/route.js +20 -0
- package/.medusa/server/src/api/admin/order-groups/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/order-groups/middlewares.js +23 -0
- package/.medusa/server/src/api/admin/order-groups/query-config.d.ts +11 -0
- package/.medusa/server/src/api/admin/order-groups/query-config.js +22 -0
- package/.medusa/server/src/api/admin/order-groups/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/order-groups/route.js +21 -0
- package/.medusa/server/src/api/admin/order-groups/validators.d.ts +133 -0
- package/.medusa/server/src/api/admin/order-groups/validators.js +20 -0
- package/.medusa/server/src/api/admin/payouts/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/payouts/[id]/route.js +18 -0
- package/.medusa/server/src/api/admin/payouts/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/payouts/middlewares.js +23 -0
- package/.medusa/server/src/api/admin/payouts/query-config.d.ts +11 -0
- package/.medusa/server/src/api/admin/payouts/query-config.js +29 -0
- package/.medusa/server/src/api/admin/payouts/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/payouts/route.js +21 -0
- package/.medusa/server/src/api/admin/payouts/validators.d.ts +124 -0
- package/.medusa/server/src/api/admin/payouts/validators.js +17 -0
- package/.medusa/server/src/api/admin/sellers/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/sellers/[id]/route.js +18 -0
- package/.medusa/server/src/api/admin/sellers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/sellers/middlewares.js +23 -0
- package/.medusa/server/src/api/admin/sellers/query-config.d.ts +11 -0
- package/.medusa/server/src/api/admin/sellers/query-config.js +38 -0
- package/.medusa/server/src/api/admin/sellers/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/sellers/route.js +21 -0
- package/.medusa/server/src/api/admin/sellers/validators.d.ts +133 -0
- package/.medusa/server/src/api/admin/sellers/validators.js +20 -0
- package/.medusa/server/src/api/hooks/payout/route.d.ts +2 -0
- package/.medusa/server/src/api/hooks/payout/route.js +26 -0
- package/.medusa/server/src/api/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/middlewares.js +10 -0
- package/.medusa/server/src/api/store/carts/[id]/complete/query-config.d.ts +5 -0
- package/.medusa/server/src/api/store/carts/[id]/complete/query-config.js +17 -0
- package/.medusa/server/src/api/store/carts/[id]/complete/route.d.ts +4 -0
- package/.medusa/server/src/api/store/carts/[id]/complete/route.js +50 -0
- package/.medusa/server/src/api/store/carts/[id]/complete/validators.d.ts +9 -0
- package/.medusa/server/src/api/store/carts/[id]/complete/validators.js +6 -0
- package/.medusa/server/src/api/store/carts/[id]/promotions/route.d.ts +3 -0
- package/.medusa/server/src/api/store/carts/[id]/promotions/route.js +23 -0
- package/.medusa/server/src/api/store/carts/[id]/shipping-methods/route.d.ts +3 -0
- package/.medusa/server/src/api/store/carts/[id]/shipping-methods/route.js +19 -0
- package/.medusa/server/src/api/store/carts/helpers.d.ts +3 -0
- package/.medusa/server/src/api/store/carts/helpers.js +147 -0
- package/.medusa/server/src/api/store/carts/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/carts/middlewares.js +16 -0
- package/.medusa/server/src/api/store/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/middlewares.js +12 -0
- package/.medusa/server/src/api/store/order-groups/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/store/order-groups/[id]/route.js +22 -0
- package/.medusa/server/src/api/store/order-groups/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/order-groups/middlewares.js +25 -0
- package/.medusa/server/src/api/store/order-groups/query-config.d.ts +13 -0
- package/.medusa/server/src/api/store/order-groups/query-config.js +32 -0
- package/.medusa/server/src/api/store/order-groups/route.d.ts +3 -0
- package/.medusa/server/src/api/store/order-groups/route.js +25 -0
- package/.medusa/server/src/api/store/order-groups/validators.d.ts +118 -0
- package/.medusa/server/src/api/store/order-groups/validators.js +15 -0
- package/.medusa/server/src/api/store/sellers/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/store/sellers/[id]/route.js +22 -0
- package/.medusa/server/src/api/store/sellers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/sellers/middlewares.js +23 -0
- package/.medusa/server/src/api/store/sellers/query-config.d.ts +13 -0
- package/.medusa/server/src/api/store/sellers/query-config.js +31 -0
- package/.medusa/server/src/api/store/sellers/route.d.ts +3 -0
- package/.medusa/server/src/api/store/sellers/route.js +25 -0
- package/.medusa/server/src/api/store/sellers/validators.d.ts +127 -0
- package/.medusa/server/src/api/store/sellers/validators.js +18 -0
- package/.medusa/server/src/api/store/shipping-options/route.d.ts +4 -0
- package/.medusa/server/src/api/store/shipping-options/route.js +17 -0
- package/.medusa/server/src/api/utils/index.d.ts +1 -0
- package/.medusa/server/src/api/utils/index.js +18 -0
- package/.medusa/server/src/api/utils/unless-base-url.d.ts +10 -0
- package/.medusa/server/src/api/utils/unless-base-url.js +20 -0
- package/.medusa/server/src/api/vendor/campaigns/[id]/promotions/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/campaigns/[id]/promotions/route.js +21 -0
- package/.medusa/server/src/api/vendor/campaigns/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/campaigns/[id]/route.js +42 -0
- package/.medusa/server/src/api/vendor/campaigns/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/campaigns/helpers.js +30 -0
- package/.medusa/server/src/api/vendor/campaigns/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/campaigns/middlewares.js +63 -0
- package/.medusa/server/src/api/vendor/campaigns/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/campaigns/query-config.js +27 -0
- package/.medusa/server/src/api/vendor/campaigns/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/campaigns/route.js +35 -0
- package/.medusa/server/src/api/vendor/campaigns/validators.d.ts +191 -0
- package/.medusa/server/src/api/vendor/campaigns/validators.js +70 -0
- package/.medusa/server/src/api/vendor/collections/[id]/products/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/collections/[id]/products/route.js +23 -0
- package/.medusa/server/src/api/vendor/collections/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/collections/[id]/route.js +25 -0
- package/.medusa/server/src/api/vendor/collections/helpers.d.ts +4 -0
- package/.medusa/server/src/api/vendor/collections/helpers.js +29 -0
- package/.medusa/server/src/api/vendor/collections/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/collections/middlewares.js +32 -0
- package/.medusa/server/src/api/vendor/collections/query-config.d.ts +9 -0
- package/.medusa/server/src/api/vendor/collections/query-config.js +20 -0
- package/.medusa/server/src/api/vendor/collections/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/collections/route.js +26 -0
- package/.medusa/server/src/api/vendor/collections/validators.d.ts +169 -0
- package/.medusa/server/src/api/vendor/collections/validators.js +19 -0
- package/.medusa/server/src/api/vendor/currencies/[code]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/currencies/[code]/route.js +19 -0
- package/.medusa/server/src/api/vendor/currencies/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/currencies/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/currencies/query-config.d.ts +12 -0
- package/.medusa/server/src/api/vendor/currencies/query-config.js +23 -0
- package/.medusa/server/src/api/vendor/currencies/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/currencies/route.js +21 -0
- package/.medusa/server/src/api/vendor/currencies/validators.d.ts +46 -0
- package/.medusa/server/src/api/vendor/currencies/validators.js +15 -0
- package/.medusa/server/src/api/vendor/customers/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/customers/[id]/route.js +21 -0
- package/.medusa/server/src/api/vendor/customers/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/customers/helpers.js +20 -0
- package/.medusa/server/src/api/vendor/customers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/customers/middlewares.js +33 -0
- package/.medusa/server/src/api/vendor/customers/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/customers/query-config.js +28 -0
- package/.medusa/server/src/api/vendor/customers/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/customers/route.js +21 -0
- package/.medusa/server/src/api/vendor/customers/validators.d.ts +127 -0
- package/.medusa/server/src/api/vendor/customers/validators.js +18 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/middlewares.js +16 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/query-config.d.ts +7 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/query-config.js +11 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/route.js +21 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/validators.d.ts +35 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/validators.js +17 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/[id]/service-zones/[zone_id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/[id]/service-zones/[zone_id]/route.js +61 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/[id]/service-zones/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/[id]/service-zones/route.js +25 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/helpers.js +40 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/middlewares.js +44 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/query-config.d.ts +13 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/query-config.js +34 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/validators.d.ts +365 -0
- package/.medusa/server/src/api/vendor/fulfillment-sets/validators.js +56 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/location-levels/[location_id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/location-levels/[location_id]/route.js +48 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/location-levels/batch/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/location-levels/batch/route.js +30 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/location-levels/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/location-levels/route.js +42 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/route.js +42 -0
- package/.medusa/server/src/api/vendor/inventory-items/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/inventory-items/helpers.js +30 -0
- package/.medusa/server/src/api/vendor/inventory-items/location-levels/batch/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/inventory-items/location-levels/batch/route.js +22 -0
- package/.medusa/server/src/api/vendor/inventory-items/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/inventory-items/middlewares.js +100 -0
- package/.medusa/server/src/api/vendor/inventory-items/query-config.d.ts +22 -0
- package/.medusa/server/src/api/vendor/inventory-items/query-config.js +58 -0
- package/.medusa/server/src/api/vendor/inventory-items/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/inventory-items/route.js +35 -0
- package/.medusa/server/src/api/vendor/inventory-items/validators.d.ts +773 -0
- package/.medusa/server/src/api/vendor/inventory-items/validators.js +117 -0
- package/.medusa/server/src/api/vendor/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/middlewares.js +105 -0
- package/.medusa/server/src/api/vendor/orders/[id]/cancel/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/cancel/route.js +26 -0
- package/.medusa/server/src/api/vendor/orders/[id]/changes/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/changes/route.js +21 -0
- package/.medusa/server/src/api/vendor/orders/[id]/complete/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/complete/route.js +25 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/cancel/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/cancel/route.js +27 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/mark-as-delivered/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/mark-as-delivered/route.js +26 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/shipments/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/shipments/route.js +28 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/route.js +20 -0
- package/.medusa/server/src/api/vendor/orders/[id]/preview/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/preview/route.js +15 -0
- package/.medusa/server/src/api/vendor/orders/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/[id]/route.js +19 -0
- package/.medusa/server/src/api/vendor/orders/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/orders/helpers.js +23 -0
- package/.medusa/server/src/api/vendor/orders/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/orders/middlewares.js +88 -0
- package/.medusa/server/src/api/vendor/orders/query-config.d.ts +18 -0
- package/.medusa/server/src/api/vendor/orders/query-config.js +58 -0
- package/.medusa/server/src/api/vendor/orders/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/orders/route.js +29 -0
- package/.medusa/server/src/api/vendor/orders/validators.d.ts +225 -0
- package/.medusa/server/src/api/vendor/orders/validators.js +45 -0
- package/.medusa/server/src/api/vendor/payments/[id]/capture/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/payments/[id]/capture/route.js +21 -0
- package/.medusa/server/src/api/vendor/payments/[id]/refund/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/payments/[id]/refund/route.js +21 -0
- package/.medusa/server/src/api/vendor/payments/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payments/[id]/route.js +12 -0
- package/.medusa/server/src/api/vendor/payments/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payments/helpers.js +30 -0
- package/.medusa/server/src/api/vendor/payments/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/payments/middlewares.js +56 -0
- package/.medusa/server/src/api/vendor/payments/payment-providers/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payments/payment-providers/route.js +21 -0
- package/.medusa/server/src/api/vendor/payments/query-config.d.ts +18 -0
- package/.medusa/server/src/api/vendor/payments/query-config.js +37 -0
- package/.medusa/server/src/api/vendor/payments/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payments/route.js +21 -0
- package/.medusa/server/src/api/vendor/payments/validators.d.ts +174 -0
- package/.medusa/server/src/api/vendor/payments/validators.js +37 -0
- package/.medusa/server/src/api/vendor/payout-accounts/[id]/onboarding/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/payout-accounts/[id]/onboarding/route.js +26 -0
- package/.medusa/server/src/api/vendor/payout-accounts/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payout-accounts/[id]/route.js +18 -0
- package/.medusa/server/src/api/vendor/payout-accounts/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/payout-accounts/helpers.js +20 -0
- package/.medusa/server/src/api/vendor/payout-accounts/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/payout-accounts/middlewares.js +49 -0
- package/.medusa/server/src/api/vendor/payout-accounts/query-config.d.ts +18 -0
- package/.medusa/server/src/api/vendor/payout-accounts/query-config.js +40 -0
- package/.medusa/server/src/api/vendor/payout-accounts/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/payout-accounts/route.js +40 -0
- package/.medusa/server/src/api/vendor/payout-accounts/validators.d.ts +52 -0
- package/.medusa/server/src/api/vendor/payout-accounts/validators.js +23 -0
- package/.medusa/server/src/api/vendor/payouts/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payouts/[id]/route.js +21 -0
- package/.medusa/server/src/api/vendor/payouts/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/payouts/helpers.js +20 -0
- package/.medusa/server/src/api/vendor/payouts/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/payouts/middlewares.js +33 -0
- package/.medusa/server/src/api/vendor/payouts/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/payouts/query-config.js +24 -0
- package/.medusa/server/src/api/vendor/payouts/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payouts/route.js +21 -0
- package/.medusa/server/src/api/vendor/payouts/validators.d.ts +118 -0
- package/.medusa/server/src/api/vendor/payouts/validators.js +15 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/prices/batch/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/prices/batch/route.js +48 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/prices/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/prices/route.js +27 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/products/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/products/route.js +31 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/price-lists/[id]/route.js +40 -0
- package/.medusa/server/src/api/vendor/price-lists/helpers.d.ts +5 -0
- package/.medusa/server/src/api/vendor/price-lists/helpers.js +71 -0
- package/.medusa/server/src/api/vendor/price-lists/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/price-lists/middlewares.js +111 -0
- package/.medusa/server/src/api/vendor/price-lists/query-config.d.ts +14 -0
- package/.medusa/server/src/api/vendor/price-lists/query-config.js +44 -0
- package/.medusa/server/src/api/vendor/price-lists/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/price-lists/route.js +40 -0
- package/.medusa/server/src/api/vendor/price-lists/validators.d.ts +285 -0
- package/.medusa/server/src/api/vendor/price-lists/validators.js +58 -0
- package/.medusa/server/src/api/vendor/price-preferences/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/price-preferences/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/price-preferences/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/price-preferences/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/price-preferences/query-config.d.ts +10 -0
- package/.medusa/server/src/api/vendor/price-preferences/query-config.js +21 -0
- package/.medusa/server/src/api/vendor/price-preferences/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/price-preferences/route.js +21 -0
- package/.medusa/server/src/api/vendor/price-preferences/validators.d.ts +43 -0
- package/.medusa/server/src/api/vendor/price-preferences/validators.js +16 -0
- package/.medusa/server/src/api/vendor/product-categories/[id]/products/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-categories/[id]/products/route.js +27 -0
- package/.medusa/server/src/api/vendor/product-categories/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-categories/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/product-categories/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/product-categories/helpers.js +24 -0
- package/.medusa/server/src/api/vendor/product-categories/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/product-categories/middlewares.js +65 -0
- package/.medusa/server/src/api/vendor/product-categories/query-config.d.ts +9 -0
- package/.medusa/server/src/api/vendor/product-categories/query-config.js +27 -0
- package/.medusa/server/src/api/vendor/product-categories/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-categories/route.js +21 -0
- package/.medusa/server/src/api/vendor/product-categories/validators.d.ts +58 -0
- package/.medusa/server/src/api/vendor/product-categories/validators.js +22 -0
- package/.medusa/server/src/api/vendor/product-tags/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-tags/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/product-tags/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/product-tags/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/product-tags/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/product-tags/query-config.js +21 -0
- package/.medusa/server/src/api/vendor/product-tags/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-tags/route.js +21 -0
- package/.medusa/server/src/api/vendor/product-tags/validators.d.ts +60 -0
- package/.medusa/server/src/api/vendor/product-tags/validators.js +19 -0
- package/.medusa/server/src/api/vendor/product-types/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-types/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/product-types/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/product-types/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/product-types/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/product-types/query-config.js +21 -0
- package/.medusa/server/src/api/vendor/product-types/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-types/route.js +21 -0
- package/.medusa/server/src/api/vendor/product-types/validators.d.ts +40 -0
- package/.medusa/server/src/api/vendor/product-types/validators.js +15 -0
- package/.medusa/server/src/api/vendor/product-variants/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/product-variants/middlewares.js +26 -0
- package/.medusa/server/src/api/vendor/product-variants/query-config.d.ts +12 -0
- package/.medusa/server/src/api/vendor/product-variants/query-config.js +41 -0
- package/.medusa/server/src/api/vendor/product-variants/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/product-variants/route.js +21 -0
- package/.medusa/server/src/api/vendor/product-variants/validators.d.ts +128 -0
- package/.medusa/server/src/api/vendor/product-variants/validators.js +20 -0
- package/.medusa/server/src/api/vendor/products/[id]/options/[option_id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/products/[id]/options/[option_id]/route.js +43 -0
- package/.medusa/server/src/api/vendor/products/[id]/options/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/products/[id]/options/route.js +34 -0
- package/.medusa/server/src/api/vendor/products/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/products/[id]/route.js +58 -0
- package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/route.js +57 -0
- package/.medusa/server/src/api/vendor/products/[id]/variants/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/products/[id]/variants/route.js +55 -0
- package/.medusa/server/src/api/vendor/products/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/products/helpers.js +20 -0
- package/.medusa/server/src/api/vendor/products/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/products/middlewares.js +112 -0
- package/.medusa/server/src/api/vendor/products/query-config.d.ts +22 -0
- package/.medusa/server/src/api/vendor/products/query-config.js +61 -0
- package/.medusa/server/src/api/vendor/products/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/products/route.js +43 -0
- package/.medusa/server/src/api/vendor/products/validators.d.ts +2192 -0
- package/.medusa/server/src/api/vendor/products/validators.js +168 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/[rule_type]/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/[rule_type]/route.js +103 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/buy-rules/batch/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/buy-rules/batch/route.js +23 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/route.js +42 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/rules/batch/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/rules/batch/route.js +23 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/target-rules/batch/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/promotions/[id]/target-rules/batch/route.js +23 -0
- package/.medusa/server/src/api/vendor/promotions/helpers.d.ts +13 -0
- package/.medusa/server/src/api/vendor/promotions/helpers.js +70 -0
- package/.medusa/server/src/api/vendor/promotions/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/promotions/middlewares.js +100 -0
- package/.medusa/server/src/api/vendor/promotions/query-config.d.ts +29 -0
- package/.medusa/server/src/api/vendor/promotions/query-config.js +60 -0
- package/.medusa/server/src/api/vendor/promotions/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/promotions/route.js +35 -0
- package/.medusa/server/src/api/vendor/promotions/rule-attribute-options/[rule_type]/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/promotions/rule-attribute-options/[rule_type]/route.js +18 -0
- package/.medusa/server/src/api/vendor/promotions/rule-value-options/[rule_type]/[rule_attribute_id]/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/promotions/rule-value-options/[rule_type]/[rule_attribute_id]/route.js +54 -0
- package/.medusa/server/src/api/vendor/promotions/utils/index.d.ts +5 -0
- package/.medusa/server/src/api/vendor/promotions/utils/index.js +22 -0
- package/.medusa/server/src/api/vendor/promotions/utils/operators-map.d.ts +18 -0
- package/.medusa/server/src/api/vendor/promotions/utils/operators-map.js +22 -0
- package/.medusa/server/src/api/vendor/promotions/utils/rule-attributes-map.d.ts +11 -0
- package/.medusa/server/src/api/vendor/promotions/utils/rule-attributes-map.js +155 -0
- package/.medusa/server/src/api/vendor/promotions/utils/rule-query-configuration.d.ts +5 -0
- package/.medusa/server/src/api/vendor/promotions/utils/rule-query-configuration.js +61 -0
- package/.medusa/server/src/api/vendor/promotions/utils/validate-rule-attribute.d.ts +8 -0
- package/.medusa/server/src/api/vendor/promotions/utils/validate-rule-attribute.js +18 -0
- package/.medusa/server/src/api/vendor/promotions/utils/validate-rule-type.d.ts +1 -0
- package/.medusa/server/src/api/vendor/promotions/utils/validate-rule-type.js +12 -0
- package/.medusa/server/src/api/vendor/promotions/validators.d.ts +1082 -0
- package/.medusa/server/src/api/vendor/promotions/validators.js +134 -0
- package/.medusa/server/src/api/vendor/refund-reasons/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/refund-reasons/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/refund-reasons/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/refund-reasons/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/refund-reasons/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/refund-reasons/query-config.js +22 -0
- package/.medusa/server/src/api/vendor/refund-reasons/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/refund-reasons/route.js +21 -0
- package/.medusa/server/src/api/vendor/refund-reasons/validators.d.ts +121 -0
- package/.medusa/server/src/api/vendor/refund-reasons/validators.js +16 -0
- package/.medusa/server/src/api/vendor/regions/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/regions/[id]/route.js +18 -0
- package/.medusa/server/src/api/vendor/regions/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/regions/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/regions/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/regions/query-config.js +24 -0
- package/.medusa/server/src/api/vendor/regions/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/regions/route.js +21 -0
- package/.medusa/server/src/api/vendor/regions/validators.d.ts +127 -0
- package/.medusa/server/src/api/vendor/regions/validators.js +18 -0
- package/.medusa/server/src/api/vendor/return-reasons/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/return-reasons/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/return-reasons/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/return-reasons/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/return-reasons/query-config.d.ts +12 -0
- package/.medusa/server/src/api/vendor/return-reasons/query-config.js +28 -0
- package/.medusa/server/src/api/vendor/return-reasons/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/return-reasons/route.js +21 -0
- package/.medusa/server/src/api/vendor/return-reasons/validators.d.ts +133 -0
- package/.medusa/server/src/api/vendor/return-reasons/validators.js +22 -0
- package/.medusa/server/src/api/vendor/returns/[id]/cancel/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/returns/[id]/cancel/route.js +19 -0
- package/.medusa/server/src/api/vendor/returns/[id]/dismiss-items/[action_id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/[id]/dismiss-items/[action_id]/route.js +56 -0
- package/.medusa/server/src/api/vendor/returns/[id]/dismiss-items/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/returns/[id]/dismiss-items/route.js +28 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive/confirm/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive/confirm/route.js +31 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive/route.js +51 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive-items/[action_id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive-items/[action_id]/route.js +56 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive-items/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/returns/[id]/receive-items/route.js +28 -0
- package/.medusa/server/src/api/vendor/returns/[id]/request/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/[id]/request/route.js +46 -0
- package/.medusa/server/src/api/vendor/returns/[id]/request-items/[action_id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/[id]/request-items/[action_id]/route.js +56 -0
- package/.medusa/server/src/api/vendor/returns/[id]/request-items/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/returns/[id]/request-items/route.js +28 -0
- package/.medusa/server/src/api/vendor/returns/[id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/[id]/route.js +45 -0
- package/.medusa/server/src/api/vendor/returns/[id]/shipping-method/[action_id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/[id]/shipping-method/[action_id]/route.js +56 -0
- package/.medusa/server/src/api/vendor/returns/[id]/shipping-method/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/returns/[id]/shipping-method/route.js +28 -0
- package/.medusa/server/src/api/vendor/returns/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/returns/helpers.js +21 -0
- package/.medusa/server/src/api/vendor/returns/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/returns/middlewares.js +189 -0
- package/.medusa/server/src/api/vendor/returns/query-config.d.ts +12 -0
- package/.medusa/server/src/api/vendor/returns/query-config.js +38 -0
- package/.medusa/server/src/api/vendor/returns/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/returns/route.js +52 -0
- package/.medusa/server/src/api/vendor/returns/validators.d.ts +439 -0
- package/.medusa/server/src/api/vendor/returns/validators.js +91 -0
- package/.medusa/server/src/api/vendor/sales-channels/[id]/products/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/sales-channels/[id]/products/route.js +24 -0
- package/.medusa/server/src/api/vendor/sales-channels/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/sales-channels/[id]/route.js +20 -0
- package/.medusa/server/src/api/vendor/sales-channels/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/sales-channels/helpers.js +14 -0
- package/.medusa/server/src/api/vendor/sales-channels/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/sales-channels/middlewares.js +32 -0
- package/.medusa/server/src/api/vendor/sales-channels/query-config.d.ts +10 -0
- package/.medusa/server/src/api/vendor/sales-channels/query-config.js +22 -0
- package/.medusa/server/src/api/vendor/sales-channels/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/sales-channels/route.js +21 -0
- package/.medusa/server/src/api/vendor/sales-channels/validators.d.ts +43 -0
- package/.medusa/server/src/api/vendor/sales-channels/validators.js +16 -0
- package/.medusa/server/src/api/vendor/sellers/me/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/sellers/me/route.js +32 -0
- package/.medusa/server/src/api/vendor/sellers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/sellers/middlewares.js +32 -0
- package/.medusa/server/src/api/vendor/sellers/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/sellers/query-config.js +32 -0
- package/.medusa/server/src/api/vendor/sellers/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/sellers/route.js +22 -0
- package/.medusa/server/src/api/vendor/sellers/validators.d.ts +112 -0
- package/.medusa/server/src/api/vendor/sellers/validators.js +43 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/[id]/route.js +14 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/helpers.js +15 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/middlewares.js +23 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/query-config.d.ts +12 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/query-config.js +23 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/route.js +21 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/validators.d.ts +130 -0
- package/.medusa/server/src/api/vendor/shipping-option-types/validators.js +19 -0
- package/.medusa/server/src/api/vendor/shipping-options/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/shipping-options/[id]/route.js +46 -0
- package/.medusa/server/src/api/vendor/shipping-options/[id]/rules/batch/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/shipping-options/[id]/rules/batch/route.js +26 -0
- package/.medusa/server/src/api/vendor/shipping-options/helpers.d.ts +12 -0
- package/.medusa/server/src/api/vendor/shipping-options/helpers.js +64 -0
- package/.medusa/server/src/api/vendor/shipping-options/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/shipping-options/middlewares.js +63 -0
- package/.medusa/server/src/api/vendor/shipping-options/query-config.d.ts +22 -0
- package/.medusa/server/src/api/vendor/shipping-options/query-config.js +47 -0
- package/.medusa/server/src/api/vendor/shipping-options/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/shipping-options/route.js +35 -0
- package/.medusa/server/src/api/vendor/shipping-options/validators.d.ts +860 -0
- package/.medusa/server/src/api/vendor/shipping-options/validators.js +130 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/[id]/route.js +38 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/helpers.js +30 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/middlewares.js +54 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/query-config.js +22 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/route.js +35 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/validators.d.ts +155 -0
- package/.medusa/server/src/api/vendor/shipping-profiles/validators.js +32 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/fulfillment-providers/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/fulfillment-providers/route.js +30 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/fulfillment-sets/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/fulfillment-sets/route.js +23 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/route.js +43 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/sales-channels/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/stock-locations/[id]/sales-channels/route.js +22 -0
- package/.medusa/server/src/api/vendor/stock-locations/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/stock-locations/helpers.js +30 -0
- package/.medusa/server/src/api/vendor/stock-locations/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/stock-locations/middlewares.js +79 -0
- package/.medusa/server/src/api/vendor/stock-locations/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/stock-locations/query-config.js +30 -0
- package/.medusa/server/src/api/vendor/stock-locations/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/stock-locations/route.js +35 -0
- package/.medusa/server/src/api/vendor/stock-locations/validators.d.ts +287 -0
- package/.medusa/server/src/api/vendor/stock-locations/validators.js +47 -0
- package/.medusa/server/src/api/vendor/stores/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/stores/middlewares.js +16 -0
- package/.medusa/server/src/api/vendor/stores/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/stores/query-config.js +26 -0
- package/.medusa/server/src/api/vendor/stores/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/stores/route.js +21 -0
- package/.medusa/server/src/api/vendor/stores/validators.d.ts +40 -0
- package/.medusa/server/src/api/vendor/stores/validators.js +15 -0
- package/.medusa/server/src/api/vendor/uploads/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/uploads/middlewares.js +16 -0
- package/.medusa/server/src/api/vendor/uploads/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/uploads/route.js +24 -0
- package/.medusa/server/src/links/campaign-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/campaign-seller-link.js +10 -0
- package/.medusa/server/src/links/inventory-item-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/inventory-item-seller-link.js +10 -0
- package/.medusa/server/src/links/line-item-commission-line-link.d.ts +2 -0
- package/.medusa/server/src/links/line-item-commission-line-link.js +21 -0
- package/.medusa/server/src/links/order-group-cart-link.d.ts +2 -0
- package/.medusa/server/src/links/order-group-cart-link.js +15 -0
- package/.medusa/server/src/links/order-group-order-link.d.ts +2 -0
- package/.medusa/server/src/links/order-group-order-link.js +14 -0
- package/.medusa/server/src/links/order-payout-link.d.ts +2 -0
- package/.medusa/server/src/links/order-payout-link.js +13 -0
- package/.medusa/server/src/links/order-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/order-seller-link.js +10 -0
- package/.medusa/server/src/links/payout-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/payout-seller-link.js +13 -0
- package/.medusa/server/src/links/price-list-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/price-list-seller-link.js +10 -0
- package/.medusa/server/src/links/product-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/product-seller-link.js +10 -0
- package/.medusa/server/src/links/promotion-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/promotion-seller-link.js +10 -0
- package/.medusa/server/src/links/seller-customer-link.d.ts +2 -0
- package/.medusa/server/src/links/seller-customer-link.js +10 -0
- package/.medusa/server/src/links/seller-payout-account-link.d.ts +2 -0
- package/.medusa/server/src/links/seller-payout-account-link.js +10 -0
- package/.medusa/server/src/links/shipping-option-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/shipping-option-seller-link.js +10 -0
- package/.medusa/server/src/links/shipping-profile-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/shipping-profile-seller-link.js +10 -0
- package/.medusa/server/src/links/stock-location-seller-link.d.ts +2 -0
- package/.medusa/server/src/links/stock-location-seller-link.js +10 -0
- package/.medusa/server/src/modules/commission/index.d.ts +49 -0
- package/.medusa/server/src/modules/commission/index.js +12 -0
- package/.medusa/server/src/modules/commission/migrations/Migration20260130132817.d.ts +5 -0
- package/.medusa/server/src/modules/commission/migrations/Migration20260130132817.js +26 -0
- package/.medusa/server/src/modules/commission/models/commission-line.d.ts +10 -0
- package/.medusa/server/src/modules/commission/models/commission-line.js +14 -0
- package/.medusa/server/src/modules/commission/models/commission-rate.d.ts +21 -0
- package/.medusa/server/src/modules/commission/models/commission-rate.js +26 -0
- package/.medusa/server/src/modules/commission/models/commission-rule.d.ts +20 -0
- package/.medusa/server/src/modules/commission/models/commission-rule.js +17 -0
- package/.medusa/server/src/modules/commission/models/index.d.ts +3 -0
- package/.medusa/server/src/modules/commission/models/index.js +13 -0
- package/.medusa/server/src/modules/commission/service.d.ts +63 -0
- package/.medusa/server/src/modules/commission/service.js +184 -0
- package/.medusa/server/src/modules/payout/index.d.ts +77 -0
- package/.medusa/server/src/modules/payout/index.js +14 -0
- package/.medusa/server/src/modules/payout/loaders/provider.d.ts +5 -0
- package/.medusa/server/src/modules/payout/loaders/provider.js +28 -0
- package/.medusa/server/src/modules/payout/migrations/Migration20260130132816.d.ts +5 -0
- package/.medusa/server/src/modules/payout/migrations/Migration20260130132816.js +42 -0
- package/.medusa/server/src/modules/payout/migrations/Migration20260216152209.d.ts +5 -0
- package/.medusa/server/src/modules/payout/migrations/Migration20260216152209.js +14 -0
- package/.medusa/server/src/modules/payout/models/balance.d.ts +53 -0
- package/.medusa/server/src/modules/payout/models/balance.js +35 -0
- package/.medusa/server/src/modules/payout/models/index.d.ts +5 -0
- package/.medusa/server/src/modules/payout/models/index.js +14 -0
- package/.medusa/server/src/modules/payout/models/onboarding.d.ts +35 -0
- package/.medusa/server/src/modules/payout/models/onboarding.js +14 -0
- package/.medusa/server/src/modules/payout/models/payout-account.d.ts +41 -0
- package/.medusa/server/src/modules/payout/models/payout-account.js +28 -0
- package/.medusa/server/src/modules/payout/models/payout.d.ts +41 -0
- package/.medusa/server/src/modules/payout/models/payout.js +18 -0
- package/.medusa/server/src/modules/payout/models/transaction.d.ts +40 -0
- package/.medusa/server/src/modules/payout/models/transaction.js +26 -0
- package/.medusa/server/src/modules/payout/providers/index.d.ts +1 -0
- package/.medusa/server/src/modules/payout/providers/index.js +6 -0
- package/.medusa/server/src/modules/payout/providers/system.d.ts +8 -0
- package/.medusa/server/src/modules/payout/providers/system.js +32 -0
- package/.medusa/server/src/modules/payout/services/index.d.ts +2 -0
- package/.medusa/server/src/modules/payout/services/index.js +24 -0
- package/.medusa/server/src/modules/payout/services/payout-module-service.d.ts +220 -0
- package/.medusa/server/src/modules/payout/services/payout-module-service.js +278 -0
- package/.medusa/server/src/modules/payout/services/provider-service.d.ts +17 -0
- package/.medusa/server/src/modules/payout/services/provider-service.js +32 -0
- package/.medusa/server/src/modules/payout/utils/calculate-payout-transactions.d.ts +10 -0
- package/.medusa/server/src/modules/payout/utils/calculate-payout-transactions.js +17 -0
- package/.medusa/server/src/modules/payout/utils/index.d.ts +1 -0
- package/.medusa/server/src/modules/payout/utils/index.js +18 -0
- package/.medusa/server/src/modules/seller/index.d.ts +35 -0
- package/.medusa/server/src/modules/seller/index.js +12 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260123112516.d.ts +5 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260123112516.js +20 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260126130937.d.ts +5 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260126130937.js +18 -0
- package/.medusa/server/src/modules/seller/models/index.d.ts +2 -0
- package/.medusa/server/src/modules/seller/models/index.js +11 -0
- package/.medusa/server/src/modules/seller/models/order-group.d.ts +8 -0
- package/.medusa/server/src/modules/seller/models/order-group.js +12 -0
- package/.medusa/server/src/modules/seller/models/seller.d.ts +18 -0
- package/.medusa/server/src/modules/seller/models/seller.js +22 -0
- package/.medusa/server/src/modules/seller/repositories/index.d.ts +1 -0
- package/.medusa/server/src/modules/seller/repositories/index.js +6 -0
- package/.medusa/server/src/modules/seller/repositories/order-group.d.ts +17 -0
- package/.medusa/server/src/modules/seller/repositories/order-group.js +179 -0
- package/.medusa/server/src/modules/seller/service.d.ts +80 -0
- package/.medusa/server/src/modules/seller/service.js +129 -0
- package/.medusa/server/src/subscribers/payout-webhook.d.ts +4 -0
- package/.medusa/server/src/subscribers/payout-webhook.js +27 -0
- package/.medusa/server/src/workflows/campaign/index.d.ts +2 -0
- package/.medusa/server/src/workflows/campaign/index.js +19 -0
- package/.medusa/server/src/workflows/campaign/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/campaign/steps/index.js +18 -0
- package/.medusa/server/src/workflows/campaign/steps/link-seller-campaign.d.ts +6 -0
- package/.medusa/server/src/workflows/campaign/steps/link-seller-campaign.js +36 -0
- package/.medusa/server/src/workflows/campaign/workflows/create-seller-campaigns.d.ts +7 -0
- package/.medusa/server/src/workflows/campaign/workflows/create-seller-campaigns.js +20 -0
- package/.medusa/server/src/workflows/campaign/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/campaign/workflows/index.js +18 -0
- package/.medusa/server/src/workflows/cart/index.d.ts +2 -0
- package/.medusa/server/src/workflows/cart/index.js +19 -0
- package/.medusa/server/src/workflows/cart/steps/index.d.ts +2 -0
- package/.medusa/server/src/workflows/cart/steps/index.js +19 -0
- package/.medusa/server/src/workflows/cart/steps/prepare-adjustments-from-promotion-actions.d.ts +6 -0
- package/.medusa/server/src/workflows/cart/steps/prepare-adjustments-from-promotion-actions.js +106 -0
- package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-items.d.ts +15 -0
- package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-items.js +17 -0
- package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-shipping.d.ts +18 -0
- package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-shipping.js +18 -0
- package/.medusa/server/src/workflows/cart/utils/fields.d.ts +3 -0
- package/.medusa/server/src/workflows/cart/utils/fields.js +154 -0
- package/.medusa/server/src/workflows/cart/utils/index.d.ts +4 -0
- package/.medusa/server/src/workflows/cart/utils/index.js +21 -0
- package/.medusa/server/src/workflows/cart/utils/prepare-confirm-inventory-input.d.ts +28 -0
- package/.medusa/server/src/workflows/cart/utils/prepare-confirm-inventory-input.js +165 -0
- package/.medusa/server/src/workflows/cart/utils/prepare-line-item-data.d.ts +71 -0
- package/.medusa/server/src/workflows/cart/utils/prepare-line-item-data.js +90 -0
- package/.medusa/server/src/workflows/cart/utils/schemas.d.ts +3 -0
- package/.medusa/server/src/workflows/cart/utils/schemas.js +7 -0
- package/.medusa/server/src/workflows/cart/workflows/add-seller-shipping-method-to-cart.d.ts +7 -0
- package/.medusa/server/src/workflows/cart/workflows/add-seller-shipping-method-to-cart.js +130 -0
- package/.medusa/server/src/workflows/cart/workflows/complete-cart-with-split-orders.d.ts +13 -0
- package/.medusa/server/src/workflows/cart/workflows/complete-cart-with-split-orders.js +379 -0
- package/.medusa/server/src/workflows/cart/workflows/index.d.ts +4 -0
- package/.medusa/server/src/workflows/cart/workflows/index.js +21 -0
- package/.medusa/server/src/workflows/cart/workflows/list-seller-shipping-options-for-cart.d.ts +21 -0
- package/.medusa/server/src/workflows/cart/workflows/list-seller-shipping-options-for-cart.js +217 -0
- package/.medusa/server/src/workflows/cart/workflows/update-cart-seller-promotions.d.ts +5 -0
- package/.medusa/server/src/workflows/cart/workflows/update-cart-seller-promotions.js +74 -0
- package/.medusa/server/src/workflows/commission/index.d.ts +2 -0
- package/.medusa/server/src/workflows/commission/index.js +19 -0
- package/.medusa/server/src/workflows/commission/steps/create-commission-rates.d.ts +30 -0
- package/.medusa/server/src/workflows/commission/steps/create-commission-rates.js +17 -0
- package/.medusa/server/src/workflows/commission/steps/create-commission-rules.d.ts +34 -0
- package/.medusa/server/src/workflows/commission/steps/create-commission-rules.js +21 -0
- package/.medusa/server/src/workflows/commission/steps/delete-commission-rates.d.ts +2 -0
- package/.medusa/server/src/workflows/commission/steps/delete-commission-rates.js +17 -0
- package/.medusa/server/src/workflows/commission/steps/delete-commission-rules.d.ts +2 -0
- package/.medusa/server/src/workflows/commission/steps/delete-commission-rules.js +24 -0
- package/.medusa/server/src/workflows/commission/steps/get-commission-lines.d.ts +3 -0
- package/.medusa/server/src/workflows/commission/steps/get-commission-lines.js +15 -0
- package/.medusa/server/src/workflows/commission/steps/index.d.ts +8 -0
- package/.medusa/server/src/workflows/commission/steps/index.js +25 -0
- package/.medusa/server/src/workflows/commission/steps/update-commission-rates.d.ts +30 -0
- package/.medusa/server/src/workflows/commission/steps/update-commission-rates.js +17 -0
- package/.medusa/server/src/workflows/commission/steps/update-commission-rules.d.ts +30 -0
- package/.medusa/server/src/workflows/commission/steps/update-commission-rules.js +24 -0
- package/.medusa/server/src/workflows/commission/steps/upsert-commission-lines.d.ts +7 -0
- package/.medusa/server/src/workflows/commission/steps/upsert-commission-lines.js +12 -0
- package/.medusa/server/src/workflows/commission/workflows/batch-commission-rules.d.ts +9 -0
- package/.medusa/server/src/workflows/commission/workflows/batch-commission-rules.js +19 -0
- package/.medusa/server/src/workflows/commission/workflows/create-commission-rates.d.ts +30 -0
- package/.medusa/server/src/workflows/commission/workflows/create-commission-rates.js +11 -0
- package/.medusa/server/src/workflows/commission/workflows/delete-commission-rates.d.ts +8 -0
- package/.medusa/server/src/workflows/commission/workflows/delete-commission-rates.js +16 -0
- package/.medusa/server/src/workflows/commission/workflows/index.d.ts +5 -0
- package/.medusa/server/src/workflows/commission/workflows/index.js +22 -0
- package/.medusa/server/src/workflows/commission/workflows/refresh-order-commission-lines.d.ts +6 -0
- package/.medusa/server/src/workflows/commission/workflows/refresh-order-commission-lines.js +79 -0
- package/.medusa/server/src/workflows/commission/workflows/update-commission-rates.d.ts +30 -0
- package/.medusa/server/src/workflows/commission/workflows/update-commission-rates.js +11 -0
- package/.medusa/server/src/workflows/events.d.ts +17 -0
- package/.medusa/server/src/workflows/events.js +21 -0
- package/.medusa/server/src/workflows/hooks/product-created.d.ts +1 -0
- package/.medusa/server/src/workflows/hooks/product-created.js +68 -0
- package/.medusa/server/src/workflows/hooks/product-variant-created.d.ts +1 -0
- package/.medusa/server/src/workflows/hooks/product-variant-created.js +50 -0
- package/.medusa/server/src/workflows/index.d.ts +13 -0
- package/.medusa/server/src/workflows/index.js +30 -0
- package/.medusa/server/src/workflows/inventory-item/index.d.ts +2 -0
- package/.medusa/server/src/workflows/inventory-item/index.js +19 -0
- package/.medusa/server/src/workflows/inventory-item/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/inventory-item/steps/index.js +18 -0
- package/.medusa/server/src/workflows/inventory-item/steps/link-seller-inventory-item.d.ts +6 -0
- package/.medusa/server/src/workflows/inventory-item/steps/link-seller-inventory-item.js +36 -0
- package/.medusa/server/src/workflows/inventory-item/workflows/create-seller-inventory-items.d.ts +7 -0
- package/.medusa/server/src/workflows/inventory-item/workflows/create-seller-inventory-items.js +20 -0
- package/.medusa/server/src/workflows/inventory-item/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/inventory-item/workflows/index.js +18 -0
- package/.medusa/server/src/workflows/order-group/index.d.ts +1 -0
- package/.medusa/server/src/workflows/order-group/index.js +18 -0
- package/.medusa/server/src/workflows/order-group/steps/create-order-group.d.ts +11 -0
- package/.medusa/server/src/workflows/order-group/steps/create-order-group.js +17 -0
- package/.medusa/server/src/workflows/order-group/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/order-group/steps/index.js +18 -0
- package/.medusa/server/src/workflows/payout/index.d.ts +2 -0
- package/.medusa/server/src/workflows/payout/index.js +19 -0
- package/.medusa/server/src/workflows/payout/steps/add-payout-transactions.d.ts +11 -0
- package/.medusa/server/src/workflows/payout/steps/add-payout-transactions.js +24 -0
- package/.medusa/server/src/workflows/payout/steps/create-onboarding.d.ts +2 -0
- package/.medusa/server/src/workflows/payout/steps/create-onboarding.js +11 -0
- package/.medusa/server/src/workflows/payout/steps/create-payout-account.d.ts +2 -0
- package/.medusa/server/src/workflows/payout/steps/create-payout-account.js +11 -0
- package/.medusa/server/src/workflows/payout/steps/create-payout.d.ts +3 -0
- package/.medusa/server/src/workflows/payout/steps/create-payout.js +12 -0
- package/.medusa/server/src/workflows/payout/steps/index.d.ts +6 -0
- package/.medusa/server/src/workflows/payout/steps/index.js +23 -0
- package/.medusa/server/src/workflows/payout/steps/update-payout-account.d.ts +58 -0
- package/.medusa/server/src/workflows/payout/steps/update-payout-account.js +27 -0
- package/.medusa/server/src/workflows/payout/steps/update-payout.d.ts +58 -0
- package/.medusa/server/src/workflows/payout/steps/update-payout.js +27 -0
- package/.medusa/server/src/workflows/payout/workflows/create-onboarding.d.ts +2 -0
- package/.medusa/server/src/workflows/payout/workflows/create-onboarding.js +10 -0
- package/.medusa/server/src/workflows/payout/workflows/create-payout-account.d.ts +6 -0
- package/.medusa/server/src/workflows/payout/workflows/create-payout-account.js +25 -0
- package/.medusa/server/src/workflows/payout/workflows/create-payout.d.ts +3 -0
- package/.medusa/server/src/workflows/payout/workflows/create-payout.js +50 -0
- package/.medusa/server/src/workflows/payout/workflows/credit-order-to-payout-account.d.ts +9 -0
- package/.medusa/server/src/workflows/payout/workflows/credit-order-to-payout-account.js +45 -0
- package/.medusa/server/src/workflows/payout/workflows/index.d.ts +5 -0
- package/.medusa/server/src/workflows/payout/workflows/index.js +22 -0
- package/.medusa/server/src/workflows/payout/workflows/process-payout.d.ts +5 -0
- package/.medusa/server/src/workflows/payout/workflows/process-payout.js +67 -0
- package/.medusa/server/src/workflows/price-list/index.d.ts +2 -0
- package/.medusa/server/src/workflows/price-list/index.js +19 -0
- package/.medusa/server/src/workflows/price-list/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/price-list/steps/index.js +18 -0
- package/.medusa/server/src/workflows/price-list/steps/link-seller-price-list.d.ts +6 -0
- package/.medusa/server/src/workflows/price-list/steps/link-seller-price-list.js +36 -0
- package/.medusa/server/src/workflows/price-list/workflows/create-seller-price-lists.d.ts +7 -0
- package/.medusa/server/src/workflows/price-list/workflows/create-seller-price-lists.js +20 -0
- package/.medusa/server/src/workflows/price-list/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/price-list/workflows/index.js +18 -0
- package/.medusa/server/src/workflows/promotion/index.d.ts +2 -0
- package/.medusa/server/src/workflows/promotion/index.js +19 -0
- package/.medusa/server/src/workflows/promotion/steps/index.d.ts +2 -0
- package/.medusa/server/src/workflows/promotion/steps/index.js +19 -0
- package/.medusa/server/src/workflows/promotion/steps/link-seller-promotion.d.ts +6 -0
- package/.medusa/server/src/workflows/promotion/steps/link-seller-promotion.js +36 -0
- package/.medusa/server/src/workflows/promotion/steps/register-usage.d.ts +11 -0
- package/.medusa/server/src/workflows/promotion/steps/register-usage.js +27 -0
- package/.medusa/server/src/workflows/promotion/workflows/create-seller-promotions.d.ts +7 -0
- package/.medusa/server/src/workflows/promotion/workflows/create-seller-promotions.js +20 -0
- package/.medusa/server/src/workflows/promotion/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/promotion/workflows/index.js +18 -0
- package/.medusa/server/src/workflows/seller/index.d.ts +2 -0
- package/.medusa/server/src/workflows/seller/index.js +19 -0
- package/.medusa/server/src/workflows/seller/steps/create-seller.d.ts +2 -0
- package/.medusa/server/src/workflows/seller/steps/create-seller.js +17 -0
- package/.medusa/server/src/workflows/seller/steps/index.d.ts +2 -0
- package/.medusa/server/src/workflows/seller/steps/index.js +19 -0
- package/.medusa/server/src/workflows/seller/steps/update-seller.d.ts +2 -0
- package/.medusa/server/src/workflows/seller/steps/update-seller.js +20 -0
- package/.medusa/server/src/workflows/seller/workflows/create-seller.d.ts +7 -0
- package/.medusa/server/src/workflows/seller/workflows/create-seller.js +16 -0
- package/.medusa/server/src/workflows/seller/workflows/index.d.ts +2 -0
- package/.medusa/server/src/workflows/seller/workflows/index.js +19 -0
- package/.medusa/server/src/workflows/seller/workflows/update-seller.d.ts +2 -0
- package/.medusa/server/src/workflows/seller/workflows/update-seller.js +9 -0
- package/.medusa/server/src/workflows/shipping-option/index.d.ts +2 -0
- package/.medusa/server/src/workflows/shipping-option/index.js +19 -0
- package/.medusa/server/src/workflows/shipping-option/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/shipping-option/steps/index.js +18 -0
- package/.medusa/server/src/workflows/shipping-option/steps/link-seller-shipping-option.d.ts +6 -0
- package/.medusa/server/src/workflows/shipping-option/steps/link-seller-shipping-option.js +36 -0
- package/.medusa/server/src/workflows/shipping-option/workflows/create-seller-shipping-options.d.ts +7 -0
- package/.medusa/server/src/workflows/shipping-option/workflows/create-seller-shipping-options.js +18 -0
- package/.medusa/server/src/workflows/shipping-option/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/shipping-option/workflows/index.js +18 -0
- package/.medusa/server/src/workflows/shipping-profile/index.d.ts +2 -0
- package/.medusa/server/src/workflows/shipping-profile/index.js +19 -0
- package/.medusa/server/src/workflows/shipping-profile/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/shipping-profile/steps/index.js +18 -0
- package/.medusa/server/src/workflows/shipping-profile/steps/link-seller-shipping-profile.d.ts +6 -0
- package/.medusa/server/src/workflows/shipping-profile/steps/link-seller-shipping-profile.js +36 -0
- package/.medusa/server/src/workflows/shipping-profile/workflows/create-seller-shipping-profiles.d.ts +7 -0
- package/.medusa/server/src/workflows/shipping-profile/workflows/create-seller-shipping-profiles.js +20 -0
- package/.medusa/server/src/workflows/shipping-profile/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/shipping-profile/workflows/index.js +18 -0
- package/.medusa/server/src/workflows/stock-location/index.d.ts +2 -0
- package/.medusa/server/src/workflows/stock-location/index.js +19 -0
- package/.medusa/server/src/workflows/stock-location/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/stock-location/steps/index.js +18 -0
- package/.medusa/server/src/workflows/stock-location/steps/link-seller-stock-location.d.ts +6 -0
- package/.medusa/server/src/workflows/stock-location/steps/link-seller-stock-location.js +36 -0
- package/.medusa/server/src/workflows/stock-location/workflows/create-seller-stock-locations.d.ts +7 -0
- package/.medusa/server/src/workflows/stock-location/workflows/create-seller-stock-locations.js +20 -0
- package/.medusa/server/src/workflows/stock-location/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/stock-location/workflows/index.js +18 -0
- package/package.json +78 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { CreatePayoutAccountDTO, CreatePayoutDTO, CreateOnboardingDTO, CreatePayoutTransactionDTO, OnboardingDTO, PayoutAccountDTO, PayoutAccountStatus, PayoutDTO, PayoutTransactionDTO, PayoutWebhookActionInput, PayoutWebhookResult } from "@mercurjs/types";
|
|
2
|
+
import PayoutProviderService from "./provider-service";
|
|
3
|
+
import { Context, DAL } from "@medusajs/framework/types";
|
|
4
|
+
import { EntityManager } from "@medusajs/framework/mikro-orm/knex";
|
|
5
|
+
type InjectedDependencies = {
|
|
6
|
+
payoutProviderService: PayoutProviderService;
|
|
7
|
+
baseRepository: DAL.RepositoryService;
|
|
8
|
+
};
|
|
9
|
+
declare const PayoutModuleService_base: import("@medusajs/framework/utils").MedusaServiceReturnType<import("@medusajs/framework/utils").ModelConfigurationsToConfigTemplate<{
|
|
10
|
+
readonly Onboarding: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
11
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
12
|
+
data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
13
|
+
context: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
14
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
15
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
16
|
+
status: import("@medusajs/framework/utils").EnumProperty<typeof PayoutAccountStatus>;
|
|
17
|
+
data: import("@medusajs/framework/utils").JSONProperty;
|
|
18
|
+
context: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
19
|
+
onboarding: import("@medusajs/framework/utils").RelationNullableModifier<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "onboarding">, import("@medusajs/framework/utils").HasOne<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "onboarding">>, false>;
|
|
20
|
+
payouts: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
21
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
22
|
+
display_id: import("@medusajs/framework/utils").AutoIncrementProperty;
|
|
23
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
24
|
+
amount: import("@medusajs/framework/utils").BigNumberProperty;
|
|
25
|
+
data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
26
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
27
|
+
status: import("@medusajs/framework/utils").EnumProperty<typeof import("@mercurjs/types").PayoutStatus>;
|
|
28
|
+
}>, "payout">>;
|
|
29
|
+
transactions: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
30
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
31
|
+
amount: import("@medusajs/framework/utils").BigNumberProperty;
|
|
32
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
33
|
+
reference: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
34
|
+
reference_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
35
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
36
|
+
}>, "payout_transaction">>;
|
|
37
|
+
balances: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
38
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
39
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
40
|
+
totals: import("@medusajs/framework/utils").JSONProperty;
|
|
41
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
42
|
+
}>, "payout_balance">>;
|
|
43
|
+
}>, "payout_account">, undefined>;
|
|
44
|
+
}>, "onboarding">;
|
|
45
|
+
readonly Payout: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
46
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
47
|
+
display_id: import("@medusajs/framework/utils").AutoIncrementProperty;
|
|
48
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
49
|
+
amount: import("@medusajs/framework/utils").BigNumberProperty;
|
|
50
|
+
data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
51
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
52
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
53
|
+
status: import("@medusajs/framework/utils").EnumProperty<typeof PayoutAccountStatus>;
|
|
54
|
+
data: import("@medusajs/framework/utils").JSONProperty;
|
|
55
|
+
context: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
56
|
+
onboarding: import("@medusajs/framework/utils").RelationNullableModifier<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
57
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
58
|
+
data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
59
|
+
context: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
60
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
61
|
+
}>, "onboarding">, import("@medusajs/framework/utils").HasOne<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
62
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
63
|
+
data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
64
|
+
context: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
65
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
66
|
+
}>, "onboarding">>, false>;
|
|
67
|
+
payouts: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout">>;
|
|
68
|
+
transactions: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
69
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
70
|
+
amount: import("@medusajs/framework/utils").BigNumberProperty;
|
|
71
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
72
|
+
reference: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
73
|
+
reference_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
74
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
75
|
+
}>, "payout_transaction">>;
|
|
76
|
+
balances: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
77
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
78
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
79
|
+
totals: import("@medusajs/framework/utils").JSONProperty;
|
|
80
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
81
|
+
}>, "payout_balance">>;
|
|
82
|
+
}>, "payout_account">, undefined>;
|
|
83
|
+
status: import("@medusajs/framework/utils").EnumProperty<typeof import("@mercurjs/types").PayoutStatus>;
|
|
84
|
+
}>, "payout">;
|
|
85
|
+
readonly PayoutAccount: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
86
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
87
|
+
status: import("@medusajs/framework/utils").EnumProperty<typeof PayoutAccountStatus>;
|
|
88
|
+
data: import("@medusajs/framework/utils").JSONProperty;
|
|
89
|
+
context: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
90
|
+
onboarding: import("@medusajs/framework/utils").RelationNullableModifier<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
91
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
92
|
+
data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
93
|
+
context: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
94
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
95
|
+
}>, "onboarding">, import("@medusajs/framework/utils").HasOne<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
96
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
97
|
+
data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
98
|
+
context: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
99
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
100
|
+
}>, "onboarding">>, false>;
|
|
101
|
+
payouts: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
102
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
103
|
+
display_id: import("@medusajs/framework/utils").AutoIncrementProperty;
|
|
104
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
105
|
+
amount: import("@medusajs/framework/utils").BigNumberProperty;
|
|
106
|
+
data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
107
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
108
|
+
status: import("@medusajs/framework/utils").EnumProperty<typeof import("@mercurjs/types").PayoutStatus>;
|
|
109
|
+
}>, "payout">>;
|
|
110
|
+
transactions: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
111
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
112
|
+
amount: import("@medusajs/framework/utils").BigNumberProperty;
|
|
113
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
114
|
+
reference: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
115
|
+
reference_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
116
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
117
|
+
}>, "payout_transaction">>;
|
|
118
|
+
balances: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
119
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
120
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
121
|
+
totals: import("@medusajs/framework/utils").JSONProperty;
|
|
122
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
123
|
+
}>, "payout_balance">>;
|
|
124
|
+
}>, "payout_account">;
|
|
125
|
+
readonly PayoutBalance: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
126
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
127
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
128
|
+
totals: import("@medusajs/framework/utils").JSONProperty;
|
|
129
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
130
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
131
|
+
status: import("@medusajs/framework/utils").EnumProperty<typeof PayoutAccountStatus>;
|
|
132
|
+
data: import("@medusajs/framework/utils").JSONProperty;
|
|
133
|
+
context: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
134
|
+
onboarding: import("@medusajs/framework/utils").RelationNullableModifier<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
135
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
136
|
+
data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
137
|
+
context: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
138
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
139
|
+
}>, "onboarding">, import("@medusajs/framework/utils").HasOne<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
140
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
141
|
+
data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
142
|
+
context: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
143
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
144
|
+
}>, "onboarding">>, false>;
|
|
145
|
+
payouts: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
146
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
147
|
+
display_id: import("@medusajs/framework/utils").AutoIncrementProperty;
|
|
148
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
149
|
+
amount: import("@medusajs/framework/utils").BigNumberProperty;
|
|
150
|
+
data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
151
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
152
|
+
status: import("@medusajs/framework/utils").EnumProperty<typeof import("@mercurjs/types").PayoutStatus>;
|
|
153
|
+
}>, "payout">>;
|
|
154
|
+
transactions: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
155
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
156
|
+
amount: import("@medusajs/framework/utils").BigNumberProperty;
|
|
157
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
158
|
+
reference: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
159
|
+
reference_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
160
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
161
|
+
}>, "payout_transaction">>;
|
|
162
|
+
balances: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_balance">>;
|
|
163
|
+
}>, "payout_account">, undefined>;
|
|
164
|
+
}>, "payout_balance">;
|
|
165
|
+
readonly PayoutTransaction: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
166
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
167
|
+
amount: import("@medusajs/framework/utils").BigNumberProperty;
|
|
168
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
169
|
+
reference: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
170
|
+
reference_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
171
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
172
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
173
|
+
status: import("@medusajs/framework/utils").EnumProperty<typeof PayoutAccountStatus>;
|
|
174
|
+
data: import("@medusajs/framework/utils").JSONProperty;
|
|
175
|
+
context: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
176
|
+
onboarding: import("@medusajs/framework/utils").RelationNullableModifier<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
177
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
178
|
+
data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
179
|
+
context: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
180
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
181
|
+
}>, "onboarding">, import("@medusajs/framework/utils").HasOne<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
182
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
183
|
+
data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
184
|
+
context: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
185
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
186
|
+
}>, "onboarding">>, false>;
|
|
187
|
+
payouts: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
188
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
189
|
+
display_id: import("@medusajs/framework/utils").AutoIncrementProperty;
|
|
190
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
191
|
+
amount: import("@medusajs/framework/utils").BigNumberProperty;
|
|
192
|
+
data: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
193
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
194
|
+
status: import("@medusajs/framework/utils").EnumProperty<typeof import("@mercurjs/types").PayoutStatus>;
|
|
195
|
+
}>, "payout">>;
|
|
196
|
+
transactions: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_transaction">>;
|
|
197
|
+
balances: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
198
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
199
|
+
currency_code: import("@medusajs/framework/utils").TextProperty;
|
|
200
|
+
totals: import("@medusajs/framework/utils").JSONProperty;
|
|
201
|
+
account: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "payout_account">, undefined>;
|
|
202
|
+
}>, "payout_balance">>;
|
|
203
|
+
}>, "payout_account">, undefined>;
|
|
204
|
+
}>, "payout_transaction">;
|
|
205
|
+
}>>;
|
|
206
|
+
export default class PayoutModuleService extends PayoutModuleService_base {
|
|
207
|
+
protected readonly payoutProviderService_: PayoutProviderService;
|
|
208
|
+
protected readonly baseRepository_: DAL.RepositoryService;
|
|
209
|
+
constructor({ payoutProviderService, baseRepository }: InjectedDependencies);
|
|
210
|
+
private validatePayoutAvailability_;
|
|
211
|
+
createPayoutAccount(input: CreatePayoutAccountDTO, sharedContext?: Context<EntityManager>): Promise<PayoutAccountDTO>;
|
|
212
|
+
createOnboarding(input: CreateOnboardingDTO, sharedContext?: Context<EntityManager>): Promise<OnboardingDTO>;
|
|
213
|
+
createPayouts(input: CreatePayoutDTO, sharedContext?: Context<EntityManager>): Promise<PayoutDTO>;
|
|
214
|
+
getWebhookActionAndData(input: PayoutWebhookActionInput): Promise<PayoutWebhookResult>;
|
|
215
|
+
private addPayoutTransactions_;
|
|
216
|
+
addPayoutTransactions(account_id: string, transactions: Omit<CreatePayoutTransactionDTO, 'account_id'>[], sharedContext?: Context<EntityManager>): Promise<PayoutTransactionDTO[]>;
|
|
217
|
+
deletePayoutTransactions(transactionIds: string | string[], sharedContext?: Context<EntityManager>): Promise<void>;
|
|
218
|
+
private updatePayoutBalanceAfterUpdate_;
|
|
219
|
+
}
|
|
220
|
+
export {};
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
16
|
+
const types_1 = require("@mercurjs/types");
|
|
17
|
+
const models_1 = require("../models");
|
|
18
|
+
const core_1 = require("@medusajs/framework/mikro-orm/core");
|
|
19
|
+
const calculate_payout_transactions_1 = require("../utils/calculate-payout-transactions");
|
|
20
|
+
class PayoutModuleService extends (0, utils_1.MedusaService)({
|
|
21
|
+
Onboarding: models_1.Onboarding,
|
|
22
|
+
Payout: models_1.Payout,
|
|
23
|
+
PayoutAccount: models_1.PayoutAccount,
|
|
24
|
+
PayoutBalance: models_1.PayoutBalance,
|
|
25
|
+
PayoutTransaction: models_1.PayoutTransaction,
|
|
26
|
+
}) {
|
|
27
|
+
constructor({ payoutProviderService, baseRepository }) {
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
super(...arguments);
|
|
30
|
+
this.payoutProviderService_ = payoutProviderService;
|
|
31
|
+
this.baseRepository_ = baseRepository;
|
|
32
|
+
}
|
|
33
|
+
async validatePayoutAvailability_(account_id, amount, currency_code, sharedContext) {
|
|
34
|
+
const account = await this.retrievePayoutAccount(account_id, { select: ['id', 'status'] }, sharedContext);
|
|
35
|
+
if (account.status !== types_1.PayoutAccountStatus.ACTIVE) {
|
|
36
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_ALLOWED, `Account '${account_id}' is not active`);
|
|
37
|
+
}
|
|
38
|
+
const [balance] = await this.listPayoutBalances({ account_id, currency_code }, { take: 1 }, sharedContext);
|
|
39
|
+
if (!balance) {
|
|
40
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_ALLOWED, 'Insufficient funds');
|
|
41
|
+
}
|
|
42
|
+
const currentBalance = balance.totals?.raw_balance?.value ?? "0";
|
|
43
|
+
if (utils_1.MathBN.lt(currentBalance, amount)) {
|
|
44
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_ALLOWED, 'Insufficient funds');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async createPayoutAccount(input, sharedContext) {
|
|
48
|
+
let payoutAccount = null;
|
|
49
|
+
let providerAccount = null;
|
|
50
|
+
try {
|
|
51
|
+
payoutAccount = await this.createPayoutAccounts({ data: input.data, context: input.context }, sharedContext);
|
|
52
|
+
providerAccount = await this.payoutProviderService_.createPayoutAccount({
|
|
53
|
+
context: {
|
|
54
|
+
idempotency_key: payoutAccount.id,
|
|
55
|
+
...input.context
|
|
56
|
+
},
|
|
57
|
+
data: input.data
|
|
58
|
+
});
|
|
59
|
+
payoutAccount = await this.updatePayoutAccounts({
|
|
60
|
+
id: payoutAccount.id,
|
|
61
|
+
data: providerAccount.data,
|
|
62
|
+
status: providerAccount.status
|
|
63
|
+
}, sharedContext);
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
if (payoutAccount?.id) {
|
|
67
|
+
await this.deletePayoutAccounts(payoutAccount.id, sharedContext);
|
|
68
|
+
}
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
71
|
+
return await this.baseRepository_.serialize(payoutAccount);
|
|
72
|
+
}
|
|
73
|
+
async createOnboarding(input, sharedContext) {
|
|
74
|
+
const payoutAccount = await this.retrievePayoutAccount(input.account_id, {
|
|
75
|
+
select: ['data'],
|
|
76
|
+
relations: ['onboarding']
|
|
77
|
+
}, sharedContext);
|
|
78
|
+
const providerData = await this.payoutProviderService_.createOnboarding({
|
|
79
|
+
context: {
|
|
80
|
+
idempotency_key: input.account_id,
|
|
81
|
+
...input.context
|
|
82
|
+
},
|
|
83
|
+
data: {
|
|
84
|
+
...payoutAccount.data,
|
|
85
|
+
...input.data
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
const upsertOnboardingData = {
|
|
89
|
+
...(payoutAccount.onboarding ? { id: payoutAccount.onboarding.id } : {}),
|
|
90
|
+
payout_account_id: input.account_id,
|
|
91
|
+
data: providerData.data,
|
|
92
|
+
context: input.context
|
|
93
|
+
};
|
|
94
|
+
let onboarding;
|
|
95
|
+
if (!payoutAccount.onboarding) {
|
|
96
|
+
onboarding = await this.createOnboardings(upsertOnboardingData, sharedContext);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
onboarding = await this.updateOnboardings(upsertOnboardingData, sharedContext);
|
|
100
|
+
}
|
|
101
|
+
return await this.baseRepository_.serialize(onboarding);
|
|
102
|
+
}
|
|
103
|
+
// @ts-ignore
|
|
104
|
+
async createPayouts(input, sharedContext) {
|
|
105
|
+
await this.validatePayoutAvailability_(input.account_id, input.amount, input.currency_code, sharedContext);
|
|
106
|
+
const payoutAccount = await this.retrievePayoutAccount(input.account_id, {
|
|
107
|
+
select: ['id', 'data']
|
|
108
|
+
}, sharedContext);
|
|
109
|
+
const providerResponse = await this.payoutProviderService_.createPayout({
|
|
110
|
+
account_id: input.account_id,
|
|
111
|
+
amount: input.amount,
|
|
112
|
+
currency_code: input.currency_code,
|
|
113
|
+
context: input.context,
|
|
114
|
+
data: {
|
|
115
|
+
...payoutAccount.data,
|
|
116
|
+
...input.data
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
const payout = await super.createPayouts({
|
|
120
|
+
amount: input.amount,
|
|
121
|
+
currency_code: input.currency_code,
|
|
122
|
+
account_id: payoutAccount.id,
|
|
123
|
+
data: providerResponse.data,
|
|
124
|
+
status: providerResponse.status,
|
|
125
|
+
}, sharedContext);
|
|
126
|
+
return await this.baseRepository_.serialize(payout);
|
|
127
|
+
}
|
|
128
|
+
async getWebhookActionAndData(input) {
|
|
129
|
+
return await this.payoutProviderService_.getWebhookActionAndData(input);
|
|
130
|
+
}
|
|
131
|
+
async addPayoutTransactions_(account_id, transactions, sharedContext) {
|
|
132
|
+
return await this.baseRepository_.transaction(async (transactionManager) => {
|
|
133
|
+
// Group transactions by currency_code
|
|
134
|
+
const groupedByCurrency = transactions.reduce((acc, txn) => {
|
|
135
|
+
if (!acc[txn.currency_code]) {
|
|
136
|
+
acc[txn.currency_code] = [];
|
|
137
|
+
}
|
|
138
|
+
acc[txn.currency_code].push(txn);
|
|
139
|
+
return acc;
|
|
140
|
+
}, {});
|
|
141
|
+
// Update balances for each currency
|
|
142
|
+
await (0, utils_1.promiseAll)(Object.entries(groupedByCurrency).map(async ([currency_code, currencyTransactions]) => {
|
|
143
|
+
const [existingBalance] = await this.listPayoutBalances({ account_id, currency_code }, { take: 1 }, { transactionManager });
|
|
144
|
+
const newTotals = (0, calculate_payout_transactions_1.calculatePayoutTransactions)({
|
|
145
|
+
currentBalance: existingBalance,
|
|
146
|
+
transactions: currencyTransactions
|
|
147
|
+
});
|
|
148
|
+
if (!existingBalance) {
|
|
149
|
+
await this.createPayoutBalances({ account_id, currency_code, totals: newTotals }, { transactionManager });
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
await this.updatePayoutBalances({ id: existingBalance.id, totals: newTotals }, { transactionManager });
|
|
153
|
+
}
|
|
154
|
+
}));
|
|
155
|
+
const createdTransactions = await this.createPayoutTransactions(transactions.map((txn) => ({
|
|
156
|
+
...txn,
|
|
157
|
+
account_id,
|
|
158
|
+
amount: utils_1.MathBN.convert(txn.amount).toNumber(),
|
|
159
|
+
})), { transactionManager });
|
|
160
|
+
return await this.baseRepository_.serialize(createdTransactions);
|
|
161
|
+
}, {
|
|
162
|
+
transaction: sharedContext?.transactionManager,
|
|
163
|
+
isolationLevel: core_1.IsolationLevel.SERIALIZABLE,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
async addPayoutTransactions(account_id, transactions, sharedContext) {
|
|
167
|
+
return await this.addPayoutTransactions_(account_id, transactions, sharedContext);
|
|
168
|
+
}
|
|
169
|
+
// @ts-ignore
|
|
170
|
+
async deletePayoutTransactions(transactionIds, sharedContext = {}) {
|
|
171
|
+
const ids = Array.isArray(transactionIds) ? transactionIds : [transactionIds];
|
|
172
|
+
if (!ids.length) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const transactions = await super.listPayoutTransactions({ id: ids }, undefined, sharedContext);
|
|
176
|
+
if (!transactions.length) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
await super.deletePayoutTransactions(ids, sharedContext);
|
|
180
|
+
await this.updatePayoutBalanceAfterUpdate_(transactions, sharedContext);
|
|
181
|
+
}
|
|
182
|
+
async updatePayoutBalanceAfterUpdate_(transactions, sharedContext = {}) {
|
|
183
|
+
// Group transactions by account_id and currency_code
|
|
184
|
+
const grouped = transactions.reduce((acc, txn) => {
|
|
185
|
+
const key = `${txn.account_id}-${txn.currency_code}`;
|
|
186
|
+
if (!acc[key]) {
|
|
187
|
+
acc[key] = {
|
|
188
|
+
account_id: txn.account_id,
|
|
189
|
+
currency_code: txn.currency_code,
|
|
190
|
+
totalAmount: utils_1.MathBN.convert(0)
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
acc[key].totalAmount = utils_1.MathBN.add(acc[key].totalAmount, txn.amount);
|
|
194
|
+
return acc;
|
|
195
|
+
}, {});
|
|
196
|
+
await (0, utils_1.promiseAll)(Object.values(grouped).map(async (group) => {
|
|
197
|
+
const [balance] = await this.listPayoutBalances({ account_id: group.account_id, currency_code: group.currency_code }, { take: 1 }, sharedContext);
|
|
198
|
+
if (!balance) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const currentRawBalance = balance.totals?.raw_balance?.value ?? "0";
|
|
202
|
+
// Subtract the deleted transaction amounts from the balance
|
|
203
|
+
const newBalance = utils_1.MathBN.sub(utils_1.MathBN.convert(currentRawBalance), group.totalAmount);
|
|
204
|
+
const totals = {
|
|
205
|
+
balance: new utils_1.BigNumber(newBalance),
|
|
206
|
+
};
|
|
207
|
+
(0, utils_1.createRawPropertiesFromBigNumber)(totals);
|
|
208
|
+
await this.updatePayoutBalances({ id: balance.id, totals }, sharedContext);
|
|
209
|
+
}));
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
exports.default = PayoutModuleService;
|
|
213
|
+
__decorate([
|
|
214
|
+
(0, utils_1.InjectManager)(),
|
|
215
|
+
__param(3, (0, utils_1.MedusaContext)()),
|
|
216
|
+
__metadata("design:type", Function),
|
|
217
|
+
__metadata("design:paramtypes", [String, Object, String, Object]),
|
|
218
|
+
__metadata("design:returntype", Promise)
|
|
219
|
+
], PayoutModuleService.prototype, "validatePayoutAvailability_", null);
|
|
220
|
+
__decorate([
|
|
221
|
+
(0, utils_1.InjectManager)(),
|
|
222
|
+
(0, utils_1.EmitEvents)(),
|
|
223
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
|
224
|
+
__metadata("design:type", Function),
|
|
225
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
226
|
+
__metadata("design:returntype", Promise)
|
|
227
|
+
], PayoutModuleService.prototype, "createPayoutAccount", null);
|
|
228
|
+
__decorate([
|
|
229
|
+
(0, utils_1.InjectTransactionManager)(),
|
|
230
|
+
(0, utils_1.EmitEvents)(),
|
|
231
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
|
232
|
+
__metadata("design:type", Function),
|
|
233
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
234
|
+
__metadata("design:returntype", Promise)
|
|
235
|
+
], PayoutModuleService.prototype, "createOnboarding", null);
|
|
236
|
+
__decorate([
|
|
237
|
+
(0, utils_1.InjectTransactionManager)(),
|
|
238
|
+
(0, utils_1.EmitEvents)()
|
|
239
|
+
// @ts-ignore
|
|
240
|
+
,
|
|
241
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
|
242
|
+
__metadata("design:type", Function),
|
|
243
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
244
|
+
__metadata("design:returntype", Promise)
|
|
245
|
+
], PayoutModuleService.prototype, "createPayouts", null);
|
|
246
|
+
__decorate([
|
|
247
|
+
(0, utils_1.InjectTransactionManager)(),
|
|
248
|
+
__param(2, (0, utils_1.MedusaContext)()),
|
|
249
|
+
__metadata("design:type", Function),
|
|
250
|
+
__metadata("design:paramtypes", [String, Array, Object]),
|
|
251
|
+
__metadata("design:returntype", Promise)
|
|
252
|
+
], PayoutModuleService.prototype, "addPayoutTransactions_", null);
|
|
253
|
+
__decorate([
|
|
254
|
+
(0, utils_1.InjectManager)(),
|
|
255
|
+
(0, utils_1.EmitEvents)(),
|
|
256
|
+
__param(2, (0, utils_1.MedusaContext)()),
|
|
257
|
+
__metadata("design:type", Function),
|
|
258
|
+
__metadata("design:paramtypes", [String, Array, Object]),
|
|
259
|
+
__metadata("design:returntype", Promise)
|
|
260
|
+
], PayoutModuleService.prototype, "addPayoutTransactions", null);
|
|
261
|
+
__decorate([
|
|
262
|
+
(0, utils_1.InjectTransactionManager)(),
|
|
263
|
+
(0, utils_1.EmitEvents)()
|
|
264
|
+
// @ts-ignore
|
|
265
|
+
,
|
|
266
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
|
267
|
+
__metadata("design:type", Function),
|
|
268
|
+
__metadata("design:paramtypes", [Object, Object]),
|
|
269
|
+
__metadata("design:returntype", Promise)
|
|
270
|
+
], PayoutModuleService.prototype, "deletePayoutTransactions", null);
|
|
271
|
+
__decorate([
|
|
272
|
+
(0, utils_1.InjectTransactionManager)(),
|
|
273
|
+
__param(1, (0, utils_1.MedusaContext)()),
|
|
274
|
+
__metadata("design:type", Function),
|
|
275
|
+
__metadata("design:paramtypes", [Array, Object]),
|
|
276
|
+
__metadata("design:returntype", Promise)
|
|
277
|
+
], PayoutModuleService.prototype, "updatePayoutBalanceAfterUpdate_", null);
|
|
278
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF5b3V0LW1vZHVsZS1zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21vZHVsZXMvcGF5b3V0L3NlcnZpY2VzL3BheW91dC1tb2R1bGUtc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUFBLHFEQVdrQztBQUNsQywyQ0Fld0I7QUFFeEIsc0NBQStGO0FBRy9GLDZEQUFtRTtBQUNuRSwwRkFBb0Y7QUFPcEYsTUFBcUIsbUJBQW9CLFNB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LElBQUEsZ0NBQXdCLEdBQUU7SUFDMUIsSUFBQSxrQkFBVSxHQUFFO0lBR1IsV0FBQSxJQUFBLHFCQUFhLEdBQUUsQ0FBQTs7OzsyREF5Q25CO0FBS0s7SUFITCxJQUFBLGdDQUF3QixHQUFFO0lBQzFCLElBQUEsa0JBQVUsR0FBRTtJQUNiLGFBQWE7O0lBR1IsV0FBQSxJQUFBLHFCQUFhLEdBQUUsQ0FBQTs7Ozt3REFvQ25CO0FBU2E7SUFEYixJQUFBLGdDQUF3QixHQUFFO0lBSXRCLFdBQUEsSUFBQSxxQkFBYSxHQUFFLENBQUE7Ozs7aUVBeURuQjtBQUlLO0lBRkwsSUFBQSxxQkFBYSxHQUFFO0lBQ2YsSUFBQSxrQkFBVSxHQUFFO0lBSVIsV0FBQSxJQUFBLHFCQUFhLEdBQUUsQ0FBQTs7OztnRUFPbkI7QUFLSztJQUhMLElBQUEsZ0NBQXdCLEdBQUU7SUFDMUIsSUFBQSxrQkFBVSxHQUFFO0lBQ2IsYUFBYTs7SUFHUixXQUFBLElBQUEscUJBQWEsR0FBRSxDQUFBOzs7O21FQXFCbkI7QUFHYTtJQURiLElBQUEsZ0NBQXdCLEdBQUU7SUFHdEIsV0FBQSxJQUFBLHFCQUFhLEdBQUUsQ0FBQTs7OzswRUFnRG5CIn0=
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Constructor } from "@medusajs/framework/types";
|
|
2
|
+
import { IPayoutProvider, CreatePayoutAccountInput, CreatePayoutAccountResponse, CreatePayoutInput, CreatePayoutResponse, CreateOnboardingInput, CreateOnboardingResponse, PayoutWebhookActionInput, PayoutWebhookResult } from "@mercurjs/types";
|
|
3
|
+
export declare const PayoutProviderIdentifierRegistrationName = "payout_providers_identifier";
|
|
4
|
+
export declare const PayoutProviderRegistrationPrefix = "payout_";
|
|
5
|
+
type InjectedDependencies = {
|
|
6
|
+
[key: `${typeof PayoutProviderRegistrationPrefix}${string}`]: IPayoutProvider;
|
|
7
|
+
};
|
|
8
|
+
export default class PayoutProviderService {
|
|
9
|
+
protected readonly payoutProvider_: IPayoutProvider;
|
|
10
|
+
constructor(container: InjectedDependencies);
|
|
11
|
+
static getRegistrationIdentifier(providerClass: Constructor<IPayoutProvider>, optionName?: string): string;
|
|
12
|
+
createPayoutAccount(data: CreatePayoutAccountInput): Promise<CreatePayoutAccountResponse>;
|
|
13
|
+
createPayout(data: CreatePayoutInput): Promise<CreatePayoutResponse>;
|
|
14
|
+
createOnboarding(input: CreateOnboardingInput): Promise<CreateOnboardingResponse>;
|
|
15
|
+
getWebhookActionAndData(payload: PayoutWebhookActionInput): Promise<PayoutWebhookResult>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PayoutProviderRegistrationPrefix = exports.PayoutProviderIdentifierRegistrationName = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
exports.PayoutProviderIdentifierRegistrationName = "payout_providers_identifier";
|
|
6
|
+
exports.PayoutProviderRegistrationPrefix = "payout_";
|
|
7
|
+
class PayoutProviderService {
|
|
8
|
+
constructor(container) {
|
|
9
|
+
const payoutProviderKeys = Object.keys(container).filter((k) => k.startsWith(exports.PayoutProviderRegistrationPrefix));
|
|
10
|
+
if (payoutProviderKeys.length !== 1) {
|
|
11
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, `Payout module should be initialized with exactly one provider`);
|
|
12
|
+
}
|
|
13
|
+
this.payoutProvider_ = container[payoutProviderKeys[0]];
|
|
14
|
+
}
|
|
15
|
+
static getRegistrationIdentifier(providerClass, optionName) {
|
|
16
|
+
return `${providerClass.identifier}_${optionName}`;
|
|
17
|
+
}
|
|
18
|
+
async createPayoutAccount(data) {
|
|
19
|
+
return await this.payoutProvider_.createPayoutAccount(data);
|
|
20
|
+
}
|
|
21
|
+
async createPayout(data) {
|
|
22
|
+
return await this.payoutProvider_.createPayout(data);
|
|
23
|
+
}
|
|
24
|
+
async createOnboarding(input) {
|
|
25
|
+
return await this.payoutProvider_.createOnboarding(input);
|
|
26
|
+
}
|
|
27
|
+
async getWebhookActionAndData(payload) {
|
|
28
|
+
return await this.payoutProvider_.getWebhookActionAndData(payload);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.default = PayoutProviderService;
|
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvdmlkZXItc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9tb2R1bGVzL3BheW91dC9zZXJ2aWNlcy9wcm92aWRlci1zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFEQUF1RDtBQWMxQyxRQUFBLHdDQUF3QyxHQUNuRCw2QkFBNkIsQ0FBQTtBQUVsQixRQUFBLGdDQUFnQyxHQUFHLFNBQVMsQ0FBQTtBQU16RCxNQUFxQixxQkFBcUI7SUFHeEMsWUFBWSxTQUErQjtRQUN6QyxNQUFNLGtCQUFrQixHQUFHLE1BQU0sQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FDN0QsQ0FBQyxDQUFDLFVBQVUsQ0FBQyx3Q0FBZ0MsQ0FBQyxDQUMvQyxDQUFBO1FBRUQsSUFBSSxrQkFBa0IsQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFLENBQUM7WUFDcEMsTUFBTSxJQUFJLG1CQUFXLENBQ25CLG1CQUFXLENBQUMsS0FBSyxDQUFDLFlBQVksRUFDOUIsK0RBQStELENBQ2hFLENBQUE7UUFDSCxDQUFDO1FBRUQsSUFBSSxDQUFDLGVBQWUsR0FBRyxTQUFTLENBQUMsa0JBQWtCLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQTtJQUN6RCxDQUFDO0lBRUQsTUFBTSxDQUFDLHlCQUF5QixDQUM5QixhQUEyQyxFQUMzQyxVQUFtQjtRQUVuQixPQUFPLEdBQUksYUFBcUIsQ0FBQyxVQUFVLElBQUksVUFBVSxFQUFFLENBQUE7SUFDN0QsQ0FBQztJQUVELEtBQUssQ0FBQyxtQkFBbUIsQ0FDdkIsSUFBOEI7UUFFOUIsT0FBTyxNQUFNLElBQUksQ0FBQyxlQUFlLENBQUMsbUJBQW1CLENBQUMsSUFBSSxDQUFDLENBQUE7SUFDN0QsQ0FBQztJQUVELEtBQUssQ0FBQyxZQUFZLENBQUMsSUFBdUI7UUFDeEMsT0FBTyxNQUFNLElBQUksQ0FBQyxlQUFlLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxDQUFBO0lBQ3RELENBQUM7SUFFRCxLQUFLLENBQUMsZ0JBQWdCLENBQ3BCLEtBQTRCO1FBRTVCLE9BQU8sTUFBTSxJQUFJLENBQUMsZUFBZSxDQUFDLGdCQUFnQixDQUFDLEtBQUssQ0FBQyxDQUFBO0lBQzNELENBQUM7SUFFRCxLQUFLLENBQUMsdUJBQXVCLENBQzNCLE9BQWlDO1FBRWpDLE9BQU8sTUFBTSxJQUFJLENBQUMsZUFBZSxDQUFDLHVCQUF1QixDQUFDLE9BQU8sQ0FBQyxDQUFBO0lBQ3BFLENBQUM7Q0FDRjtBQTlDRCx3Q0E4Q0MifQ==
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BigNumberInput } from "@medusajs/framework/types";
|
|
2
|
+
import { PayoutBalanceDTO, PayoutBalanceTotals } from "@mercurjs/types";
|
|
3
|
+
export declare function calculatePayoutTransactions({ transactions, currentBalance }: {
|
|
4
|
+
currentBalance?: PayoutBalanceDTO;
|
|
5
|
+
transactions: {
|
|
6
|
+
amount: BigNumberInput;
|
|
7
|
+
reference?: string;
|
|
8
|
+
reference_id?: string;
|
|
9
|
+
}[];
|
|
10
|
+
}): PayoutBalanceTotals;
|