Skip to content

Commit

Permalink
Merge branch 'develop' into feat/custom-line-item-price
Browse files Browse the repository at this point in the history
  • Loading branch information
olivermrbl authored Dec 18, 2024
2 parents e5feb06 + bde4b82 commit cd645db
Show file tree
Hide file tree
Showing 252 changed files with 228,933 additions and 159,726 deletions.
5 changes: 5 additions & 0 deletions .changeset/little-books-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/types": patch
---

Add description and Label to FilterableRefundReasonProps
5 changes: 5 additions & 0 deletions .changeset/wet-queens-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/core-flows": patch
---

fix(core-flows): export getItemTaxLinesStep
6 changes: 6 additions & 0 deletions integration-tests/modules/__tests__/order/order.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ medusaIntegrationTestRunner({
const created = await orderModule.createOrders({
region_id: "test_region_id",
email: "[email protected]",
metadata: {
foo: "bar",
},
items: [
{
title: "Custom Item 2",
Expand Down Expand Up @@ -108,6 +111,9 @@ medusaIntegrationTestRunner({
payment_status: "not_paid",
region_id: "test_region_id",
fulfillments: [],
metadata: {
foo: "bar",
},
fulfillment_status: "not_fulfilled",
summary: expect.objectContaining({
// TODO: add all summary fields
Expand Down
28 changes: 28 additions & 0 deletions packages/admin/dashboard/src/hooks/api/fulfillment-providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ export const fulfillmentProvidersQueryKeys = queryKeysFactory(
FULFILLMENT_PROVIDERS_QUERY_KEY
)

const FULFILLMENT_PROVIDER_OPTIONS_QUERY_KEY =
"fulfillment_provider_options" as const
export const fulfillmentProviderOptionsQueryKeys = queryKeysFactory(
FULFILLMENT_PROVIDER_OPTIONS_QUERY_KEY
)

export const useFulfillmentProviders = (
query?: HttpTypes.AdminFulfillmentProviderListParams,
options?: Omit<
Expand All @@ -29,3 +35,25 @@ export const useFulfillmentProviders = (

return { ...data, ...rest }
}

export const useFulfillmentProviderOptions = (
providerId: string,
options?: Omit<
UseQueryOptions<
HttpTypes.AdminFulfillmentProviderOptionsListResponse,
FetchError,
HttpTypes.AdminFulfillmentProviderOptionsListResponse,
QueryKey
>,
"queryFn" | "queryKey"
>
) => {
const { data, ...rest } = useQuery({
queryFn: () =>
sdk.admin.fulfillmentProvider.listFulfillmentOptions(providerId),
queryKey: fulfillmentProviderOptionsQueryKeys.list(providerId),
...options,
})

return { ...data, ...rest }
}
3 changes: 1 addition & 2 deletions packages/admin/dashboard/src/hooks/use-combobox-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type ComboboxQueryParams = {

export const useComboboxData = <
TResponse extends ComboboxExternalData,
TParams extends ComboboxQueryParams
TParams extends ComboboxQueryParams,
>({
queryKey,
queryFn,
Expand Down Expand Up @@ -50,7 +50,6 @@ export const useComboboxData = <
enabled: !!defaultValue,
})


const { data, ...rest } = useInfiniteQuery({
queryKey: [...queryKey, query],
queryFn: async ({ pageParam = 0 }) => {
Expand Down
Loading

0 comments on commit cd645db

Please sign in to comment.