@mercurjs/core 2.1.6 → 2.2.0-canary.11
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/claims/[id]/outbound/items/route.d.ts +20 -0
- package/.medusa/server/src/api/admin/claims/[id]/outbound/items/route.js +66 -0
- package/.medusa/server/src/api/admin/claims/[id]/request/route.d.ts +10 -0
- package/.medusa/server/src/api/admin/claims/[id]/request/route.js +80 -0
- package/.medusa/server/src/api/admin/commission-rates/validators.d.ts +12 -12
- package/.medusa/server/src/api/admin/exchanges/[id]/outbound/items/route.d.ts +22 -0
- package/.medusa/server/src/api/admin/exchanges/[id]/outbound/items/route.js +68 -0
- package/.medusa/server/src/api/admin/exchanges/[id]/request/route.d.ts +10 -0
- package/.medusa/server/src/api/admin/exchanges/[id]/request/route.js +81 -0
- package/.medusa/server/src/api/admin/members/validators.d.ts +2 -2
- package/.medusa/server/src/api/admin/middlewares.js +27 -50
- package/.medusa/server/src/api/admin/offers/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/offers/[id]/route.js +37 -0
- package/.medusa/server/src/api/admin/offers/batch/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/offers/batch/route.js +37 -0
- package/.medusa/server/src/api/admin/offers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/offers/middlewares.js +31 -0
- package/.medusa/server/src/api/admin/offers/query-config.d.ts +11 -0
- package/.medusa/server/src/api/admin/offers/query-config.js +47 -0
- package/.medusa/server/src/api/admin/offers/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/offers/route.js +21 -0
- package/.medusa/server/src/api/admin/offers/validators.d.ts +299 -0
- package/.medusa/server/src/api/admin/offers/validators.js +65 -0
- package/.medusa/server/src/api/admin/order-edits/[id]/items/route.d.ts +26 -0
- package/.medusa/server/src/api/admin/order-edits/[id]/items/route.js +57 -0
- package/.medusa/server/src/api/admin/order-groups/apply-request-filter.d.ts +2 -0
- package/.medusa/server/src/api/admin/order-groups/apply-request-filter.js +140 -0
- package/.medusa/server/src/api/admin/order-groups/middlewares.js +3 -1
- package/.medusa/server/src/api/admin/order-groups/validators.d.ts +7 -4
- package/.medusa/server/src/api/admin/order-groups/validators.js +7 -1
- package/.medusa/server/src/api/admin/orders/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/orders/middlewares.js +42 -0
- package/.medusa/server/src/api/admin/orders/resolve-order-seller-id.d.ts +11 -0
- package/.medusa/server/src/api/admin/orders/resolve-order-seller-id.js +24 -0
- package/.medusa/server/src/api/admin/orders/validators.d.ts +73 -27
- package/.medusa/server/src/api/admin/orders/validators.js +9 -29
- package/.medusa/server/src/api/admin/payouts/validators.d.ts +2 -2
- package/.medusa/server/src/api/admin/product-attributes/[id]/route.d.ts +7 -0
- package/.medusa/server/src/api/admin/product-attributes/[id]/route.js +51 -0
- package/.medusa/server/src/api/admin/product-attributes/[id]/values/[value_id]/route.d.ts +6 -0
- package/.medusa/server/src/api/admin/product-attributes/[id]/values/[value_id]/route.js +37 -0
- package/.medusa/server/src/api/admin/product-attributes/[id]/values/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/product-attributes/[id]/values/route.js +22 -0
- package/.medusa/server/src/api/admin/product-attributes/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/product-attributes/middlewares.js +89 -0
- package/.medusa/server/src/api/admin/product-attributes/query-config.d.ts +12 -0
- package/.medusa/server/src/api/admin/product-attributes/query-config.js +33 -0
- package/.medusa/server/src/api/admin/product-attributes/route.d.ts +6 -0
- package/.medusa/server/src/api/admin/product-attributes/route.js +41 -0
- package/.medusa/server/src/api/admin/product-attributes/validators.d.ts +544 -0
- package/.medusa/server/src/api/admin/product-attributes/validators.js +115 -0
- package/.medusa/server/src/api/admin/product-categories/[id]/products/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/product-categories/[id]/products/route.js +20 -0
- package/.medusa/server/src/api/admin/product-categories/[id]/route.d.ts +7 -0
- package/.medusa/server/src/api/admin/product-categories/[id]/route.js +51 -0
- package/.medusa/server/src/api/admin/product-categories/[id]/sellers/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/product-categories/[id]/sellers/route.js +20 -0
- package/.medusa/server/src/api/admin/product-categories/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/product-categories/middlewares.js +54 -0
- package/.medusa/server/src/api/admin/product-categories/query-config.d.ts +12 -0
- package/.medusa/server/src/api/admin/product-categories/query-config.js +31 -0
- package/.medusa/server/src/api/admin/product-categories/route.d.ts +6 -0
- package/.medusa/server/src/api/admin/product-categories/route.js +39 -0
- package/.medusa/server/src/api/admin/product-categories/validators.d.ts +446 -0
- package/.medusa/server/src/api/admin/product-categories/validators.js +65 -0
- package/.medusa/server/src/api/admin/product-changes/[id]/cancel/route.d.ts +10 -0
- package/.medusa/server/src/api/admin/product-changes/[id]/cancel/route.js +32 -0
- package/.medusa/server/src/api/admin/product-changes/[id]/confirm/route.d.ts +10 -0
- package/.medusa/server/src/api/admin/product-changes/[id]/confirm/route.js +27 -0
- package/.medusa/server/src/api/admin/product-changes/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/product-changes/middlewares.js +18 -0
- package/.medusa/server/src/api/admin/product-changes/validators.d.ts +17 -0
- package/.medusa/server/src/api/admin/product-changes/validators.js +15 -0
- package/.medusa/server/src/api/admin/products/[id]/attributes/[attribute_id]/route.d.ts +13 -0
- package/.medusa/server/src/api/admin/products/[id]/attributes/[attribute_id]/route.js +90 -0
- package/.medusa/server/src/api/admin/{subscription-plans/[id]/overrides → products/[id]/attributes/batch}/route.d.ts +2 -2
- package/.medusa/server/src/api/admin/products/[id]/attributes/batch/route.js +25 -0
- package/.medusa/server/src/api/admin/products/[id]/attributes/route.d.ts +5 -0
- package/.medusa/server/src/api/admin/products/[id]/attributes/route.js +63 -0
- package/.medusa/server/src/api/admin/products/[id]/confirm/route.d.ts +16 -0
- package/.medusa/server/src/api/admin/products/[id]/confirm/route.js +36 -0
- package/.medusa/server/src/api/admin/products/[id]/preview/route.d.ts +12 -0
- package/.medusa/server/src/api/admin/products/[id]/preview/route.js +27 -0
- package/.medusa/server/src/api/admin/products/[id]/reject/route.d.ts +12 -0
- package/.medusa/server/src/api/admin/products/[id]/reject/route.js +32 -0
- package/.medusa/server/src/api/admin/products/[id]/request-changes/route.d.ts +13 -0
- package/.medusa/server/src/api/admin/products/[id]/request-changes/route.js +33 -0
- package/.medusa/server/src/api/admin/products/[id]/route.d.ts +7 -0
- package/.medusa/server/src/api/admin/products/[id]/route.js +55 -0
- package/.medusa/server/src/api/admin/products/[id]/variants/[variant_id]/route.d.ts +7 -0
- package/.medusa/server/src/api/admin/products/[id]/variants/[variant_id]/route.js +60 -0
- package/.medusa/server/src/api/admin/products/[id]/variants/route.d.ts +6 -0
- package/.medusa/server/src/api/admin/products/[id]/variants/route.js +59 -0
- package/.medusa/server/src/api/admin/products/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/products/middlewares.js +165 -0
- package/.medusa/server/src/api/admin/products/query-config.d.ts +25 -0
- package/.medusa/server/src/api/admin/products/query-config.js +95 -0
- package/.medusa/server/src/api/admin/products/route.d.ts +4 -2
- package/.medusa/server/src/api/admin/products/route.js +43 -1
- package/.medusa/server/src/api/admin/products/validators.d.ts +2923 -802
- package/.medusa/server/src/api/admin/products/validators.js +352 -4
- package/.medusa/server/src/api/admin/returns/[id]/receive/confirm/route.d.ts +9 -0
- package/.medusa/server/src/api/admin/returns/[id]/receive/confirm/route.js +35 -0
- package/.medusa/server/src/api/admin/sellers/validators.d.ts +16 -16
- package/.medusa/server/src/api/admin/shipping-options/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/shipping-options/middlewares.js +46 -0
- package/.medusa/server/src/api/admin/shipping-profiles/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/shipping-profiles/middlewares.js +46 -0
- package/.medusa/server/src/api/admin/stock-locations/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/stock-locations/middlewares.js +46 -0
- package/.medusa/server/src/api/store/carts/[id]/line-items/route.d.ts +3 -0
- package/.medusa/server/src/api/store/carts/[id]/line-items/route.js +38 -0
- package/.medusa/server/src/api/store/carts/[id]/line-items/validators.d.ts +24 -0
- package/.medusa/server/src/api/store/carts/[id]/line-items/validators.js +15 -0
- package/.medusa/server/src/api/store/carts/middlewares.js +26 -1
- package/.medusa/server/src/api/store/middlewares.js +9 -5
- package/.medusa/server/src/api/store/order-groups/validators.d.ts +2 -2
- package/.medusa/server/src/api/store/product-attributes/[id]/route.d.ts +2 -0
- package/.medusa/server/src/api/store/product-attributes/[id]/route.js +18 -0
- package/.medusa/server/src/api/store/product-attributes/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/product-attributes/middlewares.js +31 -0
- package/.medusa/server/src/api/store/product-attributes/query-config.d.ts +12 -0
- package/.medusa/server/src/api/store/product-attributes/query-config.js +31 -0
- package/.medusa/server/src/api/store/product-attributes/route.d.ts +2 -0
- package/.medusa/server/src/api/store/product-attributes/route.js +21 -0
- package/.medusa/server/src/api/store/product-attributes/validators.d.ts +234 -0
- package/.medusa/server/src/api/store/product-attributes/validators.js +26 -0
- package/.medusa/server/src/api/store/product-categories/[id]/route.d.ts +2 -0
- package/.medusa/server/src/api/store/product-categories/[id]/route.js +18 -0
- package/.medusa/server/src/api/store/product-categories/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/product-categories/middlewares.js +31 -0
- package/.medusa/server/src/api/store/product-categories/query-config.d.ts +12 -0
- package/.medusa/server/src/api/store/product-categories/query-config.js +28 -0
- package/.medusa/server/src/api/store/product-categories/route.d.ts +2 -0
- package/.medusa/server/src/api/store/product-categories/route.js +21 -0
- package/.medusa/server/src/api/store/product-categories/validators.d.ts +240 -0
- package/.medusa/server/src/api/store/product-categories/validators.js +27 -0
- package/.medusa/server/src/api/store/products/[id]/route.d.ts +2 -0
- package/.medusa/server/src/api/store/products/[id]/route.js +32 -0
- package/.medusa/server/src/api/store/products/middlewares.d.ts +1 -1
- package/.medusa/server/src/api/store/products/middlewares.js +23 -5
- package/.medusa/server/src/api/store/products/query-config.d.ts +12 -0
- package/.medusa/server/src/api/store/products/query-config.js +55 -0
- package/.medusa/server/src/api/store/products/route.d.ts +2 -0
- package/.medusa/server/src/api/store/products/route.js +28 -0
- package/.medusa/server/src/api/store/products/validators.d.ts +270 -0
- package/.medusa/server/src/api/store/products/validators.js +32 -0
- package/.medusa/server/src/api/store/sellers/validators.d.ts +2 -2
- package/.medusa/server/src/api/utils/filter-attributes-by-category-link.d.ts +17 -0
- package/.medusa/server/src/api/utils/filter-attributes-by-category-link.js +58 -0
- package/.medusa/server/src/api/utils/format-product-attributes.d.ts +54 -0
- package/.medusa/server/src/api/utils/format-product-attributes.js +189 -0
- package/.medusa/server/src/api/utils/index.d.ts +2 -0
- package/.medusa/server/src/api/utils/index.js +3 -1
- package/.medusa/server/src/api/vendor/campaigns/validators.d.ts +2 -2
- package/.medusa/server/src/api/vendor/claims/[id]/cancel/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/claims/[id]/cancel/route.js +17 -0
- package/.medusa/server/src/api/vendor/claims/[id]/claim-items/[action_id]/route.d.ts +9 -0
- package/.medusa/server/src/api/vendor/claims/[id]/claim-items/[action_id]/route.js +32 -0
- package/.medusa/server/src/api/vendor/claims/[id]/claim-items/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/claims/[id]/claim-items/route.js +15 -0
- package/.medusa/server/src/api/vendor/claims/[id]/inbound/items/[action_id]/route.d.ts +9 -0
- package/.medusa/server/src/api/vendor/claims/[id]/inbound/items/[action_id]/route.js +46 -0
- package/.medusa/server/src/api/vendor/claims/[id]/inbound/items/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/claims/[id]/inbound/items/route.js +26 -0
- package/.medusa/server/src/api/vendor/claims/[id]/inbound/shipping-method/[action_id]/route.d.ts +9 -0
- package/.medusa/server/src/api/vendor/claims/[id]/inbound/shipping-method/[action_id]/route.js +39 -0
- package/.medusa/server/src/api/vendor/claims/[id]/inbound/shipping-method/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/claims/[id]/inbound/shipping-method/route.js +26 -0
- package/.medusa/server/src/api/vendor/claims/[id]/outbound/items/[action_id]/route.d.ts +9 -0
- package/.medusa/server/src/api/vendor/claims/[id]/outbound/items/[action_id]/route.js +32 -0
- package/.medusa/server/src/api/vendor/claims/[id]/outbound/items/route.d.ts +12 -0
- package/.medusa/server/src/api/vendor/claims/[id]/outbound/items/route.js +47 -0
- package/.medusa/server/src/api/vendor/claims/[id]/outbound/shipping-method/[action_id]/route.d.ts +9 -0
- package/.medusa/server/src/api/vendor/claims/[id]/outbound/shipping-method/[action_id]/route.js +32 -0
- package/.medusa/server/src/api/vendor/claims/[id]/outbound/shipping-method/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/claims/[id]/outbound/shipping-method/route.js +15 -0
- package/.medusa/server/src/api/vendor/claims/[id]/request/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/claims/[id]/request/route.js +34 -0
- package/.medusa/server/src/api/vendor/claims/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/claims/[id]/route.js +19 -0
- package/.medusa/server/src/api/vendor/claims/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/claims/helpers.js +19 -0
- package/.medusa/server/src/api/vendor/claims/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/claims/middlewares.js +184 -0
- package/.medusa/server/src/api/vendor/claims/query-config.d.ts +12 -0
- package/.medusa/server/src/api/vendor/claims/query-config.js +31 -0
- package/.medusa/server/src/api/vendor/claims/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/claims/route.js +35 -0
- package/.medusa/server/src/api/vendor/claims/validators.d.ts +378 -0
- package/.medusa/server/src/api/vendor/claims/validators.js +89 -0
- package/.medusa/server/src/api/vendor/collections/validators.d.ts +6 -6
- package/.medusa/server/src/api/vendor/currencies/validators.d.ts +2 -2
- package/.medusa/server/src/api/vendor/customers/validators.d.ts +2 -2
- package/.medusa/server/src/api/vendor/exchanges/[id]/cancel/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/cancel/route.js +17 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/inbound/items/[action_id]/route.d.ts +9 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/inbound/items/[action_id]/route.js +46 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/inbound/items/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/inbound/items/route.js +26 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/inbound/shipping-method/[action_id]/route.d.ts +9 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/inbound/shipping-method/[action_id]/route.js +45 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/inbound/shipping-method/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/inbound/shipping-method/route.js +26 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/outbound/items/[action_id]/route.d.ts +9 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/outbound/items/[action_id]/route.js +32 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/outbound/items/route.d.ts +12 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/outbound/items/route.js +47 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/outbound/shipping-method/[action_id]/route.d.ts +9 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/outbound/shipping-method/[action_id]/route.js +32 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/outbound/shipping-method/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/outbound/shipping-method/route.js +15 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/request/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/request/route.js +34 -0
- package/.medusa/server/src/api/vendor/exchanges/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/exchanges/helpers.js +19 -0
- package/.medusa/server/src/api/vendor/exchanges/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/exchanges/middlewares.js +155 -0
- package/.medusa/server/src/api/vendor/exchanges/query-config.d.ts +7 -0
- package/.medusa/server/src/api/vendor/exchanges/query-config.js +23 -0
- package/.medusa/server/src/api/vendor/exchanges/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/exchanges/route.js +35 -0
- package/.medusa/server/src/api/vendor/exchanges/validators.d.ts +313 -0
- package/.medusa/server/src/api/vendor/exchanges/validators.js +71 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/validators.d.ts +2 -2
- package/.medusa/server/src/api/vendor/fulfillment-sets/validators.d.ts +16 -16
- package/.medusa/server/src/api/vendor/inventory-items/route.js +1 -1
- package/.medusa/server/src/api/vendor/inventory-items/validators.d.ts +60 -60
- package/.medusa/server/src/api/vendor/middlewares.js +77 -67
- package/.medusa/server/src/api/vendor/offers/[id]/inventory-items/batch/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/offers/[id]/inventory-items/batch/route.js +24 -0
- package/.medusa/server/src/api/vendor/offers/[id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/offers/[id]/route.js +38 -0
- package/.medusa/server/src/api/vendor/{products/[id]/variants/[variant_id]/media → offers/batch}/route.d.ts +2 -2
- package/.medusa/server/src/api/vendor/offers/batch/route.js +34 -0
- package/.medusa/server/src/api/vendor/offers/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/offers/helpers.js +27 -0
- package/.medusa/server/src/api/vendor/offers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/offers/middlewares.js +65 -0
- package/.medusa/server/src/api/vendor/offers/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/offers/query-config.js +47 -0
- package/.medusa/server/src/api/vendor/offers/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/offers/route.js +41 -0
- package/.medusa/server/src/api/vendor/offers/validators.d.ts +607 -0
- package/.medusa/server/src/api/vendor/offers/validators.js +119 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/confirm/route.d.ts +9 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/confirm/route.js +24 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/items/[action_id]/route.d.ts +14 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/items/[action_id]/route.js +41 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/items/item/[item_id]/route.d.ts +10 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/items/item/[item_id]/route.js +30 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/items/route.d.ts +16 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/items/route.js +45 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/request/route.d.ts +10 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/request/route.js +25 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/route.d.ts +10 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/route.js +26 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/shipping-method/[action_id]/route.d.ts +14 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/shipping-method/[action_id]/route.js +41 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/shipping-method/route.d.ts +9 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/shipping-method/route.js +20 -0
- package/.medusa/server/src/api/vendor/order-edits/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/order-edits/middlewares.js +106 -0
- package/.medusa/server/src/api/vendor/order-edits/route.d.ts +10 -0
- package/.medusa/server/src/api/vendor/order-edits/route.js +21 -0
- package/.medusa/server/src/api/vendor/order-edits/validators.d.ts +166 -0
- package/.medusa/server/src/api/vendor/order-edits/validators.js +50 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/cancel/route.js +3 -3
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/route.js +3 -3
- package/.medusa/server/src/api/vendor/orders/apply-request-filter.d.ts +2 -0
- package/.medusa/server/src/api/vendor/orders/apply-request-filter.js +99 -0
- package/.medusa/server/src/api/vendor/orders/middlewares.js +3 -1
- package/.medusa/server/src/api/vendor/orders/query-config.js +34 -11
- package/.medusa/server/src/api/vendor/orders/resolve-offer-items.d.ts +40 -0
- package/.medusa/server/src/api/vendor/orders/resolve-offer-items.js +66 -0
- package/.medusa/server/src/api/vendor/orders/validators.d.ts +7 -4
- package/.medusa/server/src/api/vendor/orders/validators.js +7 -1
- package/.medusa/server/src/api/vendor/payment-collections/[id]/mark-as-paid/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payment-collections/[id]/mark-as-paid/route.js +25 -0
- package/.medusa/server/src/api/vendor/payment-collections/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/payment-collections/helpers.js +30 -0
- package/.medusa/server/src/api/vendor/payment-collections/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/payment-collections/middlewares.js +17 -0
- package/.medusa/server/src/api/vendor/payment-collections/query-config.d.ts +7 -0
- package/.medusa/server/src/api/vendor/payment-collections/query-config.js +26 -0
- package/.medusa/server/src/api/vendor/payment-collections/validators.d.ts +17 -0
- package/.medusa/server/src/api/vendor/payment-collections/validators.js +12 -0
- package/.medusa/server/src/api/vendor/payments/helpers.d.ts +9 -0
- package/.medusa/server/src/api/vendor/payments/helpers.js +23 -8
- package/.medusa/server/src/api/vendor/payments/validators.d.ts +4 -4
- package/.medusa/server/src/api/vendor/payouts/validators.d.ts +2 -2
- package/.medusa/server/src/api/vendor/price-lists/validators.d.ts +26 -26
- package/.medusa/server/src/api/vendor/price-preferences/validators.d.ts +2 -2
- package/.medusa/server/src/api/vendor/{subscription → product-attributes/[id]}/route.d.ts +2 -2
- package/.medusa/server/src/api/vendor/product-attributes/[id]/route.js +18 -0
- package/.medusa/server/src/api/vendor/product-attributes/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/product-attributes/middlewares.js +37 -0
- package/.medusa/server/src/api/vendor/product-attributes/query-config.d.ts +12 -0
- package/.medusa/server/src/api/vendor/product-attributes/query-config.js +34 -0
- package/.medusa/server/src/api/vendor/{attributes → product-attributes}/route.d.ts +2 -1
- package/.medusa/server/src/api/vendor/product-attributes/route.js +26 -0
- package/.medusa/server/src/api/vendor/product-attributes/validators.d.ts +390 -0
- package/.medusa/server/src/api/vendor/product-attributes/validators.js +72 -0
- package/.medusa/server/src/api/vendor/product-categories/[id]/products/route.d.ts +3 -2
- package/.medusa/server/src/api/vendor/product-categories/[id]/products/route.js +24 -15
- package/.medusa/server/src/api/vendor/product-categories/[id]/route.js +2 -4
- package/.medusa/server/src/api/vendor/product-categories/middlewares.js +7 -41
- package/.medusa/server/src/api/vendor/product-categories/query-config.d.ts +11 -8
- package/.medusa/server/src/api/vendor/product-categories/query-config.js +16 -12
- package/.medusa/server/src/api/vendor/product-categories/validators.d.ts +345 -44
- package/.medusa/server/src/api/vendor/product-categories/validators.js +24 -10
- package/.medusa/server/src/api/vendor/product-types/validators.d.ts +2 -2
- package/.medusa/server/src/api/vendor/product-variants/middlewares.js +34 -11
- package/.medusa/server/src/api/vendor/product-variants/query-config.d.ts +2 -2
- package/.medusa/server/src/api/vendor/product-variants/query-config.js +16 -13
- package/.medusa/server/src/api/vendor/product-variants/route.d.ts +2 -1
- package/.medusa/server/src/api/vendor/product-variants/route.js +1 -1
- package/.medusa/server/src/api/vendor/product-variants/validators.d.ts +377 -21
- package/.medusa/server/src/api/vendor/product-variants/validators.js +14 -8
- package/.medusa/server/src/api/vendor/products/[id]/attributes/[attribute_id]/route.d.ts +20 -2
- package/.medusa/server/src/api/vendor/products/[id]/attributes/[attribute_id]/route.js +77 -129
- package/.medusa/server/src/api/vendor/products/[id]/attributes/batch/route.d.ts +12 -0
- package/.medusa/server/src/api/vendor/products/[id]/attributes/batch/route.js +46 -0
- package/.medusa/server/src/api/vendor/products/[id]/attributes/route.d.ts +13 -1
- package/.medusa/server/src/api/vendor/products/[id]/attributes/route.js +70 -101
- package/.medusa/server/src/api/vendor/products/[id]/cancel/route.d.ts +11 -0
- package/.medusa/server/src/api/vendor/products/[id]/cancel/route.js +43 -0
- package/.medusa/server/src/api/vendor/products/[id]/preview/route.d.ts +14 -0
- package/.medusa/server/src/api/vendor/products/[id]/preview/route.js +31 -0
- package/.medusa/server/src/api/vendor/products/[id]/route.d.ts +22 -3
- package/.medusa/server/src/api/vendor/products/[id]/route.js +41 -31
- package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/route.d.ts +16 -4
- package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/route.js +50 -33
- package/.medusa/server/src/api/vendor/products/[id]/variants/route.d.ts +12 -3
- package/.medusa/server/src/api/vendor/products/[id]/variants/route.js +28 -25
- package/.medusa/server/src/api/vendor/products/helpers.d.ts +8 -2
- package/.medusa/server/src/api/vendor/products/helpers.js +14 -8
- package/.medusa/server/src/api/vendor/products/middlewares.js +61 -34
- package/.medusa/server/src/api/vendor/products/query-config.d.ts +4 -1
- package/.medusa/server/src/api/vendor/products/query-config.js +42 -14
- package/.medusa/server/src/api/vendor/products/route.d.ts +11 -1
- package/.medusa/server/src/api/vendor/products/route.js +26 -10
- package/.medusa/server/src/api/vendor/products/validators.d.ts +1151 -1766
- package/.medusa/server/src/api/vendor/products/validators.js +278 -112
- package/.medusa/server/src/api/vendor/promotions/validators.d.ts +20 -20
- package/.medusa/server/src/api/vendor/refund-reasons/validators.d.ts +2 -2
- package/.medusa/server/src/api/vendor/regions/validators.d.ts +4 -4
- package/.medusa/server/src/api/vendor/reservations/[id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/reservations/[id]/route.js +39 -0
- package/.medusa/server/src/api/vendor/reservations/helpers.d.ts +2 -0
- package/.medusa/server/src/api/vendor/reservations/helpers.js +21 -0
- package/.medusa/server/src/api/vendor/reservations/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/reservations/middlewares.js +61 -0
- package/.medusa/server/src/api/vendor/reservations/query-config.d.ts +19 -0
- package/.medusa/server/src/api/vendor/reservations/query-config.js +48 -0
- package/.medusa/server/src/api/vendor/reservations/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/reservations/route.js +35 -0
- package/.medusa/server/src/api/vendor/reservations/validators.d.ts +296 -0
- package/.medusa/server/src/api/vendor/reservations/validators.js +40 -0
- package/.medusa/server/src/api/vendor/return-reasons/validators.d.ts +2 -2
- package/.medusa/server/src/api/vendor/returns/[id]/receive/confirm/route.js +3 -3
- package/.medusa/server/src/api/vendor/returns/validators.d.ts +22 -22
- package/.medusa/server/src/api/vendor/sales-channels/[id]/products/route.js +1 -5
- package/.medusa/server/src/api/vendor/sales-channels/validators.d.ts +2 -2
- package/.medusa/server/src/api/vendor/sellers/validators.d.ts +10 -10
- package/.medusa/server/src/api/vendor/shipping-option-types/validators.d.ts +2 -2
- package/.medusa/server/src/api/vendor/shipping-options/middlewares.js +13 -1
- package/.medusa/server/src/api/vendor/shipping-options/validators.d.ts +51 -48
- package/.medusa/server/src/api/vendor/shipping-options/validators.js +2 -1
- package/.medusa/server/src/api/vendor/shipping-profiles/validators.d.ts +4 -4
- package/.medusa/server/src/api/vendor/stock-locations/validators.d.ts +5 -5
- package/.medusa/server/src/api/vendor/stores/validators.d.ts +2 -2
- package/.medusa/server/src/feature-flags/product-request.d.ts +3 -0
- package/.medusa/server/src/feature-flags/product-request.js +10 -0
- package/.medusa/server/src/links/cart-line-item-offer-link.js +17 -0
- package/.medusa/server/src/links/category-seller-link.js +16 -0
- package/.medusa/server/src/links/offer-inventory-item-link.js +26 -0
- package/.medusa/server/src/links/offer-price-link.js +13 -0
- package/.medusa/server/src/links/offer-seller-link.js +15 -0
- package/.medusa/server/src/links/offer-shipping-profile-link.d.ts +2 -0
- package/.medusa/server/src/links/offer-shipping-profile-link.js +15 -0
- package/.medusa/server/src/links/offer-variant-link.d.ts +2 -0
- package/.medusa/server/src/links/offer-variant-link.js +15 -0
- package/.medusa/server/src/links/order-line-item-offer-link.d.ts +2 -0
- package/.medusa/server/src/links/order-line-item-offer-link.js +18 -0
- package/.medusa/server/src/links/product-attribute-category-link.d.ts +16 -0
- package/.medusa/server/src/links/product-attribute-category-link.js +40 -0
- package/.medusa/server/src/links/product-attribute-product-link.d.ts +10 -0
- package/.medusa/server/src/links/product-attribute-product-link.js +29 -0
- package/.medusa/server/src/links/product-attribute-value-link.d.ts +20 -0
- package/.medusa/server/src/links/product-attribute-value-link.js +34 -4
- package/.medusa/server/src/links/product-change-link.d.ts +8 -0
- package/.medusa/server/src/links/product-change-link.js +27 -0
- package/.medusa/server/src/links/product-seller-link.js +12 -2
- package/.medusa/server/src/links/product-variant-attribute-link.d.ts +2 -0
- package/.medusa/server/src/links/product-variant-attribute-link.js +21 -0
- package/.medusa/server/src/links/product-variant-attribute-value-link.d.ts +2 -0
- package/.medusa/server/src/links/product-variant-attribute-value-link.js +21 -0
- package/.medusa/server/src/modules/offer/index.d.ts +21 -0
- package/.medusa/server/src/modules/{subscription → offer}/index.js +2 -2
- package/.medusa/server/src/modules/{attribute/migrations/Migration20260325000000.d.ts → offer/migrations/Migration20260520104835.d.ts} +1 -1
- package/.medusa/server/src/modules/offer/migrations/Migration20260520104835.js +22 -0
- package/.medusa/server/src/modules/{subscription/migrations/Migration20260324135903.d.ts → offer/migrations/Migration20260526000000.d.ts} +1 -1
- package/.medusa/server/src/modules/offer/migrations/Migration20260526000000.js +16 -0
- package/.medusa/server/src/modules/offer/models/index.d.ts +1 -0
- package/.medusa/server/src/modules/offer/models/index.js +9 -0
- package/.medusa/server/src/modules/offer/models/offer.d.ts +12 -0
- package/.medusa/server/src/modules/offer/models/offer.js +50 -0
- package/.medusa/server/src/modules/offer/service.d.ts +16 -0
- package/.medusa/server/src/modules/offer/service.js +10 -0
- package/.medusa/server/src/modules/product-attribute/index.d.ts +36 -0
- package/.medusa/server/src/modules/product-attribute/index.js +14 -0
- package/.medusa/server/src/modules/product-attribute/joiner-config.d.ts +1 -0
- package/.medusa/server/src/modules/product-attribute/joiner-config.js +17 -0
- package/.medusa/server/src/modules/{vendor-product-attribute/migrations/Migration20260325000000.d.ts → product-attribute/migrations/Migration20260601000000.d.ts} +1 -1
- package/.medusa/server/src/modules/product-attribute/migrations/Migration20260601000000.js +62 -0
- package/.medusa/server/src/modules/product-attribute/migrations/Migration20260601000001.d.ts +11 -0
- package/.medusa/server/src/modules/product-attribute/migrations/Migration20260601000001.js +29 -0
- package/.medusa/server/src/modules/product-attribute/models/index.d.ts +2 -0
- package/.medusa/server/src/modules/product-attribute/models/index.js +11 -0
- package/.medusa/server/src/modules/product-attribute/models/product-attribute-value.d.ts +25 -0
- package/.medusa/server/src/modules/product-attribute/models/product-attribute-value.js +29 -0
- package/.medusa/server/src/modules/product-attribute/models/product-attribute.d.ts +26 -0
- package/.medusa/server/src/modules/product-attribute/models/product-attribute.js +53 -0
- package/.medusa/server/src/modules/product-attribute/service.d.ts +55 -0
- package/.medusa/server/src/modules/product-attribute/service.js +15 -0
- package/.medusa/server/src/modules/product-edit/index.d.ts +36 -0
- package/.medusa/server/src/modules/product-edit/index.js +14 -0
- package/.medusa/server/src/modules/product-edit/joiner-config.d.ts +1 -0
- package/.medusa/server/src/modules/product-edit/joiner-config.js +17 -0
- package/.medusa/server/src/modules/product-edit/migrations/Migration20260601130000.d.ts +5 -0
- package/.medusa/server/src/modules/product-edit/migrations/Migration20260601130000.js +78 -0
- package/.medusa/server/src/modules/product-edit/models/index.d.ts +2 -0
- package/.medusa/server/src/modules/product-edit/models/index.js +11 -0
- package/.medusa/server/src/modules/product-edit/models/product-change-action.d.ts +49 -0
- package/.medusa/server/src/modules/product-edit/models/product-change-action.js +42 -0
- package/.medusa/server/src/modules/product-edit/models/product-change.d.ts +31 -0
- package/.medusa/server/src/modules/product-edit/models/product-change.js +52 -0
- package/.medusa/server/src/modules/product-edit/service.d.ts +84 -0
- package/.medusa/server/src/modules/product-edit/service.js +15 -0
- package/.medusa/server/src/modules/seller/loaders/register-feature-flags.js +7 -1
- package/.medusa/server/src/modules/seller/migrations/Migration20260414123048.d.ts +5 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260414123048.js +16 -0
- package/.medusa/server/src/subscribers/link-order-line-items-to-offers.d.ts +6 -0
- package/.medusa/server/src/subscribers/link-order-line-items-to-offers.js +94 -0
- package/.medusa/server/src/subscribers/order-edit-confirmed.d.ts +5 -0
- package/.medusa/server/src/subscribers/order-edit-confirmed.js +22 -0
- package/.medusa/server/src/types/cart-line-item.d.ts +6 -0
- package/.medusa/server/src/types/cart-line-item.js +3 -0
- package/.medusa/server/src/utils/disable-medusa-middlewares.d.ts +2 -0
- package/.medusa/server/src/utils/disable-medusa-middlewares.js +94 -0
- package/.medusa/server/src/with-mercur.js +4 -2
- package/.medusa/server/src/workflows/cart/hooks/before-refreshing-payment-collection.js +36 -0
- package/.medusa/server/src/workflows/cart/hooks/index.d.ts +3 -0
- package/.medusa/server/src/workflows/cart/hooks/index.js +6 -0
- package/.medusa/server/src/workflows/cart/hooks/set-pricing-context.js +94 -0
- package/.medusa/server/src/workflows/cart/hooks/validate.d.ts +1 -0
- package/.medusa/server/src/workflows/cart/hooks/validate.js +107 -0
- package/.medusa/server/src/workflows/cart/index.d.ts +1 -0
- package/.medusa/server/src/workflows/cart/index.js +2 -1
- package/.medusa/server/src/workflows/cart/steps/index.d.ts +2 -0
- package/.medusa/server/src/workflows/cart/steps/index.js +3 -1
- package/.medusa/server/src/workflows/cart/steps/link-line-item-to-offer.d.ts +13 -0
- package/.medusa/server/src/workflows/cart/steps/link-line-item-to-offer.js +31 -0
- package/.medusa/server/src/workflows/cart/steps/mirror-line-item-offer-links-to-order.d.ts +16 -0
- package/.medusa/server/src/workflows/cart/steps/mirror-line-item-offer-links-to-order.js +32 -0
- package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-items.d.ts +5 -7
- package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-items.js +6 -4
- package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-shipping.d.ts +5 -6
- package/.medusa/server/src/workflows/cart/steps/validate-seller-cart-shipping.js +5 -4
- package/.medusa/server/src/workflows/cart/utils/fields.js +38 -20
- package/.medusa/server/src/workflows/cart/utils/index.d.ts +0 -1
- package/.medusa/server/src/workflows/cart/utils/index.js +1 -2
- package/.medusa/server/src/workflows/cart/utils/prepare-line-item-data.d.ts +1 -0
- package/.medusa/server/src/workflows/cart/utils/prepare-line-item-data.js +2 -2
- package/.medusa/server/src/workflows/cart/workflows/complete-cart-with-split-orders.js +104 -26
- package/.medusa/server/src/workflows/cart/workflows/list-seller-shipping-options-for-cart.js +18 -15
- package/.medusa/server/src/workflows/commission/workflows/refresh-order-commission-lines.js +5 -3
- package/.medusa/server/src/workflows/events.d.ts +5 -0
- package/.medusa/server/src/workflows/events.js +7 -2
- package/.medusa/server/src/workflows/index.d.ts +5 -1
- package/.medusa/server/src/workflows/index.js +6 -2
- package/.medusa/server/src/workflows/{attribute → offer}/index.d.ts +2 -1
- package/.medusa/server/src/workflows/{attribute/workflows → offer}/index.js +4 -6
- package/.medusa/server/src/workflows/offer/steps/add-offer-prices.d.ts +22 -0
- package/.medusa/server/src/workflows/offer/steps/add-offer-prices.js +64 -0
- package/.medusa/server/src/workflows/offer/steps/create-offers.d.ts +16 -0
- package/.medusa/server/src/workflows/offer/steps/create-offers.js +17 -0
- package/.medusa/server/src/workflows/offer/steps/delete-offers.d.ts +6 -0
- package/.medusa/server/src/workflows/offer/steps/delete-offers.js +21 -0
- package/.medusa/server/src/workflows/offer/steps/ensure-variant-price-sets.d.ts +15 -0
- package/.medusa/server/src/workflows/offer/steps/ensure-variant-price-sets.js +61 -0
- package/.medusa/server/src/workflows/offer/steps/index.d.ts +6 -0
- package/.medusa/server/src/workflows/offer/steps/index.js +23 -0
- package/.medusa/server/src/workflows/offer/steps/remove-offer-prices.d.ts +3 -0
- package/.medusa/server/src/workflows/offer/steps/remove-offer-prices.js +15 -0
- package/.medusa/server/src/workflows/offer/steps/update-offers.d.ts +25 -0
- package/.medusa/server/src/workflows/offer/steps/update-offers.js +35 -0
- package/.medusa/server/src/workflows/offer/utils/assert-offer-price-ownership.d.ts +17 -0
- package/.medusa/server/src/workflows/offer/utils/assert-offer-price-ownership.js +27 -0
- package/.medusa/server/src/workflows/offer/utils/index.d.ts +2 -0
- package/.medusa/server/src/workflows/{subscription/steps → offer/utils}/index.js +3 -7
- package/.medusa/server/src/workflows/offer/utils/prepare-offer-inventory-input.d.ts +59 -0
- package/.medusa/server/src/workflows/offer/utils/prepare-offer-inventory-input.js +128 -0
- package/.medusa/server/src/workflows/offer/workflows/batch-offer-inventory-items.d.ts +21 -0
- package/.medusa/server/src/workflows/offer/workflows/batch-offer-inventory-items.js +118 -0
- package/.medusa/server/src/workflows/offer/workflows/create-offers.d.ts +17 -0
- package/.medusa/server/src/workflows/offer/workflows/create-offers.js +170 -0
- package/.medusa/server/src/workflows/offer/workflows/delete-offers.d.ts +11 -0
- package/.medusa/server/src/workflows/offer/workflows/delete-offers.js +22 -0
- package/.medusa/server/src/workflows/offer/workflows/index.d.ts +4 -0
- package/.medusa/server/src/workflows/{attribute/steps → offer/workflows}/index.js +5 -8
- package/.medusa/server/src/workflows/offer/workflows/update-offers.d.ts +28 -0
- package/.medusa/server/src/workflows/offer/workflows/update-offers.js +182 -0
- package/.medusa/server/src/workflows/order/index.d.ts +1 -0
- package/.medusa/server/src/workflows/{attribute → order}/index.js +1 -2
- package/.medusa/server/src/workflows/order/workflows/cancel-order-fulfillment.d.ts +15 -0
- package/.medusa/server/src/workflows/order/workflows/cancel-order-fulfillment.js +186 -0
- package/.medusa/server/src/workflows/order/workflows/confirm-claim-request.d.ts +7 -0
- package/.medusa/server/src/workflows/order/workflows/confirm-claim-request.js +151 -0
- package/.medusa/server/src/workflows/order/workflows/confirm-exchange-request.d.ts +7 -0
- package/.medusa/server/src/workflows/order/workflows/confirm-exchange-request.js +159 -0
- package/.medusa/server/src/workflows/order/workflows/confirm-return-receive.d.ts +7 -0
- package/.medusa/server/src/workflows/order/workflows/confirm-return-receive.js +220 -0
- package/.medusa/server/src/workflows/order/workflows/create-order-fulfillment.d.ts +16 -0
- package/.medusa/server/src/workflows/order/workflows/create-order-fulfillment.js +366 -0
- package/.medusa/server/src/workflows/order/workflows/index.d.ts +5 -0
- package/.medusa/server/src/workflows/order/workflows/index.js +22 -0
- package/.medusa/server/src/workflows/product/events.d.ts +12 -0
- package/.medusa/server/src/workflows/product/events.js +16 -0
- package/.medusa/server/src/workflows/product/index.d.ts +3 -0
- package/.medusa/server/src/workflows/product/index.js +20 -0
- package/.medusa/server/src/workflows/product/steps/associate-sellers-with-product-category.d.ts +8 -0
- package/.medusa/server/src/workflows/product/steps/associate-sellers-with-product-category.js +26 -0
- package/.medusa/server/src/workflows/product/steps/associate-sellers-with-product.d.ts +8 -0
- package/.medusa/server/src/workflows/product/steps/associate-sellers-with-product.js +26 -0
- package/.medusa/server/src/workflows/product/steps/detach-sellers-from-product-category.d.ts +8 -0
- package/.medusa/server/src/workflows/product/steps/detach-sellers-from-product-category.js +26 -0
- package/.medusa/server/src/workflows/product/steps/detach-sellers-from-product.d.ts +8 -0
- package/.medusa/server/src/workflows/product/steps/detach-sellers-from-product.js +26 -0
- package/.medusa/server/src/workflows/product/steps/index.d.ts +8 -0
- package/.medusa/server/src/workflows/product/steps/index.js +25 -0
- package/.medusa/server/src/workflows/product/steps/replace-product-attribute-value-links.d.ts +28 -0
- package/.medusa/server/src/workflows/product/steps/replace-product-attribute-value-links.js +72 -0
- package/.medusa/server/src/workflows/product/steps/resolve-attribute-refs.d.ts +90 -0
- package/.medusa/server/src/workflows/product/steps/resolve-attribute-refs.js +185 -0
- package/.medusa/server/src/workflows/product/steps/validate-products-status.d.ts +19 -0
- package/.medusa/server/src/workflows/product/steps/validate-products-status.js +28 -0
- package/.medusa/server/src/workflows/product/steps/validate-seller-product-permissions.d.ts +6 -0
- package/.medusa/server/src/workflows/product/steps/validate-seller-product-permissions.js +26 -0
- package/.medusa/server/src/workflows/product/workflows/confirm-products.d.ts +27 -0
- package/.medusa/server/src/workflows/product/workflows/confirm-products.js +68 -0
- package/.medusa/server/src/workflows/product/workflows/create-products.d.ts +59 -0
- package/.medusa/server/src/workflows/product/workflows/create-products.js +221 -0
- package/.medusa/server/src/workflows/product/workflows/index.d.ts +7 -0
- package/.medusa/server/src/workflows/product/workflows/index.js +24 -0
- package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product-category.d.ts +14 -0
- package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product-category.js +20 -0
- package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product.d.ts +14 -0
- package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product.js +20 -0
- package/.medusa/server/src/workflows/product/workflows/reject-product.d.ts +18 -0
- package/.medusa/server/src/workflows/product/workflows/reject-product.js +65 -0
- package/.medusa/server/src/workflows/product/workflows/request-product-change.d.ts +25 -0
- package/.medusa/server/src/workflows/product/workflows/request-product-change.js +69 -0
- package/.medusa/server/src/workflows/product/workflows/update-products.d.ts +39 -0
- package/.medusa/server/src/workflows/product/workflows/update-products.js +161 -0
- package/.medusa/server/src/workflows/product-attribute/events.d.ts +19 -0
- package/.medusa/server/src/workflows/product-attribute/events.js +23 -0
- package/.medusa/server/src/workflows/{subscription → product-attribute}/index.d.ts +1 -0
- package/.medusa/server/src/workflows/product-attribute/index.js +20 -0
- package/.medusa/server/src/workflows/product-attribute/steps/create-product-attribute-values.d.ts +37 -0
- package/.medusa/server/src/workflows/product-attribute/steps/create-product-attribute-values.js +18 -0
- package/.medusa/server/src/workflows/product-attribute/steps/create-product-attributes.d.ts +44 -0
- package/.medusa/server/src/workflows/product-attribute/steps/create-product-attributes.js +18 -0
- package/.medusa/server/src/workflows/product-attribute/steps/delete-product-attribute-values.d.ts +2 -0
- package/.medusa/server/src/workflows/product-attribute/steps/delete-product-attribute-values.js +18 -0
- package/.medusa/server/src/workflows/product-attribute/steps/delete-product-attributes.d.ts +2 -0
- package/.medusa/server/src/workflows/product-attribute/steps/delete-product-attributes.js +18 -0
- package/.medusa/server/src/workflows/product-attribute/steps/index.d.ts +10 -7
- package/.medusa/server/src/workflows/product-attribute/steps/index.js +11 -8
- package/.medusa/server/src/workflows/product-attribute/steps/update-product-attribute-values.d.ts +38 -0
- package/.medusa/server/src/workflows/product-attribute/steps/update-product-attribute-values.js +23 -0
- package/.medusa/server/src/workflows/product-attribute/steps/update-product-attributes.d.ts +38 -0
- package/.medusa/server/src/workflows/product-attribute/steps/update-product-attributes.js +23 -0
- package/.medusa/server/src/workflows/product-attribute/steps/upsert-product-attribute-values.d.ts +43 -0
- package/.medusa/server/src/workflows/product-attribute/steps/upsert-product-attribute-values.js +51 -0
- package/.medusa/server/src/workflows/product-attribute/steps/upsert-product-options-for-axis.d.ts +7 -0
- package/.medusa/server/src/workflows/product-attribute/steps/upsert-product-options-for-axis.js +59 -0
- package/.medusa/server/src/workflows/product-attribute/steps/validate-attribute-accepts-values.d.ts +6 -0
- package/.medusa/server/src/workflows/product-attribute/steps/validate-attribute-accepts-values.js +20 -0
- package/.medusa/server/src/workflows/product-attribute/steps/validate-product-attribute-input.d.ts +7 -0
- package/.medusa/server/src/workflows/product-attribute/steps/validate-product-attribute-input.js +20 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/add-product-attribute.d.ts +52 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/add-product-attribute.js +120 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/batch-product-attribute-values.d.ts +23 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/batch-product-attribute-values.js +252 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/create-product-attribute-values.d.ts +18 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/create-product-attribute-values.js +26 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/create-product-attributes.d.ts +19 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/create-product-attributes.js +64 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/delete-product-attribute-values.d.ts +16 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/delete-product-attribute-values.js +40 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/delete-product-attributes.d.ts +23 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/delete-product-attributes.js +31 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/detach-product-attribute.d.ts +17 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/detach-product-attribute.js +62 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/index.d.ts +13 -8
- package/.medusa/server/src/workflows/product-attribute/workflows/index.js +14 -9
- package/.medusa/server/src/workflows/product-attribute/workflows/materialize-product-attributes.d.ts +135 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/materialize-product-attributes.js +43 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/sync-product-attribute-options.d.ts +24 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/sync-product-attribute-options.js +27 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attribute-values.d.ts +18 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attribute-values.js +27 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attribute.d.ts +23 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attribute.js +67 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attributes.d.ts +18 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attributes.js +27 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/upsert-product-attribute-values.d.ts +18 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/upsert-product-attribute-values.js +26 -0
- package/.medusa/server/src/workflows/product-edit/events.d.ts +13 -0
- package/.medusa/server/src/workflows/product-edit/events.js +17 -0
- package/.medusa/server/src/workflows/product-edit/index.d.ts +3 -0
- package/.medusa/server/src/workflows/{subscription → product-edit}/index.js +2 -1
- package/.medusa/server/src/workflows/product-edit/steps/add-product-change-action.d.ts +38 -0
- package/.medusa/server/src/workflows/product-edit/steps/add-product-change-action.js +18 -0
- package/.medusa/server/src/workflows/product-edit/steps/cancel-product-change.d.ts +43 -0
- package/.medusa/server/src/workflows/product-edit/steps/cancel-product-change.js +32 -0
- package/.medusa/server/src/workflows/product-edit/steps/confirm-product-change-validation.d.ts +15 -0
- package/.medusa/server/src/workflows/product-edit/steps/confirm-product-change-validation.js +25 -0
- package/.medusa/server/src/workflows/product-edit/steps/confirm-product-changes.d.ts +51 -0
- package/.medusa/server/src/workflows/product-edit/steps/confirm-product-changes.js +48 -0
- package/.medusa/server/src/workflows/product-edit/steps/create-product-change-actions.d.ts +43 -0
- package/.medusa/server/src/workflows/product-edit/steps/create-product-change-actions.js +26 -0
- package/.medusa/server/src/workflows/product-edit/steps/create-product-changes.d.ts +47 -0
- package/.medusa/server/src/workflows/product-edit/steps/create-product-changes.js +18 -0
- package/.medusa/server/src/workflows/product-edit/steps/decline-product-change.d.ts +49 -0
- package/.medusa/server/src/workflows/product-edit/steps/decline-product-change.js +41 -0
- package/.medusa/server/src/workflows/product-edit/steps/index.d.ts +10 -0
- package/.medusa/server/src/workflows/product-edit/steps/index.js +27 -0
- package/.medusa/server/src/workflows/product-edit/steps/update-product-change-actions.d.ts +49 -0
- package/.medusa/server/src/workflows/product-edit/steps/update-product-change-actions.js +34 -0
- package/.medusa/server/src/workflows/product-edit/steps/validate-no-pending-product-change.d.ts +12 -0
- package/.medusa/server/src/workflows/product-edit/steps/validate-no-pending-product-change.js +37 -0
- package/.medusa/server/src/workflows/product-edit/steps/validate-product-change-is-pending.d.ts +10 -0
- package/.medusa/server/src/workflows/product-edit/steps/validate-product-change-is-pending.js +14 -0
- package/.medusa/server/src/workflows/product-edit/workflows/apply-product-attribute-change-actions.d.ts +23 -0
- package/.medusa/server/src/workflows/product-edit/workflows/apply-product-attribute-change-actions.js +139 -0
- package/.medusa/server/src/workflows/product-edit/workflows/apply-product-change-actions.d.ts +38 -0
- package/.medusa/server/src/workflows/product-edit/workflows/apply-product-change-actions.js +191 -0
- package/.medusa/server/src/workflows/product-edit/workflows/auto-confirm-product-change.d.ts +17 -0
- package/.medusa/server/src/workflows/product-edit/workflows/auto-confirm-product-change.js +29 -0
- package/.medusa/server/src/workflows/product-edit/workflows/cancel-product-change.d.ts +17 -0
- package/.medusa/server/src/workflows/product-edit/workflows/cancel-product-change.js +35 -0
- package/.medusa/server/src/workflows/product-edit/workflows/confirm-product-change.d.ts +30 -0
- package/.medusa/server/src/workflows/product-edit/workflows/confirm-product-change.js +55 -0
- package/.medusa/server/src/workflows/product-edit/workflows/create-product-change.d.ts +17 -0
- package/.medusa/server/src/workflows/product-edit/workflows/create-product-change.js +26 -0
- package/.medusa/server/src/workflows/product-edit/workflows/index.d.ts +13 -0
- package/.medusa/server/src/workflows/product-edit/workflows/index.js +30 -0
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-delete-product.d.ts +17 -0
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-delete-product.js +35 -0
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-attributes.d.ts +55 -0
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-attributes.js +198 -0
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-fields.d.ts +25 -0
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-fields.js +148 -0
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-variants.d.ts +35 -0
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-variants.js +108 -0
- package/.medusa/server/src/workflows/product-edit/workflows/record-product-audit-change.d.ts +36 -0
- package/.medusa/server/src/workflows/product-edit/workflows/record-product-audit-change.js +53 -0
- package/.medusa/server/src/workflows/product-edit/workflows/reject-product-change.d.ts +18 -0
- package/.medusa/server/src/workflows/product-edit/workflows/reject-product-change.js +36 -0
- package/.medusa/server/src/workflows/product-edit/workflows/stage-product-change.d.ts +35 -0
- package/.medusa/server/src/workflows/product-edit/workflows/stage-product-change.js +57 -0
- package/.medusa/server/src/workflows/seller/workflows/create-sellers.d.ts +20 -2
- package/.medusa/server/src/workflows/seller/workflows/create-sellers.js +5 -2
- package/.medusa/server/src/workflows/seller/workflows/update-seller-address.d.ts +14 -2
- package/.medusa/server/src/workflows/seller/workflows/update-seller-address.js +1 -1
- package/.medusa/server/src/workflows/seller/workflows/update-seller-payment-details.d.ts +14 -2
- package/.medusa/server/src/workflows/seller/workflows/update-seller-payment-details.js +1 -1
- package/.medusa/server/src/workflows/seller/workflows/update-seller-professional-details.d.ts +14 -2
- package/.medusa/server/src/workflows/seller/workflows/update-seller-professional-details.js +1 -1
- package/.medusa/server/src/workflows/seller/workflows/update-seller.d.ts +14 -2
- package/.medusa/server/src/workflows/seller/workflows/update-seller.js +1 -1
- package/package.json +8 -4
- package/.medusa/server/src/api/admin/attributes/[id]/route.d.ts +0 -5
- package/.medusa/server/src/api/admin/attributes/[id]/route.js +0 -68
- package/.medusa/server/src/api/admin/attributes/[id]/values/[value_id]/route.d.ts +0 -4
- package/.medusa/server/src/api/admin/attributes/[id]/values/[value_id]/route.js +0 -40
- package/.medusa/server/src/api/admin/attributes/[id]/values/route.d.ts +0 -4
- package/.medusa/server/src/api/admin/attributes/[id]/values/route.js +0 -44
- package/.medusa/server/src/api/admin/attributes/middlewares.d.ts +0 -2
- package/.medusa/server/src/api/admin/attributes/middlewares.js +0 -102
- package/.medusa/server/src/api/admin/attributes/query-config.d.ts +0 -20
- package/.medusa/server/src/api/admin/attributes/query-config.js +0 -41
- package/.medusa/server/src/api/admin/attributes/route.d.ts +0 -4
- package/.medusa/server/src/api/admin/attributes/route.js +0 -51
- package/.medusa/server/src/api/admin/attributes/validators.d.ts +0 -793
- package/.medusa/server/src/api/admin/attributes/validators.js +0 -92
- package/.medusa/server/src/api/admin/subscription-plans/[id]/overrides/[override_id]/route.d.ts +0 -6
- package/.medusa/server/src/api/admin/subscription-plans/[id]/overrides/[override_id]/route.js +0 -43
- package/.medusa/server/src/api/admin/subscription-plans/[id]/overrides/route.js +0 -24
- package/.medusa/server/src/api/admin/subscription-plans/[id]/route.d.ts +0 -6
- package/.medusa/server/src/api/admin/subscription-plans/[id]/route.js +0 -43
- package/.medusa/server/src/api/admin/subscription-plans/middlewares.d.ts +0 -2
- package/.medusa/server/src/api/admin/subscription-plans/middlewares.js +0 -81
- package/.medusa/server/src/api/admin/subscription-plans/query-config.d.ts +0 -17
- package/.medusa/server/src/api/admin/subscription-plans/query-config.js +0 -43
- package/.medusa/server/src/api/admin/subscription-plans/route.d.ts +0 -5
- package/.medusa/server/src/api/admin/subscription-plans/route.js +0 -35
- package/.medusa/server/src/api/admin/subscription-plans/validators.d.ts +0 -117
- package/.medusa/server/src/api/admin/subscription-plans/validators.js +0 -42
- package/.medusa/server/src/api/vendor/attributes/middlewares.d.ts +0 -2
- package/.medusa/server/src/api/vendor/attributes/middlewares.js +0 -32
- package/.medusa/server/src/api/vendor/attributes/route.js +0 -20
- package/.medusa/server/src/api/vendor/product-categories/helpers.d.ts +0 -2
- package/.medusa/server/src/api/vendor/product-categories/helpers.js +0 -24
- package/.medusa/server/src/api/vendor/products/[id]/attributes/utils.d.ts +0 -7
- package/.medusa/server/src/api/vendor/products/[id]/attributes/utils.js +0 -16
- package/.medusa/server/src/api/vendor/products/[id]/options/[option_id]/route.d.ts +0 -5
- package/.medusa/server/src/api/vendor/products/[id]/options/[option_id]/route.js +0 -74
- package/.medusa/server/src/api/vendor/products/[id]/options/route.d.ts +0 -4
- package/.medusa/server/src/api/vendor/products/[id]/options/route.js +0 -34
- package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/media/route.js +0 -20
- package/.medusa/server/src/api/vendor/products/utils/transform-product-attributes.d.ts +0 -34
- package/.medusa/server/src/api/vendor/products/utils/transform-product-attributes.js +0 -71
- package/.medusa/server/src/api/vendor/subscription/middlewares.d.ts +0 -2
- package/.medusa/server/src/api/vendor/subscription/middlewares.js +0 -28
- package/.medusa/server/src/api/vendor/subscription/route.js +0 -31
- package/.medusa/server/src/links/category-attribute-link.js +0 -16
- package/.medusa/server/src/links/product-vendor-product-attribute-link.js +0 -16
- package/.medusa/server/src/links/seller-attribute-link.js +0 -13
- package/.medusa/server/src/links/seller-attribute-value-link.js +0 -13
- package/.medusa/server/src/links/seller-vendor-product-attribute-link.js +0 -13
- package/.medusa/server/src/modules/attribute/index.d.ts +0 -51
- package/.medusa/server/src/modules/attribute/index.js +0 -15
- package/.medusa/server/src/modules/attribute/migrations/Migration20260325000000.js +0 -32
- package/.medusa/server/src/modules/attribute/models/attribute-possible-value.d.ts +0 -27
- package/.medusa/server/src/modules/attribute/models/attribute-possible-value.js +0 -26
- package/.medusa/server/src/modules/attribute/models/attribute-value.d.ts +0 -27
- package/.medusa/server/src/modules/attribute/models/attribute-value.js +0 -26
- package/.medusa/server/src/modules/attribute/models/attribute.d.ts +0 -28
- package/.medusa/server/src/modules/attribute/models/attribute.js +0 -36
- package/.medusa/server/src/modules/attribute/models/index.d.ts +0 -3
- package/.medusa/server/src/modules/attribute/models/index.js +0 -13
- package/.medusa/server/src/modules/attribute/service.d.ts +0 -105
- package/.medusa/server/src/modules/attribute/service.js +0 -74
- package/.medusa/server/src/modules/subscription/index.d.ts +0 -35
- package/.medusa/server/src/modules/subscription/migrations/Migration20260324135903.js +0 -24
- package/.medusa/server/src/modules/subscription/models/index.d.ts +0 -2
- package/.medusa/server/src/modules/subscription/models/index.js +0 -11
- package/.medusa/server/src/modules/subscription/models/subscription-override.d.ts +0 -20
- package/.medusa/server/src/modules/subscription/models/subscription-override.js +0 -36
- package/.medusa/server/src/modules/subscription/models/subscription-plan.d.ts +0 -20
- package/.medusa/server/src/modules/subscription/models/subscription-plan.js +0 -32
- package/.medusa/server/src/modules/subscription/service.d.ts +0 -49
- package/.medusa/server/src/modules/subscription/service.js +0 -17
- package/.medusa/server/src/modules/vendor-product-attribute/index.d.ts +0 -23
- package/.medusa/server/src/modules/vendor-product-attribute/index.js +0 -15
- package/.medusa/server/src/modules/vendor-product-attribute/migrations/Migration20260325000000.js +0 -16
- package/.medusa/server/src/modules/vendor-product-attribute/models/vendor-product-attribute.d.ts +0 -11
- package/.medusa/server/src/modules/vendor-product-attribute/models/vendor-product-attribute.js +0 -24
- package/.medusa/server/src/modules/vendor-product-attribute/service.d.ts +0 -14
- package/.medusa/server/src/modules/vendor-product-attribute/service.js +0 -13
- package/.medusa/server/src/workflows/attribute/steps/create-attribute-possible-values.d.ts +0 -40
- package/.medusa/server/src/workflows/attribute/steps/create-attribute-possible-values.js +0 -18
- package/.medusa/server/src/workflows/attribute/steps/create-attributes.d.ts +0 -5
- package/.medusa/server/src/workflows/attribute/steps/create-attributes.js +0 -32
- package/.medusa/server/src/workflows/attribute/steps/delete-attribute.d.ts +0 -6
- package/.medusa/server/src/workflows/attribute/steps/delete-attribute.js +0 -31
- package/.medusa/server/src/workflows/attribute/steps/index.d.ts +0 -7
- package/.medusa/server/src/workflows/attribute/steps/update-attribute-possible-value.d.ts +0 -39
- package/.medusa/server/src/workflows/attribute/steps/update-attribute-possible-value.js +0 -18
- package/.medusa/server/src/workflows/attribute/steps/update-attributes.d.ts +0 -21
- package/.medusa/server/src/workflows/attribute/steps/update-attributes.js +0 -37
- package/.medusa/server/src/workflows/attribute/steps/validate-attribute-delete.d.ts +0 -6
- package/.medusa/server/src/workflows/attribute/steps/validate-attribute-delete.js +0 -50
- package/.medusa/server/src/workflows/attribute/steps/validate-possible-values-removal.d.ts +0 -7
- package/.medusa/server/src/workflows/attribute/steps/validate-possible-values-removal.js +0 -70
- package/.medusa/server/src/workflows/attribute/workflows/create-attribute-possible-values.d.ts +0 -39
- package/.medusa/server/src/workflows/attribute/workflows/create-attribute-possible-values.js +0 -11
- package/.medusa/server/src/workflows/attribute/workflows/create-attributes.d.ts +0 -7
- package/.medusa/server/src/workflows/attribute/workflows/create-attributes.js +0 -40
- package/.medusa/server/src/workflows/attribute/workflows/delete-attribute.d.ts +0 -6
- package/.medusa/server/src/workflows/attribute/workflows/delete-attribute.js +0 -11
- package/.medusa/server/src/workflows/attribute/workflows/index.d.ts +0 -5
- package/.medusa/server/src/workflows/attribute/workflows/update-attribute-possible-value.d.ts +0 -39
- package/.medusa/server/src/workflows/attribute/workflows/update-attribute-possible-value.js +0 -11
- package/.medusa/server/src/workflows/attribute/workflows/update-attributes.d.ts +0 -24
- package/.medusa/server/src/workflows/attribute/workflows/update-attributes.js +0 -69
- package/.medusa/server/src/workflows/cart/utils/prepare-confirm-inventory-input.d.ts +0 -28
- package/.medusa/server/src/workflows/cart/utils/prepare-confirm-inventory-input.js +0 -165
- package/.medusa/server/src/workflows/hooks/product-created.js +0 -75
- package/.medusa/server/src/workflows/hooks/product-variant-created.js +0 -50
- package/.medusa/server/src/workflows/product-attribute/steps/create-attribute-value.d.ts +0 -39
- package/.medusa/server/src/workflows/product-attribute/steps/create-attribute-value.js +0 -21
- package/.medusa/server/src/workflows/product-attribute/steps/create-attribute-values.d.ts +0 -12
- package/.medusa/server/src/workflows/product-attribute/steps/create-attribute-values.js +0 -24
- package/.medusa/server/src/workflows/product-attribute/steps/create-vendor-product-attribute.d.ts +0 -14
- package/.medusa/server/src/workflows/product-attribute/steps/create-vendor-product-attribute.js +0 -18
- package/.medusa/server/src/workflows/product-attribute/steps/delete-attribute-value.d.ts +0 -2
- package/.medusa/server/src/workflows/product-attribute/steps/delete-attribute-value.js +0 -18
- package/.medusa/server/src/workflows/product-attribute/steps/restore-variant-image-associations.d.ts +0 -10
- package/.medusa/server/src/workflows/product-attribute/steps/restore-variant-image-associations.js +0 -49
- package/.medusa/server/src/workflows/product-attribute/steps/save-variant-image-associations.d.ts +0 -8
- package/.medusa/server/src/workflows/product-attribute/steps/save-variant-image-associations.js +0 -29
- package/.medusa/server/src/workflows/product-attribute/steps/validate-attribute-value.d.ts +0 -3
- package/.medusa/server/src/workflows/product-attribute/steps/validate-attribute-value.js +0 -59
- package/.medusa/server/src/workflows/product-attribute/utils/find-or-create-vendor-attribute.d.ts +0 -13
- package/.medusa/server/src/workflows/product-attribute/utils/find-or-create-vendor-attribute.js +0 -56
- package/.medusa/server/src/workflows/product-attribute/utils/get-applicable-attributes.d.ts +0 -2
- package/.medusa/server/src/workflows/product-attribute/utils/get-applicable-attributes.js +0 -58
- package/.medusa/server/src/workflows/product-attribute/utils/products-created-handler.d.ts +0 -8
- package/.medusa/server/src/workflows/product-attribute/utils/products-created-handler.js +0 -100
- package/.medusa/server/src/workflows/product-attribute/workflows/convert-attribute-to-option.d.ts +0 -3
- package/.medusa/server/src/workflows/product-attribute/workflows/convert-attribute-to-option.js +0 -46
- package/.medusa/server/src/workflows/product-attribute/workflows/convert-option-to-attribute.d.ts +0 -3
- package/.medusa/server/src/workflows/product-attribute/workflows/convert-option-to-attribute.js +0 -29
- package/.medusa/server/src/workflows/product-attribute/workflows/create-and-link-attribute-values.d.ts +0 -16
- package/.medusa/server/src/workflows/product-attribute/workflows/create-and-link-attribute-values.js +0 -72
- package/.medusa/server/src/workflows/product-attribute/workflows/create-attribute-value.d.ts +0 -39
- package/.medusa/server/src/workflows/product-attribute/workflows/create-attribute-value.js +0 -35
- package/.medusa/server/src/workflows/product-attribute/workflows/create-vendor-product-attribute.d.ts +0 -24
- package/.medusa/server/src/workflows/product-attribute/workflows/create-vendor-product-attribute.js +0 -42
- package/.medusa/server/src/workflows/product-attribute/workflows/delete-attribute-value.d.ts +0 -3
- package/.medusa/server/src/workflows/product-attribute/workflows/delete-attribute-value.js +0 -59
- package/.medusa/server/src/workflows/product-attribute/workflows/sync-product-attribute-values.d.ts +0 -20
- package/.medusa/server/src/workflows/product-attribute/workflows/sync-product-attribute-values.js +0 -67
- package/.medusa/server/src/workflows/product-attribute/workflows/update-product-with-variant-images.d.ts +0 -11
- package/.medusa/server/src/workflows/product-attribute/workflows/update-product-with-variant-images.js +0 -34
- package/.medusa/server/src/workflows/subscription/steps/create-subscription-overrides.d.ts +0 -31
- package/.medusa/server/src/workflows/subscription/steps/create-subscription-overrides.js +0 -17
- package/.medusa/server/src/workflows/subscription/steps/create-subscription-plans.d.ts +0 -31
- package/.medusa/server/src/workflows/subscription/steps/create-subscription-plans.js +0 -17
- package/.medusa/server/src/workflows/subscription/steps/delete-subscription-overrides.d.ts +0 -2
- package/.medusa/server/src/workflows/subscription/steps/delete-subscription-overrides.js +0 -17
- package/.medusa/server/src/workflows/subscription/steps/delete-subscription-plans.d.ts +0 -2
- package/.medusa/server/src/workflows/subscription/steps/delete-subscription-plans.js +0 -17
- package/.medusa/server/src/workflows/subscription/steps/index.d.ts +0 -6
- package/.medusa/server/src/workflows/subscription/steps/update-subscription-overrides.d.ts +0 -31
- package/.medusa/server/src/workflows/subscription/steps/update-subscription-overrides.js +0 -17
- package/.medusa/server/src/workflows/subscription/steps/update-subscription-plans.d.ts +0 -31
- package/.medusa/server/src/workflows/subscription/steps/update-subscription-plans.js +0 -17
- package/.medusa/server/src/workflows/subscription/workflows/create-subscription-overrides.d.ts +0 -31
- package/.medusa/server/src/workflows/subscription/workflows/create-subscription-overrides.js +0 -11
- package/.medusa/server/src/workflows/subscription/workflows/create-subscription-plans.d.ts +0 -31
- package/.medusa/server/src/workflows/subscription/workflows/create-subscription-plans.js +0 -11
- package/.medusa/server/src/workflows/subscription/workflows/delete-subscription-overrides.d.ts +0 -5
- package/.medusa/server/src/workflows/subscription/workflows/delete-subscription-overrides.js +0 -11
- package/.medusa/server/src/workflows/subscription/workflows/delete-subscription-plans.d.ts +0 -5
- package/.medusa/server/src/workflows/subscription/workflows/delete-subscription-plans.js +0 -11
- package/.medusa/server/src/workflows/subscription/workflows/index.d.ts +0 -6
- package/.medusa/server/src/workflows/subscription/workflows/index.js +0 -23
- package/.medusa/server/src/workflows/subscription/workflows/update-subscription-overrides.d.ts +0 -31
- package/.medusa/server/src/workflows/subscription/workflows/update-subscription-overrides.js +0 -11
- package/.medusa/server/src/workflows/subscription/workflows/update-subscription-plans.d.ts +0 -31
- package/.medusa/server/src/workflows/subscription/workflows/update-subscription-plans.js +0 -11
- /package/.medusa/server/src/links/{category-attribute-link.d.ts → cart-line-item-offer-link.d.ts} +0 -0
- /package/.medusa/server/src/links/{product-vendor-product-attribute-link.d.ts → category-seller-link.d.ts} +0 -0
- /package/.medusa/server/src/links/{seller-attribute-link.d.ts → offer-inventory-item-link.d.ts} +0 -0
- /package/.medusa/server/src/links/{seller-attribute-value-link.d.ts → offer-price-link.d.ts} +0 -0
- /package/.medusa/server/src/links/{seller-vendor-product-attribute-link.d.ts → offer-seller-link.d.ts} +0 -0
- /package/.medusa/server/src/workflows/{hooks/product-created.d.ts → cart/hooks/before-refreshing-payment-collection.d.ts} +0 -0
- /package/.medusa/server/src/workflows/{hooks/product-variant-created.d.ts → cart/hooks/set-pricing-context.d.ts} +0 -0
|
@@ -25,6 +25,7 @@ export declare const VendorGetOrdersParams: z.ZodObject<{
|
|
|
25
25
|
currency_code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
26
26
|
fulfillment_status: z.ZodOptional<z.ZodString>;
|
|
27
27
|
payment_status: z.ZodOptional<z.ZodString>;
|
|
28
|
+
request: z.ZodOptional<z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, string[], string | string[]>, z.ZodArray<z.ZodEnum<["edit", "return", "exchange", "claim"]>, "many">>>;
|
|
28
29
|
created_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
29
30
|
$eq: any;
|
|
30
31
|
$ne: any;
|
|
@@ -108,6 +109,8 @@ export declare const VendorGetOrdersParams: z.ZodObject<{
|
|
|
108
109
|
}, "strip", z.ZodTypeAny, {
|
|
109
110
|
offset: number;
|
|
110
111
|
limit: number;
|
|
112
|
+
request?: ("edit" | "return" | "exchange" | "claim")[] | undefined;
|
|
113
|
+
order?: string | undefined;
|
|
111
114
|
id?: string | string[] | undefined;
|
|
112
115
|
customer_id?: string | string[] | undefined;
|
|
113
116
|
created_at?: any;
|
|
@@ -116,13 +119,14 @@ export declare const VendorGetOrdersParams: z.ZodObject<{
|
|
|
116
119
|
q?: string | undefined;
|
|
117
120
|
sales_channel_id?: string | string[] | undefined;
|
|
118
121
|
fields?: string | undefined;
|
|
119
|
-
order?: string | undefined;
|
|
120
122
|
with_deleted?: boolean | undefined;
|
|
121
123
|
currency_code?: string | string[] | undefined;
|
|
122
124
|
region_id?: string | string[] | undefined;
|
|
123
125
|
fulfillment_status?: string | undefined;
|
|
124
126
|
payment_status?: string | undefined;
|
|
125
127
|
}, {
|
|
128
|
+
request?: string | string[] | undefined;
|
|
129
|
+
order?: string | undefined;
|
|
126
130
|
id?: string | string[] | undefined;
|
|
127
131
|
customer_id?: string | string[] | undefined;
|
|
128
132
|
created_at?: any;
|
|
@@ -133,7 +137,6 @@ export declare const VendorGetOrdersParams: z.ZodObject<{
|
|
|
133
137
|
q?: string | undefined;
|
|
134
138
|
sales_channel_id?: string | string[] | undefined;
|
|
135
139
|
fields?: string | undefined;
|
|
136
|
-
order?: string | undefined;
|
|
137
140
|
with_deleted?: unknown;
|
|
138
141
|
currency_code?: string | string[] | undefined;
|
|
139
142
|
region_id?: string | string[] | undefined;
|
|
@@ -164,18 +167,18 @@ export declare const VendorCreateFulfillment: z.ZodObject<{
|
|
|
164
167
|
location_id: z.ZodString;
|
|
165
168
|
}, "strip", z.ZodTypeAny, {
|
|
166
169
|
location_id: string;
|
|
167
|
-
requires_shipping: boolean;
|
|
168
170
|
items: {
|
|
169
171
|
id: string;
|
|
170
172
|
quantity: number;
|
|
171
173
|
}[];
|
|
174
|
+
requires_shipping: boolean;
|
|
172
175
|
}, {
|
|
173
176
|
location_id: string;
|
|
174
|
-
requires_shipping: boolean;
|
|
175
177
|
items: {
|
|
176
178
|
id: string;
|
|
177
179
|
quantity: number;
|
|
178
180
|
}[];
|
|
181
|
+
requires_shipping: boolean;
|
|
179
182
|
}>;
|
|
180
183
|
export type VendorCreateShipmentType = z.infer<typeof VendorCreateShipment>;
|
|
181
184
|
export declare const VendorCreateShipment: z.ZodObject<{
|
|
@@ -4,6 +4,7 @@ exports.VendorCreateShipment = exports.VendorCreateFulfillment = exports.VendorG
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const validators_1 = require("@medusajs/medusa/api/utils/validators");
|
|
6
6
|
exports.VendorGetOrderParams = (0, validators_1.createSelectParams)();
|
|
7
|
+
const REQUEST_FILTER_VALUES = ["edit", "return", "exchange", "claim"];
|
|
7
8
|
exports.VendorGetOrdersParams = (0, validators_1.createFindParams)({
|
|
8
9
|
offset: 0,
|
|
9
10
|
limit: 50,
|
|
@@ -17,6 +18,11 @@ exports.VendorGetOrdersParams = (0, validators_1.createFindParams)({
|
|
|
17
18
|
currency_code: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
18
19
|
fulfillment_status: zod_1.z.string().optional(),
|
|
19
20
|
payment_status: zod_1.z.string().optional(),
|
|
21
|
+
request: zod_1.z
|
|
22
|
+
.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())])
|
|
23
|
+
.transform((v) => (Array.isArray(v) ? v : v.split(",")))
|
|
24
|
+
.pipe(zod_1.z.array(zod_1.z.enum(REQUEST_FILTER_VALUES)))
|
|
25
|
+
.optional(),
|
|
20
26
|
created_at: (0, validators_1.createOperatorMap)().optional(),
|
|
21
27
|
updated_at: (0, validators_1.createOperatorMap)().optional(),
|
|
22
28
|
}));
|
|
@@ -42,4 +48,4 @@ exports.VendorCreateShipment = zod_1.z.object({
|
|
|
42
48
|
}))
|
|
43
49
|
.optional(),
|
|
44
50
|
});
|
|
45
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9ycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcGkvdmVuZG9yL29yZGVycy92YWxpZGF0b3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDZCQUF1QjtBQUN2QixzRUFJOEM7QUFHakMsUUFBQSxvQkFBb0IsR0FBRyxJQUFBLCtCQUFrQixHQUFFLENBQUE7QUFFeEQsTUFBTSxxQkFBcUIsR0FBRyxDQUFDLE1BQU0sRUFBRSxRQUFRLEVBQUUsVUFBVSxFQUFFLE9BQU8sQ0FBVSxDQUFBO0FBR2pFLFFBQUEscUJBQXFCLEdBQUcsSUFBQSw2QkFBZ0IsRUFBQztJQUNwRCxNQUFNLEVBQUUsQ0FBQztJQUNULEtBQUssRUFBRSxFQUFFO0NBQ1YsQ0FBQyxDQUFDLEtBQUssQ0FDTixPQUFDLENBQUMsTUFBTSxDQUFDO0lBQ1AsQ0FBQyxFQUFFLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxRQUFRLEVBQUU7SUFDeEIsRUFBRSxFQUFFLE9BQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxPQUFDLENBQUMsTUFBTSxFQUFFLEVBQUUsT0FBQyxDQUFDLEtBQUssQ0FBQyxPQUFDLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsUUFBUSxFQUFFO0lBQ3pELE1BQU0sRUFBRSxPQUFDLENBQUMsS0FBSyxDQUFDLENBQUMsT0FBQyxDQUFDLE1BQU0sRUFBRSxFQUFFLE9BQUMsQ0FBQyxLQUFLLENBQUMsT0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLFFBQVEsRUFBRTtJQUM3RCxXQUFXLEVBQUUsT0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLE9BQUMsQ0FBQyxNQUFNLEVBQUUsRUFBRSxPQUFDLENBQUMsS0FBSyxDQUFDLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxRQUFRLEVBQUU7SUFDbEUsZ0JBQWdCLEVBQUUsT0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLE9BQUMsQ0FBQyxNQUFNLEVBQUUsRUFBRSxPQUFDLENBQUMsS0FBSyxDQUFDLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxRQUFRLEVBQUU7SUFDdkUsU0FBUyxFQUFFLE9BQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxPQUFDLENBQUMsTUFBTSxFQUFFLEVBQUUsT0FBQyxDQUFDLEtBQUssQ0FBQyxPQUFDLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsUUFBUSxFQUFFO0lBQ2hFLGFBQWEsRUFBRSxPQUFDLENBQUMsS0FBSyxDQUFDLENBQUMsT0FBQyxDQUFDLE1BQU0sRUFBRSxFQUFFLE9BQUMsQ0FBQyxLQUFLLENBQUMsT0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLFFBQVEsRUFBRTtJQUNwRSxrQkFBa0IsRUFBRSxPQUFDLENBQUMsTUFBTSxFQUFFLENBQUMsUUFBUSxFQUFFO0lBQ3pDLGNBQWMsRUFBRSxPQUFDLENBQUMsTUFBTSxFQUFFLENBQUMsUUFBUSxFQUFFO0lBQ3JDLE9BQU8sRUFBRSxPQUFDO1NBQ1AsS0FBSyxDQUFDLENBQUMsT0FBQyxDQUFDLE1BQU0sRUFBRSxFQUFFLE9BQUMsQ0FBQyxLQUFLLENBQUMsT0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDLENBQUMsQ0FBQztTQUN4QyxTQUFTLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUM7U0FDdkQsSUFBSSxDQUFDLE9BQUMsQ0FBQyxLQUFLLENBQUMsT0FBQyxDQUFDLElBQUksQ0FBQyxxQkFBcUIsQ0FBQyxDQUFDLENBQUM7U0FDNUMsUUFBUSxFQUFFO0lBQ2IsVUFBVSxFQUFFLElBQUEsOEJBQWlCLEdBQUUsQ0FBQyxRQUFRLEVBQUU7SUFDMUMsVUFBVSxFQUFFLElBQUEsOEJBQWlCLEdBQUUsQ0FBQyxRQUFRLEVBQUU7Q0FDM0MsQ0FBQyxDQUNILENBQUE7QUFLWSxRQUFBLDJCQUEyQixHQUFHLElBQUEsK0JBQWtCLEdBQUUsQ0FBQTtBQUdsRCxRQUFBLHVCQUF1QixHQUFHLE9BQUMsQ0FBQyxNQUFNLENBQUM7SUFDOUMsS0FBSyxFQUFFLE9BQUMsQ0FBQyxLQUFLLENBQ1osT0FBQyxDQUFDLE1BQU0sQ0FBQztRQUNQLEVBQUUsRUFBRSxPQUFDLENBQUMsTUFBTSxFQUFFO1FBQ2QsUUFBUSxFQUFFLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDO0tBQ2xDLENBQUMsQ0FDSDtJQUNELGlCQUFpQixFQUFFLE9BQUMsQ0FBQyxPQUFPLEVBQUU7SUFDOUIsV0FBVyxFQUFFLE9BQUMsQ0FBQyxNQUFNLEVBQUU7Q0FDeEIsQ0FBQyxDQUFBO0FBR1csUUFBQSxvQkFBb0IsR0FBRyxPQUFDLENBQUMsTUFBTSxDQUFDO0lBQzNDLEtBQUssRUFBRSxPQUFDLENBQUMsS0FBSyxDQUNaLE9BQUMsQ0FBQyxNQUFNLENBQUM7UUFDUCxFQUFFLEVBQUUsT0FBQyxDQUFDLE1BQU0sRUFBRTtRQUNkLFFBQVEsRUFBRSxPQUFDLENBQUMsTUFBTSxFQUFFO0tBQ3JCLENBQUMsQ0FDSDtJQUNELE1BQU0sRUFBRSxPQUFDO1NBQ04sS0FBSyxDQUNKLE9BQUMsQ0FBQyxNQUFNLENBQUM7UUFDUCxlQUFlLEVBQUUsT0FBQyxDQUFDLE1BQU0sRUFBRTtRQUMzQixZQUFZLEVBQUUsT0FBQyxDQUFDLE1BQU0sRUFBRTtRQUN4QixTQUFTLEVBQUUsT0FBQyxDQUFDLE1BQU0sRUFBRTtLQUN0QixDQUFDLENBQ0g7U0FDQSxRQUFRLEVBQUU7Q0FDZCxDQUFDLENBQUEifQ==
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework/http";
|
|
2
|
+
import { VendorMarkPaymentCollectionAsPaidType } from "../../validators";
|
|
3
|
+
export declare const POST: (req: AuthenticatedMedusaRequest<VendorMarkPaymentCollectionAsPaidType>, res: MedusaResponse) => Promise<void>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.POST = void 0;
|
|
4
|
+
const core_flows_1 = require("@medusajs/core-flows");
|
|
5
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
6
|
+
const helpers_1 = require("../../helpers");
|
|
7
|
+
const POST = async (req, res) => {
|
|
8
|
+
const sellerId = req.seller_context.seller_id;
|
|
9
|
+
const { id } = req.params;
|
|
10
|
+
const orderId = await (0, helpers_1.validateSellerPaymentCollection)(req.scope, sellerId, id);
|
|
11
|
+
if (req.validatedBody.order_id !== orderId) {
|
|
12
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.INVALID_DATA, `order_id does not match the payment collection's order`);
|
|
13
|
+
}
|
|
14
|
+
await (0, core_flows_1.markPaymentCollectionAsPaid)(req.scope).run({
|
|
15
|
+
input: {
|
|
16
|
+
payment_collection_id: id,
|
|
17
|
+
order_id: orderId,
|
|
18
|
+
captured_by: req.auth_context.actor_id,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
const payment_collection = await (0, helpers_1.refetchPaymentCollection)(req.scope, id, req.queryConfig.fields);
|
|
22
|
+
res.status(200).json({ payment_collection });
|
|
23
|
+
};
|
|
24
|
+
exports.POST = POST;
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9wYXltZW50LWNvbGxlY3Rpb25zL1tpZF0vbWFyay1hcy1wYWlkL3JvdXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHFEQUFrRTtBQUtsRSxxREFBdUQ7QUFFdkQsMkNBR3NCO0FBR2YsTUFBTSxJQUFJLEdBQUcsS0FBSyxFQUN2QixHQUFzRSxFQUN0RSxHQUFtQixFQUNuQixFQUFFO0lBQ0YsTUFBTSxRQUFRLEdBQUcsR0FBRyxDQUFDLGNBQWUsQ0FBQyxTQUFTLENBQUE7SUFDOUMsTUFBTSxFQUFFLEVBQUUsRUFBRSxHQUFHLEdBQUcsQ0FBQyxNQUFNLENBQUE7SUFFekIsTUFBTSxPQUFPLEdBQUcsTUFBTSxJQUFBLHlDQUErQixFQUNuRCxHQUFHLENBQUMsS0FBSyxFQUNULFFBQVEsRUFDUixFQUFFLENBQ0gsQ0FBQTtJQUVELElBQUksR0FBRyxDQUFDLGFBQWEsQ0FBQyxRQUFRLEtBQUssT0FBTyxFQUFFLENBQUM7UUFDM0MsTUFBTSxJQUFJLG1CQUFXLENBQ25CLG1CQUFXLENBQUMsS0FBSyxDQUFDLFlBQVksRUFDOUIsd0RBQXdELENBQ3pELENBQUE7SUFDSCxDQUFDO0lBRUQsTUFBTSxJQUFBLHdDQUEyQixFQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsQ0FBQyxHQUFHLENBQUM7UUFDL0MsS0FBSyxFQUFFO1lBQ0wscUJBQXFCLEVBQUUsRUFBRTtZQUN6QixRQUFRLEVBQUUsT0FBTztZQUNqQixXQUFXLEVBQUUsR0FBRyxDQUFDLFlBQVksQ0FBQyxRQUFRO1NBQ3ZDO0tBQ0YsQ0FBQyxDQUFBO0lBRUYsTUFBTSxrQkFBa0IsR0FBRyxNQUFNLElBQUEsa0NBQXdCLEVBQ3ZELEdBQUcsQ0FBQyxLQUFLLEVBQ1QsRUFBRSxFQUNGLEdBQUcsQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUN2QixDQUFBO0lBRUQsR0FBRyxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQyxJQUFJLENBQUMsRUFBRSxrQkFBa0IsRUFBRSxDQUFDLENBQUE7QUFDOUMsQ0FBQyxDQUFBO0FBbkNZLFFBQUEsSUFBSSxRQW1DaEIifQ==
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { MedusaContainer } from "@medusajs/framework/types";
|
|
2
|
+
export declare const refetchPaymentCollection: (scope: MedusaContainer, paymentCollectionId: string, fields: string[]) => Promise<any>;
|
|
3
|
+
export declare const validateSellerPaymentCollection: (scope: MedusaContainer, sellerId: string, paymentCollectionId: string) => Promise<string>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateSellerPaymentCollection = exports.refetchPaymentCollection = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const helpers_1 = require("../orders/helpers");
|
|
6
|
+
const refetchPaymentCollection = async (scope, paymentCollectionId, fields) => {
|
|
7
|
+
const query = scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
8
|
+
const { data: [paymentCollection], } = await query.graph({
|
|
9
|
+
entity: "payment_collection",
|
|
10
|
+
filters: { id: paymentCollectionId },
|
|
11
|
+
fields,
|
|
12
|
+
});
|
|
13
|
+
return paymentCollection;
|
|
14
|
+
};
|
|
15
|
+
exports.refetchPaymentCollection = refetchPaymentCollection;
|
|
16
|
+
const validateSellerPaymentCollection = async (scope, sellerId, paymentCollectionId) => {
|
|
17
|
+
const query = scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
18
|
+
const { data: [link], } = await query.graph({
|
|
19
|
+
entity: "order_payment_collection",
|
|
20
|
+
filters: { payment_collection_id: paymentCollectionId },
|
|
21
|
+
fields: ["order_id"],
|
|
22
|
+
});
|
|
23
|
+
if (!link?.order_id) {
|
|
24
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Payment collection with id: ${paymentCollectionId} was not found`);
|
|
25
|
+
}
|
|
26
|
+
await (0, helpers_1.validateSellerOrder)(scope, sellerId, link.order_id);
|
|
27
|
+
return link.order_id;
|
|
28
|
+
};
|
|
29
|
+
exports.validateSellerPaymentCollection = validateSellerPaymentCollection;
|
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcGkvdmVuZG9yL3BheW1lbnQtY29sbGVjdGlvbnMvaGVscGVycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSxxREFHa0M7QUFFbEMsK0NBQXVEO0FBRWhELE1BQU0sd0JBQXdCLEdBQUcsS0FBSyxFQUMzQyxLQUFzQixFQUN0QixtQkFBMkIsRUFDM0IsTUFBZ0IsRUFDaEIsRUFBRTtJQUNGLE1BQU0sS0FBSyxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsaUNBQXlCLENBQUMsS0FBSyxDQUFDLENBQUE7SUFFNUQsTUFBTSxFQUNKLElBQUksRUFBRSxDQUFDLGlCQUFpQixDQUFDLEdBQzFCLEdBQUcsTUFBTSxLQUFLLENBQUMsS0FBSyxDQUFDO1FBQ3BCLE1BQU0sRUFBRSxvQkFBb0I7UUFDNUIsT0FBTyxFQUFFLEVBQUUsRUFBRSxFQUFFLG1CQUFtQixFQUFFO1FBQ3BDLE1BQU07S0FDUCxDQUFDLENBQUE7SUFFRixPQUFPLGlCQUFpQixDQUFBO0FBQzFCLENBQUMsQ0FBQTtBQWhCWSxRQUFBLHdCQUF3Qiw0QkFnQnBDO0FBRU0sTUFBTSwrQkFBK0IsR0FBRyxLQUFLLEVBQ2xELEtBQXNCLEVBQ3RCLFFBQWdCLEVBQ2hCLG1CQUEyQixFQUNWLEVBQUU7SUFDbkIsTUFBTSxLQUFLLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxpQ0FBeUIsQ0FBQyxLQUFLLENBQUMsQ0FBQTtJQUU1RCxNQUFNLEVBQ0osSUFBSSxFQUFFLENBQUMsSUFBSSxDQUFDLEdBQ2IsR0FBRyxNQUFNLEtBQUssQ0FBQyxLQUFLLENBQUM7UUFDcEIsTUFBTSxFQUFFLDBCQUEwQjtRQUNsQyxPQUFPLEVBQUUsRUFBRSxxQkFBcUIsRUFBRSxtQkFBbUIsRUFBRTtRQUN2RCxNQUFNLEVBQUUsQ0FBQyxVQUFVLENBQUM7S0FDckIsQ0FBQyxDQUFBO0lBRUYsSUFBSSxDQUFDLElBQUksRUFBRSxRQUFRLEVBQUUsQ0FBQztRQUNwQixNQUFNLElBQUksbUJBQVcsQ0FDbkIsbUJBQVcsQ0FBQyxLQUFLLENBQUMsU0FBUyxFQUMzQiwrQkFBK0IsbUJBQW1CLGdCQUFnQixDQUNuRSxDQUFBO0lBQ0gsQ0FBQztJQUVELE1BQU0sSUFBQSw2QkFBbUIsRUFBQyxLQUFLLEVBQUUsUUFBUSxFQUFFLElBQUksQ0FBQyxRQUFRLENBQUMsQ0FBQTtJQUV6RCxPQUFPLElBQUksQ0FBQyxRQUFRLENBQUE7QUFDdEIsQ0FBQyxDQUFBO0FBekJZLFFBQUEsK0JBQStCLG1DQXlCM0MifQ==
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.vendorPaymentCollectionsMiddlewares = 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.vendorPaymentCollectionsMiddlewares = [
|
|
8
|
+
{
|
|
9
|
+
method: ["POST"],
|
|
10
|
+
matcher: "/vendor/payment-collections/:id/mark-as-paid",
|
|
11
|
+
middlewares: [
|
|
12
|
+
(0, framework_1.validateAndTransformBody)(validators_1.VendorMarkPaymentCollectionAsPaid),
|
|
13
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.VendorGetPaymentCollectionParams, query_config_1.vendorPaymentCollectionQueryConfig.retrieve),
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlkZGxld2FyZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9wYXltZW50LWNvbGxlY3Rpb25zL21pZGRsZXdhcmVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLG1EQUc0QjtBQUU1QixpREFBbUU7QUFDbkUsNkNBR3FCO0FBRVIsUUFBQSxtQ0FBbUMsR0FBc0I7SUFDcEU7UUFDRSxNQUFNLEVBQUUsQ0FBQyxNQUFNLENBQUM7UUFDaEIsT0FBTyxFQUFFLDhDQUE4QztRQUN2RCxXQUFXLEVBQUU7WUFDWCxJQUFBLG9DQUF3QixFQUFDLDhDQUFpQyxDQUFDO1lBQzNELElBQUEscUNBQXlCLEVBQ3ZCLDZDQUFnQyxFQUNoQyxpREFBa0MsQ0FBQyxRQUFRLENBQzVDO1NBQ0Y7S0FDRjtDQUNGLENBQUEifQ==
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.vendorPaymentCollectionQueryConfig = exports.vendorPaymentCollectionFields = void 0;
|
|
4
|
+
exports.vendorPaymentCollectionFields = [
|
|
5
|
+
"id",
|
|
6
|
+
"status",
|
|
7
|
+
"amount",
|
|
8
|
+
"authorized_amount",
|
|
9
|
+
"captured_amount",
|
|
10
|
+
"refunded_amount",
|
|
11
|
+
"currency_code",
|
|
12
|
+
"completed_at",
|
|
13
|
+
"created_at",
|
|
14
|
+
"updated_at",
|
|
15
|
+
"metadata",
|
|
16
|
+
"*payments",
|
|
17
|
+
"*payments.refunds",
|
|
18
|
+
"*payment_sessions",
|
|
19
|
+
];
|
|
20
|
+
exports.vendorPaymentCollectionQueryConfig = {
|
|
21
|
+
retrieve: {
|
|
22
|
+
defaults: exports.vendorPaymentCollectionFields,
|
|
23
|
+
isList: false,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwaS92ZW5kb3IvcGF5bWVudC1jb2xsZWN0aW9ucy9xdWVyeS1jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQWEsUUFBQSw2QkFBNkIsR0FBRztJQUMzQyxJQUFJO0lBQ0osUUFBUTtJQUNSLFFBQVE7SUFDUixtQkFBbUI7SUFDbkIsaUJBQWlCO0lBQ2pCLGlCQUFpQjtJQUNqQixlQUFlO0lBQ2YsY0FBYztJQUNkLFlBQVk7SUFDWixZQUFZO0lBQ1osVUFBVTtJQUNWLFdBQVc7SUFDWCxtQkFBbUI7SUFDbkIsbUJBQW1CO0NBQ3BCLENBQUE7QUFFWSxRQUFBLGtDQUFrQyxHQUFHO0lBQ2hELFFBQVEsRUFBRTtRQUNSLFFBQVEsRUFBRSxxQ0FBNkI7UUFDdkMsTUFBTSxFQUFFLEtBQUs7S0FDZDtDQUNGLENBQUEifQ==
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export type VendorGetPaymentCollectionParamsType = z.infer<typeof VendorGetPaymentCollectionParams>;
|
|
3
|
+
export declare const VendorGetPaymentCollectionParams: z.ZodObject<{
|
|
4
|
+
fields: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
fields?: string | undefined;
|
|
7
|
+
}, {
|
|
8
|
+
fields?: string | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
export type VendorMarkPaymentCollectionAsPaidType = z.infer<typeof VendorMarkPaymentCollectionAsPaid>;
|
|
11
|
+
export declare const VendorMarkPaymentCollectionAsPaid: z.ZodObject<{
|
|
12
|
+
order_id: z.ZodString;
|
|
13
|
+
}, "strict", z.ZodTypeAny, {
|
|
14
|
+
order_id: string;
|
|
15
|
+
}, {
|
|
16
|
+
order_id: string;
|
|
17
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VendorMarkPaymentCollectionAsPaid = exports.VendorGetPaymentCollectionParams = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const validators_1 = require("@medusajs/medusa/api/utils/validators");
|
|
6
|
+
exports.VendorGetPaymentCollectionParams = (0, validators_1.createSelectParams)();
|
|
7
|
+
exports.VendorMarkPaymentCollectionAsPaid = zod_1.z
|
|
8
|
+
.object({
|
|
9
|
+
order_id: zod_1.z.string(),
|
|
10
|
+
})
|
|
11
|
+
.strict();
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9ycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcGkvdmVuZG9yL3BheW1lbnQtY29sbGVjdGlvbnMvdmFsaWRhdG9ycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2QkFBdUI7QUFDdkIsc0VBQTBFO0FBSzdELFFBQUEsZ0NBQWdDLEdBQUcsSUFBQSwrQkFBa0IsR0FBRSxDQUFBO0FBS3ZELFFBQUEsaUNBQWlDLEdBQUcsT0FBQztLQUMvQyxNQUFNLENBQUM7SUFDTixRQUFRLEVBQUUsT0FBQyxDQUFDLE1BQU0sRUFBRTtDQUNyQixDQUFDO0tBQ0QsTUFBTSxFQUFFLENBQUEifQ==
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import { MedusaContainer } from "@medusajs/framework/types";
|
|
2
2
|
export declare const refetchPayment: (scope: MedusaContainer, paymentId: string, fields: string[]) => Promise<any>;
|
|
3
|
+
/**
|
|
4
|
+
* Asserts the seller owns the order that owns the payment.
|
|
5
|
+
*
|
|
6
|
+
* Mercur doesn't have a direct `seller_payment` module link (the join
|
|
7
|
+
* goes through the order). Resolve the payment → `payment_collection` →
|
|
8
|
+
* `order` → `order_seller` chain via Query Graph and check the seller
|
|
9
|
+
* matches. The previous implementation queried a non-existent
|
|
10
|
+
* `seller_payment` entity which 500-d every refund / capture call.
|
|
11
|
+
*/
|
|
3
12
|
export declare const validateSellerPayment: (scope: MedusaContainer, sellerId: string, paymentId: string) => Promise<void>;
|
|
@@ -12,19 +12,34 @@ const refetchPayment = async (scope, paymentId, fields) => {
|
|
|
12
12
|
return payment;
|
|
13
13
|
};
|
|
14
14
|
exports.refetchPayment = refetchPayment;
|
|
15
|
+
/**
|
|
16
|
+
* Asserts the seller owns the order that owns the payment.
|
|
17
|
+
*
|
|
18
|
+
* Mercur doesn't have a direct `seller_payment` module link (the join
|
|
19
|
+
* goes through the order). Resolve the payment → `payment_collection` →
|
|
20
|
+
* `order` → `order_seller` chain via Query Graph and check the seller
|
|
21
|
+
* matches. The previous implementation queried a non-existent
|
|
22
|
+
* `seller_payment` entity which 500-d every refund / capture call.
|
|
23
|
+
*/
|
|
15
24
|
const validateSellerPayment = async (scope, sellerId, paymentId) => {
|
|
16
25
|
const query = scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
17
|
-
const { data: [
|
|
18
|
-
entity: "
|
|
19
|
-
filters: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
const { data: [payment], } = await query.graph({
|
|
27
|
+
entity: "payment",
|
|
28
|
+
filters: { id: paymentId },
|
|
29
|
+
fields: ["id", "payment_collection.order.id"],
|
|
30
|
+
});
|
|
31
|
+
const orderId = payment?.payment_collection?.order?.id;
|
|
32
|
+
if (!orderId) {
|
|
33
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Payment with id: ${paymentId} was not found`);
|
|
34
|
+
}
|
|
35
|
+
const { data: [sellerOrder], } = await query.graph({
|
|
36
|
+
entity: "order_seller",
|
|
37
|
+
filters: { seller_id: sellerId, order_id: orderId },
|
|
23
38
|
fields: ["seller_id"],
|
|
24
39
|
});
|
|
25
|
-
if (!
|
|
40
|
+
if (!sellerOrder) {
|
|
26
41
|
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Payment with id: ${paymentId} was not found`);
|
|
27
42
|
}
|
|
28
43
|
};
|
|
29
44
|
exports.validateSellerPayment = validateSellerPayment;
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcGkvdmVuZG9yL3BheW1lbnRzL2hlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQ0EscURBR2tDO0FBRTNCLE1BQU0sY0FBYyxHQUFHLEtBQUssRUFDakMsS0FBc0IsRUFDdEIsU0FBaUIsRUFDakIsTUFBZ0IsRUFDaEIsRUFBRTtJQUNGLE1BQU0sS0FBSyxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsaUNBQXlCLENBQUMsS0FBSyxDQUFDLENBQUE7SUFFNUQsTUFBTSxFQUNKLElBQUksRUFBRSxDQUFDLE9BQU8sQ0FBQyxHQUNoQixHQUFHLE1BQU0sS0FBSyxDQUFDLEtBQUssQ0FBQztRQUNwQixNQUFNLEVBQUUsU0FBUztRQUNqQixPQUFPLEVBQUUsRUFBRSxFQUFFLEVBQUUsU0FBUyxFQUFFO1FBQzFCLE1BQU07S0FDUCxDQUFDLENBQUE7SUFFRixPQUFPLE9BQU8sQ0FBQTtBQUNoQixDQUFDLENBQUE7QUFoQlksUUFBQSxjQUFjLGtCQWdCMUI7QUFFRDs7Ozs7Ozs7R0FRRztBQUNJLE1BQU0scUJBQXFCLEdBQUcsS0FBSyxFQUN4QyxLQUFzQixFQUN0QixRQUFnQixFQUNoQixTQUFpQixFQUNqQixFQUFFO0lBQ0YsTUFBTSxLQUFLLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxpQ0FBeUIsQ0FBQyxLQUFLLENBQUMsQ0FBQTtJQUU1RCxNQUFNLEVBQ0osSUFBSSxFQUFFLENBQUMsT0FBTyxDQUFDLEdBQ2hCLEdBQUcsTUFBTSxLQUFLLENBQUMsS0FBSyxDQUFDO1FBQ3BCLE1BQU0sRUFBRSxTQUFTO1FBQ2pCLE9BQU8sRUFBRSxFQUFFLEVBQUUsRUFBRSxTQUFTLEVBQUU7UUFDMUIsTUFBTSxFQUFFLENBQUMsSUFBSSxFQUFFLDZCQUE2QixDQUFDO0tBQzlDLENBQUMsQ0FBQTtJQUVGLE1BQU0sT0FBTyxHQUNYLE9BR0QsRUFBRSxrQkFBa0IsRUFBRSxLQUFLLEVBQUUsRUFBRSxDQUFBO0lBRWhDLElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQztRQUNiLE1BQU0sSUFBSSxtQkFBVyxDQUNuQixtQkFBVyxDQUFDLEtBQUssQ0FBQyxTQUFTLEVBQzNCLG9CQUFvQixTQUFTLGdCQUFnQixDQUM5QyxDQUFBO0lBQ0gsQ0FBQztJQUVELE1BQU0sRUFDSixJQUFJLEVBQUUsQ0FBQyxXQUFXLENBQUMsR0FDcEIsR0FBRyxNQUFNLEtBQUssQ0FBQyxLQUFLLENBQUM7UUFDcEIsTUFBTSxFQUFFLGNBQWM7UUFDdEIsT0FBTyxFQUFFLEVBQUUsU0FBUyxFQUFFLFFBQVEsRUFBRSxRQUFRLEVBQUUsT0FBTyxFQUFFO1FBQ25ELE1BQU0sRUFBRSxDQUFDLFdBQVcsQ0FBQztLQUN0QixDQUFDLENBQUE7SUFFRixJQUFJLENBQUMsV0FBVyxFQUFFLENBQUM7UUFDakIsTUFBTSxJQUFJLG1CQUFXLENBQ25CLG1CQUFXLENBQUMsS0FBSyxDQUFDLFNBQVMsRUFDM0Isb0JBQW9CLFNBQVMsZ0JBQWdCLENBQzlDLENBQUE7SUFDSCxDQUFDO0FBQ0gsQ0FBQyxDQUFBO0FBMUNZLFFBQUEscUJBQXFCLHlCQTBDakMifQ==
|
|
@@ -102,15 +102,16 @@ export declare const VendorGetPaymentsParams: z.ZodObject<{
|
|
|
102
102
|
}, "strip", z.ZodTypeAny, {
|
|
103
103
|
offset: number;
|
|
104
104
|
limit: number;
|
|
105
|
+
order?: string | undefined;
|
|
105
106
|
id?: string | string[] | undefined;
|
|
106
107
|
created_at?: any;
|
|
107
108
|
updated_at?: any;
|
|
108
109
|
q?: string | undefined;
|
|
109
110
|
fields?: string | undefined;
|
|
110
|
-
order?: string | undefined;
|
|
111
111
|
with_deleted?: boolean | undefined;
|
|
112
112
|
payment_session_id?: string | string[] | undefined;
|
|
113
113
|
}, {
|
|
114
|
+
order?: string | undefined;
|
|
114
115
|
id?: string | string[] | undefined;
|
|
115
116
|
created_at?: any;
|
|
116
117
|
updated_at?: any;
|
|
@@ -118,7 +119,6 @@ export declare const VendorGetPaymentsParams: z.ZodObject<{
|
|
|
118
119
|
limit?: unknown;
|
|
119
120
|
q?: string | undefined;
|
|
120
121
|
fields?: string | undefined;
|
|
121
|
-
order?: string | undefined;
|
|
122
122
|
with_deleted?: unknown;
|
|
123
123
|
payment_session_id?: string | string[] | undefined;
|
|
124
124
|
}>;
|
|
@@ -136,17 +136,17 @@ export declare const VendorGetPaymentProvidersParams: z.ZodObject<{
|
|
|
136
136
|
}, "strip", z.ZodTypeAny, {
|
|
137
137
|
offset: number;
|
|
138
138
|
limit: number;
|
|
139
|
+
order?: string | undefined;
|
|
139
140
|
id?: string | string[] | undefined;
|
|
140
141
|
fields?: string | undefined;
|
|
141
|
-
order?: string | undefined;
|
|
142
142
|
with_deleted?: boolean | undefined;
|
|
143
143
|
is_enabled?: boolean | undefined;
|
|
144
144
|
}, {
|
|
145
|
+
order?: string | undefined;
|
|
145
146
|
id?: string | string[] | undefined;
|
|
146
147
|
offset?: unknown;
|
|
147
148
|
limit?: unknown;
|
|
148
149
|
fields?: string | undefined;
|
|
149
|
-
order?: string | undefined;
|
|
150
150
|
with_deleted?: unknown;
|
|
151
151
|
is_enabled?: string | boolean | undefined;
|
|
152
152
|
}>;
|
|
@@ -100,19 +100,19 @@ export declare const VendorGetPayoutsParams: z.ZodObject<{
|
|
|
100
100
|
}, "strip", z.ZodTypeAny, {
|
|
101
101
|
offset: number;
|
|
102
102
|
limit: number;
|
|
103
|
+
order?: string | undefined;
|
|
103
104
|
created_at?: any;
|
|
104
105
|
updated_at?: any;
|
|
105
106
|
status?: string | string[] | undefined;
|
|
106
107
|
fields?: string | undefined;
|
|
107
|
-
order?: string | undefined;
|
|
108
108
|
with_deleted?: boolean | undefined;
|
|
109
109
|
}, {
|
|
110
|
+
order?: string | undefined;
|
|
110
111
|
created_at?: any;
|
|
111
112
|
updated_at?: any;
|
|
112
113
|
status?: string | string[] | undefined;
|
|
113
114
|
offset?: unknown;
|
|
114
115
|
limit?: unknown;
|
|
115
116
|
fields?: string | undefined;
|
|
116
|
-
order?: string | undefined;
|
|
117
117
|
with_deleted?: unknown;
|
|
118
118
|
}>;
|
|
@@ -103,22 +103,22 @@ export declare const VendorGetPriceListsParams: z.ZodObject<{
|
|
|
103
103
|
}, "strip", z.ZodTypeAny, {
|
|
104
104
|
offset: number;
|
|
105
105
|
limit: number;
|
|
106
|
+
order?: string | undefined;
|
|
106
107
|
id?: string | string[] | undefined;
|
|
107
108
|
status?: PriceListStatus[] | undefined;
|
|
108
109
|
q?: string | undefined;
|
|
109
110
|
fields?: string | undefined;
|
|
110
|
-
order?: string | undefined;
|
|
111
111
|
with_deleted?: boolean | undefined;
|
|
112
112
|
starts_at?: any;
|
|
113
113
|
ends_at?: any;
|
|
114
114
|
}, {
|
|
115
|
+
order?: string | undefined;
|
|
115
116
|
id?: string | string[] | undefined;
|
|
116
117
|
status?: PriceListStatus[] | undefined;
|
|
117
118
|
offset?: unknown;
|
|
118
119
|
limit?: unknown;
|
|
119
120
|
q?: string | undefined;
|
|
120
121
|
fields?: string | undefined;
|
|
121
|
-
order?: string | undefined;
|
|
122
122
|
with_deleted?: unknown;
|
|
123
123
|
starts_at?: any;
|
|
124
124
|
ends_at?: any;
|
|
@@ -132,19 +132,19 @@ export declare const VendorCreatePriceListPrice: z.ZodObject<{
|
|
|
132
132
|
max_quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
133
133
|
rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
134
134
|
}, "strip", z.ZodTypeAny, {
|
|
135
|
+
variant_id: string;
|
|
135
136
|
amount: number;
|
|
136
137
|
currency_code: string;
|
|
137
|
-
variant_id: string;
|
|
138
|
-
rules?: Record<string, string> | undefined;
|
|
139
138
|
min_quantity?: number | null | undefined;
|
|
140
139
|
max_quantity?: number | null | undefined;
|
|
140
|
+
rules?: Record<string, string> | undefined;
|
|
141
141
|
}, {
|
|
142
|
+
variant_id: string;
|
|
142
143
|
amount: number;
|
|
143
144
|
currency_code: string;
|
|
144
|
-
variant_id: string;
|
|
145
|
-
rules?: Record<string, string> | undefined;
|
|
146
145
|
min_quantity?: number | null | undefined;
|
|
147
146
|
max_quantity?: number | null | undefined;
|
|
147
|
+
rules?: Record<string, string> | undefined;
|
|
148
148
|
}>;
|
|
149
149
|
export type VendorUpdatePriceListPriceType = z.infer<typeof VendorUpdatePriceListPrice>;
|
|
150
150
|
export declare const VendorUpdatePriceListPrice: z.ZodObject<{
|
|
@@ -160,17 +160,17 @@ export declare const VendorUpdatePriceListPrice: z.ZodObject<{
|
|
|
160
160
|
variant_id: string;
|
|
161
161
|
amount?: number | undefined;
|
|
162
162
|
currency_code?: string | undefined;
|
|
163
|
-
rules?: Record<string, string> | undefined;
|
|
164
163
|
min_quantity?: number | null | undefined;
|
|
165
164
|
max_quantity?: number | null | undefined;
|
|
165
|
+
rules?: Record<string, string> | undefined;
|
|
166
166
|
}, {
|
|
167
167
|
id: string;
|
|
168
168
|
variant_id: string;
|
|
169
169
|
amount?: number | undefined;
|
|
170
170
|
currency_code?: string | undefined;
|
|
171
|
-
rules?: Record<string, string> | undefined;
|
|
172
171
|
min_quantity?: number | null | undefined;
|
|
173
172
|
max_quantity?: number | null | undefined;
|
|
173
|
+
rules?: Record<string, string> | undefined;
|
|
174
174
|
}>;
|
|
175
175
|
export type VendorGetPriceListPricesParamsType = z.infer<typeof VendorGetPriceListPricesParams>;
|
|
176
176
|
export declare const VendorGetPriceListPricesParams: z.ZodObject<{
|
|
@@ -210,52 +210,52 @@ export declare const VendorCreatePriceList: z.ZodObject<{
|
|
|
210
210
|
max_quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
211
211
|
rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
212
212
|
}, "strip", z.ZodTypeAny, {
|
|
213
|
+
variant_id: string;
|
|
213
214
|
amount: number;
|
|
214
215
|
currency_code: string;
|
|
215
|
-
variant_id: string;
|
|
216
|
-
rules?: Record<string, string> | undefined;
|
|
217
216
|
min_quantity?: number | null | undefined;
|
|
218
217
|
max_quantity?: number | null | undefined;
|
|
218
|
+
rules?: Record<string, string> | undefined;
|
|
219
219
|
}, {
|
|
220
|
+
variant_id: string;
|
|
220
221
|
amount: number;
|
|
221
222
|
currency_code: string;
|
|
222
|
-
variant_id: string;
|
|
223
|
-
rules?: Record<string, string> | undefined;
|
|
224
223
|
min_quantity?: number | null | undefined;
|
|
225
224
|
max_quantity?: number | null | undefined;
|
|
225
|
+
rules?: Record<string, string> | undefined;
|
|
226
226
|
}>, "many">>;
|
|
227
227
|
}, "strip", z.ZodTypeAny, {
|
|
228
|
-
description: string;
|
|
229
228
|
title: string;
|
|
229
|
+
description: string;
|
|
230
230
|
type?: PriceListType | undefined;
|
|
231
231
|
status?: PriceListStatus | undefined;
|
|
232
232
|
rules?: Record<string, string[]> | undefined;
|
|
233
|
-
starts_at?: string | null | undefined;
|
|
234
|
-
ends_at?: string | null | undefined;
|
|
235
233
|
prices?: {
|
|
234
|
+
variant_id: string;
|
|
236
235
|
amount: number;
|
|
237
236
|
currency_code: string;
|
|
238
|
-
variant_id: string;
|
|
239
|
-
rules?: Record<string, string> | undefined;
|
|
240
237
|
min_quantity?: number | null | undefined;
|
|
241
238
|
max_quantity?: number | null | undefined;
|
|
239
|
+
rules?: Record<string, string> | undefined;
|
|
242
240
|
}[] | undefined;
|
|
241
|
+
starts_at?: string | null | undefined;
|
|
242
|
+
ends_at?: string | null | undefined;
|
|
243
243
|
}, {
|
|
244
|
-
description: string;
|
|
245
244
|
title: string;
|
|
245
|
+
description: string;
|
|
246
246
|
type?: PriceListType | undefined;
|
|
247
247
|
status?: PriceListStatus | undefined;
|
|
248
248
|
rules?: Record<string, string[]> | undefined;
|
|
249
|
-
starts_at?: string | null | undefined;
|
|
250
|
-
ends_at?: string | null | undefined;
|
|
251
249
|
prices?: {
|
|
250
|
+
variant_id: string;
|
|
252
251
|
amount: number;
|
|
253
252
|
currency_code: string;
|
|
254
|
-
variant_id: string;
|
|
255
|
-
rules?: Record<string, string> | undefined;
|
|
256
253
|
min_quantity?: number | null | undefined;
|
|
257
254
|
max_quantity?: number | null | undefined;
|
|
255
|
+
rules?: Record<string, string> | undefined;
|
|
258
256
|
}[] | undefined;
|
|
257
|
+
starts_at?: string | null | undefined;
|
|
258
|
+
ends_at?: string | null | undefined;
|
|
259
259
|
}>;
|
|
260
260
|
export type VendorUpdatePriceListType = z.infer<typeof VendorUpdatePriceList>;
|
|
261
261
|
export declare const VendorUpdatePriceList: z.ZodObject<{
|
|
@@ -269,17 +269,17 @@ export declare const VendorUpdatePriceList: z.ZodObject<{
|
|
|
269
269
|
}, "strip", z.ZodTypeAny, {
|
|
270
270
|
type?: PriceListType | undefined;
|
|
271
271
|
status?: PriceListStatus | undefined;
|
|
272
|
-
description?: string | null | undefined;
|
|
273
|
-
title?: string | undefined;
|
|
274
272
|
rules?: Record<string, string[]> | undefined;
|
|
273
|
+
title?: string | undefined;
|
|
274
|
+
description?: string | null | undefined;
|
|
275
275
|
starts_at?: string | null | undefined;
|
|
276
276
|
ends_at?: string | null | undefined;
|
|
277
277
|
}, {
|
|
278
278
|
type?: PriceListType | undefined;
|
|
279
279
|
status?: PriceListStatus | undefined;
|
|
280
|
-
description?: string | null | undefined;
|
|
281
|
-
title?: string | undefined;
|
|
282
280
|
rules?: Record<string, string[]> | undefined;
|
|
281
|
+
title?: string | undefined;
|
|
282
|
+
description?: string | null | undefined;
|
|
283
283
|
starts_at?: string | null | undefined;
|
|
284
284
|
ends_at?: string | null | undefined;
|
|
285
285
|
}>;
|
|
@@ -23,21 +23,21 @@ export declare const VendorGetPricePreferencesParams: z.ZodObject<{
|
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
24
|
offset: number;
|
|
25
25
|
limit: number;
|
|
26
|
+
order?: string | undefined;
|
|
26
27
|
id?: string | string[] | undefined;
|
|
27
28
|
value?: string | string[] | undefined;
|
|
28
29
|
q?: string | undefined;
|
|
29
30
|
fields?: string | undefined;
|
|
30
|
-
order?: string | undefined;
|
|
31
31
|
with_deleted?: boolean | undefined;
|
|
32
32
|
attribute?: string | string[] | undefined;
|
|
33
33
|
}, {
|
|
34
|
+
order?: string | undefined;
|
|
34
35
|
id?: string | string[] | undefined;
|
|
35
36
|
value?: string | string[] | undefined;
|
|
36
37
|
offset?: unknown;
|
|
37
38
|
limit?: unknown;
|
|
38
39
|
q?: string | undefined;
|
|
39
40
|
fields?: string | undefined;
|
|
40
|
-
order?: string | undefined;
|
|
41
41
|
with_deleted?: unknown;
|
|
42
42
|
attribute?: string | string[] | undefined;
|
|
43
43
|
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework";
|
|
1
|
+
import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework/http";
|
|
2
2
|
import { HttpTypes } from "@mercurjs/types";
|
|
3
|
-
export declare const GET: (req: AuthenticatedMedusaRequest, res: MedusaResponse<HttpTypes.
|
|
3
|
+
export declare const GET: (req: AuthenticatedMedusaRequest, res: MedusaResponse<HttpTypes.VendorProductAttributeResponse>) => Promise<void>;
|
|
@@ -0,0 +1,18 @@
|
|
|
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: [product_attribute], } = await query.graph({
|
|
8
|
+
entity: "product_attribute",
|
|
9
|
+
fields: req.queryConfig.fields,
|
|
10
|
+
filters: { id: req.params.id },
|
|
11
|
+
});
|
|
12
|
+
if (!product_attribute) {
|
|
13
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Product attribute with id ${req.params.id} was not found`);
|
|
14
|
+
}
|
|
15
|
+
res.json({ product_attribute });
|
|
16
|
+
};
|
|
17
|
+
exports.GET = GET;
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9wcm9kdWN0LWF0dHJpYnV0ZXMvW2lkXS9yb3V0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFJQSxxREFHa0M7QUFHM0IsTUFBTSxHQUFHLEdBQUcsS0FBSyxFQUN0QixHQUErQixFQUMvQixHQUE2RCxFQUM3RCxFQUFFO0lBQ0YsTUFBTSxLQUFLLEdBQUcsR0FBRyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsaUNBQXlCLENBQUMsS0FBSyxDQUFDLENBQUE7SUFFaEUsTUFBTSxFQUNKLElBQUksRUFBRSxDQUFDLGlCQUFpQixDQUFDLEdBQzFCLEdBQUcsTUFBTSxLQUFLLENBQUMsS0FBSyxDQUFDO1FBQ3BCLE1BQU0sRUFBRSxtQkFBbUI7UUFDM0IsTUFBTSxFQUFFLEdBQUcsQ0FBQyxXQUFXLENBQUMsTUFBTTtRQUM5QixPQUFPLEVBQUUsRUFBRSxFQUFFLEVBQUUsR0FBRyxDQUFDLE1BQU0sQ0FBQyxFQUFFLEVBQUU7S0FDL0IsQ0FBQyxDQUFBO0lBRUYsSUFBSSxDQUFDLGlCQUFpQixFQUFFLENBQUM7UUFDdkIsTUFBTSxJQUFJLG1CQUFXLENBQ25CLG1CQUFXLENBQUMsS0FBSyxDQUFDLFNBQVMsRUFDM0IsNkJBQTZCLEdBQUcsQ0FBQyxNQUFNLENBQUMsRUFBRSxnQkFBZ0IsQ0FDM0QsQ0FBQTtJQUNILENBQUM7SUFFRCxHQUFHLENBQUMsSUFBSSxDQUFDLEVBQUUsaUJBQWlCLEVBQUUsQ0FBQyxDQUFBO0FBQ2pDLENBQUMsQ0FBQTtBQXRCWSxRQUFBLEdBQUcsT0FzQmYifQ==
|