@mercurjs/core 2.2.0-canary.5 → 2.2.0-canary.51
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 +13 -0
- package/.medusa/server/src/api/admin/claims/[id]/outbound/items/route.js +59 -0
- package/.medusa/server/src/api/admin/claims/[id]/request/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/claims/[id]/request/route.js +74 -0
- package/.medusa/server/src/api/admin/collections/[id]/route.d.ts +7 -0
- package/.medusa/server/src/api/admin/collections/[id]/route.js +48 -0
- package/.medusa/server/src/api/admin/collections/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/collections/middlewares.js +49 -0
- package/.medusa/server/src/api/admin/collections/query-config.d.ts +12 -0
- package/.medusa/server/src/api/admin/collections/query-config.js +29 -0
- package/.medusa/server/src/api/admin/collections/route.d.ts +6 -0
- package/.medusa/server/src/api/admin/collections/route.js +36 -0
- package/.medusa/server/src/api/admin/collections/validators.d.ts +262 -0
- package/.medusa/server/src/api/admin/collections/validators.js +42 -0
- package/.medusa/server/src/api/admin/commission-rates/query-config.js +6 -4
- package/.medusa/server/src/api/admin/commission-rates/route.js +4 -1
- package/.medusa/server/src/api/admin/commission-rates/validators.d.ts +89 -58
- package/.medusa/server/src/api/admin/commission-rates/validators.js +16 -9
- package/.medusa/server/src/api/admin/customer-groups/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/admin/customer-groups/middlewares.js +43 -0
- package/.medusa/server/src/api/admin/customer-groups/validators.d.ts +257 -0
- package/.medusa/server/src/api/admin/customer-groups/validators.js +12 -0
- package/.medusa/server/src/api/admin/exchanges/[id]/outbound/items/route.d.ts +14 -0
- package/.medusa/server/src/api/admin/exchanges/[id]/outbound/items/route.js +60 -0
- package/.medusa/server/src/api/admin/exchanges/[id]/request/route.d.ts +4 -0
- package/.medusa/server/src/api/admin/exchanges/[id]/request/route.js +75 -0
- package/.medusa/server/src/api/admin/members/validators.d.ts +14 -15
- package/.medusa/server/src/api/admin/middlewares.js +31 -36
- package/.medusa/server/src/api/admin/offers/batch/route.js +3 -3
- package/.medusa/server/src/api/admin/offers/middlewares.js +3 -1
- package/.medusa/server/src/api/admin/offers/query-config.js +3 -1
- package/.medusa/server/src/api/admin/offers/validators.d.ts +79 -57
- package/.medusa/server/src/api/admin/offers/validators.js +10 -2
- package/.medusa/server/src/api/admin/order-edits/[id]/confirm/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/order-edits/[id]/confirm/route.js +18 -0
- package/.medusa/server/src/api/admin/order-edits/[id]/items/route.d.ts +15 -0
- package/.medusa/server/src/api/admin/order-edits/[id]/items/route.js +46 -0
- package/.medusa/server/src/api/admin/order-groups/helpers.d.ts +2 -0
- package/.medusa/server/src/api/admin/order-groups/helpers.js +53 -0
- package/.medusa/server/src/api/admin/order-groups/middlewares.js +3 -1
- package/.medusa/server/src/api/admin/order-groups/route.js +4 -2
- package/.medusa/server/src/api/admin/order-groups/validators.d.ts +20 -21
- package/.medusa/server/src/api/admin/orders/[id]/commission-lines/route.d.ts +7 -0
- package/.medusa/server/src/api/admin/orders/[id]/commission-lines/route.js +17 -0
- 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 +2 -0
- package/.medusa/server/src/api/admin/orders/resolve-order-seller-id.js +15 -0
- package/.medusa/server/src/api/admin/orders/validators.d.ts +1 -287
- package/.medusa/server/src/api/admin/orders/validators.js +9 -29
- package/.medusa/server/src/api/admin/payouts/validators.d.ts +18 -19
- package/.medusa/server/src/api/admin/product-attributes/[id]/route.js +2 -2
- package/.medusa/server/src/api/admin/product-attributes/[id]/values/[value_id]/route.js +2 -2
- package/.medusa/server/src/api/admin/product-attributes/middlewares.js +1 -3
- package/.medusa/server/src/api/admin/product-attributes/query-config.js +4 -1
- package/.medusa/server/src/api/admin/product-attributes/route.d.ts +2 -2
- package/.medusa/server/src/api/admin/product-attributes/route.js +2 -5
- package/.medusa/server/src/api/admin/product-attributes/validators.d.ts +129 -140
- package/.medusa/server/src/api/admin/product-attributes/validators.js +1 -3
- package/.medusa/server/src/api/admin/product-categories/[id]/products/route.js +3 -3
- package/.medusa/server/src/api/admin/product-categories/[id]/route.js +8 -11
- package/.medusa/server/src/api/admin/product-categories/query-config.js +7 -1
- package/.medusa/server/src/api/admin/product-categories/route.js +5 -8
- package/.medusa/server/src/api/admin/product-categories/validators.d.ts +153 -93
- package/.medusa/server/src/api/admin/product-categories/validators.js +11 -1
- package/.medusa/server/src/api/admin/product-changes/[id]/cancel/route.d.ts +0 -7
- package/.medusa/server/src/api/admin/product-changes/[id]/cancel/route.js +2 -8
- package/.medusa/server/src/api/admin/product-changes/[id]/confirm/route.d.ts +0 -7
- package/.medusa/server/src/api/admin/product-changes/[id]/confirm/route.js +2 -8
- package/.medusa/server/src/api/admin/product-changes/validators.d.ts +8 -4
- package/.medusa/server/src/api/admin/product-changes/validators.js +6 -3
- package/.medusa/server/src/api/admin/products/[id]/attributes/batch/route.js +6 -9
- package/.medusa/server/src/api/admin/products/[id]/confirm/route.d.ts +0 -12
- package/.medusa/server/src/api/admin/products/[id]/confirm/route.js +2 -13
- package/.medusa/server/src/api/admin/products/[id]/preview/route.d.ts +0 -7
- package/.medusa/server/src/api/admin/products/[id]/preview/route.js +1 -8
- package/.medusa/server/src/api/admin/products/[id]/reject/route.d.ts +0 -8
- package/.medusa/server/src/api/admin/products/[id]/reject/route.js +2 -9
- package/.medusa/server/src/api/admin/products/[id]/request-changes/route.d.ts +0 -9
- package/.medusa/server/src/api/admin/products/[id]/request-changes/route.js +2 -10
- package/.medusa/server/src/api/admin/products/[id]/route.js +9 -3
- package/.medusa/server/src/api/admin/products/[id]/sellers/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/products/[id]/sellers/route.js +13 -0
- package/.medusa/server/src/api/admin/products/middlewares.js +6 -42
- package/.medusa/server/src/api/admin/products/query-config.js +41 -16
- package/.medusa/server/src/api/admin/products/route.js +9 -1
- package/.medusa/server/src/api/admin/products/validators.d.ts +570 -1314
- package/.medusa/server/src/api/admin/products/validators.js +66 -90
- package/.medusa/server/src/api/admin/returns/[id]/receive/confirm/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/returns/[id]/receive/confirm/route.js +29 -0
- package/.medusa/server/src/api/admin/sellers/[id]/address/route.js +4 -2
- package/.medusa/server/src/api/admin/sellers/[id]/approve/route.d.ts +2 -1
- package/.medusa/server/src/api/admin/sellers/[id]/approve/route.js +2 -1
- package/.medusa/server/src/api/admin/sellers/[id]/payment-details/route.js +4 -2
- package/.medusa/server/src/api/admin/sellers/[id]/professional-details/route.js +4 -2
- package/.medusa/server/src/api/admin/sellers/[id]/route.js +4 -2
- package/.medusa/server/src/api/admin/sellers/[id]/suspend/route.js +2 -1
- package/.medusa/server/src/api/admin/sellers/[id]/terminate/route.js +2 -1
- package/.medusa/server/src/api/admin/sellers/[id]/unsuspend/route.d.ts +2 -1
- package/.medusa/server/src/api/admin/sellers/[id]/unsuspend/route.js +2 -1
- package/.medusa/server/src/api/admin/sellers/[id]/unterminate/route.d.ts +2 -1
- package/.medusa/server/src/api/admin/sellers/[id]/unterminate/route.js +2 -1
- package/.medusa/server/src/api/admin/sellers/middlewares.js +4 -20
- package/.medusa/server/src/api/admin/sellers/route.js +4 -2
- package/.medusa/server/src/api/admin/sellers/validators.d.ts +89 -100
- package/.medusa/server/src/api/admin/sellers/validators.js +12 -7
- 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]/complete/route.js +1 -5
- package/.medusa/server/src/api/store/carts/[id]/complete/validators.d.ts +1 -1
- package/.medusa/server/src/api/store/carts/[id]/line-items/route.js +13 -1
- package/.medusa/server/src/api/store/carts/[id]/line-items/validators.d.ts +0 -3
- package/.medusa/server/src/api/store/carts/[id]/line-items/validators.js +1 -2
- package/.medusa/server/src/api/store/carts/[id]/shipping-methods/route.js +6 -2
- package/.medusa/server/src/api/store/middlewares.js +15 -11
- package/.medusa/server/src/api/store/offers/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/store/offers/[id]/route.js +28 -0
- package/.medusa/server/src/api/store/offers/helpers.d.ts +43 -0
- package/.medusa/server/src/api/store/offers/helpers.js +191 -0
- package/.medusa/server/src/api/store/offers/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/offers/middlewares.js +64 -0
- package/.medusa/server/src/api/store/offers/query-config.d.ts +12 -0
- package/.medusa/server/src/api/store/offers/query-config.js +50 -0
- package/.medusa/server/src/api/store/offers/route.d.ts +3 -0
- package/.medusa/server/src/api/store/offers/route.js +30 -0
- package/.medusa/server/src/api/store/offers/validators.d.ts +158 -0
- package/.medusa/server/src/api/store/offers/validators.js +29 -0
- package/.medusa/server/src/api/store/order-groups/validators.d.ts +16 -17
- package/.medusa/server/src/api/store/product-attributes/validators.d.ts +50 -46
- package/.medusa/server/src/api/store/product-categories/validators.d.ts +59 -53
- package/.medusa/server/src/api/store/products/[id]/route.js +9 -5
- package/.medusa/server/src/api/store/products/helpers.d.ts +10 -0
- package/.medusa/server/src/api/store/products/helpers.js +20 -0
- package/.medusa/server/src/api/store/products/middlewares.js +37 -24
- package/.medusa/server/src/api/store/products/query-config.js +23 -7
- package/.medusa/server/src/api/store/products/route.js +9 -1
- package/.medusa/server/src/api/store/products/validators.d.ts +69 -65
- package/.medusa/server/src/api/store/search/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/search/middlewares.js +73 -0
- package/.medusa/server/src/api/store/search/route.d.ts +8 -0
- package/.medusa/server/src/api/store/search/route.js +25 -0
- package/.medusa/server/src/api/store/search/validators.d.ts +27 -0
- package/.medusa/server/src/api/store/search/validators.js +17 -0
- package/.medusa/server/src/api/store/sellers/validators.d.ts +35 -34
- package/.medusa/server/src/api/utils/filter-attributes-by-category-link.d.ts +0 -15
- package/.medusa/server/src/api/utils/filter-attributes-by-category-link.js +22 -26
- package/.medusa/server/src/api/utils/format-product-attributes.d.ts +5 -50
- package/.medusa/server/src/api/utils/format-product-attributes.js +90 -164
- 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/utils/offers.d.ts +50 -0
- package/.medusa/server/src/api/utils/offers.js +286 -0
- package/.medusa/server/src/api/utils/order-commission-lines.d.ts +11 -0
- package/.medusa/server/src/api/utils/order-commission-lines.js +71 -0
- package/.medusa/server/src/api/utils/product-attribute-fields.d.ts +5 -0
- package/.medusa/server/src/api/utils/product-attribute-fields.js +35 -0
- package/.medusa/server/src/api/utils/sellers.d.ts +2 -0
- package/.medusa/server/src/api/utils/sellers.js +23 -0
- package/.medusa/server/src/api/vendor/campaigns/validators.d.ts +14 -15
- 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 +6 -0
- package/.medusa/server/src/api/vendor/claims/[id]/outbound/items/route.js +41 -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 +31 -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 +377 -0
- package/.medusa/server/src/api/vendor/claims/validators.js +89 -0
- package/.medusa/server/src/api/vendor/collections/query-config.js +7 -1
- package/.medusa/server/src/api/vendor/collections/validators.d.ts +22 -23
- package/.medusa/server/src/api/vendor/currencies/validators.d.ts +14 -15
- package/.medusa/server/src/api/vendor/customer-groups/[id]/customers/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/customer-groups/[id]/customers/route.js +20 -0
- package/.medusa/server/src/api/vendor/customer-groups/[id]/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/customer-groups/[id]/route.js +43 -0
- package/.medusa/server/src/api/vendor/customer-groups/helpers.d.ts +3 -0
- package/.medusa/server/src/api/vendor/customer-groups/helpers.js +38 -0
- package/.medusa/server/src/api/vendor/customer-groups/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/customer-groups/middlewares.js +62 -0
- package/.medusa/server/src/api/vendor/customer-groups/query-config.d.ts +11 -0
- package/.medusa/server/src/api/vendor/customer-groups/query-config.js +22 -0
- package/.medusa/server/src/api/vendor/customer-groups/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/customer-groups/route.js +35 -0
- package/.medusa/server/src/api/vendor/customer-groups/validators.d.ts +156 -0
- package/.medusa/server/src/api/vendor/customer-groups/validators.js +35 -0
- package/.medusa/server/src/api/vendor/customers/[id]/customer-groups/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/customers/[id]/customer-groups/route.js +27 -0
- package/.medusa/server/src/api/vendor/customers/[id]/route.js +13 -1
- package/.medusa/server/src/api/vendor/customers/middlewares.js +9 -1
- package/.medusa/server/src/api/vendor/customers/validators.d.ts +47 -32
- package/.medusa/server/src/api/vendor/customers/validators.js +9 -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 +6 -0
- package/.medusa/server/src/api/vendor/exchanges/[id]/outbound/items/route.js +41 -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 +31 -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 +312 -0
- package/.medusa/server/src/api/vendor/exchanges/validators.js +71 -0
- package/.medusa/server/src/api/vendor/fulfillment-providers/validators.d.ts +24 -23
- package/.medusa/server/src/api/vendor/fulfillment-sets/validators.d.ts +18 -18
- package/.medusa/server/src/api/vendor/inventory-items/validators.d.ts +104 -110
- package/.medusa/server/src/api/vendor/members/me/route.js +3 -2
- package/.medusa/server/src/api/vendor/members/validators.d.ts +4 -2
- package/.medusa/server/src/api/vendor/members/validators.js +5 -3
- package/.medusa/server/src/api/vendor/middlewares.js +77 -67
- package/.medusa/server/src/api/vendor/offers/[id]/route.js +4 -2
- package/.medusa/server/src/api/vendor/offers/batch/route.js +3 -2
- package/.medusa/server/src/api/vendor/offers/query-config.js +2 -1
- package/.medusa/server/src/api/vendor/offers/route.js +4 -2
- package/.medusa/server/src/api/vendor/offers/validators.d.ts +68 -67
- package/.medusa/server/src/api/vendor/offers/validators.js +12 -12
- package/.medusa/server/src/api/vendor/order-edits/[id]/confirm/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/confirm/route.js +18 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/items/[action_id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/items/[action_id]/route.js +32 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/items/item/[item_id]/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/items/item/[item_id]/route.js +24 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/items/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/items/route.js +33 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/request/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/request/route.js +18 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/route.d.ts +3 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/route.js +19 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/shipping-method/[action_id]/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/shipping-method/[action_id]/route.js +32 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/shipping-method/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/order-edits/[id]/shipping-method/route.js +15 -0
- package/.medusa/server/src/api/vendor/order-edits/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/order-edits/middlewares.js +94 -0
- package/.medusa/server/src/api/vendor/order-edits/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/order-edits/route.js +15 -0
- package/.medusa/server/src/api/vendor/order-edits/validators.d.ts +160 -0
- package/.medusa/server/src/api/vendor/order-edits/validators.js +50 -0
- package/.medusa/server/src/api/vendor/orders/[id]/commission-lines/route.d.ts +7 -0
- package/.medusa/server/src/api/vendor/orders/[id]/commission-lines/route.js +18 -0
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/cancel/route.d.ts +2 -1
- package/.medusa/server/src/api/vendor/orders/[id]/fulfillments/[fulfillment_id]/cancel/route.js +4 -1
- package/.medusa/server/src/api/vendor/orders/middlewares.js +2 -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 +23 -0
- package/.medusa/server/src/api/vendor/orders/resolve-offer-items.js +75 -0
- package/.medusa/server/src/api/vendor/orders/validators.d.ts +37 -26
- package/.medusa/server/src/api/vendor/orders/validators.js +10 -3
- package/.medusa/server/src/api/vendor/payments/helpers.js +14 -8
- package/.medusa/server/src/api/vendor/payments/validators.d.ts +38 -38
- package/.medusa/server/src/api/vendor/payout-accounts/validators.d.ts +11 -12
- package/.medusa/server/src/api/vendor/payouts/validators.d.ts +18 -19
- package/.medusa/server/src/api/vendor/price-lists/validators.d.ts +38 -40
- package/.medusa/server/src/api/vendor/price-preferences/validators.d.ts +14 -15
- package/.medusa/server/src/api/vendor/product-attributes/query-config.js +4 -2
- package/.medusa/server/src/api/vendor/product-attributes/route.js +1 -3
- package/.medusa/server/src/api/vendor/product-attributes/validators.d.ts +92 -104
- package/.medusa/server/src/api/vendor/product-attributes/validators.js +1 -1
- package/.medusa/server/src/api/vendor/product-categories/[id]/products/route.d.ts +4 -0
- package/.medusa/server/src/api/vendor/product-categories/[id]/products/route.js +36 -0
- package/.medusa/server/src/api/vendor/product-categories/middlewares.js +9 -1
- package/.medusa/server/src/api/vendor/product-categories/query-config.js +7 -1
- package/.medusa/server/src/api/vendor/product-categories/validators.d.ts +102 -79
- package/.medusa/server/src/api/vendor/product-categories/validators.js +7 -2
- package/.medusa/server/src/api/vendor/product-tags/validators.d.ts +2 -2
- package/.medusa/server/src/api/vendor/product-types/validators.d.ts +14 -15
- package/.medusa/server/src/api/vendor/product-variants/middlewares.js +11 -19
- package/.medusa/server/src/api/vendor/product-variants/query-config.js +1 -3
- package/.medusa/server/src/api/vendor/product-variants/validators.d.ts +103 -97
- package/.medusa/server/src/api/vendor/products/[id]/attributes/batch/route.d.ts +5 -0
- package/.medusa/server/src/api/vendor/products/[id]/attributes/batch/route.js +22 -0
- package/.medusa/server/src/api/vendor/products/[id]/cancel/route.d.ts +2 -7
- package/.medusa/server/src/api/vendor/products/[id]/cancel/route.js +2 -9
- package/.medusa/server/src/api/vendor/products/[id]/preview/route.d.ts +0 -9
- package/.medusa/server/src/api/vendor/products/[id]/preview/route.js +1 -10
- package/.medusa/server/src/api/vendor/products/[id]/route.d.ts +0 -14
- package/.medusa/server/src/api/vendor/products/[id]/route.js +12 -21
- package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/route.d.ts +0 -8
- package/.medusa/server/src/api/vendor/products/[id]/variants/[variant_id]/route.js +3 -14
- package/.medusa/server/src/api/vendor/products/[id]/variants/route.d.ts +0 -7
- package/.medusa/server/src/api/vendor/products/[id]/variants/route.js +2 -11
- package/.medusa/server/src/api/vendor/products/helpers.d.ts +6 -5
- package/.medusa/server/src/api/vendor/products/helpers.js +54 -10
- package/.medusa/server/src/api/vendor/products/middlewares.js +16 -48
- package/.medusa/server/src/api/vendor/products/query-config.js +52 -15
- package/.medusa/server/src/api/vendor/products/route.d.ts +0 -9
- package/.medusa/server/src/api/vendor/products/route.js +14 -17
- package/.medusa/server/src/api/vendor/products/validators.d.ts +458 -770
- package/.medusa/server/src/api/vendor/products/validators.js +90 -78
- package/.medusa/server/src/api/vendor/promotions/validators.d.ts +47 -49
- package/.medusa/server/src/api/vendor/refund-reasons/validators.d.ts +18 -19
- package/.medusa/server/src/api/vendor/regions/validators.d.ts +20 -21
- 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 +18 -0
- package/.medusa/server/src/api/vendor/reservations/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/vendor/reservations/middlewares.js +44 -0
- package/.medusa/server/src/api/vendor/reservations/query-config.d.ts +19 -0
- package/.medusa/server/src/api/vendor/reservations/query-config.js +45 -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 +295 -0
- package/.medusa/server/src/api/vendor/reservations/validators.js +40 -0
- package/.medusa/server/src/api/vendor/return-reasons/validators.d.ts +18 -19
- package/.medusa/server/src/api/vendor/returns/validators.d.ts +25 -26
- package/.medusa/server/src/api/vendor/sales-channels/[id]/products/route.js +2 -1
- package/.medusa/server/src/api/vendor/sales-channels/helpers.d.ts +1 -0
- package/.medusa/server/src/api/vendor/sales-channels/helpers.js +25 -2
- package/.medusa/server/src/api/vendor/sales-channels/validators.d.ts +25 -24
- package/.medusa/server/src/api/vendor/sellers/[id]/address/route.js +4 -2
- package/.medusa/server/src/api/vendor/sellers/[id]/payment-details/route.js +4 -2
- package/.medusa/server/src/api/vendor/sellers/[id]/professional-details/route.js +4 -2
- package/.medusa/server/src/api/vendor/sellers/[id]/route.js +4 -2
- package/.medusa/server/src/api/vendor/sellers/me/route.js +10 -1
- package/.medusa/server/src/api/vendor/sellers/middlewares.js +1 -18
- package/.medusa/server/src/api/vendor/sellers/route.js +8 -3
- package/.medusa/server/src/api/vendor/sellers/validators.d.ts +25 -46
- package/.medusa/server/src/api/vendor/sellers/validators.js +2 -2
- package/.medusa/server/src/api/vendor/shipping-option-types/validators.d.ts +18 -19
- package/.medusa/server/src/api/vendor/shipping-options/middlewares.js +13 -1
- package/.medusa/server/src/api/vendor/shipping-options/validators.d.ts +100 -98
- package/.medusa/server/src/api/vendor/shipping-options/validators.js +2 -1
- package/.medusa/server/src/api/vendor/shipping-profiles/validators.d.ts +20 -21
- package/.medusa/server/src/api/vendor/stock-locations/validators.d.ts +18 -19
- package/.medusa/server/src/api/vendor/stores/validators.d.ts +14 -15
- package/.medusa/server/src/links/cart-line-item-offer-link.js +9 -2
- package/.medusa/server/src/links/media-product-category-link.d.ts +20 -0
- package/.medusa/server/src/links/media-product-category-link.js +34 -0
- package/.medusa/server/src/links/media-product-collection-link.d.ts +18 -0
- package/.medusa/server/src/links/media-product-collection-link.js +32 -0
- package/.medusa/server/src/links/offer-product-link.js +15 -0
- package/.medusa/server/src/links/order-line-item-offer-link.js +10 -2
- package/.medusa/server/src/links/product-attribute-category-link.d.ts +0 -14
- package/.medusa/server/src/links/product-attribute-category-link.js +4 -21
- package/.medusa/server/src/links/product-attribute-option-mirror-link.d.ts +6 -0
- package/.medusa/server/src/links/product-attribute-option-mirror-link.js +24 -0
- package/.medusa/server/src/links/product-attribute-product-link.d.ts +0 -5
- package/.medusa/server/src/links/product-attribute-product-link.js +2 -7
- package/.medusa/server/src/links/product-attribute-value-option-value-mirror-link.d.ts +6 -0
- package/.medusa/server/src/links/product-attribute-value-option-value-mirror-link.js +24 -0
- package/.medusa/server/src/links/{product-variant-attribute-value-link.d.ts → product-attribute-value-pivot-link.d.ts} +3 -0
- package/.medusa/server/src/links/product-attribute-value-pivot-link.js +23 -0
- package/.medusa/server/src/links/seller-customer-group-link.js +15 -0
- package/.medusa/server/src/migration-scripts/drop-fulfillment-global-unique-indexes.js +6 -1
- package/.medusa/server/src/migration-scripts/rename-default-store.d.ts +2 -0
- package/.medusa/server/src/migration-scripts/rename-default-store.js +12 -0
- package/.medusa/server/src/modules/commission/index.d.ts +14 -0
- package/.medusa/server/src/modules/commission/index.js +3 -1
- package/.medusa/server/src/modules/commission/loaders/seed-default-commission-rate.d.ts +11 -0
- package/.medusa/server/src/modules/commission/loaders/seed-default-commission-rate.js +35 -0
- package/.medusa/server/src/modules/commission/migrations/Migration20260615120000.d.ts +5 -0
- package/.medusa/server/src/modules/commission/migrations/Migration20260615120000.js +46 -0
- package/.medusa/server/src/modules/commission/models/commission-line.d.ts +2 -1
- package/.medusa/server/src/modules/commission/models/commission-line.js +3 -2
- package/.medusa/server/src/modules/commission/models/commission-rate-value.d.ts +25 -0
- package/.medusa/server/src/modules/commission/models/commission-rate-value.js +17 -0
- package/.medusa/server/src/modules/commission/models/commission-rate.d.ts +9 -4
- package/.medusa/server/src/modules/commission/models/commission-rate.js +9 -6
- package/.medusa/server/src/modules/commission/models/commission-rule.d.ts +8 -3
- package/.medusa/server/src/modules/commission/models/index.d.ts +1 -0
- package/.medusa/server/src/modules/commission/models/index.js +4 -2
- package/.medusa/server/src/modules/commission/service.d.ts +170 -10
- package/.medusa/server/src/modules/commission/service.js +270 -114
- package/.medusa/server/src/modules/media/index.d.ts +21 -0
- package/.medusa/server/src/modules/media/index.js +12 -0
- package/.medusa/server/src/modules/media/migrations/Migration20260616000000.d.ts +5 -0
- package/.medusa/server/src/modules/media/migrations/Migration20260616000000.js +16 -0
- package/.medusa/server/src/modules/media/models/index.d.ts +1 -0
- package/.medusa/server/src/modules/media/models/index.js +9 -0
- package/.medusa/server/src/modules/media/models/media-image.d.ts +32 -0
- package/.medusa/server/src/modules/media/models/media-image.js +41 -0
- package/.medusa/server/src/modules/media/service.d.ts +17 -0
- package/.medusa/server/src/modules/media/service.js +10 -0
- package/.medusa/server/src/modules/offer/migrations/Migration20260622000000.d.ts +5 -0
- package/.medusa/server/src/modules/offer/migrations/Migration20260622000000.js +16 -0
- package/.medusa/server/src/modules/offer/models/offer.d.ts +2 -0
- package/.medusa/server/src/modules/offer/models/offer.js +8 -1
- package/.medusa/server/src/modules/offer/service.d.ts +10 -0
- package/.medusa/server/src/modules/offer/service.js +100 -1
- package/.medusa/server/src/modules/product-attribute/migrations/Migration20260601000002.d.ts +14 -0
- package/.medusa/server/src/modules/product-attribute/migrations/Migration20260601000002.js +31 -0
- package/.medusa/server/src/modules/product-attribute/models/product-attribute-value.d.ts +2 -0
- package/.medusa/server/src/modules/product-attribute/models/product-attribute-value.js +2 -1
- package/.medusa/server/src/modules/product-attribute/models/product-attribute.d.ts +2 -0
- package/.medusa/server/src/modules/product-attribute/models/product-attribute.js +2 -1
- package/.medusa/server/src/modules/product-attribute/service.d.ts +18 -3
- package/.medusa/server/src/modules/product-attribute/service.js +213 -1
- package/.medusa/server/src/modules/search/abstract-search-provider.d.ts +9 -0
- package/.medusa/server/src/modules/search/abstract-search-provider.js +20 -0
- package/.medusa/server/src/modules/search/index.d.ts +10 -0
- package/.medusa/server/src/modules/search/index.js +31 -0
- package/.medusa/server/src/modules/search/lib/build-docs.d.ts +84 -0
- package/.medusa/server/src/modules/search/lib/build-docs.js +207 -0
- package/.medusa/server/src/modules/search/lib/reindex.d.ts +7 -0
- package/.medusa/server/src/modules/search/lib/reindex.js +61 -0
- package/.medusa/server/src/modules/search/lib/sync.d.ts +9 -0
- package/.medusa/server/src/modules/search/lib/sync.js +73 -0
- package/.medusa/server/src/modules/search/loaders/providers.d.ts +5 -0
- package/.medusa/server/src/modules/search/loaders/providers.js +26 -0
- package/.medusa/server/src/modules/search/providers/index.d.ts +1 -0
- package/.medusa/server/src/modules/search/providers/index.js +6 -0
- package/.medusa/server/src/modules/search/providers/orama/index.d.ts +4 -0
- package/.medusa/server/src/modules/search/providers/orama/index.js +12 -0
- package/.medusa/server/src/modules/search/providers/orama/service.d.ts +19 -0
- package/.medusa/server/src/modules/search/providers/orama/service.js +148 -0
- package/.medusa/server/src/modules/search/providers/orama/types.d.ts +10 -0
- package/.medusa/server/src/modules/search/providers/orama/types.js +3 -0
- package/.medusa/server/src/modules/search/services/index.d.ts +2 -0
- package/.medusa/server/src/modules/search/services/index.js +24 -0
- package/.medusa/server/src/modules/search/services/search-module-service.d.ts +25 -0
- package/.medusa/server/src/modules/search/services/search-module-service.js +60 -0
- package/.medusa/server/src/modules/search/services/search-provider-service.d.ts +15 -0
- package/.medusa/server/src/modules/search/services/search-provider-service.js +30 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260616120000.d.ts +5 -0
- package/.medusa/server/src/modules/seller/migrations/Migration20260616120000.js +16 -0
- package/.medusa/server/src/modules/seller/models/address.d.ts +2 -2
- package/.medusa/server/src/modules/seller/models/member-invite.d.ts +2 -2
- package/.medusa/server/src/modules/seller/models/member.d.ts +2 -2
- package/.medusa/server/src/modules/seller/models/payment-details.d.ts +2 -2
- package/.medusa/server/src/modules/seller/models/payment-details.js +3 -3
- package/.medusa/server/src/modules/seller/models/professional-details.d.ts +2 -2
- package/.medusa/server/src/modules/seller/models/seller-member.d.ts +4 -4
- package/.medusa/server/src/modules/seller/models/seller.d.ts +2 -2
- package/.medusa/server/src/modules/seller/repositories/order-group.js +1 -11
- package/.medusa/server/src/modules/seller/service.d.ts +16 -16
- package/.medusa/server/src/modules/seller/service.js +1 -2
- 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 +12 -0
- package/.medusa/server/src/subscribers/order-edit-confirmed.js +34 -0
- package/.medusa/server/src/subscribers/search-offer-changed.d.ts +6 -0
- package/.medusa/server/src/subscribers/search-offer-changed.js +34 -0
- package/.medusa/server/src/subscribers/search-product-changed.d.ts +5 -0
- package/.medusa/server/src/subscribers/search-product-changed.js +29 -0
- package/.medusa/server/src/subscribers/search-product-deleted.d.ts +5 -0
- package/.medusa/server/src/subscribers/search-product-deleted.js +23 -0
- package/.medusa/server/src/subscribers/search-reindex.d.ts +3 -0
- package/.medusa/server/src/subscribers/search-reindex.js +23 -0
- package/.medusa/server/src/subscribers/search-seller-changed.d.ts +5 -0
- package/.medusa/server/src/subscribers/search-seller-changed.js +44 -0
- package/.medusa/server/src/utils/dashboard/dashboard-base.js +6 -2
- package/.medusa/server/src/utils/disable-medusa-middlewares.js +7 -1
- package/.medusa/server/src/workflows/cart/hooks/validate.js +1 -12
- package/.medusa/server/src/workflows/cart/steps/prepare-adjustments-from-promotion-actions.js +3 -5
- package/.medusa/server/src/workflows/cart/utils/fields.js +25 -9
- package/.medusa/server/src/workflows/cart/utils/prepare-line-item-data.js +1 -3
- package/.medusa/server/src/workflows/cart/workflows/add-seller-shipping-method-to-cart.js +1 -2
- package/.medusa/server/src/workflows/cart/workflows/complete-cart-with-split-orders.js +19 -16
- package/.medusa/server/src/workflows/cart/workflows/list-seller-shipping-options-for-cart.d.ts +2 -2
- package/.medusa/server/src/workflows/cart/workflows/list-seller-shipping-options-for-cart.js +1 -2
- package/.medusa/server/src/workflows/commission/steps/create-commission-rates.d.ts +1 -28
- package/.medusa/server/src/workflows/commission/steps/create-commission-rules.d.ts +13 -4
- package/.medusa/server/src/workflows/commission/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/commission/steps/index.js +2 -1
- package/.medusa/server/src/workflows/commission/steps/update-commission-rates.d.ts +13 -4
- package/.medusa/server/src/workflows/commission/steps/update-commission-rules.d.ts +13 -4
- package/.medusa/server/src/workflows/commission/steps/upsert-commission-lines.d.ts +2 -2
- package/.medusa/server/src/workflows/commission/steps/upsert-commission-lines.js +1 -1
- package/.medusa/server/src/workflows/commission/steps/validate-commission-rates-deletable.d.ts +2 -0
- package/.medusa/server/src/workflows/commission/steps/validate-commission-rates-deletable.js +19 -0
- package/.medusa/server/src/workflows/commission/workflows/create-commission-rates.d.ts +1 -28
- package/.medusa/server/src/workflows/commission/workflows/delete-commission-rates.d.ts +1 -2
- package/.medusa/server/src/workflows/commission/workflows/delete-commission-rates.js +3 -1
- package/.medusa/server/src/workflows/commission/workflows/refresh-order-commission-lines.js +2 -1
- package/.medusa/server/src/workflows/commission/workflows/update-commission-rates.d.ts +13 -4
- package/.medusa/server/src/workflows/customer-group/index.d.ts +2 -0
- package/.medusa/server/src/workflows/customer-group/index.js +19 -0
- package/.medusa/server/src/workflows/customer-group/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/customer-group/steps/index.js +18 -0
- package/.medusa/server/src/workflows/customer-group/steps/link-seller-customer-group.d.ts +6 -0
- package/.medusa/server/src/workflows/customer-group/steps/link-seller-customer-group.js +38 -0
- package/.medusa/server/src/workflows/customer-group/workflows/create-seller-customer-groups.d.ts +7 -0
- package/.medusa/server/src/workflows/customer-group/workflows/create-seller-customer-groups.js +20 -0
- package/.medusa/server/src/workflows/customer-group/workflows/index.d.ts +1 -0
- package/.medusa/server/src/workflows/customer-group/workflows/index.js +18 -0
- package/.medusa/server/src/workflows/index.d.ts +2 -0
- package/.medusa/server/src/workflows/index.js +3 -1
- package/.medusa/server/src/workflows/media/index.d.ts +2 -0
- package/.medusa/server/src/workflows/media/index.js +19 -0
- package/.medusa/server/src/workflows/media/steps/create-images.d.ts +20 -0
- package/.medusa/server/src/workflows/media/steps/create-images.js +21 -0
- package/.medusa/server/src/workflows/media/steps/delete-images.d.ts +3 -0
- package/.medusa/server/src/workflows/media/steps/delete-images.js +21 -0
- package/.medusa/server/src/workflows/media/steps/index.d.ts +2 -0
- package/.medusa/server/src/workflows/media/steps/index.js +19 -0
- package/.medusa/server/src/workflows/media/workflows/create-product-category-with-images.d.ts +8 -0
- package/.medusa/server/src/workflows/media/workflows/create-product-category-with-images.js +23 -0
- package/.medusa/server/src/workflows/media/workflows/create-product-collection-with-images.d.ts +8 -0
- package/.medusa/server/src/workflows/media/workflows/create-product-collection-with-images.js +23 -0
- package/.medusa/server/src/workflows/media/workflows/delete-product-category-with-images.d.ts +5 -0
- package/.medusa/server/src/workflows/media/workflows/delete-product-category-with-images.js +21 -0
- package/.medusa/server/src/workflows/media/workflows/delete-product-collection-with-images.d.ts +5 -0
- package/.medusa/server/src/workflows/media/workflows/delete-product-collection-with-images.js +21 -0
- package/.medusa/server/src/workflows/media/workflows/index.d.ts +8 -0
- package/.medusa/server/src/workflows/media/workflows/index.js +25 -0
- package/.medusa/server/src/workflows/media/workflows/set-category-images.d.ts +13 -0
- package/.medusa/server/src/workflows/media/workflows/set-category-images.js +71 -0
- package/.medusa/server/src/workflows/media/workflows/set-collection-images.d.ts +13 -0
- package/.medusa/server/src/workflows/media/workflows/set-collection-images.js +71 -0
- package/.medusa/server/src/workflows/media/workflows/update-product-category-with-images.d.ts +9 -0
- package/.medusa/server/src/workflows/media/workflows/update-product-category-with-images.js +22 -0
- package/.medusa/server/src/workflows/media/workflows/update-product-collection-with-images.d.ts +9 -0
- package/.medusa/server/src/workflows/media/workflows/update-product-collection-with-images.js +22 -0
- package/.medusa/server/src/workflows/offer/steps/add-offer-prices.d.ts +0 -12
- package/.medusa/server/src/workflows/offer/steps/add-offer-prices.js +1 -16
- package/.medusa/server/src/workflows/offer/steps/create-offers.d.ts +2 -0
- package/.medusa/server/src/workflows/offer/steps/ensure-variant-price-sets.d.ts +0 -9
- package/.medusa/server/src/workflows/offer/steps/ensure-variant-price-sets.js +1 -10
- package/.medusa/server/src/workflows/offer/steps/update-offers.d.ts +2 -5
- package/.medusa/server/src/workflows/offer/steps/update-offers.js +1 -1
- package/.medusa/server/src/workflows/offer/utils/assert-offer-price-ownership.d.ts +0 -11
- package/.medusa/server/src/workflows/offer/utils/assert-offer-price-ownership.js +1 -12
- package/.medusa/server/src/workflows/offer/utils/prepare-offer-inventory-input.d.ts +0 -10
- package/.medusa/server/src/workflows/offer/utils/prepare-offer-inventory-input.js +1 -19
- package/.medusa/server/src/workflows/offer/workflows/create-offers.js +4 -16
- package/.medusa/server/src/workflows/offer/workflows/delete-offers.js +7 -2
- package/.medusa/server/src/workflows/offer/workflows/update-offers.d.ts +0 -11
- package/.medusa/server/src/workflows/offer/workflows/update-offers.js +2 -23
- package/.medusa/server/src/workflows/order/workflows/cancel-order-fulfillment.d.ts +1 -2
- package/.medusa/server/src/workflows/order/workflows/cancel-order-fulfillment.js +1 -2
- 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 +149 -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 +152 -0
- package/.medusa/server/src/workflows/order/workflows/confirm-order-edit-request.d.ts +7 -0
- package/.medusa/server/src/workflows/order/workflows/confirm-order-edit-request.js +165 -0
- package/.medusa/server/src/workflows/order/workflows/confirm-return-receive.js +1 -9
- package/.medusa/server/src/workflows/order/workflows/create-order-fulfillment.js +2 -3
- package/.medusa/server/src/workflows/order/workflows/index.d.ts +3 -0
- package/.medusa/server/src/workflows/order/workflows/index.js +4 -1
- package/.medusa/server/src/workflows/order-group/utils/aggregate-status.js +1 -7
- package/.medusa/server/src/workflows/order-group/workflows/get-order-groups-list.d.ts +1 -0
- package/.medusa/server/src/workflows/order-group/workflows/get-order-groups-list.js +11 -2
- package/.medusa/server/src/workflows/payout/workflows/create-payout.js +34 -21
- package/.medusa/server/src/workflows/product/events.d.ts +0 -6
- package/.medusa/server/src/workflows/product/events.js +1 -7
- package/.medusa/server/src/workflows/product/steps/index.d.ts +0 -2
- package/.medusa/server/src/workflows/product/steps/index.js +1 -3
- package/.medusa/server/src/workflows/product/steps/validate-products-status.d.ts +0 -8
- package/.medusa/server/src/workflows/product/steps/validate-products-status.js +1 -9
- package/.medusa/server/src/workflows/product/steps/validate-seller-product-permissions.js +1 -3
- package/.medusa/server/src/workflows/product/workflows/assign-products-to-category.d.ts +12 -0
- package/.medusa/server/src/workflows/product/workflows/assign-products-to-category.js +23 -0
- package/.medusa/server/src/workflows/product/workflows/confirm-products.d.ts +4 -20
- package/.medusa/server/src/workflows/product/workflows/confirm-products.js +2 -13
- package/.medusa/server/src/workflows/product/workflows/create-products.d.ts +4 -52
- package/.medusa/server/src/workflows/product/workflows/create-products.js +69 -142
- package/.medusa/server/src/workflows/product/workflows/index.d.ts +1 -1
- package/.medusa/server/src/workflows/product/workflows/index.js +2 -2
- package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product-category.d.ts +0 -7
- package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product-category.js +1 -1
- package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product.d.ts +0 -7
- package/.medusa/server/src/workflows/product/workflows/link-sellers-to-product.js +1 -1
- package/.medusa/server/src/workflows/product/workflows/reject-product.d.ts +4 -11
- package/.medusa/server/src/workflows/product/workflows/reject-product.js +2 -8
- package/.medusa/server/src/workflows/product/workflows/request-product-change.d.ts +4 -18
- package/.medusa/server/src/workflows/product/workflows/request-product-change.js +2 -15
- package/.medusa/server/src/workflows/product-attribute/events.d.ts +0 -9
- package/.medusa/server/src/workflows/product-attribute/events.js +1 -10
- package/.medusa/server/src/workflows/product-attribute/steps/create-product-attribute-values.d.ts +1 -31
- package/.medusa/server/src/workflows/product-attribute/steps/create-product-attributes.d.ts +1 -41
- package/.medusa/server/src/workflows/product-attribute/steps/create-product-attributes.js +1 -1
- package/.medusa/server/src/workflows/product-attribute/steps/detach-product-option-values-from-product.d.ts +14 -0
- package/.medusa/server/src/workflows/product-attribute/steps/detach-product-option-values-from-product.js +40 -0
- package/.medusa/server/src/workflows/product-attribute/steps/index.d.ts +3 -4
- package/.medusa/server/src/workflows/product-attribute/steps/index.js +4 -5
- package/.medusa/server/src/workflows/product-attribute/steps/update-product-attribute-values.d.ts +6 -3
- package/.medusa/server/src/workflows/product-attribute/steps/update-product-attribute-values.js +17 -2
- package/.medusa/server/src/workflows/product-attribute/steps/update-product-attributes.d.ts +1 -31
- package/.medusa/server/src/workflows/product-attribute/steps/validate-product-attributes-not-linked.d.ts +2 -0
- package/.medusa/server/src/workflows/product-attribute/steps/validate-product-attributes-not-linked.js +28 -0
- package/.medusa/server/src/workflows/product-attribute/steps/validate-product-attributes-not-required.d.ts +7 -0
- package/.medusa/server/src/workflows/product-attribute/steps/validate-product-attributes-not-required.js +16 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/add-product-attributes-to-product.d.ts +9 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/add-product-attributes-to-product.js +242 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/create-and-link-product-attributes.d.ts +15 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/create-and-link-product-attributes.js +28 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/create-product-attribute-values.js +44 -3
- package/.medusa/server/src/workflows/product-attribute/workflows/create-product-attributes.js +41 -17
- package/.medusa/server/src/workflows/product-attribute/workflows/delete-product-attribute-values.js +36 -15
- package/.medusa/server/src/workflows/product-attribute/workflows/delete-product-attributes.d.ts +0 -7
- package/.medusa/server/src/workflows/product-attribute/workflows/delete-product-attributes.js +11 -8
- package/.medusa/server/src/workflows/product-attribute/workflows/index.d.ts +4 -5
- package/.medusa/server/src/workflows/product-attribute/workflows/index.js +5 -6
- package/.medusa/server/src/workflows/product-attribute/workflows/remove-product-attributes-from-product.d.ts +10 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/remove-product-attributes-from-product.js +83 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attribute-values.js +34 -1
- package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attributes-on-product.d.ts +11 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attributes-on-product.js +285 -0
- package/.medusa/server/src/workflows/product-attribute/workflows/update-product-attributes.js +15 -1
- package/.medusa/server/src/workflows/product-attribute/workflows/upsert-product-attribute-values.d.ts +4 -11
- package/.medusa/server/src/workflows/product-attribute/workflows/upsert-product-attribute-values.js +19 -19
- package/.medusa/server/src/workflows/product-edit/events.d.ts +0 -7
- package/.medusa/server/src/workflows/product-edit/events.js +1 -8
- package/.medusa/server/src/workflows/product-edit/steps/apply-variant-image-links.d.ts +16 -0
- package/.medusa/server/src/workflows/product-edit/steps/apply-variant-image-links.js +35 -0
- package/.medusa/server/src/workflows/product-edit/steps/confirm-product-change-validation.d.ts +0 -4
- package/.medusa/server/src/workflows/product-edit/steps/confirm-product-change-validation.js +1 -5
- package/.medusa/server/src/workflows/product-edit/steps/confirm-product-changes.d.ts +0 -6
- package/.medusa/server/src/workflows/product-edit/steps/confirm-product-changes.js +1 -7
- package/.medusa/server/src/workflows/product-edit/steps/create-product-change-actions.d.ts +0 -5
- package/.medusa/server/src/workflows/product-edit/steps/create-product-change-actions.js +1 -6
- package/.medusa/server/src/workflows/product-edit/steps/create-product-changes.d.ts +0 -6
- package/.medusa/server/src/workflows/product-edit/steps/create-product-changes.js +1 -1
- package/.medusa/server/src/workflows/product-edit/steps/decline-product-change.d.ts +0 -5
- package/.medusa/server/src/workflows/product-edit/steps/decline-product-change.js +1 -6
- package/.medusa/server/src/workflows/product-edit/steps/index.d.ts +1 -0
- package/.medusa/server/src/workflows/product-edit/steps/index.js +2 -1
- package/.medusa/server/src/workflows/product-edit/steps/update-product-change-actions.d.ts +0 -5
- package/.medusa/server/src/workflows/product-edit/steps/update-product-change-actions.js +1 -6
- package/.medusa/server/src/workflows/product-edit/steps/validate-no-pending-product-change.d.ts +0 -6
- package/.medusa/server/src/workflows/product-edit/steps/validate-no-pending-product-change.js +2 -8
- package/.medusa/server/src/workflows/product-edit/workflows/apply-product-attribute-change-actions.d.ts +5 -19
- package/.medusa/server/src/workflows/product-edit/workflows/apply-product-attribute-change-actions.js +11 -128
- package/.medusa/server/src/workflows/product-edit/workflows/apply-product-change-actions.d.ts +0 -31
- package/.medusa/server/src/workflows/product-edit/workflows/apply-product-change-actions.js +43 -50
- package/.medusa/server/src/workflows/product-edit/workflows/auto-confirm-product-change.d.ts +1 -9
- package/.medusa/server/src/workflows/product-edit/workflows/auto-confirm-product-change.js +3 -11
- package/.medusa/server/src/workflows/product-edit/workflows/confirm-product-change.d.ts +0 -11
- package/.medusa/server/src/workflows/product-edit/workflows/confirm-product-change.js +1 -12
- package/.medusa/server/src/workflows/product-edit/workflows/index.d.ts +1 -1
- package/.medusa/server/src/workflows/product-edit/workflows/index.js +2 -2
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-delete-product.d.ts +0 -7
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-delete-product.js +10 -9
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-attributes.d.ts +4 -46
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-attributes.js +11 -162
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-product.d.ts +16 -0
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-product.js +139 -0
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-variants.d.ts +0 -10
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-variants.js +71 -17
- package/.medusa/server/src/workflows/product-edit/workflows/record-product-audit-change.d.ts +0 -24
- package/.medusa/server/src/workflows/product-edit/workflows/record-product-audit-change.js +1 -15
- package/.medusa/server/src/workflows/product-edit/workflows/stage-product-change.d.ts +1 -25
- package/.medusa/server/src/workflows/product-edit/workflows/stage-product-change.js +2 -15
- package/.medusa/server/src/workflows/promotion/steps/register-usage.d.ts +0 -3
- package/.medusa/server/src/workflows/promotion/steps/register-usage.js +1 -4
- package/.medusa/server/src/workflows/seller/steps/create-seller-member.d.ts +4 -4
- package/.medusa/server/src/workflows/seller/steps/update-member.d.ts +2 -2
- package/.medusa/server/src/workflows/seller/steps/update-seller-member.d.ts +4 -4
- package/.medusa/server/src/workflows/seller/workflows/accept-member-invite.js +1 -2
- package/.medusa/server/src/workflows/seller/workflows/add-seller-member.d.ts +4 -4
- package/.medusa/server/src/workflows/seller/workflows/approve-seller.d.ts +4 -4
- package/.medusa/server/src/workflows/seller/workflows/approve-seller.js +2 -1
- package/.medusa/server/src/workflows/seller/workflows/create-sellers.js +1 -2
- package/.medusa/server/src/workflows/seller/workflows/suspend-seller.d.ts +4 -4
- package/.medusa/server/src/workflows/seller/workflows/suspend-seller.js +2 -1
- package/.medusa/server/src/workflows/seller/workflows/terminate-seller.d.ts +4 -4
- package/.medusa/server/src/workflows/seller/workflows/terminate-seller.js +2 -1
- package/.medusa/server/src/workflows/seller/workflows/unsuspend-seller.d.ts +4 -4
- package/.medusa/server/src/workflows/seller/workflows/unsuspend-seller.js +2 -1
- package/.medusa/server/src/workflows/seller/workflows/unterminate-seller.d.ts +4 -4
- package/.medusa/server/src/workflows/seller/workflows/unterminate-seller.js +2 -1
- package/.medusa/server/src/workflows/seller/workflows/update-member.d.ts +12 -101
- package/.medusa/server/src/workflows/seller/workflows/update-member.js +6 -2
- package/package.json +22 -21
- package/.medusa/server/src/api/admin/products/[id]/attributes/[attribute_id]/route.d.ts +0 -4
- package/.medusa/server/src/api/admin/products/[id]/attributes/[attribute_id]/route.js +0 -65
- package/.medusa/server/src/api/admin/products/[id]/attributes/route.d.ts +0 -5
- package/.medusa/server/src/api/admin/products/[id]/attributes/route.js +0 -63
- package/.medusa/server/src/api/vendor/products/[id]/attributes/[attribute_id]/route.d.ts +0 -10
- package/.medusa/server/src/api/vendor/products/[id]/attributes/[attribute_id]/route.js +0 -62
- package/.medusa/server/src/api/vendor/products/[id]/attributes/route.d.ts +0 -15
- package/.medusa/server/src/api/vendor/products/[id]/attributes/route.js +0 -82
- package/.medusa/server/src/links/line-item-commission-line-link.js +0 -21
- package/.medusa/server/src/links/product-attribute-value-link.d.ts +0 -22
- package/.medusa/server/src/links/product-attribute-value-link.js +0 -46
- package/.medusa/server/src/links/product-variant-attribute-link.js +0 -21
- package/.medusa/server/src/links/product-variant-attribute-value-link.js +0 -21
- package/.medusa/server/src/workflows/product/steps/replace-product-attribute-value-links.d.ts +0 -28
- package/.medusa/server/src/workflows/product/steps/replace-product-attribute-value-links.js +0 -72
- package/.medusa/server/src/workflows/product/steps/resolve-attribute-refs.d.ts +0 -90
- package/.medusa/server/src/workflows/product/steps/resolve-attribute-refs.js +0 -185
- package/.medusa/server/src/workflows/product/workflows/update-products.d.ts +0 -39
- package/.medusa/server/src/workflows/product/workflows/update-products.js +0 -161
- package/.medusa/server/src/workflows/product-attribute/steps/upsert-product-attribute-values.d.ts +0 -43
- package/.medusa/server/src/workflows/product-attribute/steps/upsert-product-attribute-values.js +0 -51
- package/.medusa/server/src/workflows/product-attribute/steps/upsert-product-options-for-axis.d.ts +0 -7
- package/.medusa/server/src/workflows/product-attribute/steps/upsert-product-options-for-axis.js +0 -59
- package/.medusa/server/src/workflows/product-attribute/steps/validate-attribute-accepts-values.d.ts +0 -6
- package/.medusa/server/src/workflows/product-attribute/steps/validate-attribute-accepts-values.js +0 -20
- package/.medusa/server/src/workflows/product-attribute/steps/validate-product-attribute-input.d.ts +0 -7
- package/.medusa/server/src/workflows/product-attribute/steps/validate-product-attribute-input.js +0 -20
- package/.medusa/server/src/workflows/product-attribute/workflows/add-product-attribute.d.ts +0 -52
- package/.medusa/server/src/workflows/product-attribute/workflows/add-product-attribute.js +0 -120
- package/.medusa/server/src/workflows/product-attribute/workflows/batch-product-attribute-values.d.ts +0 -23
- package/.medusa/server/src/workflows/product-attribute/workflows/batch-product-attribute-values.js +0 -252
- package/.medusa/server/src/workflows/product-attribute/workflows/detach-product-attribute.d.ts +0 -17
- package/.medusa/server/src/workflows/product-attribute/workflows/detach-product-attribute.js +0 -62
- package/.medusa/server/src/workflows/product-attribute/workflows/materialize-product-attributes.d.ts +0 -135
- package/.medusa/server/src/workflows/product-attribute/workflows/materialize-product-attributes.js +0 -43
- package/.medusa/server/src/workflows/product-attribute/workflows/sync-product-attribute-options.d.ts +0 -24
- package/.medusa/server/src/workflows/product-attribute/workflows/sync-product-attribute-options.js +0 -27
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-fields.d.ts +0 -25
- package/.medusa/server/src/workflows/product-edit/workflows/product-edit-update-fields.js +0 -148
- /package/.medusa/server/src/links/{line-item-commission-line-link.d.ts → offer-product-link.d.ts} +0 -0
- /package/.medusa/server/src/links/{product-variant-attribute-link.d.ts → seller-customer-group-link.d.ts} +0 -0
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
export type VendorGetRefundReasonParamsType = z.infer<typeof VendorGetRefundReasonParams>;
|
|
3
3
|
export declare const VendorGetRefundReasonParams: z.ZodObject<{
|
|
4
4
|
fields: z.ZodOptional<z.ZodString>;
|
|
5
|
-
},
|
|
5
|
+
}, z.core.$strip, z.ZodTypeAny, {
|
|
6
6
|
fields?: string | undefined;
|
|
7
7
|
}, {
|
|
8
8
|
fields?: string | undefined;
|
|
@@ -10,15 +10,14 @@ export declare const VendorGetRefundReasonParams: z.ZodObject<{
|
|
|
10
10
|
export type VendorGetRefundReasonsParamsType = z.infer<typeof VendorGetRefundReasonsParams>;
|
|
11
11
|
export declare const VendorGetRefundReasonsParams: z.ZodObject<{
|
|
12
12
|
fields: z.ZodOptional<z.ZodString>;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
13
|
+
offset: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
14
|
+
limit: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
16
15
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
17
|
-
with_deleted: z.
|
|
16
|
+
with_deleted: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
|
|
18
17
|
} & {
|
|
19
18
|
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
20
19
|
q: z.ZodOptional<z.ZodString>;
|
|
21
|
-
created_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
20
|
+
created_at: z.ZodOptional<z.ZodUnion<readonly [any, z.ZodObject<{
|
|
22
21
|
$eq: any;
|
|
23
22
|
$ne: any;
|
|
24
23
|
$in: any;
|
|
@@ -31,7 +30,7 @@ export declare const VendorGetRefundReasonsParams: z.ZodObject<{
|
|
|
31
30
|
$gte: any;
|
|
32
31
|
$lt: any;
|
|
33
32
|
$lte: any;
|
|
34
|
-
},
|
|
33
|
+
}, z.core.$strip, z.ZodTypeAny, {
|
|
35
34
|
$eq?: any;
|
|
36
35
|
$ne?: any;
|
|
37
36
|
$in?: any;
|
|
@@ -58,7 +57,7 @@ export declare const VendorGetRefundReasonsParams: z.ZodObject<{
|
|
|
58
57
|
$lt?: any;
|
|
59
58
|
$lte?: any;
|
|
60
59
|
}>]>>;
|
|
61
|
-
updated_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
60
|
+
updated_at: z.ZodOptional<z.ZodUnion<readonly [any, z.ZodObject<{
|
|
62
61
|
$eq: any;
|
|
63
62
|
$ne: any;
|
|
64
63
|
$in: any;
|
|
@@ -71,7 +70,7 @@ export declare const VendorGetRefundReasonsParams: z.ZodObject<{
|
|
|
71
70
|
$gte: any;
|
|
72
71
|
$lt: any;
|
|
73
72
|
$lte: any;
|
|
74
|
-
},
|
|
73
|
+
}, z.core.$strip, z.ZodTypeAny, {
|
|
75
74
|
$eq?: any;
|
|
76
75
|
$ne?: any;
|
|
77
76
|
$in?: any;
|
|
@@ -99,23 +98,23 @@ export declare const VendorGetRefundReasonsParams: z.ZodObject<{
|
|
|
99
98
|
$lte?: any;
|
|
100
99
|
}>]>>;
|
|
101
100
|
}, "strip", z.ZodTypeAny, {
|
|
102
|
-
|
|
103
|
-
limit: number;
|
|
101
|
+
order?: string | undefined;
|
|
104
102
|
id?: string | string[] | undefined;
|
|
105
103
|
created_at?: any;
|
|
106
104
|
updated_at?: any;
|
|
107
|
-
q?: string | undefined;
|
|
108
105
|
fields?: string | undefined;
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
offset?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
107
|
+
limit?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
108
|
+
with_deleted?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
|
|
109
|
+
q?: string | undefined;
|
|
111
110
|
}, {
|
|
111
|
+
order?: string | undefined;
|
|
112
112
|
id?: string | string[] | undefined;
|
|
113
113
|
created_at?: any;
|
|
114
114
|
updated_at?: any;
|
|
115
|
-
offset?: unknown;
|
|
116
|
-
limit?: unknown;
|
|
117
|
-
q?: string | undefined;
|
|
118
115
|
fields?: string | undefined;
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
offset?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
117
|
+
limit?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
118
|
+
with_deleted?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
|
|
119
|
+
q?: string | undefined;
|
|
121
120
|
}>;
|
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
export type VendorGetRegionParamsType = z.infer<typeof VendorGetRegionParams>;
|
|
3
3
|
export declare const VendorGetRegionParams: z.ZodObject<{
|
|
4
4
|
fields: z.ZodOptional<z.ZodString>;
|
|
5
|
-
},
|
|
5
|
+
}, z.core.$strip, z.ZodTypeAny, {
|
|
6
6
|
fields?: string | undefined;
|
|
7
7
|
}, {
|
|
8
8
|
fields?: string | undefined;
|
|
@@ -10,17 +10,16 @@ export declare const VendorGetRegionParams: z.ZodObject<{
|
|
|
10
10
|
export type VendorGetRegionsParamsType = z.infer<typeof VendorGetRegionsParams>;
|
|
11
11
|
export declare const VendorGetRegionsParams: z.ZodObject<{
|
|
12
12
|
fields: z.ZodOptional<z.ZodString>;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
13
|
+
offset: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
14
|
+
limit: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
16
15
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
17
|
-
with_deleted: z.
|
|
16
|
+
with_deleted: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
|
|
18
17
|
} & {
|
|
19
18
|
q: z.ZodOptional<z.ZodString>;
|
|
20
19
|
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
21
20
|
currency_code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
22
21
|
name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
23
|
-
created_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
22
|
+
created_at: z.ZodOptional<z.ZodUnion<readonly [any, z.ZodObject<{
|
|
24
23
|
$eq: any;
|
|
25
24
|
$ne: any;
|
|
26
25
|
$in: any;
|
|
@@ -33,7 +32,7 @@ export declare const VendorGetRegionsParams: z.ZodObject<{
|
|
|
33
32
|
$gte: any;
|
|
34
33
|
$lt: any;
|
|
35
34
|
$lte: any;
|
|
36
|
-
},
|
|
35
|
+
}, z.core.$strip, z.ZodTypeAny, {
|
|
37
36
|
$eq?: any;
|
|
38
37
|
$ne?: any;
|
|
39
38
|
$in?: any;
|
|
@@ -60,7 +59,7 @@ export declare const VendorGetRegionsParams: z.ZodObject<{
|
|
|
60
59
|
$lt?: any;
|
|
61
60
|
$lte?: any;
|
|
62
61
|
}>]>>;
|
|
63
|
-
updated_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
62
|
+
updated_at: z.ZodOptional<z.ZodUnion<readonly [any, z.ZodObject<{
|
|
64
63
|
$eq: any;
|
|
65
64
|
$ne: any;
|
|
66
65
|
$in: any;
|
|
@@ -73,7 +72,7 @@ export declare const VendorGetRegionsParams: z.ZodObject<{
|
|
|
73
72
|
$gte: any;
|
|
74
73
|
$lt: any;
|
|
75
74
|
$lte: any;
|
|
76
|
-
},
|
|
75
|
+
}, z.core.$strip, z.ZodTypeAny, {
|
|
77
76
|
$eq?: any;
|
|
78
77
|
$ne?: any;
|
|
79
78
|
$in?: any;
|
|
@@ -101,27 +100,27 @@ export declare const VendorGetRegionsParams: z.ZodObject<{
|
|
|
101
100
|
$lte?: any;
|
|
102
101
|
}>]>>;
|
|
103
102
|
}, "strip", z.ZodTypeAny, {
|
|
104
|
-
|
|
105
|
-
limit: number;
|
|
103
|
+
order?: string | undefined;
|
|
106
104
|
id?: string | string[] | undefined;
|
|
107
105
|
created_at?: any;
|
|
108
106
|
updated_at?: any;
|
|
109
|
-
q?: string | undefined;
|
|
110
107
|
fields?: string | undefined;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
offset?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
109
|
+
limit?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
110
|
+
with_deleted?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
|
|
111
|
+
q?: string | undefined;
|
|
114
112
|
name?: string | string[] | undefined;
|
|
113
|
+
currency_code?: string | string[] | undefined;
|
|
115
114
|
}, {
|
|
115
|
+
order?: string | undefined;
|
|
116
116
|
id?: string | string[] | undefined;
|
|
117
117
|
created_at?: any;
|
|
118
118
|
updated_at?: any;
|
|
119
|
-
offset?: unknown;
|
|
120
|
-
limit?: unknown;
|
|
121
|
-
q?: string | undefined;
|
|
122
119
|
fields?: string | undefined;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
offset?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
121
|
+
limit?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodNumber>>>;
|
|
122
|
+
with_deleted?: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodBoolean>>;
|
|
123
|
+
q?: string | undefined;
|
|
126
124
|
name?: string | string[] | undefined;
|
|
125
|
+
currency_code?: string | string[] | undefined;
|
|
127
126
|
}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework/http";
|
|
2
|
+
import { HttpTypes } from "@medusajs/framework/types";
|
|
3
|
+
export declare const GET: (req: AuthenticatedMedusaRequest<HttpTypes.AdminReservationParams>, res: MedusaResponse<HttpTypes.AdminReservationResponse>) => Promise<void>;
|
|
4
|
+
export declare const POST: (req: AuthenticatedMedusaRequest<HttpTypes.AdminUpdateReservation, HttpTypes.AdminReservationParams>, res: MedusaResponse<HttpTypes.AdminReservationResponse>) => Promise<void>;
|
|
5
|
+
export declare const DELETE: (req: AuthenticatedMedusaRequest, res: MedusaResponse<HttpTypes.AdminReservationDeleteResponse>) => Promise<void>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DELETE = exports.POST = exports.GET = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const core_flows_1 = require("@medusajs/core-flows");
|
|
6
|
+
const helpers_1 = require("../helpers");
|
|
7
|
+
const GET = async (req, res) => {
|
|
8
|
+
const { id } = req.params;
|
|
9
|
+
const reservation = await (0, helpers_1.refetchReservation)(id, req.scope, req.queryConfig.fields);
|
|
10
|
+
if (!reservation) {
|
|
11
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Reservation with id: ${id} was not found`);
|
|
12
|
+
}
|
|
13
|
+
res.status(200).json({ reservation });
|
|
14
|
+
};
|
|
15
|
+
exports.GET = GET;
|
|
16
|
+
const POST = async (req, res) => {
|
|
17
|
+
const { id } = req.params;
|
|
18
|
+
await (0, core_flows_1.updateReservationsWorkflow)(req.scope).run({
|
|
19
|
+
input: {
|
|
20
|
+
updates: [{ ...req.validatedBody, id }],
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
const reservation = await (0, helpers_1.refetchReservation)(id, req.scope, req.queryConfig.fields);
|
|
24
|
+
res.status(200).json({ reservation });
|
|
25
|
+
};
|
|
26
|
+
exports.POST = POST;
|
|
27
|
+
const DELETE = async (req, res) => {
|
|
28
|
+
const id = req.params.id;
|
|
29
|
+
await (0, core_flows_1.deleteReservationsWorkflow)(req.scope).run({
|
|
30
|
+
input: { ids: [id] },
|
|
31
|
+
});
|
|
32
|
+
res.status(200).json({
|
|
33
|
+
id,
|
|
34
|
+
object: "reservation",
|
|
35
|
+
deleted: true,
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
exports.DELETE = DELETE;
|
|
39
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9yZXNlcnZhdGlvbnMvW2lkXS9yb3V0ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFJQSxxREFBdUQ7QUFDdkQscURBRzZCO0FBRzdCLHdDQUErQztBQUV4QyxNQUFNLEdBQUcsR0FBRyxLQUFLLEVBQ3RCLEdBQWlFLEVBQ2pFLEdBQXVELEVBQ3ZELEVBQUU7SUFDRixNQUFNLEVBQUUsRUFBRSxFQUFFLEdBQUcsR0FBRyxDQUFDLE1BQU0sQ0FBQTtJQUV6QixNQUFNLFdBQVcsR0FBRyxNQUFNLElBQUEsNEJBQWtCLEVBQzFDLEVBQUUsRUFDRixHQUFHLENBQUMsS0FBSyxFQUNULEdBQUcsQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUN2QixDQUFBO0lBRUQsSUFBSSxDQUFDLFdBQVcsRUFBRSxDQUFDO1FBQ2pCLE1BQU0sSUFBSSxtQkFBVyxDQUNuQixtQkFBVyxDQUFDLEtBQUssQ0FBQyxTQUFTLEVBQzNCLHdCQUF3QixFQUFFLGdCQUFnQixDQUMzQyxDQUFBO0lBQ0gsQ0FBQztJQUVELEdBQUcsQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDLEVBQUUsV0FBVyxFQUFFLENBQUMsQ0FBQTtBQUN2QyxDQUFDLENBQUE7QUFwQlksUUFBQSxHQUFHLE9Bb0JmO0FBRU0sTUFBTSxJQUFJLEdBQUcsS0FBSyxFQUN2QixHQUdDLEVBQ0QsR0FBdUQsRUFDdkQsRUFBRTtJQUNGLE1BQU0sRUFBRSxFQUFFLEVBQUUsR0FBRyxHQUFHLENBQUMsTUFBTSxDQUFBO0lBQ3pCLE1BQU0sSUFBQSx1Q0FBMEIsRUFBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUMsR0FBRyxDQUFDO1FBQzlDLEtBQUssRUFBRTtZQUNMLE9BQU8sRUFBRSxDQUFDLEVBQUUsR0FBRyxHQUFHLENBQUMsYUFBYSxFQUFFLEVBQUUsRUFBRSxDQUFDO1NBQ3hDO0tBQ0YsQ0FBQyxDQUFBO0lBRUYsTUFBTSxXQUFXLEdBQUcsTUFBTSxJQUFBLDRCQUFrQixFQUMxQyxFQUFFLEVBQ0YsR0FBRyxDQUFDLEtBQUssRUFDVCxHQUFHLENBQUMsV0FBVyxDQUFDLE1BQU0sQ0FDdkIsQ0FBQTtJQUNELEdBQUcsQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDLEVBQUUsV0FBVyxFQUFFLENBQUMsQ0FBQTtBQUN2QyxDQUFDLENBQUE7QUFwQlksUUFBQSxJQUFJLFFBb0JoQjtBQUVNLE1BQU0sTUFBTSxHQUFHLEtBQUssRUFDekIsR0FBK0IsRUFDL0IsR0FBNkQsRUFDN0QsRUFBRTtJQUNGLE1BQU0sRUFBRSxHQUFHLEdBQUcsQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFBO0lBRXhCLE1BQU0sSUFBQSx1Q0FBMEIsRUFBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUMsR0FBRyxDQUFDO1FBQzlDLEtBQUssRUFBRSxFQUFFLEdBQUcsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFO0tBQ3JCLENBQUMsQ0FBQTtJQUVGLEdBQUcsQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDO1FBQ25CLEVBQUU7UUFDRixNQUFNLEVBQUUsYUFBYTtRQUNyQixPQUFPLEVBQUUsSUFBSTtLQUNkLENBQUMsQ0FBQTtBQUNKLENBQUMsQ0FBQTtBQWZZLFFBQUEsTUFBTSxVQWVsQiJ9
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.refetchReservation = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const refetchReservation = async (reservationId, scope, fields) => {
|
|
6
|
+
const remoteQuery = scope.resolve(utils_1.ContainerRegistrationKeys.REMOTE_QUERY);
|
|
7
|
+
const queryObject = (0, utils_1.remoteQueryObjectFromString)({
|
|
8
|
+
entryPoint: "reservation",
|
|
9
|
+
variables: {
|
|
10
|
+
filters: { id: reservationId },
|
|
11
|
+
},
|
|
12
|
+
fields: fields,
|
|
13
|
+
});
|
|
14
|
+
const reservations = await remoteQuery(queryObject);
|
|
15
|
+
return reservations[0];
|
|
16
|
+
};
|
|
17
|
+
exports.refetchReservation = refetchReservation;
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcGkvdmVuZG9yL3Jlc2VydmF0aW9ucy9oZWxwZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLHFEQUdrQztBQUUzQixNQUFNLGtCQUFrQixHQUFHLEtBQUssRUFDckMsYUFBcUIsRUFDckIsS0FBc0IsRUFDdEIsTUFBZ0IsRUFDaEIsRUFBRTtJQUNGLE1BQU0sV0FBVyxHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsaUNBQXlCLENBQUMsWUFBWSxDQUFDLENBQUE7SUFDekUsTUFBTSxXQUFXLEdBQUcsSUFBQSxtQ0FBMkIsRUFBQztRQUM5QyxVQUFVLEVBQUUsYUFBYTtRQUN6QixTQUFTLEVBQUU7WUFDVCxPQUFPLEVBQUUsRUFBRSxFQUFFLEVBQUUsYUFBYSxFQUFFO1NBQy9CO1FBQ0QsTUFBTSxFQUFFLE1BQU07S0FDZixDQUFDLENBQUE7SUFFRixNQUFNLFlBQVksR0FBRyxNQUFNLFdBQVcsQ0FBQyxXQUFXLENBQUMsQ0FBQTtJQUNuRCxPQUFPLFlBQVksQ0FBQyxDQUFDLENBQUMsQ0FBQTtBQUN4QixDQUFDLENBQUE7QUFoQlksUUFBQSxrQkFBa0Isc0JBZ0I5QiJ9
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.vendorReservationsMiddlewares = void 0;
|
|
4
|
+
const framework_1 = require("@medusajs/framework");
|
|
5
|
+
const query_config_1 = require("./query-config");
|
|
6
|
+
const validators_1 = require("./validators");
|
|
7
|
+
exports.vendorReservationsMiddlewares = [
|
|
8
|
+
{
|
|
9
|
+
method: ["GET"],
|
|
10
|
+
matcher: "/vendor/reservations",
|
|
11
|
+
middlewares: [
|
|
12
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.VendorGetReservationsParams, query_config_1.vendorReservationQueryConfig.list),
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
method: ["GET"],
|
|
17
|
+
matcher: "/vendor/reservations/:id",
|
|
18
|
+
middlewares: [
|
|
19
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.VendorGetReservationParams, query_config_1.vendorReservationQueryConfig.retrieve),
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
method: ["POST"],
|
|
24
|
+
matcher: "/vendor/reservations",
|
|
25
|
+
middlewares: [
|
|
26
|
+
(0, framework_1.validateAndTransformBody)(validators_1.VendorCreateReservation),
|
|
27
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.VendorGetReservationParams, query_config_1.vendorReservationQueryConfig.retrieve),
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
method: ["POST"],
|
|
32
|
+
matcher: "/vendor/reservations/:id",
|
|
33
|
+
middlewares: [
|
|
34
|
+
(0, framework_1.validateAndTransformBody)(validators_1.VendorUpdateReservation),
|
|
35
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.VendorGetReservationParams, query_config_1.vendorReservationQueryConfig.retrieve),
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
method: ["DELETE"],
|
|
40
|
+
matcher: "/vendor/reservations/:id",
|
|
41
|
+
middlewares: [],
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlkZGxld2FyZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9yZXNlcnZhdGlvbnMvbWlkZGxld2FyZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBR0EsbURBRzRCO0FBRTVCLGlEQUV1QjtBQUN2Qiw2Q0FLcUI7QUFFUixRQUFBLDZCQUE2QixHQUFzQjtJQUM5RDtRQUNFLE1BQU0sRUFBRSxDQUFDLEtBQUssQ0FBQztRQUNmLE9BQU8sRUFBRSxzQkFBc0I7UUFDL0IsV0FBVyxFQUFFO1lBQ1gsSUFBQSxxQ0FBeUIsRUFDdkIsd0NBQTJCLEVBQzNCLDJDQUE0QixDQUFDLElBQUksQ0FDbEM7U0FDRjtLQUNGO0lBQ0Q7UUFDRSxNQUFNLEVBQUUsQ0FBQyxLQUFLLENBQUM7UUFDZixPQUFPLEVBQUUsMEJBQTBCO1FBQ25DLFdBQVcsRUFBRTtZQUNYLElBQUEscUNBQXlCLEVBQ3ZCLHVDQUEwQixFQUMxQiwyQ0FBNEIsQ0FBQyxRQUFRLENBQ3RDO1NBQ0Y7S0FDRjtJQUNEO1FBQ0UsTUFBTSxFQUFFLENBQUMsTUFBTSxDQUFDO1FBQ2hCLE9BQU8sRUFBRSxzQkFBc0I7UUFDL0IsV0FBVyxFQUFFO1lBQ1gsSUFBQSxvQ0FBd0IsRUFBQyxvQ0FBdUIsQ0FBQztZQUNqRCxJQUFBLHFDQUF5QixFQUN2Qix1Q0FBMEIsRUFDMUIsMkNBQTRCLENBQUMsUUFBUSxDQUN0QztTQUNGO0tBQ0Y7SUFDRDtRQUNFLE1BQU0sRUFBRSxDQUFDLE1BQU0sQ0FBQztRQUNoQixPQUFPLEVBQUUsMEJBQTBCO1FBQ25DLFdBQVcsRUFBRTtZQUNYLElBQUEsb0NBQXdCLEVBQUMsb0NBQXVCLENBQUM7WUFDakQsSUFBQSxxQ0FBeUIsRUFDdkIsdUNBQTBCLEVBQzFCLDJDQUE0QixDQUFDLFFBQVEsQ0FDdEM7U0FDRjtLQUNGO0lBQ0Q7UUFDRSxNQUFNLEVBQUUsQ0FBQyxRQUFRLENBQUM7UUFDbEIsT0FBTyxFQUFFLDBCQUEwQjtRQUNuQyxXQUFXLEVBQUUsRUFBRTtLQUNoQjtDQUNGLENBQUEifQ==
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const defaultVendorReservationFields: string[];
|
|
2
|
+
export declare const retrieveTransformQueryConfig: {
|
|
3
|
+
defaults: string[];
|
|
4
|
+
isList: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const listTransformQueryConfig: {
|
|
7
|
+
isList: boolean;
|
|
8
|
+
defaults: string[];
|
|
9
|
+
};
|
|
10
|
+
export declare const vendorReservationQueryConfig: {
|
|
11
|
+
list: {
|
|
12
|
+
isList: boolean;
|
|
13
|
+
defaults: string[];
|
|
14
|
+
};
|
|
15
|
+
retrieve: {
|
|
16
|
+
defaults: string[];
|
|
17
|
+
isList: boolean;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.vendorReservationQueryConfig = exports.listTransformQueryConfig = exports.retrieveTransformQueryConfig = exports.defaultVendorReservationFields = void 0;
|
|
4
|
+
const defaultVendorInventoryItemFields = [
|
|
5
|
+
"id",
|
|
6
|
+
"sku",
|
|
7
|
+
"origin_country",
|
|
8
|
+
"hs_code",
|
|
9
|
+
"requires_shipping",
|
|
10
|
+
"mid_code",
|
|
11
|
+
"material",
|
|
12
|
+
"weight",
|
|
13
|
+
"length",
|
|
14
|
+
"height",
|
|
15
|
+
"width",
|
|
16
|
+
"title",
|
|
17
|
+
"description",
|
|
18
|
+
"thumbnail",
|
|
19
|
+
"metadata",
|
|
20
|
+
];
|
|
21
|
+
exports.defaultVendorReservationFields = [
|
|
22
|
+
"id",
|
|
23
|
+
"location_id",
|
|
24
|
+
"inventory_item_id",
|
|
25
|
+
"quantity",
|
|
26
|
+
"line_item_id",
|
|
27
|
+
"description",
|
|
28
|
+
"metadata",
|
|
29
|
+
"created_at",
|
|
30
|
+
"updated_at",
|
|
31
|
+
...defaultVendorInventoryItemFields.map((f) => `inventory_item.${f}`),
|
|
32
|
+
];
|
|
33
|
+
exports.retrieveTransformQueryConfig = {
|
|
34
|
+
defaults: exports.defaultVendorReservationFields,
|
|
35
|
+
isList: false,
|
|
36
|
+
};
|
|
37
|
+
exports.listTransformQueryConfig = {
|
|
38
|
+
...exports.retrieveTransformQueryConfig,
|
|
39
|
+
isList: true,
|
|
40
|
+
};
|
|
41
|
+
exports.vendorReservationQueryConfig = {
|
|
42
|
+
list: exports.listTransformQueryConfig,
|
|
43
|
+
retrieve: exports.retrieveTransformQueryConfig,
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnktY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwaS92ZW5kb3IvcmVzZXJ2YXRpb25zL3F1ZXJ5LWNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxNQUFNLGdDQUFnQyxHQUFHO0lBQ3ZDLElBQUk7SUFDSixLQUFLO0lBQ0wsZ0JBQWdCO0lBQ2hCLFNBQVM7SUFDVCxtQkFBbUI7SUFDbkIsVUFBVTtJQUNWLFVBQVU7SUFDVixRQUFRO0lBQ1IsUUFBUTtJQUNSLFFBQVE7SUFDUixPQUFPO0lBQ1AsT0FBTztJQUNQLGFBQWE7SUFDYixXQUFXO0lBQ1gsVUFBVTtDQUNYLENBQUE7QUFFWSxRQUFBLDhCQUE4QixHQUFHO0lBQzVDLElBQUk7SUFDSixhQUFhO0lBQ2IsbUJBQW1CO0lBQ25CLFVBQVU7SUFDVixjQUFjO0lBQ2QsYUFBYTtJQUNiLFVBQVU7SUFDVixZQUFZO0lBQ1osWUFBWTtJQUNaLEdBQUcsZ0NBQWdDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxrQkFBa0IsQ0FBQyxFQUFFLENBQUM7Q0FDdEUsQ0FBQTtBQUVZLFFBQUEsNEJBQTRCLEdBQUc7SUFDMUMsUUFBUSxFQUFFLHNDQUE4QjtJQUN4QyxNQUFNLEVBQUUsS0FBSztDQUNkLENBQUE7QUFFWSxRQUFBLHdCQUF3QixHQUFHO0lBQ3RDLEdBQUcsb0NBQTRCO0lBQy9CLE1BQU0sRUFBRSxJQUFJO0NBQ2IsQ0FBQTtBQUVZLFFBQUEsNEJBQTRCLEdBQUc7SUFDMUMsSUFBSSxFQUFFLGdDQUF3QjtJQUM5QixRQUFRLEVBQUUsb0NBQTRCO0NBQ3ZDLENBQUEifQ==
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework/http";
|
|
2
|
+
import { HttpTypes } from "@medusajs/framework/types";
|
|
3
|
+
export declare const GET: (req: AuthenticatedMedusaRequest<HttpTypes.AdminGetReservationsParams>, res: MedusaResponse<HttpTypes.AdminReservationListResponse>) => Promise<void>;
|
|
4
|
+
export declare const POST: (req: AuthenticatedMedusaRequest<HttpTypes.AdminCreateReservation, HttpTypes.AdminReservationParams>, res: MedusaResponse<HttpTypes.AdminReservationResponse>) => Promise<void>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.POST = exports.GET = void 0;
|
|
4
|
+
const utils_1 = require("@medusajs/framework/utils");
|
|
5
|
+
const core_flows_1 = require("@medusajs/core-flows");
|
|
6
|
+
const helpers_1 = require("./helpers");
|
|
7
|
+
const GET = async (req, res) => {
|
|
8
|
+
const remoteQuery = req.scope.resolve(utils_1.ContainerRegistrationKeys.REMOTE_QUERY);
|
|
9
|
+
const queryObject = (0, utils_1.remoteQueryObjectFromString)({
|
|
10
|
+
entryPoint: "reservation",
|
|
11
|
+
variables: {
|
|
12
|
+
filters: req.filterableFields,
|
|
13
|
+
...req.queryConfig.pagination,
|
|
14
|
+
},
|
|
15
|
+
fields: req.queryConfig.fields,
|
|
16
|
+
});
|
|
17
|
+
const { rows: reservations, metadata } = await remoteQuery(queryObject);
|
|
18
|
+
res.json({
|
|
19
|
+
reservations,
|
|
20
|
+
count: metadata.count,
|
|
21
|
+
offset: metadata.skip,
|
|
22
|
+
limit: metadata.take,
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
exports.GET = GET;
|
|
26
|
+
const POST = async (req, res) => {
|
|
27
|
+
const input = [req.validatedBody];
|
|
28
|
+
const { result } = await (0, core_flows_1.createReservationsWorkflow)(req.scope).run({
|
|
29
|
+
input: { reservations: input },
|
|
30
|
+
});
|
|
31
|
+
const reservation = await (0, helpers_1.refetchReservation)(result[0].id, req.scope, req.queryConfig.fields);
|
|
32
|
+
res.status(200).json({ reservation });
|
|
33
|
+
};
|
|
34
|
+
exports.POST = POST;
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9yZXNlcnZhdGlvbnMvcm91dGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBSUEscURBR2tDO0FBRWxDLHFEQUFpRTtBQUdqRSx1Q0FBOEM7QUFFdkMsTUFBTSxHQUFHLEdBQUcsS0FBSyxFQUN0QixHQUFxRSxFQUNyRSxHQUEyRCxFQUMzRCxFQUFFO0lBQ0YsTUFBTSxXQUFXLEdBQUcsR0FBRyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsaUNBQXlCLENBQUMsWUFBWSxDQUFDLENBQUE7SUFFN0UsTUFBTSxXQUFXLEdBQUcsSUFBQSxtQ0FBMkIsRUFBQztRQUM5QyxVQUFVLEVBQUUsYUFBYTtRQUN6QixTQUFTLEVBQUU7WUFDVCxPQUFPLEVBQUUsR0FBRyxDQUFDLGdCQUFnQjtZQUM3QixHQUFHLEdBQUcsQ0FBQyxXQUFXLENBQUMsVUFBVTtTQUM5QjtRQUNELE1BQU0sRUFBRSxHQUFHLENBQUMsV0FBVyxDQUFDLE1BQU07S0FDL0IsQ0FBQyxDQUFBO0lBRUYsTUFBTSxFQUFFLElBQUksRUFBRSxZQUFZLEVBQUUsUUFBUSxFQUFFLEdBQUcsTUFBTSxXQUFXLENBQUMsV0FBVyxDQUFDLENBQUE7SUFFdkUsR0FBRyxDQUFDLElBQUksQ0FBQztRQUNQLFlBQVk7UUFDWixLQUFLLEVBQUUsUUFBUSxDQUFDLEtBQUs7UUFDckIsTUFBTSxFQUFFLFFBQVEsQ0FBQyxJQUFJO1FBQ3JCLEtBQUssRUFBRSxRQUFRLENBQUMsSUFBSTtLQUNyQixDQUFDLENBQUE7QUFDSixDQUFDLENBQUE7QUF2QlksUUFBQSxHQUFHLE9BdUJmO0FBRU0sTUFBTSxJQUFJLEdBQUcsS0FBSyxFQUN2QixHQUdDLEVBQ0QsR0FBdUQsRUFDdkQsRUFBRTtJQUNGLE1BQU0sS0FBSyxHQUFHLENBQUMsR0FBRyxDQUFDLGFBQWEsQ0FBQyxDQUFBO0lBRWpDLE1BQU0sRUFBRSxNQUFNLEVBQUUsR0FBRyxNQUFNLElBQUEsdUNBQTBCLEVBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFDLEdBQUcsQ0FBQztRQUNqRSxLQUFLLEVBQUUsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFFO0tBQy9CLENBQUMsQ0FBQTtJQUVGLE1BQU0sV0FBVyxHQUFHLE1BQU0sSUFBQSw0QkFBa0IsRUFDMUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFDWixHQUFHLENBQUMsS0FBSyxFQUNULEdBQUcsQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUN2QixDQUFBO0lBQ0QsR0FBRyxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQUMsQ0FBQyxJQUFJLENBQUMsRUFBRSxXQUFXLEVBQUUsQ0FBQyxDQUFBO0FBQ3ZDLENBQUMsQ0FBQTtBQW5CWSxRQUFBLElBQUksUUFtQmhCIn0=
|