@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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const inventory_1 = __importDefault(require("@medusajs/medusa/inventory"));
|
|
8
|
+
const offer_1 = __importDefault(require("../modules/offer"));
|
|
9
|
+
exports.default = (0, utils_1.defineLink)({
|
|
10
|
+
linkable: offer_1.default.linkable.offer,
|
|
11
|
+
isList: true,
|
|
12
|
+
}, {
|
|
13
|
+
linkable: inventory_1.default.linkable.inventoryItem,
|
|
14
|
+
isList: true,
|
|
15
|
+
}, {
|
|
16
|
+
database: {
|
|
17
|
+
table: "offer_inventory_item",
|
|
18
|
+
extraColumns: {
|
|
19
|
+
required_quantity: {
|
|
20
|
+
type: "integer",
|
|
21
|
+
defaultValue: "1",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2ZmZXItaW52ZW50b3J5LWl0ZW0tbGluay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saW5rcy9vZmZlci1pbnZlbnRvcnktaXRlbS1saW5rLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEscURBQXNEO0FBQ3RELDJFQUF3RDtBQUN4RCw2REFBMEM7QUFFMUMsa0JBQWUsSUFBQSxrQkFBVSxFQUN2QjtJQUNFLFFBQVEsRUFBRSxlQUFXLENBQUMsUUFBUSxDQUFDLEtBQUs7SUFDcEMsTUFBTSxFQUFFLElBQUk7Q0FDYixFQUNEO0lBQ0UsUUFBUSxFQUFFLG1CQUFlLENBQUMsUUFBUSxDQUFDLGFBQWE7SUFDaEQsTUFBTSxFQUFFLElBQUk7Q0FDYixFQUNEO0lBQ0UsUUFBUSxFQUFFO1FBQ1IsS0FBSyxFQUFFLHNCQUFzQjtRQUM3QixZQUFZLEVBQUU7WUFDWixpQkFBaUIsRUFBRTtnQkFDakIsSUFBSSxFQUFFLFNBQVM7Z0JBQ2YsWUFBWSxFQUFFLEdBQUc7YUFDbEI7U0FDRjtLQUNGO0NBQ0YsQ0FDRixDQUFBIn0=
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const pricing_1 = __importDefault(require("@medusajs/medusa/pricing"));
|
|
8
|
+
const offer_1 = __importDefault(require("../modules/offer"));
|
|
9
|
+
exports.default = (0, utils_1.defineLink)(offer_1.default.linkable.offer, {
|
|
10
|
+
linkable: pricing_1.default.linkable.price,
|
|
11
|
+
isList: true,
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2ZmZXItcHJpY2UtbGluay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saW5rcy9vZmZlci1wcmljZS1saW5rLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEscURBQXNEO0FBQ3RELHVFQUFvRDtBQUNwRCw2REFBMEM7QUFFMUMsa0JBQWUsSUFBQSxrQkFBVSxFQUFDLGVBQVcsQ0FBQyxRQUFRLENBQUMsS0FBSyxFQUFFO0lBQ3BELFFBQVEsRUFBRSxpQkFBYSxDQUFDLFFBQVEsQ0FBQyxLQUFLO0lBQ3RDLE1BQU0sRUFBRSxJQUFJO0NBQ2IsQ0FBQyxDQUFBIn0=
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const offer_1 = __importDefault(require("../modules/offer"));
|
|
8
|
+
const seller_1 = __importDefault(require("../modules/seller"));
|
|
9
|
+
exports.default = (0, utils_1.defineLink)({
|
|
10
|
+
linkable: offer_1.default.linkable.offer,
|
|
11
|
+
field: "seller_id",
|
|
12
|
+
}, seller_1.default.linkable.seller, {
|
|
13
|
+
readOnly: true,
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2ZmZXItc2VsbGVyLWxpbmsuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbGlua3Mvb2ZmZXItc2VsbGVyLWxpbmsudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxREFBc0Q7QUFDdEQsNkRBQTBDO0FBQzFDLCtEQUE0QztBQUU1QyxrQkFBZSxJQUFBLGtCQUFVLEVBQ3ZCO0lBQ0UsUUFBUSxFQUFFLGVBQVcsQ0FBQyxRQUFRLENBQUMsS0FBSztJQUNwQyxLQUFLLEVBQUUsV0FBVztDQUNuQixFQUNELGdCQUFZLENBQUMsUUFBUSxDQUFDLE1BQU0sRUFDNUI7SUFDRSxRQUFRLEVBQUUsSUFBSTtDQUNmLENBQ0YsQ0FBQSJ9
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const fulfillment_1 = __importDefault(require("@medusajs/medusa/fulfillment"));
|
|
8
|
+
const offer_1 = __importDefault(require("../modules/offer"));
|
|
9
|
+
exports.default = (0, utils_1.defineLink)({
|
|
10
|
+
linkable: offer_1.default.linkable.offer,
|
|
11
|
+
field: "shipping_profile_id",
|
|
12
|
+
}, fulfillment_1.default.linkable.shippingProfile, {
|
|
13
|
+
readOnly: true,
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2ZmZXItc2hpcHBpbmctcHJvZmlsZS1saW5rLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpbmtzL29mZmVyLXNoaXBwaW5nLXByb2ZpbGUtbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUFzRDtBQUN0RCwrRUFBNEQ7QUFDNUQsNkRBQTBDO0FBRTFDLGtCQUFlLElBQUEsa0JBQVUsRUFDdkI7SUFDRSxRQUFRLEVBQUUsZUFBVyxDQUFDLFFBQVEsQ0FBQyxLQUFLO0lBQ3BDLEtBQUssRUFBRSxxQkFBcUI7Q0FDN0IsRUFDRCxxQkFBaUIsQ0FBQyxRQUFRLENBQUMsZUFBZSxFQUMxQztJQUNFLFFBQVEsRUFBRSxJQUFJO0NBQ2YsQ0FDRixDQUFBIn0=
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const product_1 = __importDefault(require("@medusajs/medusa/product"));
|
|
8
|
+
const offer_1 = __importDefault(require("../modules/offer"));
|
|
9
|
+
exports.default = (0, utils_1.defineLink)({
|
|
10
|
+
linkable: offer_1.default.linkable.offer,
|
|
11
|
+
field: "variant_id",
|
|
12
|
+
}, product_1.default.linkable.productVariant, {
|
|
13
|
+
readOnly: true,
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2ZmZXItdmFyaWFudC1saW5rLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpbmtzL29mZmVyLXZhcmlhbnQtbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUFzRDtBQUN0RCx1RUFBb0Q7QUFDcEQsNkRBQTBDO0FBRTFDLGtCQUFlLElBQUEsa0JBQVUsRUFDdkI7SUFDRSxRQUFRLEVBQUUsZUFBVyxDQUFDLFFBQVEsQ0FBQyxLQUFLO0lBQ3BDLEtBQUssRUFBRSxZQUFZO0NBQ3BCLEVBQ0QsaUJBQWEsQ0FBQyxRQUFRLENBQUMsY0FBYyxFQUNyQztJQUNFLFFBQVEsRUFBRSxJQUFJO0NBQ2YsQ0FDRixDQUFBIn0=
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const order_1 = __importDefault(require("@medusajs/medusa/order"));
|
|
8
|
+
const offer_1 = __importDefault(require("../modules/offer"));
|
|
9
|
+
// One offer can be referenced by many order line items (one per child
|
|
10
|
+
// order across many order groups). Without `isList: true` on the
|
|
11
|
+
// order-line-item side, Medusa enforces a 1:1 order_line_item ↔ offer
|
|
12
|
+
// relationship, which blocks any order from re-using an offer that was
|
|
13
|
+
// ever placed before.
|
|
14
|
+
exports.default = (0, utils_1.defineLink)({
|
|
15
|
+
linkable: order_1.default.linkable.orderLineItem,
|
|
16
|
+
isList: true,
|
|
17
|
+
}, offer_1.default.linkable.offer);
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JkZXItbGluZS1pdGVtLW9mZmVyLWxpbmsuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbGlua3Mvb3JkZXItbGluZS1pdGVtLW9mZmVyLWxpbmsudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxREFBc0Q7QUFDdEQsbUVBQWdEO0FBQ2hELDZEQUEwQztBQUUxQyxzRUFBc0U7QUFDdEUsaUVBQWlFO0FBQ2pFLHNFQUFzRTtBQUN0RSx1RUFBdUU7QUFDdkUsc0JBQXNCO0FBQ3RCLGtCQUFlLElBQUEsa0JBQVUsRUFDdkI7SUFDRSxRQUFRLEVBQUUsZUFBVyxDQUFDLFFBQVEsQ0FBQyxhQUFhO0lBQzVDLE1BQU0sRUFBRSxJQUFJO0NBQ2IsRUFDRCxlQUFXLENBQUMsUUFBUSxDQUFDLEtBQUssQ0FDM0IsQ0FBQSJ9
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProductCategory ↔ ProductAttribute pivot link.
|
|
3
|
+
*
|
|
4
|
+
* `defineLink` derives the on-service field-alias from
|
|
5
|
+
* `pluralize(aliasB)`. Without an explicit alias, the linkable's
|
|
6
|
+
* intrinsic field (`productAttribute`) pluralises to
|
|
7
|
+
* `product_attributes` on the category side and the link-service
|
|
8
|
+
* composition collides with the productAttribute service's
|
|
9
|
+
* auto-registered aliases. We rename both sides so that:
|
|
10
|
+
* - `productCategory.categories` is NOT the property added here
|
|
11
|
+
* (irrelevant for category service);
|
|
12
|
+
* - `productAttribute.categories` IS the property added (queried by
|
|
13
|
+
* `/vendor/product-attributes` `*categories` field).
|
|
14
|
+
*/
|
|
15
|
+
declare const _default: import("@medusajs/framework/utils").DefineLinkExport;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const product_1 = __importDefault(require("@medusajs/medusa/product"));
|
|
8
|
+
const product_attribute_1 = __importDefault(require("../modules/product-attribute"));
|
|
9
|
+
/**
|
|
10
|
+
* ProductCategory ↔ ProductAttribute pivot link.
|
|
11
|
+
*
|
|
12
|
+
* `defineLink` derives the on-service field-alias from
|
|
13
|
+
* `pluralize(aliasB)`. Without an explicit alias, the linkable's
|
|
14
|
+
* intrinsic field (`productAttribute`) pluralises to
|
|
15
|
+
* `product_attributes` on the category side and the link-service
|
|
16
|
+
* composition collides with the productAttribute service's
|
|
17
|
+
* auto-registered aliases. We rename both sides so that:
|
|
18
|
+
* - `productCategory.categories` is NOT the property added here
|
|
19
|
+
* (irrelevant for category service);
|
|
20
|
+
* - `productAttribute.categories` IS the property added (queried by
|
|
21
|
+
* `/vendor/product-attributes` `*categories` field).
|
|
22
|
+
*/
|
|
23
|
+
exports.default = (0, utils_1.defineLink)({
|
|
24
|
+
linkable: {
|
|
25
|
+
...product_1.default.linkable.productCategory.id,
|
|
26
|
+
alias: "category",
|
|
27
|
+
},
|
|
28
|
+
isList: true,
|
|
29
|
+
}, {
|
|
30
|
+
linkable: {
|
|
31
|
+
...product_attribute_1.default.linkable.productAttribute.id,
|
|
32
|
+
alias: "owning_attribute",
|
|
33
|
+
},
|
|
34
|
+
isList: true,
|
|
35
|
+
}, {
|
|
36
|
+
database: {
|
|
37
|
+
table: "product_category_attribute",
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1hdHRyaWJ1dGUtY2F0ZWdvcnktbGluay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saW5rcy9wcm9kdWN0LWF0dHJpYnV0ZS1jYXRlZ29yeS1saW5rLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEscURBQXNEO0FBQ3RELHVFQUFvRDtBQUVwRCxxRkFBaUU7QUFFakU7Ozs7Ozs7Ozs7Ozs7R0FhRztBQUNILGtCQUFlLElBQUEsa0JBQVUsRUFDdkI7SUFDRSxRQUFRLEVBQUU7UUFDUixHQUFHLGlCQUFhLENBQUMsUUFBUSxDQUFDLGVBQWUsQ0FBQyxFQUFFO1FBQzVDLEtBQUssRUFBRSxVQUFVO0tBQ2xCO0lBQ0QsTUFBTSxFQUFFLElBQUk7Q0FDYixFQUNEO0lBQ0UsUUFBUSxFQUFFO1FBQ1IsR0FBRywyQkFBc0IsQ0FBQyxRQUFRLENBQUMsZ0JBQWdCLENBQUMsRUFBRTtRQUN0RCxLQUFLLEVBQUUsa0JBQWtCO0tBQzFCO0lBQ0QsTUFBTSxFQUFFLElBQUk7Q0FDYixFQUNEO0lBQ0UsUUFBUSxFQUFFO1FBQ1IsS0FBSyxFQUFFLDRCQUE0QjtLQUNwQztDQUNGLENBQ0YsQ0FBQSJ9
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read-only link Product → ProductAttribute (product-scoped attributes).
|
|
3
|
+
* `ProductAttribute.product_id` is the FK; global attributes have it NULL.
|
|
4
|
+
* Exposes the scoped attributes under `product.scoped_attributes`.
|
|
5
|
+
*
|
|
6
|
+
* Same pattern as `product-change-link.ts`: no pivot table — the FK lives
|
|
7
|
+
* directly on the child row, and the link is read-only.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: import("@medusajs/framework/utils").DefineLinkExport;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const product_1 = __importDefault(require("@medusajs/medusa/product"));
|
|
8
|
+
const product_attribute_1 = __importDefault(require("../modules/product-attribute"));
|
|
9
|
+
/**
|
|
10
|
+
* Read-only link Product → ProductAttribute (product-scoped attributes).
|
|
11
|
+
* `ProductAttribute.product_id` is the FK; global attributes have it NULL.
|
|
12
|
+
* Exposes the scoped attributes under `product.scoped_attributes`.
|
|
13
|
+
*
|
|
14
|
+
* Same pattern as `product-change-link.ts`: no pivot table — the FK lives
|
|
15
|
+
* directly on the child row, and the link is read-only.
|
|
16
|
+
*/
|
|
17
|
+
exports.default = (0, utils_1.defineLink)({
|
|
18
|
+
linkable: product_1.default.linkable.product,
|
|
19
|
+
field: "id",
|
|
20
|
+
isList: true,
|
|
21
|
+
}, {
|
|
22
|
+
...product_attribute_1.default.linkable.productAttribute.id,
|
|
23
|
+
alias: "scoped_attributes",
|
|
24
|
+
primaryKey: "product_id",
|
|
25
|
+
isList: true,
|
|
26
|
+
}, {
|
|
27
|
+
readOnly: true,
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1hdHRyaWJ1dGUtcHJvZHVjdC1saW5rLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpbmtzL3Byb2R1Y3QtYXR0cmlidXRlLXByb2R1Y3QtbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUFzRDtBQUN0RCx1RUFBb0Q7QUFFcEQscUZBQWlFO0FBRWpFOzs7Ozs7O0dBT0c7QUFDSCxrQkFBZSxJQUFBLGtCQUFVLEVBQ3ZCO0lBQ0UsUUFBUSxFQUFFLGlCQUFhLENBQUMsUUFBUSxDQUFDLE9BQU87SUFDeEMsS0FBSyxFQUFFLElBQUk7SUFDWCxNQUFNLEVBQUUsSUFBSTtDQUNiLEVBQ0Q7SUFDRSxHQUFHLDJCQUFzQixDQUFDLFFBQVEsQ0FBQyxnQkFBZ0IsQ0FBQyxFQUFFO0lBQ3RELEtBQUssRUFBRSxtQkFBbUI7SUFDMUIsVUFBVSxFQUFFLFlBQVk7SUFDeEIsTUFBTSxFQUFFLElBQUk7Q0FDYixFQUNEO0lBQ0UsUUFBUSxFQUFFLElBQUk7Q0FDZixDQUNGLENBQUEifQ==
|
|
@@ -1,2 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product ↔ ProductAttributeValue pivot link.
|
|
3
|
+
*
|
|
4
|
+
* Why both sides set `alias` inside the `linkable` payload (not at the
|
|
5
|
+
* top level of the input):
|
|
6
|
+
*
|
|
7
|
+
* - `defineLink` infers the link-service name from `aliasA + "_" + aliasB`.
|
|
8
|
+
* The product-attribute service already auto-registers
|
|
9
|
+
* `product_attribute_value` as an alias, so the default composition
|
|
10
|
+
* (`product` + `product_attribute_value`) collides. We rename
|
|
11
|
+
* `aliasA` to `owning_product` to break that.
|
|
12
|
+
* - `prepareServiceConfig`'s InputSource branch (triggered when the
|
|
13
|
+
* top-level input has `serviceName`) hardcodes `isList: false`,
|
|
14
|
+
* stripping our intent. By embedding the alias inside the `linkable`
|
|
15
|
+
* object we stay on the InputOptions branch, which preserves
|
|
16
|
+
* `isList: true` and derives the property as
|
|
17
|
+
* `pluralize(alias)` — `attribute_values` on the product side
|
|
18
|
+
* (matches what `formatProductAttributes` and the `[id]/attributes`
|
|
19
|
+
* routes already query).
|
|
20
|
+
*/
|
|
1
21
|
declare const _default: import("@medusajs/framework/utils").DefineLinkExport;
|
|
2
22
|
export default _default;
|
|
@@ -5,12 +5,42 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const utils_1 = require("@medusajs/framework/utils");
|
|
7
7
|
const product_1 = __importDefault(require("@medusajs/medusa/product"));
|
|
8
|
-
const
|
|
8
|
+
const product_attribute_1 = __importDefault(require("../modules/product-attribute"));
|
|
9
|
+
/**
|
|
10
|
+
* Product ↔ ProductAttributeValue pivot link.
|
|
11
|
+
*
|
|
12
|
+
* Why both sides set `alias` inside the `linkable` payload (not at the
|
|
13
|
+
* top level of the input):
|
|
14
|
+
*
|
|
15
|
+
* - `defineLink` infers the link-service name from `aliasA + "_" + aliasB`.
|
|
16
|
+
* The product-attribute service already auto-registers
|
|
17
|
+
* `product_attribute_value` as an alias, so the default composition
|
|
18
|
+
* (`product` + `product_attribute_value`) collides. We rename
|
|
19
|
+
* `aliasA` to `owning_product` to break that.
|
|
20
|
+
* - `prepareServiceConfig`'s InputSource branch (triggered when the
|
|
21
|
+
* top-level input has `serviceName`) hardcodes `isList: false`,
|
|
22
|
+
* stripping our intent. By embedding the alias inside the `linkable`
|
|
23
|
+
* object we stay on the InputOptions branch, which preserves
|
|
24
|
+
* `isList: true` and derives the property as
|
|
25
|
+
* `pluralize(alias)` — `attribute_values` on the product side
|
|
26
|
+
* (matches what `formatProductAttributes` and the `[id]/attributes`
|
|
27
|
+
* routes already query).
|
|
28
|
+
*/
|
|
9
29
|
exports.default = (0, utils_1.defineLink)({
|
|
10
|
-
linkable:
|
|
30
|
+
linkable: {
|
|
31
|
+
...product_1.default.linkable.product.id,
|
|
32
|
+
alias: "owning_product",
|
|
33
|
+
},
|
|
11
34
|
isList: true,
|
|
12
35
|
}, {
|
|
13
|
-
linkable:
|
|
36
|
+
linkable: {
|
|
37
|
+
...product_attribute_1.default.linkable.productAttributeValue.id,
|
|
38
|
+
alias: "attribute_value",
|
|
39
|
+
},
|
|
14
40
|
isList: true,
|
|
41
|
+
}, {
|
|
42
|
+
database: {
|
|
43
|
+
table: "product_attribute_value_link",
|
|
44
|
+
},
|
|
15
45
|
});
|
|
16
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1hdHRyaWJ1dGUtdmFsdWUtbGluay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saW5rcy9wcm9kdWN0LWF0dHJpYnV0ZS12YWx1ZS1saW5rLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEscURBQXNEO0FBQ3RELHVFQUFvRDtBQUVwRCxxRkFBaUU7QUFFakU7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FtQkc7QUFDSCxrQkFBZSxJQUFBLGtCQUFVLEVBQ3ZCO0lBQ0UsUUFBUSxFQUFFO1FBQ1IsR0FBRyxpQkFBYSxDQUFDLFFBQVEsQ0FBQyxPQUFPLENBQUMsRUFBRTtRQUNwQyxLQUFLLEVBQUUsZ0JBQWdCO0tBQ3hCO0lBQ0QsTUFBTSxFQUFFLElBQUk7Q0FDYixFQUNEO0lBQ0UsUUFBUSxFQUFFO1FBQ1IsR0FBRywyQkFBc0IsQ0FBQyxRQUFRLENBQUMscUJBQXFCLENBQUMsRUFBRTtRQUMzRCxLQUFLLEVBQUUsaUJBQWlCO0tBQ3pCO0lBQ0QsTUFBTSxFQUFFLElBQUk7Q0FDYixFQUNEO0lBQ0UsUUFBUSxFQUFFO1FBQ1IsS0FBSyxFQUFFLDhCQUE4QjtLQUN0QztDQUNGLENBQ0YsQ0FBQSJ9
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read-only link Product → ProductChange.
|
|
3
|
+
* `ProductChange.product_id` references `Product.id`. No pivot table —
|
|
4
|
+
* the FK column lives directly on the change row. The `alias: "changes"`
|
|
5
|
+
* exposes the list under `product.changes` for audit-history reads.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: import("@medusajs/framework/utils").DefineLinkExport;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const product_1 = __importDefault(require("@medusajs/medusa/product"));
|
|
8
|
+
const product_edit_1 = __importDefault(require("../modules/product-edit"));
|
|
9
|
+
/**
|
|
10
|
+
* Read-only link Product → ProductChange.
|
|
11
|
+
* `ProductChange.product_id` references `Product.id`. No pivot table —
|
|
12
|
+
* the FK column lives directly on the change row. The `alias: "changes"`
|
|
13
|
+
* exposes the list under `product.changes` for audit-history reads.
|
|
14
|
+
*/
|
|
15
|
+
exports.default = (0, utils_1.defineLink)({
|
|
16
|
+
linkable: product_1.default.linkable.product,
|
|
17
|
+
field: "id",
|
|
18
|
+
isList: true,
|
|
19
|
+
}, {
|
|
20
|
+
...product_edit_1.default.linkable.productChange.id,
|
|
21
|
+
alias: "changes",
|
|
22
|
+
primaryKey: "product_id",
|
|
23
|
+
isList: true,
|
|
24
|
+
}, {
|
|
25
|
+
readOnly: true,
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1jaGFuZ2UtbGluay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saW5rcy9wcm9kdWN0LWNoYW5nZS1saW5rLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEscURBQXNEO0FBQ3RELHVFQUFvRDtBQUVwRCwyRUFBeUQ7QUFFekQ7Ozs7O0dBS0c7QUFDSCxrQkFBZSxJQUFBLGtCQUFVLEVBQ3ZCO0lBQ0UsUUFBUSxFQUFFLGlCQUFhLENBQUMsUUFBUSxDQUFDLE9BQU87SUFDeEMsS0FBSyxFQUFFLElBQUk7SUFDWCxNQUFNLEVBQUUsSUFBSTtDQUNiLEVBQ0Q7SUFDRSxHQUFHLHNCQUFtQixDQUFDLFFBQVEsQ0FBQyxhQUFhLENBQUMsRUFBRTtJQUNoRCxLQUFLLEVBQUUsU0FBUztJQUNoQixVQUFVLEVBQUUsWUFBWTtJQUN4QixNQUFNLEVBQUUsSUFBSTtDQUNiLEVBQ0Q7SUFDRSxRQUFRLEVBQUUsSUFBSTtDQUNmLENBQ0YsQ0FBQSJ9
|
|
@@ -6,5 +6,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const utils_1 = require("@medusajs/framework/utils");
|
|
7
7
|
const product_1 = __importDefault(require("@medusajs/medusa/product"));
|
|
8
8
|
const seller_1 = __importDefault(require("../modules/seller"));
|
|
9
|
-
exports.default = (0, utils_1.defineLink)({
|
|
10
|
-
|
|
9
|
+
exports.default = (0, utils_1.defineLink)({
|
|
10
|
+
linkable: product_1.default.linkable.product,
|
|
11
|
+
isList: true,
|
|
12
|
+
}, {
|
|
13
|
+
linkable: seller_1.default.linkable.seller,
|
|
14
|
+
isList: true,
|
|
15
|
+
}, {
|
|
16
|
+
database: {
|
|
17
|
+
table: "product_seller",
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1zZWxsZXItbGluay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saW5rcy9wcm9kdWN0LXNlbGxlci1saW5rLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEscURBQXNEO0FBQ3RELHVFQUFvRDtBQUNwRCwrREFBNEM7QUFFNUMsa0JBQWUsSUFBQSxrQkFBVSxFQUN2QjtJQUNFLFFBQVEsRUFBRSxpQkFBYSxDQUFDLFFBQVEsQ0FBQyxPQUFPO0lBQ3hDLE1BQU0sRUFBRSxJQUFJO0NBQ2IsRUFDRDtJQUNFLFFBQVEsRUFBRSxnQkFBWSxDQUFDLFFBQVEsQ0FBQyxNQUFNO0lBQ3RDLE1BQU0sRUFBRSxJQUFJO0NBQ2IsRUFDRDtJQUNFLFFBQVEsRUFBRTtRQUNSLEtBQUssRUFBRSxnQkFBZ0I7S0FDeEI7Q0FDRixDQUNGLENBQUEifQ==
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const product_1 = __importDefault(require("@medusajs/medusa/product"));
|
|
8
|
+
const product_attribute_1 = __importDefault(require("../modules/product-attribute"));
|
|
9
|
+
exports.default = (0, utils_1.defineLink)({
|
|
10
|
+
linkable: product_1.default.linkable.product,
|
|
11
|
+
isList: true,
|
|
12
|
+
}, {
|
|
13
|
+
linkable: product_attribute_1.default.linkable.productAttribute,
|
|
14
|
+
field: "variant_attribute",
|
|
15
|
+
isList: true,
|
|
16
|
+
}, {
|
|
17
|
+
database: {
|
|
18
|
+
table: "product_variant_attribute",
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC12YXJpYW50LWF0dHJpYnV0ZS1saW5rLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpbmtzL3Byb2R1Y3QtdmFyaWFudC1hdHRyaWJ1dGUtbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUFzRDtBQUN0RCx1RUFBb0Q7QUFFcEQscUZBQWlFO0FBRWpFLGtCQUFlLElBQUEsa0JBQVUsRUFDdkI7SUFDRSxRQUFRLEVBQUUsaUJBQWEsQ0FBQyxRQUFRLENBQUMsT0FBTztJQUN4QyxNQUFNLEVBQUUsSUFBSTtDQUNiLEVBQ0Q7SUFDRSxRQUFRLEVBQUUsMkJBQXNCLENBQUMsUUFBUSxDQUFDLGdCQUFnQjtJQUMxRCxLQUFLLEVBQUUsbUJBQW1CO0lBQzFCLE1BQU0sRUFBRSxJQUFJO0NBQ2IsRUFDRDtJQUNFLFFBQVEsRUFBRTtRQUNSLEtBQUssRUFBRSwyQkFBMkI7S0FDbkM7Q0FDRixDQUNGLENBQUEifQ==
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
7
|
+
const product_1 = __importDefault(require("@medusajs/medusa/product"));
|
|
8
|
+
const product_attribute_1 = __importDefault(require("../modules/product-attribute"));
|
|
9
|
+
exports.default = (0, utils_1.defineLink)({
|
|
10
|
+
linkable: product_1.default.linkable.productVariant,
|
|
11
|
+
isList: true,
|
|
12
|
+
}, {
|
|
13
|
+
linkable: product_attribute_1.default.linkable.productAttributeValue,
|
|
14
|
+
field: "attribute_value",
|
|
15
|
+
isList: true,
|
|
16
|
+
}, {
|
|
17
|
+
database: {
|
|
18
|
+
table: "product_variant_attribute_value",
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC12YXJpYW50LWF0dHJpYnV0ZS12YWx1ZS1saW5rLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpbmtzL3Byb2R1Y3QtdmFyaWFudC1hdHRyaWJ1dGUtdmFsdWUtbGluay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUFzRDtBQUN0RCx1RUFBb0Q7QUFFcEQscUZBQWlFO0FBRWpFLGtCQUFlLElBQUEsa0JBQVUsRUFDdkI7SUFDRSxRQUFRLEVBQUUsaUJBQWEsQ0FBQyxRQUFRLENBQUMsY0FBYztJQUMvQyxNQUFNLEVBQUUsSUFBSTtDQUNiLEVBQ0Q7SUFDRSxRQUFRLEVBQUUsMkJBQXNCLENBQUMsUUFBUSxDQUFDLHFCQUFxQjtJQUMvRCxLQUFLLEVBQUUsaUJBQWlCO0lBQ3hCLE1BQU0sRUFBRSxJQUFJO0NBQ2IsRUFDRDtJQUNFLFFBQVEsRUFBRTtRQUNSLEtBQUssRUFBRSxpQ0FBaUM7S0FDekM7Q0FDRixDQUNGLENBQUEifQ==
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MercurModules } from "@mercurjs/types";
|
|
2
|
+
import OfferModuleService from "./service";
|
|
3
|
+
declare const _default: import("@mercurjs/types").ModuleExports<typeof OfferModuleService> & {
|
|
4
|
+
linkable: {
|
|
5
|
+
readonly offer: {
|
|
6
|
+
id: {
|
|
7
|
+
serviceName: MercurModules.OFFER;
|
|
8
|
+
field: "offer";
|
|
9
|
+
linkable: "offer_id";
|
|
10
|
+
primaryKey: "id";
|
|
11
|
+
};
|
|
12
|
+
toJSON: () => {
|
|
13
|
+
serviceName: MercurModules.OFFER;
|
|
14
|
+
field: "offer";
|
|
15
|
+
linkable: "offer_id";
|
|
16
|
+
primaryKey: "id";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const utils_1 = require("@medusajs/framework/utils");
|
|
7
7
|
const types_1 = require("@mercurjs/types");
|
|
8
8
|
const service_1 = __importDefault(require("./service"));
|
|
9
|
-
exports.default = (0, utils_1.Module)(types_1.MercurModules.
|
|
9
|
+
exports.default = (0, utils_1.Module)(types_1.MercurModules.OFFER, {
|
|
10
10
|
service: service_1.default,
|
|
11
11
|
});
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9vZmZlci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHFEQUFrRDtBQUNsRCwyQ0FBK0M7QUFFL0Msd0RBQTBDO0FBRTFDLGtCQUFlLElBQUEsY0FBTSxFQUFDLHFCQUFhLENBQUMsS0FBSyxFQUFFO0lBQ3pDLE9BQU8sRUFBRSxpQkFBa0I7Q0FDNUIsQ0FBQyxDQUFBIn0=
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20260520104835 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20260520104835 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`create table if not exists "offer" ("id" text not null, "seller_id" text not null, "variant_id" text not null, "shipping_profile_id" text not null, "price_set_id" text not null, "sku" text not null, "ean" text null, "upc" text null, "created_by" text not null, "metadata" jsonb null, "created_at" timestamptz not null default now(), "updated_at" timestamptz not null default now(), "deleted_at" timestamptz null, constraint "offer_pkey" primary key ("id"));`);
|
|
8
|
+
this.addSql(`CREATE UNIQUE INDEX IF NOT EXISTS "IDX_offer_seller_sku_unique" ON "offer" ("seller_id", "sku") WHERE deleted_at IS NULL;`);
|
|
9
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_offer_variant_id" ON "offer" ("variant_id") WHERE deleted_at IS NULL;`);
|
|
10
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_offer_seller_id" ON "offer" ("seller_id") WHERE deleted_at IS NULL;`);
|
|
11
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_offer_shipping_profile_id" ON "offer" ("shipping_profile_id") WHERE deleted_at IS NULL;`);
|
|
12
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_offer_price_set_id" ON "offer" ("price_set_id") WHERE deleted_at IS NULL;`);
|
|
13
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_offer_ean" ON "offer" ("ean") WHERE deleted_at IS NULL AND ean IS NOT NULL;`);
|
|
14
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_offer_upc" ON "offer" ("upc") WHERE deleted_at IS NULL AND upc IS NOT NULL;`);
|
|
15
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_offer_deleted_at" ON "offer" ("deleted_at") WHERE deleted_at IS NULL;`);
|
|
16
|
+
}
|
|
17
|
+
async down() {
|
|
18
|
+
this.addSql(`drop table if exists "offer" cascade;`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.Migration20260520104835 = Migration20260520104835;
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjA1MjAxMDQ4MzUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9vZmZlci9taWdyYXRpb25zL01pZ3JhdGlvbjIwMjYwNTIwMTA0ODM1LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlFQUFvRTtBQUVwRSxNQUFhLHVCQUF3QixTQUFRLHNCQUFTO0lBQzNDLEtBQUssQ0FBQyxFQUFFO1FBQ2YsSUFBSSxDQUFDLE1BQU0sQ0FDVCwyY0FBMmMsQ0FDNWMsQ0FBQTtRQUNELElBQUksQ0FBQyxNQUFNLENBQ1QsMkhBQTJILENBQzVILENBQUE7UUFDRCxJQUFJLENBQUMsTUFBTSxDQUNULHVHQUF1RyxDQUN4RyxDQUFBO1FBQ0QsSUFBSSxDQUFDLE1BQU0sQ0FDVCxxR0FBcUcsQ0FDdEcsQ0FBQTtRQUNELElBQUksQ0FBQyxNQUFNLENBQ1QseUhBQXlILENBQzFILENBQUE7UUFDRCxJQUFJLENBQUMsTUFBTSxDQUNULDJHQUEyRyxDQUM1RyxDQUFBO1FBQ0QsSUFBSSxDQUFDLE1BQU0sQ0FDVCw2R0FBNkcsQ0FDOUcsQ0FBQTtRQUNELElBQUksQ0FBQyxNQUFNLENBQ1QsNkdBQTZHLENBQzlHLENBQUE7UUFDRCxJQUFJLENBQUMsTUFBTSxDQUNULHVHQUF1RyxDQUN4RyxDQUFBO0lBQ0gsQ0FBQztJQUVRLEtBQUssQ0FBQyxJQUFJO1FBQ2pCLElBQUksQ0FBQyxNQUFNLENBQUMsdUNBQXVDLENBQUMsQ0FBQTtJQUN0RCxDQUFDO0NBQ0Y7QUFsQ0QsMERBa0NDIn0=
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20260526000000 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20260526000000 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`DROP INDEX IF EXISTS "IDX_offer_price_set_id";`);
|
|
8
|
+
this.addSql(`ALTER TABLE "offer" DROP COLUMN IF EXISTS "price_set_id";`);
|
|
9
|
+
}
|
|
10
|
+
async down() {
|
|
11
|
+
this.addSql(`ALTER TABLE "offer" ADD COLUMN IF NOT EXISTS "price_set_id" text NOT NULL DEFAULT '';`);
|
|
12
|
+
this.addSql(`CREATE INDEX IF NOT EXISTS "IDX_offer_price_set_id" ON "offer" ("price_set_id") WHERE deleted_at IS NULL;`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.Migration20260526000000 = Migration20260526000000;
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjA1MjYwMDAwMDAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9vZmZlci9taWdyYXRpb25zL01pZ3JhdGlvbjIwMjYwNTI2MDAwMDAwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlFQUFvRTtBQUVwRSxNQUFhLHVCQUF3QixTQUFRLHNCQUFTO0lBQzNDLEtBQUssQ0FBQyxFQUFFO1FBQ2YsSUFBSSxDQUFDLE1BQU0sQ0FBQyxnREFBZ0QsQ0FBQyxDQUFBO1FBQzdELElBQUksQ0FBQyxNQUFNLENBQ1QsMkRBQTJELENBQzVELENBQUE7SUFDSCxDQUFDO0lBRVEsS0FBSyxDQUFDLElBQUk7UUFDakIsSUFBSSxDQUFDLE1BQU0sQ0FDVCx1RkFBdUYsQ0FDeEYsQ0FBQTtRQUNELElBQUksQ0FBQyxNQUFNLENBQ1QsMkdBQTJHLENBQzVHLENBQUE7SUFDSCxDQUFDO0NBQ0Y7QUFoQkQsMERBZ0JDIn0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Offer } from "./offer";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Offer = void 0;
|
|
7
|
+
var offer_1 = require("./offer");
|
|
8
|
+
Object.defineProperty(exports, "Offer", { enumerable: true, get: function () { return __importDefault(offer_1).default; } });
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9vZmZlci9tb2RlbHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsaUNBQTBDO0FBQWpDLCtHQUFBLE9BQU8sT0FBUyJ9
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const Offer: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
2
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
3
|
+
seller_id: import("@medusajs/framework/utils").TextProperty;
|
|
4
|
+
variant_id: import("@medusajs/framework/utils").TextProperty;
|
|
5
|
+
shipping_profile_id: import("@medusajs/framework/utils").TextProperty;
|
|
6
|
+
sku: import("@medusajs/framework/utils").TextProperty;
|
|
7
|
+
ean: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
8
|
+
upc: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
9
|
+
created_by: import("@medusajs/framework/utils").TextProperty;
|
|
10
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
11
|
+
}>, "Offer">;
|
|
12
|
+
export default Offer;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
4
|
+
const Offer = utils_1.model
|
|
5
|
+
.define("Offer", {
|
|
6
|
+
id: utils_1.model.id({ prefix: "offer" }).primaryKey(),
|
|
7
|
+
seller_id: utils_1.model.text(),
|
|
8
|
+
variant_id: utils_1.model.text(),
|
|
9
|
+
shipping_profile_id: utils_1.model.text(),
|
|
10
|
+
sku: utils_1.model.text().searchable(),
|
|
11
|
+
ean: utils_1.model.text().searchable().nullable(),
|
|
12
|
+
upc: utils_1.model.text().searchable().nullable(),
|
|
13
|
+
created_by: utils_1.model.text(),
|
|
14
|
+
metadata: utils_1.model.json().nullable(),
|
|
15
|
+
})
|
|
16
|
+
.indexes([
|
|
17
|
+
{
|
|
18
|
+
name: "IDX_offer_seller_sku_unique",
|
|
19
|
+
on: ["seller_id", "sku"],
|
|
20
|
+
unique: true,
|
|
21
|
+
where: "deleted_at IS NULL",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "IDX_offer_variant_id",
|
|
25
|
+
on: ["variant_id"],
|
|
26
|
+
where: "deleted_at IS NULL",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "IDX_offer_seller_id",
|
|
30
|
+
on: ["seller_id"],
|
|
31
|
+
where: "deleted_at IS NULL",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "IDX_offer_shipping_profile_id",
|
|
35
|
+
on: ["shipping_profile_id"],
|
|
36
|
+
where: "deleted_at IS NULL",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "IDX_offer_ean",
|
|
40
|
+
on: ["ean"],
|
|
41
|
+
where: "deleted_at IS NULL AND ean IS NOT NULL",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "IDX_offer_upc",
|
|
45
|
+
on: ["upc"],
|
|
46
|
+
where: "deleted_at IS NULL AND upc IS NOT NULL",
|
|
47
|
+
},
|
|
48
|
+
]);
|
|
49
|
+
exports.default = Offer;
|
|
50
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2ZmZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9vZmZlci9tb2RlbHMvb2ZmZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxxREFBaUQ7QUFFakQsTUFBTSxLQUFLLEdBQUcsYUFBSztLQUNoQixNQUFNLENBQUMsT0FBTyxFQUFFO0lBQ2YsRUFBRSxFQUFFLGFBQUssQ0FBQyxFQUFFLENBQUMsRUFBRSxNQUFNLEVBQUUsT0FBTyxFQUFFLENBQUMsQ0FBQyxVQUFVLEVBQUU7SUFDOUMsU0FBUyxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUU7SUFDdkIsVUFBVSxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUU7SUFDeEIsbUJBQW1CLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRTtJQUNqQyxHQUFHLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFVBQVUsRUFBRTtJQUM5QixHQUFHLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFVBQVUsRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUN6QyxHQUFHLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFVBQVUsRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUN6QyxVQUFVLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRTtJQUN4QixRQUFRLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFFBQVEsRUFBRTtDQUNsQyxDQUFDO0tBQ0QsT0FBTyxDQUFDO0lBQ1A7UUFDRSxJQUFJLEVBQUUsNkJBQTZCO1FBQ25DLEVBQUUsRUFBRSxDQUFDLFdBQVcsRUFBRSxLQUFLLENBQUM7UUFDeEIsTUFBTSxFQUFFLElBQUk7UUFDWixLQUFLLEVBQUUsb0JBQW9CO0tBQzVCO0lBQ0Q7UUFDRSxJQUFJLEVBQUUsc0JBQXNCO1FBQzVCLEVBQUUsRUFBRSxDQUFDLFlBQVksQ0FBQztRQUNsQixLQUFLLEVBQUUsb0JBQW9CO0tBQzVCO0lBQ0Q7UUFDRSxJQUFJLEVBQUUscUJBQXFCO1FBQzNCLEVBQUUsRUFBRSxDQUFDLFdBQVcsQ0FBQztRQUNqQixLQUFLLEVBQUUsb0JBQW9CO0tBQzVCO0lBQ0Q7UUFDRSxJQUFJLEVBQUUsK0JBQStCO1FBQ3JDLEVBQUUsRUFBRSxDQUFDLHFCQUFxQixDQUFDO1FBQzNCLEtBQUssRUFBRSxvQkFBb0I7S0FDNUI7SUFDRDtRQUNFLElBQUksRUFBRSxlQUFlO1FBQ3JCLEVBQUUsRUFBRSxDQUFDLEtBQUssQ0FBQztRQUNYLEtBQUssRUFBRSx3Q0FBd0M7S0FDaEQ7SUFDRDtRQUNFLElBQUksRUFBRSxlQUFlO1FBQ3JCLEVBQUUsRUFBRSxDQUFDLEtBQUssQ0FBQztRQUNYLEtBQUssRUFBRSx3Q0FBd0M7S0FDaEQ7Q0FDRixDQUFDLENBQUE7QUFFSixrQkFBZSxLQUFLLENBQUEifQ==
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const OfferModuleService_base: import("@medusajs/framework/utils").MedusaServiceReturnType<import("@medusajs/framework/utils").ModelConfigurationsToConfigTemplate<{
|
|
2
|
+
readonly Offer: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
3
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
4
|
+
seller_id: import("@medusajs/framework/utils").TextProperty;
|
|
5
|
+
variant_id: import("@medusajs/framework/utils").TextProperty;
|
|
6
|
+
shipping_profile_id: import("@medusajs/framework/utils").TextProperty;
|
|
7
|
+
sku: import("@medusajs/framework/utils").TextProperty;
|
|
8
|
+
ean: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
9
|
+
upc: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
10
|
+
created_by: import("@medusajs/framework/utils").TextProperty;
|
|
11
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
12
|
+
}>, "Offer">;
|
|
13
|
+
}>>;
|
|
14
|
+
declare class OfferModuleService extends OfferModuleService_base {
|
|
15
|
+
}
|
|
16
|
+
export default OfferModuleService;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
4
|
+
const models_1 = require("./models");
|
|
5
|
+
class OfferModuleService extends (0, utils_1.MedusaService)({
|
|
6
|
+
Offer: models_1.Offer,
|
|
7
|
+
}) {
|
|
8
|
+
}
|
|
9
|
+
exports.default = OfferModuleService;
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tb2R1bGVzL29mZmVyL3NlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxxREFBeUQ7QUFFekQscUNBQWdDO0FBRWhDLE1BQU0sa0JBQW1CLFNBQVEsSUFBQSxxQkFBYSxFQUFDO0lBQzdDLEtBQUssRUFBTCxjQUFLO0NBQ04sQ0FBQztDQUFHO0FBRUwsa0JBQWUsa0JBQWtCLENBQUEifQ==
|