@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,36 @@
|
|
|
1
|
+
import { MercurModules } from "@mercurjs/types";
|
|
2
|
+
import ProductAttributeModuleService from "./service";
|
|
3
|
+
export { ProductAttributeModuleService };
|
|
4
|
+
declare const _default: import("@mercurjs/types").ModuleExports<typeof ProductAttributeModuleService> & {
|
|
5
|
+
linkable: {
|
|
6
|
+
readonly productAttribute: {
|
|
7
|
+
id: {
|
|
8
|
+
serviceName: MercurModules.PRODUCT_ATTRIBUTE;
|
|
9
|
+
field: "productAttribute";
|
|
10
|
+
linkable: "product_attribute_id";
|
|
11
|
+
primaryKey: "id";
|
|
12
|
+
};
|
|
13
|
+
toJSON: () => {
|
|
14
|
+
serviceName: MercurModules.PRODUCT_ATTRIBUTE;
|
|
15
|
+
field: "productAttribute";
|
|
16
|
+
linkable: "product_attribute_id";
|
|
17
|
+
primaryKey: "id";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
readonly productAttributeValue: {
|
|
21
|
+
id: {
|
|
22
|
+
serviceName: MercurModules.PRODUCT_ATTRIBUTE;
|
|
23
|
+
field: "productAttributeValue";
|
|
24
|
+
linkable: "product_attribute_value_id";
|
|
25
|
+
primaryKey: "id";
|
|
26
|
+
};
|
|
27
|
+
toJSON: () => {
|
|
28
|
+
serviceName: MercurModules.PRODUCT_ATTRIBUTE;
|
|
29
|
+
field: "productAttributeValue";
|
|
30
|
+
linkable: "product_attribute_value_id";
|
|
31
|
+
primaryKey: "id";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
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.ProductAttributeModuleService = void 0;
|
|
7
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
8
|
+
const types_1 = require("@mercurjs/types");
|
|
9
|
+
const service_1 = __importDefault(require("./service"));
|
|
10
|
+
exports.ProductAttributeModuleService = service_1.default;
|
|
11
|
+
exports.default = (0, utils_1.Module)(types_1.MercurModules.PRODUCT_ATTRIBUTE, {
|
|
12
|
+
service: service_1.default,
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LWF0dHJpYnV0ZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxxREFBa0Q7QUFDbEQsMkNBQStDO0FBRS9DLHdEQUFxRDtBQUU1Qyx3Q0FGRixpQkFBNkIsQ0FFRTtBQUV0QyxrQkFBZSxJQUFBLGNBQU0sRUFBQyxxQkFBYSxDQUFDLGlCQUFpQixFQUFFO0lBQ3JELE9BQU8sRUFBRSxpQkFBNkI7Q0FDdkMsQ0FBQyxDQUFBIn0=
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const joinerConfig: Omit<import("@mercurjs/types").ModuleJoinerConfig, "alias" | "serviceName" | "primaryKeys" | "linkableKeys"> & Required<Pick<import("@mercurjs/types").ModuleJoinerConfig, "alias" | "serviceName" | "primaryKeys" | "linkableKeys">>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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.joinerConfig = void 0;
|
|
7
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
8
|
+
const types_1 = require("@mercurjs/types");
|
|
9
|
+
const product_attribute_1 = __importDefault(require("./models/product-attribute"));
|
|
10
|
+
const product_attribute_value_1 = __importDefault(require("./models/product-attribute-value"));
|
|
11
|
+
exports.joinerConfig = (0, utils_1.defineJoinerConfig)(types_1.MercurModules.PRODUCT_ATTRIBUTE, {
|
|
12
|
+
linkableKeys: {
|
|
13
|
+
product_attribute_id: product_attribute_1.default.name,
|
|
14
|
+
product_attribute_value_id: product_attribute_value_1.default.name,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiam9pbmVyLWNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tb2R1bGVzL3Byb2R1Y3QtYXR0cmlidXRlL2pvaW5lci1jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEscURBQThEO0FBQzlELDJDQUErQztBQUUvQyxtRkFBeUQ7QUFDekQsK0ZBQW9FO0FBRXZELFFBQUEsWUFBWSxHQUFHLElBQUEsMEJBQWtCLEVBQUMscUJBQWEsQ0FBQyxpQkFBaUIsRUFBRTtJQUM5RSxZQUFZLEVBQUU7UUFDWixvQkFBb0IsRUFBRSwyQkFBZ0IsQ0FBQyxJQUFJO1FBQzNDLDBCQUEwQixFQUFFLGlDQUFxQixDQUFDLElBQUk7S0FDdkQ7Q0FDRixDQUFDLENBQUEifQ==
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20260601000000 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20260601000000 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`
|
|
8
|
+
CREATE TABLE IF NOT EXISTS "product_attribute" (
|
|
9
|
+
"id" text NOT NULL PRIMARY KEY,
|
|
10
|
+
"handle" text NULL,
|
|
11
|
+
"name" text NOT NULL,
|
|
12
|
+
"description" text NULL,
|
|
13
|
+
"type" text NOT NULL,
|
|
14
|
+
"is_required" boolean NOT NULL DEFAULT false,
|
|
15
|
+
"is_filterable" boolean NOT NULL DEFAULT false,
|
|
16
|
+
"is_variant_axis" boolean NOT NULL DEFAULT false,
|
|
17
|
+
"rank" integer NOT NULL DEFAULT 0,
|
|
18
|
+
"is_active" boolean NOT NULL DEFAULT true,
|
|
19
|
+
"created_by" text NULL,
|
|
20
|
+
"metadata" jsonb NULL,
|
|
21
|
+
"created_at" timestamptz NOT NULL DEFAULT now(),
|
|
22
|
+
"updated_at" timestamptz NOT NULL DEFAULT now(),
|
|
23
|
+
"deleted_at" timestamptz NULL
|
|
24
|
+
);
|
|
25
|
+
`);
|
|
26
|
+
this.addSql(`
|
|
27
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "IDX_product_attribute_handle_unique"
|
|
28
|
+
ON "product_attribute" ("handle")
|
|
29
|
+
WHERE "deleted_at" IS NULL AND "handle" IS NOT NULL;
|
|
30
|
+
`);
|
|
31
|
+
this.addSql(`
|
|
32
|
+
CREATE INDEX IF NOT EXISTS "IDX_product_attribute_type"
|
|
33
|
+
ON "product_attribute" ("type")
|
|
34
|
+
WHERE "deleted_at" IS NULL;
|
|
35
|
+
`);
|
|
36
|
+
this.addSql(`
|
|
37
|
+
CREATE TABLE IF NOT EXISTS "product_attribute_value" (
|
|
38
|
+
"id" text NOT NULL PRIMARY KEY,
|
|
39
|
+
"handle" text NULL,
|
|
40
|
+
"name" text NOT NULL,
|
|
41
|
+
"rank" integer NOT NULL DEFAULT 0,
|
|
42
|
+
"is_active" boolean NOT NULL DEFAULT true,
|
|
43
|
+
"metadata" jsonb NULL,
|
|
44
|
+
"attribute_id" text NOT NULL REFERENCES "product_attribute"("id") ON DELETE CASCADE,
|
|
45
|
+
"created_at" timestamptz NOT NULL DEFAULT now(),
|
|
46
|
+
"updated_at" timestamptz NOT NULL DEFAULT now(),
|
|
47
|
+
"deleted_at" timestamptz NULL
|
|
48
|
+
);
|
|
49
|
+
`);
|
|
50
|
+
this.addSql(`
|
|
51
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "IDX_product_attribute_value_handle_unique"
|
|
52
|
+
ON "product_attribute_value" ("attribute_id", "handle")
|
|
53
|
+
WHERE "deleted_at" IS NULL AND "handle" IS NOT NULL;
|
|
54
|
+
`);
|
|
55
|
+
}
|
|
56
|
+
async down() {
|
|
57
|
+
this.addSql(`DROP TABLE IF EXISTS "product_attribute_value";`);
|
|
58
|
+
this.addSql(`DROP TABLE IF EXISTS "product_attribute";`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.Migration20260601000000 = Migration20260601000000;
|
|
62
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjA2MDEwMDAwMDAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LWF0dHJpYnV0ZS9taWdyYXRpb25zL01pZ3JhdGlvbjIwMjYwNjAxMDAwMDAwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlFQUFvRTtBQUVwRSxNQUFhLHVCQUF3QixTQUFRLHNCQUFTO0lBQzNDLEtBQUssQ0FBQyxFQUFFO1FBQ2YsSUFBSSxDQUFDLE1BQU0sQ0FBQzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0tBa0JYLENBQUMsQ0FBQTtRQUNGLElBQUksQ0FBQyxNQUFNLENBQUM7Ozs7S0FJWCxDQUFDLENBQUE7UUFDRixJQUFJLENBQUMsTUFBTSxDQUFDOzs7O0tBSVgsQ0FBQyxDQUFBO1FBRUYsSUFBSSxDQUFDLE1BQU0sQ0FBQzs7Ozs7Ozs7Ozs7OztLQWFYLENBQUMsQ0FBQTtRQUNGLElBQUksQ0FBQyxNQUFNLENBQUM7Ozs7S0FJWCxDQUFDLENBQUE7SUFDSixDQUFDO0lBRVEsS0FBSyxDQUFDLElBQUk7UUFDakIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxpREFBaUQsQ0FBQyxDQUFBO1FBQzlELElBQUksQ0FBQyxNQUFNLENBQUMsMkNBQTJDLENBQUMsQ0FBQTtJQUMxRCxDQUFDO0NBQ0Y7QUF6REQsMERBeURDIn0=
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Migration } from "@medusajs/framework/mikro-orm/migrations";
|
|
2
|
+
/**
|
|
3
|
+
* Adds the `product_id` FK column to `product_attribute` (nullable —
|
|
4
|
+
* non-null marks the attribute as product-scoped / inline-custom; NULL
|
|
5
|
+
* = global). Safe for environments that already ran the base table
|
|
6
|
+
* migration `Migration20260601000000`.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Migration20260601000001 extends Migration {
|
|
9
|
+
up(): Promise<void>;
|
|
10
|
+
down(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20260601000001 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
/**
|
|
6
|
+
* Adds the `product_id` FK column to `product_attribute` (nullable —
|
|
7
|
+
* non-null marks the attribute as product-scoped / inline-custom; NULL
|
|
8
|
+
* = global). Safe for environments that already ran the base table
|
|
9
|
+
* migration `Migration20260601000000`.
|
|
10
|
+
*/
|
|
11
|
+
class Migration20260601000001 extends migrations_1.Migration {
|
|
12
|
+
async up() {
|
|
13
|
+
this.addSql(`
|
|
14
|
+
ALTER TABLE "product_attribute"
|
|
15
|
+
ADD COLUMN IF NOT EXISTS "product_id" text NULL;
|
|
16
|
+
`);
|
|
17
|
+
this.addSql(`
|
|
18
|
+
CREATE INDEX IF NOT EXISTS "IDX_product_attribute_product_id"
|
|
19
|
+
ON "product_attribute" ("product_id")
|
|
20
|
+
WHERE "deleted_at" IS NULL AND "product_id" IS NOT NULL;
|
|
21
|
+
`);
|
|
22
|
+
}
|
|
23
|
+
async down() {
|
|
24
|
+
this.addSql(`DROP INDEX IF EXISTS "IDX_product_attribute_product_id";`);
|
|
25
|
+
this.addSql(`ALTER TABLE "product_attribute" DROP COLUMN IF EXISTS "product_id";`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.Migration20260601000001 = Migration20260601000001;
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjA2MDEwMDAwMDEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LWF0dHJpYnV0ZS9taWdyYXRpb25zL01pZ3JhdGlvbjIwMjYwNjAxMDAwMDAxLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHlFQUFvRTtBQUVwRTs7Ozs7R0FLRztBQUNILE1BQWEsdUJBQXdCLFNBQVEsc0JBQVM7SUFDM0MsS0FBSyxDQUFDLEVBQUU7UUFDZixJQUFJLENBQUMsTUFBTSxDQUFDOzs7S0FHWCxDQUFDLENBQUE7UUFDRixJQUFJLENBQUMsTUFBTSxDQUFDOzs7O0tBSVgsQ0FBQyxDQUFBO0lBQ0osQ0FBQztJQUVRLEtBQUssQ0FBQyxJQUFJO1FBQ2pCLElBQUksQ0FBQyxNQUFNLENBQ1QsMERBQTBELENBQzNELENBQUE7UUFDRCxJQUFJLENBQUMsTUFBTSxDQUNULHFFQUFxRSxDQUN0RSxDQUFBO0lBQ0gsQ0FBQztDQUNGO0FBckJELDBEQXFCQyJ9
|
|
@@ -0,0 +1,11 @@
|
|
|
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.ProductAttributeValue = exports.ProductAttribute = void 0;
|
|
7
|
+
var product_attribute_1 = require("./product-attribute");
|
|
8
|
+
Object.defineProperty(exports, "ProductAttribute", { enumerable: true, get: function () { return __importDefault(product_attribute_1).default; } });
|
|
9
|
+
var product_attribute_value_1 = require("./product-attribute-value");
|
|
10
|
+
Object.defineProperty(exports, "ProductAttributeValue", { enumerable: true, get: function () { return __importDefault(product_attribute_value_1).default; } });
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LWF0dHJpYnV0ZS9tb2RlbHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEseURBQWlFO0FBQXhELHNJQUFBLE9BQU8sT0FBb0I7QUFDcEMscUVBQTRFO0FBQW5FLGlKQUFBLE9BQU8sT0FBeUIifQ==
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const ProductAttributeValue: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
2
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
3
|
+
handle: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
4
|
+
name: import("@medusajs/framework/utils").TextProperty;
|
|
5
|
+
rank: import("@medusajs/framework/utils").NumberProperty;
|
|
6
|
+
is_active: import("@medusajs/framework/utils").BooleanProperty;
|
|
7
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
8
|
+
attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
9
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
10
|
+
handle: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
11
|
+
name: import("@medusajs/framework/utils").TextProperty;
|
|
12
|
+
description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
13
|
+
type: import("@medusajs/framework/utils").EnumProperty<typeof import("@mercurjs/types").AttributeType>;
|
|
14
|
+
is_required: import("@medusajs/framework/utils").BooleanProperty;
|
|
15
|
+
is_filterable: import("@medusajs/framework/utils").BooleanProperty;
|
|
16
|
+
is_variant_axis: import("@medusajs/framework/utils").BooleanProperty;
|
|
17
|
+
rank: import("@medusajs/framework/utils").NumberProperty;
|
|
18
|
+
is_active: import("@medusajs/framework/utils").BooleanProperty;
|
|
19
|
+
created_by: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
20
|
+
product_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
21
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
22
|
+
values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "ProductAttributeValue">>;
|
|
23
|
+
}>, "ProductAttribute">, undefined>;
|
|
24
|
+
}>, "ProductAttributeValue">;
|
|
25
|
+
export default ProductAttributeValue;
|
|
@@ -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_attribute_1 = __importDefault(require("./product-attribute"));
|
|
8
|
+
const ProductAttributeValue = utils_1.model
|
|
9
|
+
.define("ProductAttributeValue", {
|
|
10
|
+
id: utils_1.model.id({ prefix: "pattrval" }).primaryKey(),
|
|
11
|
+
handle: utils_1.model.text().nullable(),
|
|
12
|
+
name: utils_1.model.text(),
|
|
13
|
+
rank: utils_1.model.number().default(0),
|
|
14
|
+
is_active: utils_1.model.boolean().default(true),
|
|
15
|
+
metadata: utils_1.model.json().nullable(),
|
|
16
|
+
attribute: utils_1.model.belongsTo(() => product_attribute_1.default, {
|
|
17
|
+
mappedBy: "values",
|
|
18
|
+
}),
|
|
19
|
+
})
|
|
20
|
+
.indexes([
|
|
21
|
+
{
|
|
22
|
+
name: "IDX_product_attribute_value_handle_unique",
|
|
23
|
+
on: ["attribute_id", "handle"],
|
|
24
|
+
unique: true,
|
|
25
|
+
where: "deleted_at IS NULL AND handle IS NOT NULL",
|
|
26
|
+
},
|
|
27
|
+
]);
|
|
28
|
+
exports.default = ProductAttributeValue;
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1hdHRyaWJ1dGUtdmFsdWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LWF0dHJpYnV0ZS9tb2RlbHMvcHJvZHVjdC1hdHRyaWJ1dGUtdmFsdWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxREFBaUQ7QUFFakQsNEVBQWtEO0FBRWxELE1BQU0scUJBQXFCLEdBQUcsYUFBSztLQUNoQyxNQUFNLENBQUMsdUJBQXVCLEVBQUU7SUFDL0IsRUFBRSxFQUFFLGFBQUssQ0FBQyxFQUFFLENBQUMsRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLENBQUMsQ0FBQyxVQUFVLEVBQUU7SUFDakQsTUFBTSxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUUsQ0FBQyxRQUFRLEVBQUU7SUFDL0IsSUFBSSxFQUFFLGFBQUssQ0FBQyxJQUFJLEVBQUU7SUFDbEIsSUFBSSxFQUFFLGFBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDO0lBQy9CLFNBQVMsRUFBRSxhQUFLLENBQUMsT0FBTyxFQUFFLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQztJQUN4QyxRQUFRLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUVqQyxTQUFTLEVBQUUsYUFBSyxDQUFDLFNBQVMsQ0FBQyxHQUFHLEVBQUUsQ0FBQywyQkFBZ0IsRUFBRTtRQUNqRCxRQUFRLEVBQUUsUUFBUTtLQUNuQixDQUFDO0NBQ0gsQ0FBQztLQUNELE9BQU8sQ0FBQztJQUNQO1FBQ0UsSUFBSSxFQUFFLDJDQUEyQztRQUNqRCxFQUFFLEVBQUUsQ0FBQyxjQUFjLEVBQUUsUUFBUSxDQUFDO1FBQzlCLE1BQU0sRUFBRSxJQUFJO1FBQ1osS0FBSyxFQUFFLDJDQUEyQztLQUNuRDtDQUNGLENBQUMsQ0FBQTtBQUVKLGtCQUFlLHFCQUFxQixDQUFBIn0=
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AttributeType } from "@mercurjs/types";
|
|
2
|
+
declare const ProductAttribute: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
3
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
4
|
+
handle: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
5
|
+
name: import("@medusajs/framework/utils").TextProperty;
|
|
6
|
+
description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
7
|
+
type: import("@medusajs/framework/utils").EnumProperty<typeof AttributeType>;
|
|
8
|
+
is_required: import("@medusajs/framework/utils").BooleanProperty;
|
|
9
|
+
is_filterable: import("@medusajs/framework/utils").BooleanProperty;
|
|
10
|
+
is_variant_axis: import("@medusajs/framework/utils").BooleanProperty;
|
|
11
|
+
rank: import("@medusajs/framework/utils").NumberProperty;
|
|
12
|
+
is_active: import("@medusajs/framework/utils").BooleanProperty;
|
|
13
|
+
created_by: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
14
|
+
product_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
15
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
16
|
+
values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
17
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
18
|
+
handle: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
19
|
+
name: import("@medusajs/framework/utils").TextProperty;
|
|
20
|
+
rank: import("@medusajs/framework/utils").NumberProperty;
|
|
21
|
+
is_active: import("@medusajs/framework/utils").BooleanProperty;
|
|
22
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
23
|
+
attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "ProductAttribute">, undefined>;
|
|
24
|
+
}>, "ProductAttributeValue">>;
|
|
25
|
+
}>, "ProductAttribute">;
|
|
26
|
+
export default ProductAttribute;
|
|
@@ -0,0 +1,53 @@
|
|
|
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 types_1 = require("@mercurjs/types");
|
|
8
|
+
const product_attribute_value_1 = __importDefault(require("./product-attribute-value"));
|
|
9
|
+
const ProductAttribute = utils_1.model
|
|
10
|
+
.define("ProductAttribute", {
|
|
11
|
+
id: utils_1.model.id({ prefix: "pattr" }).primaryKey(),
|
|
12
|
+
handle: utils_1.model.text().nullable(),
|
|
13
|
+
name: utils_1.model.text().searchable(),
|
|
14
|
+
description: utils_1.model.text().nullable(),
|
|
15
|
+
type: utils_1.model.enum(types_1.AttributeType),
|
|
16
|
+
is_required: utils_1.model.boolean().default(false),
|
|
17
|
+
is_filterable: utils_1.model.boolean().default(false),
|
|
18
|
+
is_variant_axis: utils_1.model.boolean().default(false),
|
|
19
|
+
rank: utils_1.model.number().default(0),
|
|
20
|
+
is_active: utils_1.model.boolean().default(true),
|
|
21
|
+
created_by: utils_1.model.text().nullable(),
|
|
22
|
+
// FK to stock `product` table. Non-null = product-scoped (created inline
|
|
23
|
+
// from a single product's edit/create form, not visible in the global
|
|
24
|
+
// /product-attributes catalogue). Null = global attribute.
|
|
25
|
+
product_id: utils_1.model.text().nullable(),
|
|
26
|
+
metadata: utils_1.model.json().nullable(),
|
|
27
|
+
values: utils_1.model.hasMany(() => product_attribute_value_1.default, {
|
|
28
|
+
mappedBy: "attribute",
|
|
29
|
+
}),
|
|
30
|
+
})
|
|
31
|
+
.cascades({ delete: ["values"] })
|
|
32
|
+
.indexes([
|
|
33
|
+
{
|
|
34
|
+
name: "IDX_product_attribute_handle_unique",
|
|
35
|
+
on: ["handle"],
|
|
36
|
+
unique: true,
|
|
37
|
+
where: "deleted_at IS NULL AND handle IS NOT NULL",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "IDX_product_attribute_type",
|
|
41
|
+
on: ["type"],
|
|
42
|
+
unique: false,
|
|
43
|
+
where: "deleted_at IS NULL",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "IDX_product_attribute_product_id",
|
|
47
|
+
on: ["product_id"],
|
|
48
|
+
unique: false,
|
|
49
|
+
where: "deleted_at IS NULL AND product_id IS NOT NULL",
|
|
50
|
+
},
|
|
51
|
+
]);
|
|
52
|
+
exports.default = ProductAttribute;
|
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvZHVjdC1hdHRyaWJ1dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LWF0dHJpYnV0ZS9tb2RlbHMvcHJvZHVjdC1hdHRyaWJ1dGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxREFBaUQ7QUFDakQsMkNBQStDO0FBRS9DLHdGQUE2RDtBQUU3RCxNQUFNLGdCQUFnQixHQUFHLGFBQUs7S0FDM0IsTUFBTSxDQUFDLGtCQUFrQixFQUFFO0lBQzFCLEVBQUUsRUFBRSxhQUFLLENBQUMsRUFBRSxDQUFDLEVBQUUsTUFBTSxFQUFFLE9BQU8sRUFBRSxDQUFDLENBQUMsVUFBVSxFQUFFO0lBQzlDLE1BQU0sRUFBRSxhQUFLLENBQUMsSUFBSSxFQUFFLENBQUMsUUFBUSxFQUFFO0lBQy9CLElBQUksRUFBRSxhQUFLLENBQUMsSUFBSSxFQUFFLENBQUMsVUFBVSxFQUFFO0lBQy9CLFdBQVcsRUFBRSxhQUFLLENBQUMsSUFBSSxFQUFFLENBQUMsUUFBUSxFQUFFO0lBQ3BDLElBQUksRUFBRSxhQUFLLENBQUMsSUFBSSxDQUFDLHFCQUFhLENBQUM7SUFDL0IsV0FBVyxFQUFFLGFBQUssQ0FBQyxPQUFPLEVBQUUsQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDO0lBQzNDLGFBQWEsRUFBRSxhQUFLLENBQUMsT0FBTyxFQUFFLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQztJQUM3QyxlQUFlLEVBQUUsYUFBSyxDQUFDLE9BQU8sRUFBRSxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUM7SUFDL0MsSUFBSSxFQUFFLGFBQUssQ0FBQyxNQUFNLEVBQUUsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDO0lBQy9CLFNBQVMsRUFBRSxhQUFLLENBQUMsT0FBTyxFQUFFLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQztJQUN4QyxVQUFVLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUNuQyx5RUFBeUU7SUFDekUsc0VBQXNFO0lBQ3RFLDJEQUEyRDtJQUMzRCxVQUFVLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUNuQyxRQUFRLEVBQUUsYUFBSyxDQUFDLElBQUksRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUVqQyxNQUFNLEVBQUUsYUFBSyxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsQ0FBQyxpQ0FBcUIsRUFBRTtRQUNqRCxRQUFRLEVBQUUsV0FBVztLQUN0QixDQUFDO0NBQ0gsQ0FBQztLQUNELFFBQVEsQ0FBQyxFQUFFLE1BQU0sRUFBRSxDQUFDLFFBQVEsQ0FBQyxFQUFFLENBQUM7S0FDaEMsT0FBTyxDQUFDO0lBQ1A7UUFDRSxJQUFJLEVBQUUscUNBQXFDO1FBQzNDLEVBQUUsRUFBRSxDQUFDLFFBQVEsQ0FBQztRQUNkLE1BQU0sRUFBRSxJQUFJO1FBQ1osS0FBSyxFQUFFLDJDQUEyQztLQUNuRDtJQUNEO1FBQ0UsSUFBSSxFQUFFLDRCQUE0QjtRQUNsQyxFQUFFLEVBQUUsQ0FBQyxNQUFNLENBQUM7UUFDWixNQUFNLEVBQUUsS0FBSztRQUNiLEtBQUssRUFBRSxvQkFBb0I7S0FDNUI7SUFDRDtRQUNFLElBQUksRUFBRSxrQ0FBa0M7UUFDeEMsRUFBRSxFQUFFLENBQUMsWUFBWSxDQUFDO1FBQ2xCLE1BQU0sRUFBRSxLQUFLO1FBQ2IsS0FBSyxFQUFFLCtDQUErQztLQUN2RDtDQUNGLENBQUMsQ0FBQTtBQUVKLGtCQUFlLGdCQUFnQixDQUFBIn0=
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ModuleJoinerConfig } from "@medusajs/framework/types";
|
|
2
|
+
declare const ProductAttributeModuleService_base: import("@medusajs/framework/utils").MedusaServiceReturnType<import("@medusajs/framework/utils").ModelConfigurationsToConfigTemplate<{
|
|
3
|
+
readonly ProductAttribute: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
4
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
5
|
+
handle: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
6
|
+
name: import("@medusajs/framework/utils").TextProperty;
|
|
7
|
+
description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
8
|
+
type: import("@medusajs/framework/utils").EnumProperty<typeof import("@mercurjs/types").AttributeType>;
|
|
9
|
+
is_required: import("@medusajs/framework/utils").BooleanProperty;
|
|
10
|
+
is_filterable: import("@medusajs/framework/utils").BooleanProperty;
|
|
11
|
+
is_variant_axis: import("@medusajs/framework/utils").BooleanProperty;
|
|
12
|
+
rank: import("@medusajs/framework/utils").NumberProperty;
|
|
13
|
+
is_active: import("@medusajs/framework/utils").BooleanProperty;
|
|
14
|
+
created_by: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
15
|
+
product_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
16
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
17
|
+
values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
18
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
19
|
+
handle: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
20
|
+
name: import("@medusajs/framework/utils").TextProperty;
|
|
21
|
+
rank: import("@medusajs/framework/utils").NumberProperty;
|
|
22
|
+
is_active: import("@medusajs/framework/utils").BooleanProperty;
|
|
23
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
24
|
+
attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "ProductAttribute">, undefined>;
|
|
25
|
+
}>, "ProductAttributeValue">>;
|
|
26
|
+
}>, "ProductAttribute">;
|
|
27
|
+
readonly ProductAttributeValue: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
28
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
29
|
+
handle: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
30
|
+
name: import("@medusajs/framework/utils").TextProperty;
|
|
31
|
+
rank: import("@medusajs/framework/utils").NumberProperty;
|
|
32
|
+
is_active: import("@medusajs/framework/utils").BooleanProperty;
|
|
33
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
34
|
+
attribute: import("@medusajs/framework/utils").BelongsTo<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
|
|
35
|
+
id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
|
|
36
|
+
handle: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
37
|
+
name: import("@medusajs/framework/utils").TextProperty;
|
|
38
|
+
description: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
39
|
+
type: import("@medusajs/framework/utils").EnumProperty<typeof import("@mercurjs/types").AttributeType>;
|
|
40
|
+
is_required: import("@medusajs/framework/utils").BooleanProperty;
|
|
41
|
+
is_filterable: import("@medusajs/framework/utils").BooleanProperty;
|
|
42
|
+
is_variant_axis: import("@medusajs/framework/utils").BooleanProperty;
|
|
43
|
+
rank: import("@medusajs/framework/utils").NumberProperty;
|
|
44
|
+
is_active: import("@medusajs/framework/utils").BooleanProperty;
|
|
45
|
+
created_by: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
46
|
+
product_id: import("@medusajs/framework/utils").NullableModifier<string, import("@medusajs/framework/utils").TextProperty>;
|
|
47
|
+
metadata: import("@medusajs/framework/utils").NullableModifier<Record<string, unknown>, import("@medusajs/framework/utils").JSONProperty>;
|
|
48
|
+
values: import("@medusajs/framework/utils").HasMany<() => import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder</*elided*/ any>, "ProductAttributeValue">>;
|
|
49
|
+
}>, "ProductAttribute">, undefined>;
|
|
50
|
+
}>, "ProductAttributeValue">;
|
|
51
|
+
}>>;
|
|
52
|
+
declare class ProductAttributeModuleService extends ProductAttributeModuleService_base {
|
|
53
|
+
__joinerConfig(): ModuleJoinerConfig;
|
|
54
|
+
}
|
|
55
|
+
export default ProductAttributeModuleService;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
4
|
+
const joiner_config_1 = require("./joiner-config");
|
|
5
|
+
const models_1 = require("./models");
|
|
6
|
+
class ProductAttributeModuleService extends (0, utils_1.MedusaService)({
|
|
7
|
+
ProductAttribute: models_1.ProductAttribute,
|
|
8
|
+
ProductAttributeValue: models_1.ProductAttributeValue,
|
|
9
|
+
}) {
|
|
10
|
+
__joinerConfig() {
|
|
11
|
+
return joiner_config_1.joinerConfig;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.default = ProductAttributeModuleService;
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tb2R1bGVzL3Byb2R1Y3QtYXR0cmlidXRlL3NlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSxxREFBeUQ7QUFFekQsbURBQThDO0FBQzlDLHFDQUFrRTtBQUVsRSxNQUFNLDZCQUE4QixTQUFRLElBQUEscUJBQWEsRUFBQztJQUN4RCxnQkFBZ0IsRUFBaEIseUJBQWdCO0lBQ2hCLHFCQUFxQixFQUFyQiw4QkFBcUI7Q0FDdEIsQ0FBQztJQUNBLGNBQWM7UUFDWixPQUFPLDRCQUFZLENBQUE7SUFDckIsQ0FBQztDQUNGO0FBRUQsa0JBQWUsNkJBQTZCLENBQUEifQ==
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { MercurModules } from "@mercurjs/types";
|
|
2
|
+
import ProductChangeModuleService from "./service";
|
|
3
|
+
export { ProductChangeModuleService };
|
|
4
|
+
declare const _default: import("@mercurjs/types").ModuleExports<typeof ProductChangeModuleService> & {
|
|
5
|
+
linkable: {
|
|
6
|
+
readonly productChange: {
|
|
7
|
+
id: {
|
|
8
|
+
serviceName: MercurModules.PRODUCT_EDIT;
|
|
9
|
+
field: "productChange";
|
|
10
|
+
linkable: "product_change_id";
|
|
11
|
+
primaryKey: "id";
|
|
12
|
+
};
|
|
13
|
+
toJSON: () => {
|
|
14
|
+
serviceName: MercurModules.PRODUCT_EDIT;
|
|
15
|
+
field: "productChange";
|
|
16
|
+
linkable: "product_change_id";
|
|
17
|
+
primaryKey: "id";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
readonly productChangeAction: {
|
|
21
|
+
id: {
|
|
22
|
+
serviceName: MercurModules.PRODUCT_EDIT;
|
|
23
|
+
field: "productChangeAction";
|
|
24
|
+
linkable: "product_change_action_id";
|
|
25
|
+
primaryKey: "id";
|
|
26
|
+
};
|
|
27
|
+
toJSON: () => {
|
|
28
|
+
serviceName: MercurModules.PRODUCT_EDIT;
|
|
29
|
+
field: "productChangeAction";
|
|
30
|
+
linkable: "product_change_action_id";
|
|
31
|
+
primaryKey: "id";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
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.ProductChangeModuleService = void 0;
|
|
7
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
8
|
+
const types_1 = require("@mercurjs/types");
|
|
9
|
+
const service_1 = __importDefault(require("./service"));
|
|
10
|
+
exports.ProductChangeModuleService = service_1.default;
|
|
11
|
+
exports.default = (0, utils_1.Module)(types_1.MercurModules.PRODUCT_EDIT, {
|
|
12
|
+
service: service_1.default,
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LWVkaXQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEscURBQWtEO0FBQ2xELDJDQUErQztBQUUvQyx3REFBa0Q7QUFFekMscUNBRkYsaUJBQTBCLENBRUU7QUFFbkMsa0JBQWUsSUFBQSxjQUFNLEVBQUMscUJBQWEsQ0FBQyxZQUFZLEVBQUU7SUFDaEQsT0FBTyxFQUFFLGlCQUEwQjtDQUNwQyxDQUFDLENBQUEifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const joinerConfig: Omit<import("@mercurjs/types").ModuleJoinerConfig, "alias" | "serviceName" | "primaryKeys" | "linkableKeys"> & Required<Pick<import("@mercurjs/types").ModuleJoinerConfig, "alias" | "serviceName" | "primaryKeys" | "linkableKeys">>;
|
|
@@ -0,0 +1,17 @@
|
|
|
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.joinerConfig = void 0;
|
|
7
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
8
|
+
const types_1 = require("@mercurjs/types");
|
|
9
|
+
const product_change_1 = __importDefault(require("./models/product-change"));
|
|
10
|
+
const product_change_action_1 = __importDefault(require("./models/product-change-action"));
|
|
11
|
+
exports.joinerConfig = (0, utils_1.defineJoinerConfig)(types_1.MercurModules.PRODUCT_EDIT, {
|
|
12
|
+
linkableKeys: {
|
|
13
|
+
product_change_id: product_change_1.default.name,
|
|
14
|
+
product_change_action_id: product_change_action_1.default.name,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiam9pbmVyLWNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3NyYy9tb2R1bGVzL3Byb2R1Y3QtZWRpdC9qb2luZXItY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLHFEQUE4RDtBQUM5RCwyQ0FBK0M7QUFFL0MsNkVBQW1EO0FBQ25ELDJGQUFnRTtBQUVuRCxRQUFBLFlBQVksR0FBRyxJQUFBLDBCQUFrQixFQUFDLHFCQUFhLENBQUMsWUFBWSxFQUFFO0lBQ3pFLFlBQVksRUFBRTtRQUNaLGlCQUFpQixFQUFFLHdCQUFhLENBQUMsSUFBSTtRQUNyQyx3QkFBd0IsRUFBRSwrQkFBbUIsQ0FBQyxJQUFJO0tBQ25EO0NBQ0YsQ0FBQyxDQUFBIn0=
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Migration20260601130000 = void 0;
|
|
4
|
+
const migrations_1 = require("@medusajs/framework/mikro-orm/migrations");
|
|
5
|
+
class Migration20260601130000 extends migrations_1.Migration {
|
|
6
|
+
async up() {
|
|
7
|
+
this.addSql(`
|
|
8
|
+
CREATE TABLE IF NOT EXISTS "product_change" (
|
|
9
|
+
"id" text NOT NULL PRIMARY KEY,
|
|
10
|
+
"product_id" text NOT NULL,
|
|
11
|
+
"status" text NOT NULL DEFAULT 'pending',
|
|
12
|
+
"internal_note" text NULL,
|
|
13
|
+
"external_note" text NULL,
|
|
14
|
+
"created_by" text NULL,
|
|
15
|
+
"confirmed_by" text NULL,
|
|
16
|
+
"confirmed_at" timestamptz NULL,
|
|
17
|
+
"declined_by" text NULL,
|
|
18
|
+
"declined_at" timestamptz NULL,
|
|
19
|
+
"declined_reason" text NULL,
|
|
20
|
+
"canceled_by" text NULL,
|
|
21
|
+
"canceled_at" timestamptz NULL,
|
|
22
|
+
"requires_action_by" text NULL,
|
|
23
|
+
"requires_action_at" timestamptz NULL,
|
|
24
|
+
"requires_action_reason" text NULL,
|
|
25
|
+
"metadata" jsonb NULL,
|
|
26
|
+
"created_at" timestamptz NOT NULL DEFAULT now(),
|
|
27
|
+
"updated_at" timestamptz NOT NULL DEFAULT now(),
|
|
28
|
+
"deleted_at" timestamptz NULL
|
|
29
|
+
);
|
|
30
|
+
`);
|
|
31
|
+
this.addSql(`
|
|
32
|
+
CREATE INDEX IF NOT EXISTS "IDX_product_change_status"
|
|
33
|
+
ON "product_change" ("status")
|
|
34
|
+
WHERE "deleted_at" IS NULL;
|
|
35
|
+
`);
|
|
36
|
+
this.addSql(`
|
|
37
|
+
CREATE INDEX IF NOT EXISTS "IDX_product_change_product_id"
|
|
38
|
+
ON "product_change" ("product_id")
|
|
39
|
+
WHERE "deleted_at" IS NULL;
|
|
40
|
+
`);
|
|
41
|
+
this.addSql(`
|
|
42
|
+
CREATE TABLE IF NOT EXISTS "product_change_action" (
|
|
43
|
+
"id" text NOT NULL PRIMARY KEY,
|
|
44
|
+
"product_id" text NOT NULL,
|
|
45
|
+
"ordering" bigserial NOT NULL,
|
|
46
|
+
"action" text NOT NULL,
|
|
47
|
+
"details" jsonb NOT NULL DEFAULT '{}'::jsonb,
|
|
48
|
+
"internal_note" text NULL,
|
|
49
|
+
"applied" boolean NOT NULL DEFAULT false,
|
|
50
|
+
"product_change_id" text NULL REFERENCES "product_change"("id") ON DELETE SET NULL,
|
|
51
|
+
"created_at" timestamptz NOT NULL DEFAULT now(),
|
|
52
|
+
"updated_at" timestamptz NOT NULL DEFAULT now(),
|
|
53
|
+
"deleted_at" timestamptz NULL
|
|
54
|
+
);
|
|
55
|
+
`);
|
|
56
|
+
this.addSql(`
|
|
57
|
+
CREATE INDEX IF NOT EXISTS "IDX_prodchact_product_change_id"
|
|
58
|
+
ON "product_change_action" ("product_change_id")
|
|
59
|
+
WHERE "deleted_at" IS NULL;
|
|
60
|
+
`);
|
|
61
|
+
this.addSql(`
|
|
62
|
+
CREATE INDEX IF NOT EXISTS "IDX_prodchact_product_id"
|
|
63
|
+
ON "product_change_action" ("product_id")
|
|
64
|
+
WHERE "deleted_at" IS NULL;
|
|
65
|
+
`);
|
|
66
|
+
this.addSql(`
|
|
67
|
+
CREATE INDEX IF NOT EXISTS "IDX_prodchact_ordering"
|
|
68
|
+
ON "product_change_action" ("ordering")
|
|
69
|
+
WHERE "deleted_at" IS NULL;
|
|
70
|
+
`);
|
|
71
|
+
}
|
|
72
|
+
async down() {
|
|
73
|
+
this.addSql(`DROP TABLE IF EXISTS "product_change_action";`);
|
|
74
|
+
this.addSql(`DROP TABLE IF EXISTS "product_change";`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.Migration20260601130000 = Migration20260601130000;
|
|
78
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWlncmF0aW9uMjAyNjA2MDExMzAwMDAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LWVkaXQvbWlncmF0aW9ucy9NaWdyYXRpb24yMDI2MDYwMTEzMDAwMC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBb0U7QUFFcEUsTUFBYSx1QkFBd0IsU0FBUSxzQkFBUztJQUMzQyxLQUFLLENBQUMsRUFBRTtRQUNmLElBQUksQ0FBQyxNQUFNLENBQUM7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0tBdUJYLENBQUMsQ0FBQTtRQUNGLElBQUksQ0FBQyxNQUFNLENBQUM7Ozs7S0FJWCxDQUFDLENBQUE7UUFDRixJQUFJLENBQUMsTUFBTSxDQUFDOzs7O0tBSVgsQ0FBQyxDQUFBO1FBRUYsSUFBSSxDQUFDLE1BQU0sQ0FBQzs7Ozs7Ozs7Ozs7Ozs7S0FjWCxDQUFDLENBQUE7UUFDRixJQUFJLENBQUMsTUFBTSxDQUFDOzs7O0tBSVgsQ0FBQyxDQUFBO1FBQ0YsSUFBSSxDQUFDLE1BQU0sQ0FBQzs7OztLQUlYLENBQUMsQ0FBQTtRQUNGLElBQUksQ0FBQyxNQUFNLENBQUM7Ozs7S0FJWCxDQUFDLENBQUE7SUFDSixDQUFDO0lBRVEsS0FBSyxDQUFDLElBQUk7UUFDakIsSUFBSSxDQUFDLE1BQU0sQ0FBQywrQ0FBK0MsQ0FBQyxDQUFBO1FBQzVELElBQUksQ0FBQyxNQUFNLENBQUMsd0NBQXdDLENBQUMsQ0FBQTtJQUN2RCxDQUFDO0NBQ0Y7QUF6RUQsMERBeUVDIn0=
|
|
@@ -0,0 +1,11 @@
|
|
|
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.ProductChangeAction = exports.ProductChange = void 0;
|
|
7
|
+
var product_change_1 = require("./product-change");
|
|
8
|
+
Object.defineProperty(exports, "ProductChange", { enumerable: true, get: function () { return __importDefault(product_change_1).default; } });
|
|
9
|
+
var product_change_action_1 = require("./product-change-action");
|
|
10
|
+
Object.defineProperty(exports, "ProductChangeAction", { enumerable: true, get: function () { return __importDefault(product_change_action_1).default; } });
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbW9kdWxlcy9wcm9kdWN0LWVkaXQvbW9kZWxzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLG1EQUEyRDtBQUFsRCxnSUFBQSxPQUFPLE9BQWlCO0FBQ2pDLGlFQUF3RTtBQUEvRCw2SUFBQSxPQUFPLE9BQXVCIn0=
|