@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,6 @@
|
|
|
1
|
+
import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework/http";
|
|
2
|
+
import { HttpTypes } from "@mercurjs/types";
|
|
3
|
+
import { AdminUpdateCommissionRateType } from "../validators";
|
|
4
|
+
export declare const GET: (req: AuthenticatedMedusaRequest, res: MedusaResponse<HttpTypes.AdminCommissionRateResponse>) => Promise<void>;
|
|
5
|
+
export declare const POST: (req: AuthenticatedMedusaRequest<AdminUpdateCommissionRateType>, res: MedusaResponse<HttpTypes.AdminCommissionRateResponse>) => Promise<void>;
|
|
6
|
+
export declare const DELETE: (req: AuthenticatedMedusaRequest, res: MedusaResponse<HttpTypes.AdminCommissionRateDeleteResponse>) => Promise<void>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DELETE = exports.POST = exports.GET = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const commission_1 = require("../../../../workflows/commission");
|
|
6
|
+
const GET = async (req, res) => {
|
|
7
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
8
|
+
const { data: [commission_rate], } = await query.graph({
|
|
9
|
+
entity: "commission_rate",
|
|
10
|
+
fields: req.queryConfig.fields,
|
|
11
|
+
filters: { id: req.params.id },
|
|
12
|
+
});
|
|
13
|
+
if (!commission_rate) {
|
|
14
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Commission rate with id ${req.params.id} was not found`);
|
|
15
|
+
}
|
|
16
|
+
res.json({ commission_rate });
|
|
17
|
+
};
|
|
18
|
+
exports.GET = GET;
|
|
19
|
+
const POST = async (req, res) => {
|
|
20
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
21
|
+
const { result } = await (0, commission_1.updateCommissionRatesWorkflow)(req.scope).run({
|
|
22
|
+
input: [{ id: req.params.id, ...req.validatedBody }],
|
|
23
|
+
});
|
|
24
|
+
const { data: [commission_rate], } = await query.graph({
|
|
25
|
+
entity: "commission_rate",
|
|
26
|
+
fields: req.queryConfig.fields,
|
|
27
|
+
filters: { id: result[0].id },
|
|
28
|
+
});
|
|
29
|
+
res.json({ commission_rate });
|
|
30
|
+
};
|
|
31
|
+
exports.POST = POST;
|
|
32
|
+
const DELETE = async (req, res) => {
|
|
33
|
+
await (0, commission_1.deleteCommissionRatesWorkflow)(req.scope).run({
|
|
34
|
+
input: { ids: [req.params.id] },
|
|
35
|
+
});
|
|
36
|
+
res.json({
|
|
37
|
+
id: req.params.id,
|
|
38
|
+
object: "commission_rate",
|
|
39
|
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2QixFQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsQ0FBQyxHQUFHLENBQUM7UUFDakQsS0FBSyxFQUFFLEVBQUUsR0FBRyxFQUFFLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUMsRUFBRTtLQUNoQyxDQUFDLENBQUE7SUFFRixHQUFHLENBQUMsSUFBSSxDQUFDO1FBQ1AsRUFBRSxFQUFFLEdBQUcsQ0FBQyxNQUFNLENBQUMsRUFBRTtRQUNqQixNQUFNLEVBQUUsaUJBQWlCO1FBQ3pCLE9BQU8sRUFBRSxJQUFJO0tBQ2QsQ0FBQyxDQUFBO0FBQ0osQ0FBQyxDQUFBO0FBYlksUUFBQSxNQUFNLFVBYWxCIn0=
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework/http";
|
|
2
|
+
import { HttpTypes } from "@mercurjs/types";
|
|
3
|
+
import { AdminBatchCommissionRulesType } from "../../validators";
|
|
4
|
+
export declare const POST: (req: AuthenticatedMedusaRequest<AdminBatchCommissionRulesType>, res: MedusaResponse<HttpTypes.AdminBatchCommissionRulesResponse>) => Promise<void>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.POST = void 0;
|
|
4
|
+
const commission_1 = require("../../../../../workflows/commission");
|
|
5
|
+
const POST = async (req, res) => {
|
|
6
|
+
const { result } = await (0, commission_1.batchCommissionRulesWorkflow)(req.scope).run({
|
|
7
|
+
input: {
|
|
8
|
+
commission_rate_id: req.params.id,
|
|
9
|
+
create: req.validatedBody.create,
|
|
10
|
+
update: req.validatedBody.update,
|
|
11
|
+
delete: req.validatedBody.delete,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
res.json({
|
|
15
|
+
created: result.created,
|
|
16
|
+
updated: result.updated,
|
|
17
|
+
deleted: result.deleted,
|
|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|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.adminCommissionRatesMiddlewares = void 0;
|
|
4
|
+
const framework_1 = require("@medusajs/framework");
|
|
5
|
+
const query_config_1 = require("./query-config");
|
|
6
|
+
const validators_1 = require("./validators");
|
|
7
|
+
exports.adminCommissionRatesMiddlewares = [
|
|
8
|
+
{
|
|
9
|
+
method: ["GET"],
|
|
10
|
+
matcher: "/admin/commission-rates",
|
|
11
|
+
middlewares: [
|
|
12
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.AdminGetCommissionRatesParams, query_config_1.adminCommissionRateQueryConfig.list),
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
method: ["POST"],
|
|
17
|
+
matcher: "/admin/commission-rates",
|
|
18
|
+
middlewares: [
|
|
19
|
+
(0, framework_1.validateAndTransformBody)(validators_1.AdminCreateCommissionRate),
|
|
20
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.AdminGetCommissionRateParams, query_config_1.adminCommissionRateQueryConfig.retrieve),
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
method: ["GET"],
|
|
25
|
+
matcher: "/admin/commission-rates/:id",
|
|
26
|
+
middlewares: [
|
|
27
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.AdminGetCommissionRateParams, query_config_1.adminCommissionRateQueryConfig.retrieve),
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
method: ["POST"],
|
|
32
|
+
matcher: "/admin/commission-rates/:id",
|
|
33
|
+
middlewares: [
|
|
34
|
+
(0, framework_1.validateAndTransformBody)(validators_1.AdminUpdateCommissionRate),
|
|
35
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.AdminGetCommissionRateParams, query_config_1.adminCommissionRateQueryConfig.retrieve),
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
method: ["DELETE"],
|
|
40
|
+
matcher: "/admin/commission-rates/:id",
|
|
41
|
+
middlewares: [],
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
method: ["POST"],
|
|
45
|
+
matcher: "/admin/commission-rates/:id/rules",
|
|
46
|
+
middlewares: [
|
|
47
|
+
(0, framework_1.validateAndTransformBody)(validators_1.AdminBatchCommissionRules),
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlkZGxld2FyZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL2FkbWluL2NvbW1pc3Npb24tcmF0ZXMvbWlkZGxld2FyZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EsbURBRzRCO0FBRTVCLGlEQUErRDtBQUMvRCw2Q0FNcUI7QUFFUixRQUFBLCtCQUErQixHQUFzQjtJQUNoRTtRQUNFLE1BQU0sRUFBRSxDQUFDLEtBQUssQ0FBQztRQUNmLE9BQU8sRUFBRSx5QkFBeUI7UUFDbEMsV0FBVyxFQUFFO1lBQ1gsSUFBQSxxQ0FBeUIsRUFDdkIsMENBQTZCLEVBQzdCLDZDQUE4QixDQUFDLElBQUksQ0FDcEM7U0FDRjtLQUNGO0lBQ0Q7UUFDRSxNQUFNLEVBQUUsQ0FBQyxNQUFNLENBQUM7UUFDaEIsT0FBTyxFQUFFLHlCQUF5QjtRQUNsQyxXQUFXLEVBQUU7WUFDWCxJQUFBLG9DQUF3QixFQUFDLHNDQUF5QixDQUFDO1lBQ25ELElBQUEscUNBQXlCLEVBQ3ZCLHlDQUE0QixFQUM1Qiw2Q0FBOEIsQ0FBQyxRQUFRLENBQ3hDO1NBQ0Y7S0FDRjtJQUNEO1FBQ0UsTUFBTSxFQUFFLENBQUMsS0FBSyxDQUFDO1FBQ2YsT0FBTyxFQUFFLDZCQUE2QjtRQUN0QyxXQUFXLEVBQUU7WUFDWCxJQUFBLHFDQUF5QixFQUN2Qix5Q0FBNEIsRUFDNUIsNkNBQThCLENBQUMsUUFBUSxDQUN4QztTQUNGO0tBQ0Y7SUFDRDtRQUNFLE1BQU0sRUFBRSxDQUFDLE1BQU0sQ0FBQztRQUNoQixPQUFPLEVBQUUsNkJBQTZCO1FBQ3RDLFdBQVcsRUFBRTtZQUNYLElBQUEsb0NBQXdCLEVBQUMsc0NBQXlCLENBQUM7WUFDbkQsSUFBQSxxQ0FBeUIsRUFDdkIseUNBQTRCLEVBQzVCLDZDQUE4QixDQUFDLFFBQVEsQ0FDeEM7U0FDRjtLQUNGO0lBQ0Q7UUFDRSxNQUFNLEVBQUUsQ0FBQyxRQUFRLENBQUM7UUFDbEIsT0FBTyxFQUFFLDZCQUE2QjtRQUN0QyxXQUFXLEVBQUUsRUFBRTtLQUNoQjtJQUNEO1FBQ0UsTUFBTSxFQUFFLENBQUMsTUFBTSxDQUFDO1FBQ2hCLE9BQU8sRUFBRSxtQ0FBbUM7UUFDNUMsV0FBVyxFQUFFO1lBQ1gsSUFBQSxvQ0FBd0IsRUFBQyxzQ0FBeUIsQ0FBQztTQUNwRDtLQUNGO0NBQ0YsQ0FBQSJ9
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.adminCommissionRateQueryConfig = exports.adminCommissionRateFields = void 0;
|
|
4
|
+
exports.adminCommissionRateFields = [
|
|
5
|
+
"id",
|
|
6
|
+
"name",
|
|
7
|
+
"code",
|
|
8
|
+
"type",
|
|
9
|
+
"target",
|
|
10
|
+
"value",
|
|
11
|
+
"currency_code",
|
|
12
|
+
"min_amount",
|
|
13
|
+
"include_tax",
|
|
14
|
+
"is_enabled",
|
|
15
|
+
"priority",
|
|
16
|
+
"created_at",
|
|
17
|
+
"updated_at",
|
|
18
|
+
"rules.id",
|
|
19
|
+
"rules.reference",
|
|
20
|
+
"rules.reference_id",
|
|
21
|
+
];
|
|
22
|
+
exports.adminCommissionRateQueryConfig = {
|
|
23
|
+
list: {
|
|
24
|
+
defaults: exports.adminCommissionRateFields,
|
|
25
|
+
isList: true,
|
|
26
|
+
},
|
|
27
|
+
retrieve: {
|
|
28
|
+
defaults: exports.adminCommissionRateFields,
|
|
29
|
+
isList: false,
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwaS9hZG1pbi9jb21taXNzaW9uLXJhdGVzL3F1ZXJ5LWNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLHlCQUF5QixHQUFHO0lBQ3ZDLElBQUk7SUFDSixNQUFNO0lBQ04sTUFBTTtJQUNOLE1BQU07SUFDTixRQUFRO0lBQ1IsT0FBTztJQUNQLGVBQWU7SUFDZixZQUFZO0lBQ1osYUFBYTtJQUNiLFlBQVk7SUFDWixVQUFVO0lBQ1YsWUFBWTtJQUNaLFlBQVk7SUFDWixVQUFVO0lBQ1YsaUJBQWlCO0lBQ2pCLG9CQUFvQjtDQUNyQixDQUFBO0FBRVksUUFBQSw4QkFBOEIsR0FBRztJQUM1QyxJQUFJLEVBQUU7UUFDSixRQUFRLEVBQUUsaUNBQXlCO1FBQ25DLE1BQU0sRUFBRSxJQUFJO0tBQ2I7SUFDRCxRQUFRLEVBQUU7UUFDUixRQUFRLEVBQUUsaUNBQXlCO1FBQ25DLE1BQU0sRUFBRSxLQUFLO0tBQ2Q7Q0FDRixDQUFBIn0=
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework/http";
|
|
2
|
+
import { HttpTypes } from "@mercurjs/types";
|
|
3
|
+
import { AdminCreateCommissionRateType } from "./validators";
|
|
4
|
+
export declare const GET: (req: AuthenticatedMedusaRequest, res: MedusaResponse<HttpTypes.AdminCommissionRateListResponse>) => Promise<void>;
|
|
5
|
+
export declare const POST: (req: AuthenticatedMedusaRequest<AdminCreateCommissionRateType>, res: MedusaResponse<HttpTypes.AdminCommissionRateResponse>) => Promise<void>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.POST = exports.GET = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const commission_1 = require("../../../workflows/commission");
|
|
6
|
+
const GET = async (req, res) => {
|
|
7
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
8
|
+
const { data: commission_rates, metadata } = await query.graph({
|
|
9
|
+
entity: "commission_rate",
|
|
10
|
+
fields: req.queryConfig.fields,
|
|
11
|
+
filters: req.filterableFields,
|
|
12
|
+
pagination: req.queryConfig.pagination,
|
|
13
|
+
});
|
|
14
|
+
res.json({
|
|
15
|
+
commission_rates,
|
|
16
|
+
count: metadata?.count ?? 0,
|
|
17
|
+
offset: metadata?.skip ?? 0,
|
|
18
|
+
limit: metadata?.take ?? 0,
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
exports.GET = GET;
|
|
22
|
+
const POST = async (req, res) => {
|
|
23
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
24
|
+
const { result } = await (0, commission_1.createCommissionRatesWorkflow)(req.scope).run({
|
|
25
|
+
input: [req.validatedBody],
|
|
26
|
+
});
|
|
27
|
+
const { data: [commission_rate], } = await query.graph({
|
|
28
|
+
entity: "commission_rate",
|
|
29
|
+
fields: req.queryConfig.fields,
|
|
30
|
+
filters: { id: result[0].id },
|
|
31
|
+
});
|
|
32
|
+
res.status(201).json({ commission_rate });
|
|
33
|
+
};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0FtQmY7QUFFTSxNQUFNLElBQUksR0FBRyxLQUFLLEVBQ3ZCLEdBQThELEVBQzlELEdBQTBELEVBQzFELEVBQUU7SUFDRixNQUFNLEtBQUssR0FBRyxHQUFHLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxpQ0FBeUIsQ0FBQyxLQUFLLENBQUMsQ0FBQTtJQUVoRSxNQUFNLEVBQUUsTUFBTSxFQUFFLEdBQUcsTUFBTSxJQUFBLDBDQUE2QixFQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsQ0FBQyxHQUFHLENBQUM7UUFDcEUsS0FBSyxFQUFFLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQztLQUMzQixDQUFDLENBQUE7SUFFRixNQUFNLEVBQ0osSUFBSSxFQUFFLENBQUMsZUFBZSxDQUFDLEdBQ3hCLEdBQUcsTUFBTSxLQUFLLENBQUMsS0FBSyxDQUFDO1FBQ3BCLE1BQU0sRUFBRSxpQkFBaUI7UUFDekIsTUFBTSxFQUFFLEdBQUcsQ0FBQyxXQUFXLENBQUMsTUFBTTtRQUM5QixPQUFPLEVBQUUsRUFBRSxFQUFFLEVBQUUsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFBRTtLQUM5QixDQUFDLENBQUE7SUFFRixHQUFHLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxDQUFDLElBQUksQ0FBQyxFQUFFLGVBQWUsRUFBRSxDQUFDLENBQUE7QUFDM0MsQ0FBQyxDQUFBO0FBbkJZLFFBQUEsSUFBSSxRQW1CaEIifQ==
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { CommissionRateTarget, CommissionRateType } from "@mercurjs/types";
|
|
3
|
+
export type AdminGetCommissionRateParamsType = z.infer<typeof AdminGetCommissionRateParams>;
|
|
4
|
+
export declare const AdminGetCommissionRateParams: z.ZodObject<{
|
|
5
|
+
fields: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
fields?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
fields?: string | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
export type AdminGetCommissionRatesParamsType = z.infer<typeof AdminGetCommissionRatesParams>;
|
|
12
|
+
export declare const AdminGetCommissionRatesParams: z.ZodObject<{
|
|
13
|
+
fields: z.ZodOptional<z.ZodString>;
|
|
14
|
+
} & {
|
|
15
|
+
offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
16
|
+
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
17
|
+
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
18
|
+
with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
|
|
19
|
+
} & {
|
|
20
|
+
q: z.ZodOptional<z.ZodString>;
|
|
21
|
+
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
22
|
+
code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
23
|
+
type: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
24
|
+
target: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
25
|
+
is_enabled: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodBoolean, z.ZodString]>, string | boolean, string | boolean>, boolean, string | boolean>>;
|
|
26
|
+
created_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
27
|
+
$eq: any;
|
|
28
|
+
$ne: any;
|
|
29
|
+
$in: any;
|
|
30
|
+
$nin: any;
|
|
31
|
+
$like: any;
|
|
32
|
+
$ilike: any;
|
|
33
|
+
$re: any;
|
|
34
|
+
$contains: any;
|
|
35
|
+
$gt: any;
|
|
36
|
+
$gte: any;
|
|
37
|
+
$lt: any;
|
|
38
|
+
$lte: any;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
$eq?: any;
|
|
41
|
+
$ne?: any;
|
|
42
|
+
$in?: any;
|
|
43
|
+
$nin?: any;
|
|
44
|
+
$like?: any;
|
|
45
|
+
$ilike?: any;
|
|
46
|
+
$re?: any;
|
|
47
|
+
$contains?: any;
|
|
48
|
+
$gt?: any;
|
|
49
|
+
$gte?: any;
|
|
50
|
+
$lt?: any;
|
|
51
|
+
$lte?: any;
|
|
52
|
+
}, {
|
|
53
|
+
$eq?: any;
|
|
54
|
+
$ne?: any;
|
|
55
|
+
$in?: any;
|
|
56
|
+
$nin?: any;
|
|
57
|
+
$like?: any;
|
|
58
|
+
$ilike?: any;
|
|
59
|
+
$re?: any;
|
|
60
|
+
$contains?: any;
|
|
61
|
+
$gt?: any;
|
|
62
|
+
$gte?: any;
|
|
63
|
+
$lt?: any;
|
|
64
|
+
$lte?: any;
|
|
65
|
+
}>]>>;
|
|
66
|
+
updated_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
67
|
+
$eq: any;
|
|
68
|
+
$ne: any;
|
|
69
|
+
$in: any;
|
|
70
|
+
$nin: any;
|
|
71
|
+
$like: any;
|
|
72
|
+
$ilike: any;
|
|
73
|
+
$re: any;
|
|
74
|
+
$contains: any;
|
|
75
|
+
$gt: any;
|
|
76
|
+
$gte: any;
|
|
77
|
+
$lt: any;
|
|
78
|
+
$lte: any;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
$eq?: any;
|
|
81
|
+
$ne?: any;
|
|
82
|
+
$in?: any;
|
|
83
|
+
$nin?: any;
|
|
84
|
+
$like?: any;
|
|
85
|
+
$ilike?: any;
|
|
86
|
+
$re?: any;
|
|
87
|
+
$contains?: any;
|
|
88
|
+
$gt?: any;
|
|
89
|
+
$gte?: any;
|
|
90
|
+
$lt?: any;
|
|
91
|
+
$lte?: any;
|
|
92
|
+
}, {
|
|
93
|
+
$eq?: any;
|
|
94
|
+
$ne?: any;
|
|
95
|
+
$in?: any;
|
|
96
|
+
$nin?: any;
|
|
97
|
+
$like?: any;
|
|
98
|
+
$ilike?: any;
|
|
99
|
+
$re?: any;
|
|
100
|
+
$contains?: any;
|
|
101
|
+
$gt?: any;
|
|
102
|
+
$gte?: any;
|
|
103
|
+
$lt?: any;
|
|
104
|
+
$lte?: any;
|
|
105
|
+
}>]>>;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
offset: number;
|
|
108
|
+
limit: number;
|
|
109
|
+
id?: string | string[] | undefined;
|
|
110
|
+
created_at?: any;
|
|
111
|
+
updated_at?: any;
|
|
112
|
+
code?: string | string[] | undefined;
|
|
113
|
+
type?: string | string[] | undefined;
|
|
114
|
+
q?: string | undefined;
|
|
115
|
+
fields?: string | undefined;
|
|
116
|
+
order?: string | undefined;
|
|
117
|
+
with_deleted?: boolean | undefined;
|
|
118
|
+
target?: string | string[] | undefined;
|
|
119
|
+
is_enabled?: boolean | undefined;
|
|
120
|
+
}, {
|
|
121
|
+
id?: string | string[] | undefined;
|
|
122
|
+
created_at?: any;
|
|
123
|
+
updated_at?: any;
|
|
124
|
+
code?: string | string[] | undefined;
|
|
125
|
+
type?: string | string[] | undefined;
|
|
126
|
+
offset?: unknown;
|
|
127
|
+
limit?: unknown;
|
|
128
|
+
q?: string | undefined;
|
|
129
|
+
fields?: string | undefined;
|
|
130
|
+
order?: string | undefined;
|
|
131
|
+
with_deleted?: unknown;
|
|
132
|
+
target?: string | string[] | undefined;
|
|
133
|
+
is_enabled?: string | boolean | undefined;
|
|
134
|
+
}>;
|
|
135
|
+
export type AdminCreateCommissionRateType = z.infer<typeof AdminCreateCommissionRate>;
|
|
136
|
+
export declare const AdminCreateCommissionRate: z.ZodObject<{
|
|
137
|
+
name: z.ZodString;
|
|
138
|
+
code: z.ZodString;
|
|
139
|
+
type: z.ZodNativeEnum<typeof CommissionRateType>;
|
|
140
|
+
target: z.ZodOptional<z.ZodNativeEnum<typeof CommissionRateTarget>>;
|
|
141
|
+
value: z.ZodNumber;
|
|
142
|
+
currency_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
143
|
+
min_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
144
|
+
include_tax: z.ZodOptional<z.ZodBoolean>;
|
|
145
|
+
is_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
146
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
147
|
+
rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
148
|
+
reference: z.ZodString;
|
|
149
|
+
reference_id: z.ZodString;
|
|
150
|
+
}, "strip", z.ZodTypeAny, {
|
|
151
|
+
reference: string;
|
|
152
|
+
reference_id: string;
|
|
153
|
+
}, {
|
|
154
|
+
reference: string;
|
|
155
|
+
reference_id: string;
|
|
156
|
+
}>, "many">>;
|
|
157
|
+
}, "strip", z.ZodTypeAny, {
|
|
158
|
+
value: number;
|
|
159
|
+
code: string;
|
|
160
|
+
type: CommissionRateType;
|
|
161
|
+
name: string;
|
|
162
|
+
currency_code?: string | null | undefined;
|
|
163
|
+
target?: CommissionRateTarget | undefined;
|
|
164
|
+
min_amount?: number | null | undefined;
|
|
165
|
+
include_tax?: boolean | undefined;
|
|
166
|
+
is_enabled?: boolean | undefined;
|
|
167
|
+
priority?: number | undefined;
|
|
168
|
+
rules?: {
|
|
169
|
+
reference: string;
|
|
170
|
+
reference_id: string;
|
|
171
|
+
}[] | undefined;
|
|
172
|
+
}, {
|
|
173
|
+
value: number;
|
|
174
|
+
code: string;
|
|
175
|
+
type: CommissionRateType;
|
|
176
|
+
name: string;
|
|
177
|
+
currency_code?: string | null | undefined;
|
|
178
|
+
target?: CommissionRateTarget | undefined;
|
|
179
|
+
min_amount?: number | null | undefined;
|
|
180
|
+
include_tax?: boolean | undefined;
|
|
181
|
+
is_enabled?: boolean | undefined;
|
|
182
|
+
priority?: number | undefined;
|
|
183
|
+
rules?: {
|
|
184
|
+
reference: string;
|
|
185
|
+
reference_id: string;
|
|
186
|
+
}[] | undefined;
|
|
187
|
+
}>;
|
|
188
|
+
export type AdminUpdateCommissionRateType = z.infer<typeof AdminUpdateCommissionRate>;
|
|
189
|
+
export declare const AdminUpdateCommissionRate: z.ZodObject<{
|
|
190
|
+
name: z.ZodOptional<z.ZodString>;
|
|
191
|
+
code: z.ZodOptional<z.ZodString>;
|
|
192
|
+
type: z.ZodOptional<z.ZodNativeEnum<typeof CommissionRateType>>;
|
|
193
|
+
target: z.ZodOptional<z.ZodNativeEnum<typeof CommissionRateTarget>>;
|
|
194
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
currency_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
196
|
+
min_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
197
|
+
include_tax: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
+
is_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
199
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
200
|
+
}, "strip", z.ZodTypeAny, {
|
|
201
|
+
value?: number | undefined;
|
|
202
|
+
code?: string | undefined;
|
|
203
|
+
type?: CommissionRateType | undefined;
|
|
204
|
+
currency_code?: string | null | undefined;
|
|
205
|
+
name?: string | undefined;
|
|
206
|
+
target?: CommissionRateTarget | undefined;
|
|
207
|
+
min_amount?: number | null | undefined;
|
|
208
|
+
include_tax?: boolean | undefined;
|
|
209
|
+
is_enabled?: boolean | undefined;
|
|
210
|
+
priority?: number | undefined;
|
|
211
|
+
}, {
|
|
212
|
+
value?: number | undefined;
|
|
213
|
+
code?: string | undefined;
|
|
214
|
+
type?: CommissionRateType | undefined;
|
|
215
|
+
currency_code?: string | null | undefined;
|
|
216
|
+
name?: string | undefined;
|
|
217
|
+
target?: CommissionRateTarget | undefined;
|
|
218
|
+
min_amount?: number | null | undefined;
|
|
219
|
+
include_tax?: boolean | undefined;
|
|
220
|
+
is_enabled?: boolean | undefined;
|
|
221
|
+
priority?: number | undefined;
|
|
222
|
+
}>;
|
|
223
|
+
export type AdminBatchCommissionRulesType = z.infer<typeof AdminBatchCommissionRules>;
|
|
224
|
+
export declare const AdminBatchCommissionRules: z.ZodObject<{
|
|
225
|
+
create: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
226
|
+
reference: z.ZodString;
|
|
227
|
+
reference_id: z.ZodString;
|
|
228
|
+
}, "strip", z.ZodTypeAny, {
|
|
229
|
+
reference: string;
|
|
230
|
+
reference_id: string;
|
|
231
|
+
}, {
|
|
232
|
+
reference: string;
|
|
233
|
+
reference_id: string;
|
|
234
|
+
}>, "many">>;
|
|
235
|
+
update: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
236
|
+
id: z.ZodString;
|
|
237
|
+
reference: z.ZodOptional<z.ZodString>;
|
|
238
|
+
reference_id: z.ZodOptional<z.ZodString>;
|
|
239
|
+
}, "strip", z.ZodTypeAny, {
|
|
240
|
+
id: string;
|
|
241
|
+
reference?: string | undefined;
|
|
242
|
+
reference_id?: string | undefined;
|
|
243
|
+
}, {
|
|
244
|
+
id: string;
|
|
245
|
+
reference?: string | undefined;
|
|
246
|
+
reference_id?: string | undefined;
|
|
247
|
+
}>, "many">>;
|
|
248
|
+
delete: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
249
|
+
}, "strip", z.ZodTypeAny, {
|
|
250
|
+
create?: {
|
|
251
|
+
reference: string;
|
|
252
|
+
reference_id: string;
|
|
253
|
+
}[] | undefined;
|
|
254
|
+
update?: {
|
|
255
|
+
id: string;
|
|
256
|
+
reference?: string | undefined;
|
|
257
|
+
reference_id?: string | undefined;
|
|
258
|
+
}[] | undefined;
|
|
259
|
+
delete?: string[] | undefined;
|
|
260
|
+
}, {
|
|
261
|
+
create?: {
|
|
262
|
+
reference: string;
|
|
263
|
+
reference_id: string;
|
|
264
|
+
}[] | undefined;
|
|
265
|
+
update?: {
|
|
266
|
+
id: string;
|
|
267
|
+
reference?: string | undefined;
|
|
268
|
+
reference_id?: string | undefined;
|
|
269
|
+
}[] | undefined;
|
|
270
|
+
delete?: string[] | undefined;
|
|
271
|
+
}>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminBatchCommissionRules = exports.AdminUpdateCommissionRate = exports.AdminCreateCommissionRate = exports.AdminGetCommissionRatesParams = exports.AdminGetCommissionRateParams = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const validators_1 = require("@medusajs/medusa/api/utils/validators");
|
|
6
|
+
const common_1 = require("@medusajs/medusa/api/utils/common-validators/common");
|
|
7
|
+
const types_1 = require("@mercurjs/types");
|
|
8
|
+
exports.AdminGetCommissionRateParams = (0, validators_1.createSelectParams)();
|
|
9
|
+
exports.AdminGetCommissionRatesParams = (0, validators_1.createFindParams)({
|
|
10
|
+
offset: 0,
|
|
11
|
+
limit: 50,
|
|
12
|
+
}).merge(zod_1.z.object({
|
|
13
|
+
q: zod_1.z.string().optional(),
|
|
14
|
+
id: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
15
|
+
code: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
16
|
+
type: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
17
|
+
target: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
18
|
+
is_enabled: (0, common_1.booleanString)().optional(),
|
|
19
|
+
created_at: (0, validators_1.createOperatorMap)().optional(),
|
|
20
|
+
updated_at: (0, validators_1.createOperatorMap)().optional(),
|
|
21
|
+
}));
|
|
22
|
+
const CommissionRuleSchema = zod_1.z.object({
|
|
23
|
+
reference: zod_1.z.string(),
|
|
24
|
+
reference_id: zod_1.z.string(),
|
|
25
|
+
});
|
|
26
|
+
exports.AdminCreateCommissionRate = zod_1.z.object({
|
|
27
|
+
name: zod_1.z.string(),
|
|
28
|
+
code: zod_1.z.string(),
|
|
29
|
+
type: zod_1.z.nativeEnum(types_1.CommissionRateType),
|
|
30
|
+
target: zod_1.z.nativeEnum(types_1.CommissionRateTarget).optional(),
|
|
31
|
+
value: zod_1.z.number(),
|
|
32
|
+
currency_code: zod_1.z.string().nullish(),
|
|
33
|
+
min_amount: zod_1.z.number().nullish(),
|
|
34
|
+
include_tax: zod_1.z.boolean().optional(),
|
|
35
|
+
is_enabled: zod_1.z.boolean().optional(),
|
|
36
|
+
priority: zod_1.z.number().optional(),
|
|
37
|
+
rules: zod_1.z.array(CommissionRuleSchema).optional(),
|
|
38
|
+
});
|
|
39
|
+
exports.AdminUpdateCommissionRate = zod_1.z.object({
|
|
40
|
+
name: zod_1.z.string().optional(),
|
|
41
|
+
code: zod_1.z.string().optional(),
|
|
42
|
+
type: zod_1.z.nativeEnum(types_1.CommissionRateType).optional(),
|
|
43
|
+
target: zod_1.z.nativeEnum(types_1.CommissionRateTarget).optional(),
|
|
44
|
+
value: zod_1.z.number().optional(),
|
|
45
|
+
currency_code: zod_1.z.string().nullish(),
|
|
46
|
+
min_amount: zod_1.z.number().nullish(),
|
|
47
|
+
include_tax: zod_1.z.boolean().optional(),
|
|
48
|
+
is_enabled: zod_1.z.boolean().optional(),
|
|
49
|
+
priority: zod_1.z.number().optional(),
|
|
50
|
+
});
|
|
51
|
+
const UpdateCommissionRuleSchema = zod_1.z.object({
|
|
52
|
+
id: zod_1.z.string(),
|
|
53
|
+
reference: zod_1.z.string().optional(),
|
|
54
|
+
reference_id: zod_1.z.string().optional(),
|
|
55
|
+
});
|
|
56
|
+
exports.AdminBatchCommissionRules = zod_1.z.object({
|
|
57
|
+
create: zod_1.z.array(CommissionRuleSchema).optional(),
|
|
58
|
+
update: zod_1.z.array(UpdateCommissionRuleSchema).optional(),
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NQUFNLEVBQUUsQ0FBQyxPQUFPLEVBQUU7SUFDaEMsV0FBVyxFQUFFLE9BQUMsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxRQUFRLEVBQUU7SUFDbkMsVUFBVSxFQUFFLE9BQUMsQ0FBQyxPQUFPLEVBQUUsQ0FBQyxRQUFRLEVBQUU7SUFDbEMsUUFBUSxFQUFFLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxRQUFRLEVBQUU7Q0FDaEMsQ0FBQyxDQUFBO0FBRUYsTUFBTSwwQkFBMEIsR0FBRyxPQUFDLENBQUMsTUFBTSxDQUFDO0lBQzFDLEVBQUUsRUFBRSxPQUFDLENBQUMsTUFBTSxFQUFFO0lBQ2QsU0FBUyxFQUFFLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxRQUFRLEVBQUU7SUFDaEMsWUFBWSxFQUFFLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxRQUFRLEVBQUU7Q0FDcEMsQ0FBQyxDQUFBO0FBS1csUUFBQSx5QkFBeUIsR0FBRyxPQUFDLENBQUMsTUFBTSxDQUFDO0lBQ2hELE1BQU0sRUFBRSxPQUFDLENBQUMsS0FBSyxDQUFDLG9CQUFvQixDQUFDLENBQUMsUUFBUSxFQUFFO0lBQ2hELE1BQU0sRUFBRSxPQUFDLENBQUMsS0FBSyxDQUFDLDBCQUEwQixDQUFDLENBQUMsUUFBUSxFQUFFO0lBQ3RELE1BQU0sRUFBRSxPQUFDLENBQUMsS0FBSyxDQUFDLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUFDLFFBQVEsRUFBRTtDQUN2QyxDQUFDLENBQUEifQ==
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.adminMiddlewares = void 0;
|
|
4
|
+
const middlewares_1 = require("./order-groups/middlewares");
|
|
5
|
+
const middlewares_2 = require("./payouts/middlewares");
|
|
6
|
+
const middlewares_3 = require("./sellers/middlewares");
|
|
7
|
+
const middlewares_4 = require("./commission-rates/middlewares");
|
|
8
|
+
exports.adminMiddlewares = [
|
|
9
|
+
...middlewares_1.adminOrderGroupsMiddlewares,
|
|
10
|
+
...middlewares_2.adminPayoutsMiddlewares,
|
|
11
|
+
...middlewares_3.adminSellersMiddlewares,
|
|
12
|
+
...middlewares_4.adminCommissionRatesMiddlewares,
|
|
13
|
+
];
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlkZGxld2FyZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvYXBpL2FkbWluL21pZGRsZXdhcmVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUVBLDREQUF3RTtBQUN4RSx1REFBK0Q7QUFDL0QsdURBQStEO0FBQy9ELGdFQUFnRjtBQUVuRSxRQUFBLGdCQUFnQixHQUFzQjtJQUNqRCxHQUFHLHlDQUEyQjtJQUM5QixHQUFHLHFDQUF1QjtJQUMxQixHQUFHLHFDQUF1QjtJQUMxQixHQUFHLDZDQUErQjtDQUNuQyxDQUFBIn0=
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GET = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const GET = async (req, res) => {
|
|
6
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
7
|
+
const { data: [order_group], } = await query.graph({
|
|
8
|
+
entity: "order_group",
|
|
9
|
+
filters: {
|
|
10
|
+
id: req.params.id,
|
|
11
|
+
},
|
|
12
|
+
fields: req.queryConfig.fields,
|
|
13
|
+
});
|
|
14
|
+
if (!order_group) {
|
|
15
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Order group with id ${req.params.id} was not found`);
|
|
16
|
+
}
|
|
17
|
+
res.json({ order_group });
|
|
18
|
+
};
|
|
19
|
+
exports.GET = GET;
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL2FkbWluL29yZGVyLWdyb3Vwcy9baWRdL3JvdXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUlBLHFEQUdrQztBQUczQixNQUFNLEdBQUcsR0FBRyxLQUFLLEVBQ3RCLEdBQStCLEVBQy9CLEdBQXNELEVBQ3RELEVBQUU7SUFDRixNQUFNLEtBQUssR0FBRyxHQUFHLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxpQ0FBeUIsQ0FBQyxLQUFLLENBQUMsQ0FBQTtJQUVoRSxNQUFNLEVBQ0osSUFBSSxFQUFFLENBQUMsV0FBVyxDQUFDLEdBQ3BCLEdBQUcsTUFBTSxLQUFLLENBQUMsS0FBSyxDQUFDO1FBQ3BCLE1BQU0sRUFBRSxhQUFhO1FBQ3JCLE9BQU8sRUFBRTtZQUNQLEVBQUUsRUFBRSxHQUFHLENBQUMsTUFBTSxDQUFDLEVBQUU7U0FDbEI7UUFDRCxNQUFNLEVBQUUsR0FBRyxDQUFDLFdBQVcsQ0FBQyxNQUFNO0tBQy9CLENBQUMsQ0FBQTtJQUVGLElBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQztRQUNqQixNQUFNLElBQUksbUJBQVcsQ0FDbkIsbUJBQVcsQ0FBQyxLQUFLLENBQUMsU0FBUyxFQUMzQix1QkFBdUIsR0FBRyxDQUFDLE1BQU0sQ0FBQyxFQUFFLGdCQUFnQixDQUNyRCxDQUFBO0lBQ0gsQ0FBQztJQUVELEdBQUcsQ0FBQyxJQUFJLENBQUMsRUFBRSxXQUFXLEVBQUUsQ0FBQyxDQUFBO0FBQzNCLENBQUMsQ0FBQTtBQXhCWSxRQUFBLEdBQUcsT0F3QmYifQ==
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.adminOrderGroupsMiddlewares = void 0;
|
|
4
|
+
const framework_1 = require("@medusajs/framework");
|
|
5
|
+
const query_config_1 = require("./query-config");
|
|
6
|
+
const validators_1 = require("./validators");
|
|
7
|
+
exports.adminOrderGroupsMiddlewares = [
|
|
8
|
+
{
|
|
9
|
+
method: ["GET"],
|
|
10
|
+
matcher: "/admin/order-groups",
|
|
11
|
+
middlewares: [
|
|
12
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.AdminGetOrderGroupsParams, query_config_1.adminOrderGroupQueryConfig.list),
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
method: ["GET"],
|
|
17
|
+
matcher: "/admin/order-groups/:id",
|
|
18
|
+
middlewares: [
|
|
19
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.AdminGetOrderGroupParams, query_config_1.adminOrderGroupQueryConfig.retrieve),
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlkZGxld2FyZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL2FkbWluL29yZGVyLWdyb3Vwcy9taWRkbGV3YXJlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxtREFFNEI7QUFHNUIsaURBQTJEO0FBQzNELDZDQUdxQjtBQUVSLFFBQUEsMkJBQTJCLEdBQXNCO0lBQzVEO1FBQ0UsTUFBTSxFQUFFLENBQUMsS0FBSyxDQUFDO1FBQ2YsT0FBTyxFQUFFLHFCQUFxQjtRQUM5QixXQUFXLEVBQUU7WUFDWCxJQUFBLHFDQUF5QixFQUN2QixzQ0FBeUIsRUFDekIseUNBQTBCLENBQUMsSUFBSSxDQUNoQztTQUNGO0tBQ0Y7SUFDRDtRQUNFLE1BQU0sRUFBRSxDQUFDLEtBQUssQ0FBQztRQUNmLE9BQU8sRUFBRSx5QkFBeUI7UUFDbEMsV0FBVyxFQUFFO1lBQ1gsSUFBQSxxQ0FBeUIsRUFDdkIscUNBQXdCLEVBQ3hCLHlDQUEwQixDQUFDLFFBQVEsQ0FDcEM7U0FDRjtLQUNGO0NBQ0YsQ0FBQSJ9
|