feat(medusa-react): Upgrade react-query and clean up dependencies (#2969)
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"medusa-react": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Udates the required version of the peer dependency `react-query` to `@tanstack/react-query` (v4). Also fixes ´react-query´ being defined as both a dependency and peer dependency.
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
|
import { QueryClient } from "@tanstack/react-query"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { QueryClient } from "react-query"
|
|
||||||
import { MedusaProvider } from "../src"
|
import { MedusaProvider } from "../src"
|
||||||
|
|
||||||
const queryClient = new QueryClient({
|
const queryClient = new QueryClient({
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ In addition, because medusa-react is built on top of react-query, you can pass a
|
|||||||
// App.tsx
|
// App.tsx
|
||||||
|
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import { QueryClient } from "react-query"
|
import { QueryClient } from "@tanstack/react-query"
|
||||||
import { MedusaProvider } from "medusa-react"
|
import { MedusaProvider } from "medusa-react"
|
||||||
import MyStorefront from "./my-storefront"
|
import MyStorefront from "./my-storefront"
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ In general, the queries will return everything react-query returns from [`useQue
|
|||||||
So, in other words, we can express what the above query returns as the following:
|
So, in other words, we can express what the above query returns as the following:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { UseQueryResult } from "react-query"
|
import { UseQueryResult } from "@tanstack/react-query"
|
||||||
|
|
||||||
// This is what a Medusa server returns when you hit the GET /store/products endpoint
|
// This is what a Medusa server returns when you hit the GET /store/products endpoint
|
||||||
type ProductsResponse = {
|
type ProductsResponse = {
|
||||||
@@ -237,7 +237,7 @@ The first step to using the `SessionCartProvider` is by inserting it somewhere u
|
|||||||
// App.tsx
|
// App.tsx
|
||||||
|
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import { QueryClient } from "react-query"
|
import { QueryClient } from "@tanstack/react-query"
|
||||||
import { MedusaProvider, SessionCartProvider } from "medusa-react"
|
import { MedusaProvider, SessionCartProvider } from "medusa-react"
|
||||||
import MyStorefront from "./my-storefront"
|
import MyStorefront from "./my-storefront"
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ export default App
|
|||||||
// App.tsx
|
// App.tsx
|
||||||
|
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import { QueryClient } from "react-query"
|
import { QueryClient } from "@tanstack/react-query"
|
||||||
import { MedusaProvider, CartProvider } from "medusa-react"
|
import { MedusaProvider, CartProvider } from "medusa-react"
|
||||||
import MyStorefront from "./my-storefront"
|
import MyStorefront from "./my-storefront"
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@medusajs/medusa": "^1.7.1",
|
"@medusajs/medusa": "^1.7.1",
|
||||||
"react": ">=16",
|
"@tanstack/react-query": ">=4.22.0",
|
||||||
"react-query": ">= 3.29.0"
|
"react": ">=16"
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
@@ -54,6 +54,7 @@
|
|||||||
"@storybook/addon-links": "^6.3.12",
|
"@storybook/addon-links": "^6.3.12",
|
||||||
"@storybook/addons": "^6.3.12",
|
"@storybook/addons": "^6.3.12",
|
||||||
"@storybook/react": "^6.3.12",
|
"@storybook/react": "^6.3.12",
|
||||||
|
"@tanstack/react-query": "^4.22.0",
|
||||||
"@testing-library/react": "^12.1.2",
|
"@testing-library/react": "^12.1.2",
|
||||||
"@testing-library/react-hooks": "^7.0.2",
|
"@testing-library/react-hooks": "^7.0.2",
|
||||||
"@types/jest": "^27.0.3",
|
"@types/jest": "^27.0.3",
|
||||||
@@ -77,8 +78,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@medusajs/medusa-js": "^1.3.5",
|
"@medusajs/medusa-js": "^1.3.5",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21"
|
||||||
"react-query": "^3.31.0"
|
|
||||||
},
|
},
|
||||||
"msw": {
|
"msw": {
|
||||||
"workerDirectory": "public"
|
"workerDirectory": "public"
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
import React from "react"
|
|
||||||
import { QueryClientProvider, QueryClientProviderProps } from "react-query"
|
|
||||||
import Medusa from "@medusajs/medusa-js"
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
import {
|
||||||
|
QueryClientProvider,
|
||||||
|
QueryClientProviderProps,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
|
import React from "react"
|
||||||
|
|
||||||
interface MedusaContextState {
|
interface MedusaContextState {
|
||||||
client: Medusa
|
client: Medusa
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
import { AdminAuthRes, AdminPostAuthReq } from "@medusajs/medusa"
|
import { AdminAuthRes, AdminPostAuthReq } from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { adminAuthKeys } from "."
|
import { adminAuthKeys } from "."
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { AdminAuthRes } from "@medusajs/medusa"
|
import { AdminAuthRes } from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
import { AdminBatchJobRes, AdminPostBatchesReq } from "@medusajs/medusa"
|
import { AdminBatchJobRes, AdminPostBatchesReq } from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
|
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
AdminGetBatchParams,
|
AdminGetBatchParams,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { adminOrderKeys } from "./../orders/queries"
|
|
||||||
import {
|
import {
|
||||||
AdminOrdersRes,
|
AdminOrdersRes,
|
||||||
AdminPostOrdersOrderClaimsClaimFulfillmentsReq,
|
AdminPostOrdersOrderClaimsClaimFulfillmentsReq,
|
||||||
@@ -7,9 +6,14 @@ import {
|
|||||||
AdminPostOrdersOrderClaimsReq,
|
AdminPostOrdersOrderClaimsReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
import { adminOrderKeys } from "./../orders/queries"
|
||||||
|
|
||||||
export const useAdminCreateClaim = (
|
export const useAdminCreateClaim = (
|
||||||
orderId: string,
|
orderId: string,
|
||||||
|
|||||||
@@ -7,7 +7,11 @@ import {
|
|||||||
AdminPostProductsToCollectionReq,
|
AdminPostProductsToCollectionReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { adminCollectionKeys } from "."
|
import { adminCollectionKeys } from "."
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
@@ -65,7 +69,6 @@ export const useAdminDeleteCollection = (
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hook returns function for adding multiple products to a collection.
|
* Hook returns function for adding multiple products to a collection.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
AdminGetCollectionsParams,
|
AdminGetCollectionsParams,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -3,7 +3,11 @@ import {
|
|||||||
AdminPostCurrenciesCurrencyReq,
|
AdminPostCurrenciesCurrencyReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { adminCurrenciesKeys } from "."
|
import { adminCurrenciesKeys } from "."
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
AdminGetCurrenciesParams,
|
AdminGetCurrenciesParams,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -6,8 +6,12 @@ import {
|
|||||||
AdminPostCustomerGroupsGroupReq,
|
AdminPostCustomerGroupsGroupReq,
|
||||||
AdminPostCustomerGroupsReq,
|
AdminPostCustomerGroupsReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
|
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
AdminGetCustomersParams,
|
AdminGetCustomersParams,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
|
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
|
|
||||||
import { AdminCustomersRes, AdminPostCustomersReq } from "@medusajs/medusa"
|
import { AdminCustomersRes, AdminPostCustomersReq } from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
AdminGetCustomersParams,
|
AdminGetCustomersParams,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils"
|
import { queryKeysFactory } from "../../utils"
|
||||||
|
|||||||
@@ -11,7 +11,11 @@ import {
|
|||||||
AdminPostDiscountsReq,
|
AdminPostDiscountsReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
import { adminDiscountKeys } from "./queries"
|
import { adminDiscountKeys } from "./queries"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
AdminGetDiscountsParams,
|
AdminGetDiscountsParams,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils"
|
import { queryKeysFactory } from "../../utils"
|
||||||
|
|||||||
@@ -5,10 +5,14 @@ import {
|
|||||||
AdminPostDraftOrdersDraftOrderLineItemsReq,
|
AdminPostDraftOrdersDraftOrderLineItemsReq,
|
||||||
AdminPostDraftOrdersDraftOrderRegisterPaymentRes,
|
AdminPostDraftOrdersDraftOrderRegisterPaymentRes,
|
||||||
AdminPostDraftOrdersDraftOrderReq,
|
AdminPostDraftOrdersDraftOrderReq,
|
||||||
AdminPostDraftOrdersReq
|
AdminPostDraftOrdersReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
import { adminDraftOrderKeys } from "./queries"
|
import { adminDraftOrderKeys } from "./queries"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
AdminGetDraftOrdersParams,
|
AdminGetDraftOrdersParams,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -4,7 +4,11 @@ import {
|
|||||||
AdminPostGiftCardsReq,
|
AdminPostGiftCardsReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { adminGiftCardKeys } from "."
|
import { adminGiftCardKeys } from "."
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
|
AdminGetGiftCardsParams,
|
||||||
AdminGiftCardsListRes,
|
AdminGiftCardsListRes,
|
||||||
AdminGiftCardsRes,
|
AdminGiftCardsRes,
|
||||||
AdminGetGiftCardsParams,
|
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
import { buildOptions } from "../../utils/buildOptions"
|
|
||||||
import {
|
import {
|
||||||
AdminInviteDeleteRes,
|
AdminInviteDeleteRes,
|
||||||
AdminPostInvitesInviteAcceptReq,
|
AdminPostInvitesInviteAcceptReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response, AdminPostInvitesPayload } from "@medusajs/medusa-js"
|
import { AdminPostInvitesPayload, Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
import { adminInviteKeys } from "./queries"
|
import { adminInviteKeys } from "./queries"
|
||||||
|
|
||||||
export const useAdminAcceptInvite = (
|
export const useAdminAcceptInvite = (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { AdminListInvitesRes } from "@medusajs/medusa"
|
import { AdminListInvitesRes } from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -5,7 +5,11 @@ import {
|
|||||||
AdminPostNotesReq,
|
AdminPostNotesReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { adminNoteKeys } from "."
|
import { adminNoteKeys } from "."
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
|
AdminGetNotesParams,
|
||||||
AdminNotesListRes,
|
AdminNotesListRes,
|
||||||
AdminNotesRes,
|
AdminNotesRes,
|
||||||
AdminGetNotesParams,
|
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -3,10 +3,14 @@ import {
|
|||||||
AdminPostNotificationsNotificationResendReq,
|
AdminPostNotificationsNotificationResendReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { adminNotificationKeys } from "./queries"
|
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
import { adminNotificationKeys } from "./queries"
|
||||||
|
|
||||||
export const useAdminResendNotification = (
|
export const useAdminResendNotification = (
|
||||||
id: string,
|
id: string,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
AdminNotificationsListRes,
|
AdminNotificationsListRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -1,20 +1,24 @@
|
|||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AdminOrderEditDeleteRes,
|
AdminOrderEditDeleteRes,
|
||||||
AdminOrderEditItemChangeDeleteRes,
|
AdminOrderEditItemChangeDeleteRes,
|
||||||
AdminOrderEditsRes,
|
AdminOrderEditsRes,
|
||||||
AdminPostOrderEditsEditLineItemsLineItemReq,
|
AdminPostOrderEditsEditLineItemsLineItemReq,
|
||||||
|
AdminPostOrderEditsEditLineItemsReq,
|
||||||
AdminPostOrderEditsOrderEditReq,
|
AdminPostOrderEditsOrderEditReq,
|
||||||
AdminPostOrderEditsReq,
|
AdminPostOrderEditsReq,
|
||||||
AdminPostOrderEditsEditLineItemsReq,
|
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
|
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
|
||||||
import { useMedusa } from "../../../contexts"
|
|
||||||
import { adminOrderKeys } from "../orders"
|
|
||||||
import { adminOrderEditsKeys } from "."
|
import { adminOrderEditsKeys } from "."
|
||||||
|
import { useMedusa } from "../../../contexts"
|
||||||
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
import { adminOrderKeys } from "../orders"
|
||||||
|
|
||||||
export const useAdminCreateOrderEdit = (
|
export const useAdminCreateOrderEdit = (
|
||||||
options?: UseMutationOptions<
|
options?: UseMutationOptions<
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import {
|
|||||||
GetOrderEditsOrderEditParams,
|
GetOrderEditsOrderEditParams,
|
||||||
GetOrderEditsParams,
|
GetOrderEditsParams,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { queryKeysFactory } from "../../utils"
|
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { useQuery } from "react-query"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
|
import { queryKeysFactory } from "../../utils"
|
||||||
|
|
||||||
const ADMIN_ORDER_EDITS_QUERY_KEY = `admin_order_edits` as const
|
const ADMIN_ORDER_EDITS_QUERY_KEY = `admin_order_edits` as const
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { adminOrderKeys } from "./queries"
|
|
||||||
import {
|
import {
|
||||||
AdminOrdersRes,
|
AdminOrdersRes,
|
||||||
AdminPostOrdersOrderFulfillmentsReq,
|
AdminPostOrdersOrderFulfillmentsReq,
|
||||||
@@ -9,9 +8,14 @@ import {
|
|||||||
AdminPostOrdersOrderShippingMethodsReq,
|
AdminPostOrdersOrderShippingMethodsReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
import { adminOrderKeys } from "./queries"
|
||||||
|
|
||||||
export const useAdminUpdateOrder = (
|
export const useAdminUpdateOrder = (
|
||||||
id: string,
|
id: string,
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import {
|
import {
|
||||||
|
AdminGetOrdersParams,
|
||||||
AdminOrdersListRes,
|
AdminOrdersListRes,
|
||||||
AdminOrdersRes,
|
AdminOrdersRes,
|
||||||
AdminGetOrdersParams,
|
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { FindParams } from "@medusajs/medusa/dist/types/common"
|
import { FindParams } from "@medusajs/medusa/dist/types/common"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
@@ -16,7 +16,7 @@ export const adminOrderKeys = {
|
|||||||
...queryKeysFactory(ADMIN_ORDERS_QUERY_KEY),
|
...queryKeysFactory(ADMIN_ORDERS_QUERY_KEY),
|
||||||
detailOrder(id: string, query?: FindParams) {
|
detailOrder(id: string, query?: FindParams) {
|
||||||
return [...this.detail(id), { ...(query || {}) }]
|
return [...this.detail(id), { ...(query || {}) }]
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
type OrderQueryKeys = typeof adminOrderKeys
|
type OrderQueryKeys = typeof adminOrderKeys
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AdminPaymentCollectionDeleteRes,
|
AdminPaymentCollectionDeleteRes,
|
||||||
@@ -7,9 +11,9 @@ import {
|
|||||||
AdminUpdatePaymentCollectionsReq,
|
AdminUpdatePaymentCollectionsReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
|
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
|
||||||
import { useMedusa } from "../../../contexts"
|
|
||||||
import { adminPaymentCollectionQueryKeys } from "."
|
import { adminPaymentCollectionQueryKeys } from "."
|
||||||
|
import { useMedusa } from "../../../contexts"
|
||||||
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|
||||||
export const useAdminDeletePaymentCollection = (
|
export const useAdminDeletePaymentCollection = (
|
||||||
id: string,
|
id: string,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { queryKeysFactory } from "../../utils"
|
|
||||||
import { AdminPaymentCollectionsRes } from "@medusajs/medusa"
|
import { AdminPaymentCollectionsRes } from "@medusajs/medusa"
|
||||||
import { useQuery } from "react-query"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { queryKeysFactory } from "../../utils"
|
||||||
|
|
||||||
const PAYMENT_COLLECTION_QUERY_KEY = `paymentCollection` as const
|
const PAYMENT_COLLECTION_QUERY_KEY = `paymentCollection` as const
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AdminPaymentRes,
|
AdminPaymentRes,
|
||||||
@@ -7,9 +11,9 @@ import {
|
|||||||
AdminRefundRes,
|
AdminRefundRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
|
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
|
||||||
import { useMedusa } from "../../../contexts"
|
|
||||||
import { adminPaymentQueryKeys } from "."
|
import { adminPaymentQueryKeys } from "."
|
||||||
|
import { useMedusa } from "../../../contexts"
|
||||||
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|
||||||
export const useAdminPaymentsCapturePayment = (
|
export const useAdminPaymentsCapturePayment = (
|
||||||
id: string,
|
id: string,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { queryKeysFactory } from "../../utils"
|
|
||||||
import { AdminPaymentRes } from "@medusajs/medusa"
|
import { AdminPaymentRes } from "@medusajs/medusa"
|
||||||
import { useQuery } from "react-query"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { queryKeysFactory } from "../../utils"
|
||||||
|
|
||||||
const PAYMENT_QUERY_KEY = `payment` as const
|
const PAYMENT_QUERY_KEY = `payment` as const
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,25 @@
|
|||||||
import {
|
import {
|
||||||
AdminPriceListRes,
|
AdminDeletePriceListPricesPricesReq,
|
||||||
|
AdminPostPriceListPricesPricesReq,
|
||||||
AdminPostPriceListsPriceListPriceListReq,
|
AdminPostPriceListsPriceListPriceListReq,
|
||||||
AdminPostPriceListsPriceListReq,
|
AdminPostPriceListsPriceListReq,
|
||||||
AdminPostPriceListPricesPricesReq,
|
|
||||||
AdminDeletePriceListPricesPricesReq,
|
|
||||||
AdminPriceListDeleteRes,
|
|
||||||
AdminPriceListDeleteBatchRes,
|
AdminPriceListDeleteBatchRes,
|
||||||
AdminPriceListDeleteProductPricesRes,
|
AdminPriceListDeleteProductPricesRes,
|
||||||
|
AdminPriceListDeleteRes,
|
||||||
AdminPriceListDeleteVariantPricesRes,
|
AdminPriceListDeleteVariantPricesRes,
|
||||||
|
AdminPriceListRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
import { adminPriceListKeys } from "./queries"
|
|
||||||
import { adminProductKeys } from "../products"
|
import { adminProductKeys } from "../products"
|
||||||
import { adminVariantKeys } from "../variants"
|
import { adminVariantKeys } from "../variants"
|
||||||
|
import { adminPriceListKeys } from "./queries"
|
||||||
|
|
||||||
export const useAdminCreatePriceList = (
|
export const useAdminCreatePriceList = (
|
||||||
options?: UseMutationOptions<
|
options?: UseMutationOptions<
|
||||||
@@ -141,7 +145,7 @@ export const useAdminDeletePriceListProductPrices = (
|
|||||||
[
|
[
|
||||||
adminPriceListKeys.detail(id),
|
adminPriceListKeys.detail(id),
|
||||||
adminPriceListKeys.lists(),
|
adminPriceListKeys.lists(),
|
||||||
adminProductKeys.detail(productId)
|
adminProductKeys.detail(productId),
|
||||||
],
|
],
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
@@ -166,7 +170,7 @@ export const useAdminDeletePriceListVariantPrices = (
|
|||||||
[
|
[
|
||||||
adminPriceListKeys.detail(id),
|
adminPriceListKeys.detail(id),
|
||||||
adminPriceListKeys.lists(),
|
adminPriceListKeys.lists(),
|
||||||
adminVariantKeys.detail(variantId)
|
adminVariantKeys.detail(variantId),
|
||||||
],
|
],
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import {
|
import {
|
||||||
AdminGetPriceListsPriceListProductsParams,
|
|
||||||
AdminGetPriceListPaginationParams,
|
AdminGetPriceListPaginationParams,
|
||||||
AdminPriceListsListRes,
|
AdminGetPriceListsPriceListProductsParams,
|
||||||
AdminPriceListRes,
|
AdminPriceListRes,
|
||||||
|
AdminPriceListsListRes,
|
||||||
AdminProductsListRes,
|
AdminProductsListRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
@@ -21,7 +21,7 @@ export const adminPriceListKeys = {
|
|||||||
"products" as const,
|
"products" as const,
|
||||||
{ ...(query || {}) },
|
{ ...(query || {}) },
|
||||||
] as const
|
] as const
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
type PriceListQueryKeys = typeof adminPriceListKeys
|
type PriceListQueryKeys = typeof adminPriceListKeys
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import {
|
import {
|
||||||
AdminProductTagsListRes,
|
|
||||||
AdminGetProductTagsParams,
|
AdminGetProductTagsParams,
|
||||||
|
AdminProductTagsListRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import {
|
import {
|
||||||
AdminProductTypesListRes,
|
|
||||||
AdminGetProductTypesParams,
|
AdminGetProductTypesParams,
|
||||||
|
AdminProductTypesListRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -11,7 +11,11 @@ import {
|
|||||||
AdminProductsRes,
|
AdminProductsRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
import { adminProductKeys } from "./queries"
|
import { adminProductKeys } from "./queries"
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import {
|
import {
|
||||||
AdminProductsListRes,
|
|
||||||
AdminProductsRes,
|
|
||||||
AdminGetProductsParams,
|
AdminGetProductsParams,
|
||||||
|
AdminProductsListRes,
|
||||||
AdminProductsListTagsRes,
|
AdminProductsListTagsRes,
|
||||||
|
AdminProductsRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
AdminPublishableApiKeyDeleteRes,
|
AdminPostPublishableApiKeySalesChannelsBatchReq,
|
||||||
AdminPublishableApiKeysRes,
|
|
||||||
AdminPostPublishableApiKeysPublishableApiKeyReq,
|
AdminPostPublishableApiKeysPublishableApiKeyReq,
|
||||||
AdminPostPublishableApiKeysReq,
|
AdminPostPublishableApiKeysReq,
|
||||||
AdminPostPublishableApiKeySalesChannelsBatchReq,
|
AdminPublishableApiKeyDeleteRes,
|
||||||
|
AdminPublishableApiKeysRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
|
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
|
||||||
import { useMedusa } from "../../../contexts"
|
|
||||||
import { adminPublishableApiKeysKeys } from "."
|
import { adminPublishableApiKeysKeys } from "."
|
||||||
|
import { useMedusa } from "../../../contexts"
|
||||||
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|
||||||
export const useAdminCreatePublishableApiKey = (
|
export const useAdminCreatePublishableApiKey = (
|
||||||
options?: UseMutationOptions<
|
options?: UseMutationOptions<
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import {
|
|||||||
GetPublishableApiKeySalesChannelsParams,
|
GetPublishableApiKeySalesChannelsParams,
|
||||||
GetPublishableApiKeysParams,
|
GetPublishableApiKeysParams,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { useQuery } from "react-query"
|
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import { useQuery } from "@tanstack/react-query"
|
||||||
|
|
||||||
import { queryKeysFactory } from "../../utils"
|
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
|
import { queryKeysFactory } from "../../utils"
|
||||||
|
|
||||||
const ADMIN_PUBLISHABLE_API_KEYS_QUERY_KEY =
|
const ADMIN_PUBLISHABLE_API_KEYS_QUERY_KEY =
|
||||||
`admin_publishable_api_keys` as const
|
`admin_publishable_api_keys` as const
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
import { adminRegionKeys } from "./queries"
|
|
||||||
import {
|
import {
|
||||||
AdminRegionsDeleteRes,
|
|
||||||
AdminRegionsRes,
|
|
||||||
AdminPostRegionsRegionReq,
|
|
||||||
AdminPostRegionsReq,
|
|
||||||
AdminPostRegionsRegionCountriesReq,
|
AdminPostRegionsRegionCountriesReq,
|
||||||
AdminPostRegionsRegionFulfillmentProvidersReq,
|
AdminPostRegionsRegionFulfillmentProvidersReq,
|
||||||
AdminPostRegionsRegionPaymentProvidersReq,
|
AdminPostRegionsRegionPaymentProvidersReq,
|
||||||
|
AdminPostRegionsRegionReq,
|
||||||
|
AdminPostRegionsReq,
|
||||||
|
AdminRegionsDeleteRes,
|
||||||
|
AdminRegionsRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
import { adminRegionKeys } from "./queries"
|
||||||
|
|
||||||
export const useAdminCreateRegion = (
|
export const useAdminCreateRegion = (
|
||||||
options?: UseMutationOptions<
|
options?: UseMutationOptions<
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import {
|
import {
|
||||||
AdminRegionsListRes,
|
|
||||||
AdminRegionsRes,
|
|
||||||
AdminGetRegionsParams,
|
AdminGetRegionsParams,
|
||||||
AdminGetRegionsRegionFulfillmentOptionsRes,
|
AdminGetRegionsRegionFulfillmentOptionsRes,
|
||||||
|
AdminRegionsListRes,
|
||||||
|
AdminRegionsRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -4,7 +4,11 @@ import {
|
|||||||
AdminReturnReasonsRes,
|
AdminReturnReasonsRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { adminReturnReasonKeys } from "."
|
import { adminReturnReasonKeys } from "."
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
AdminReturnReasonsRes,
|
AdminReturnReasonsRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -4,7 +4,11 @@ import {
|
|||||||
AdminReturnsRes,
|
AdminReturnsRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
import { adminReturnKeys } from "./queries"
|
import { adminReturnKeys } from "./queries"
|
||||||
@@ -21,7 +25,7 @@ export const useAdminReceiveReturn = (
|
|||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
|
|
||||||
return useMutation(
|
return useMutation(
|
||||||
payload => client.admin.returns.receive(id, payload),
|
(payload) => client.admin.returns.receive(id, payload),
|
||||||
buildOptions(
|
buildOptions(
|
||||||
queryClient,
|
queryClient,
|
||||||
[adminReturnKeys.detail(id), adminReturnKeys.list()],
|
[adminReturnKeys.detail(id), adminReturnKeys.list()],
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { AdminReturnsListRes } from "@medusajs/medusa"
|
import { AdminReturnsListRes } from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
import {
|
import {
|
||||||
AdminPostSalesChannelsReq,
|
|
||||||
AdminSalesChannelsRes,
|
|
||||||
AdminPostSalesChannelsSalesChannelReq,
|
|
||||||
AdminSalesChannelsDeleteRes,
|
|
||||||
AdminDeleteSalesChannelsChannelProductsBatchReq,
|
AdminDeleteSalesChannelsChannelProductsBatchReq,
|
||||||
AdminPostSalesChannelsChannelProductsBatchReq,
|
AdminPostSalesChannelsChannelProductsBatchReq,
|
||||||
|
AdminPostSalesChannelsReq,
|
||||||
|
AdminPostSalesChannelsSalesChannelReq,
|
||||||
|
AdminSalesChannelsDeleteRes,
|
||||||
|
AdminSalesChannelsRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
|
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
AdminSalesChannelsRes,
|
|
||||||
AdminSalesChannelsListRes,
|
|
||||||
AdminGetSalesChannelsParams,
|
AdminGetSalesChannelsParams,
|
||||||
|
AdminSalesChannelsListRes,
|
||||||
|
AdminSalesChannelsRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils"
|
import { queryKeysFactory } from "../../utils"
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
import { adminShippingOptionKeys } from "./queries"
|
|
||||||
import {
|
import {
|
||||||
AdminPostShippingOptionsOptionReq,
|
AdminPostShippingOptionsOptionReq,
|
||||||
AdminPostShippingOptionsReq,
|
AdminPostShippingOptionsReq,
|
||||||
AdminShippingOptionsRes,
|
AdminShippingOptionsRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
import { adminShippingOptionKeys } from "./queries"
|
||||||
|
|
||||||
export const useAdminCreateShippingOption = (
|
export const useAdminCreateShippingOption = (
|
||||||
options?: UseMutationOptions<
|
options?: UseMutationOptions<
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
AdminShippingOptionsRes,
|
AdminShippingOptionsRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
import { adminShippingProfileKeys } from "./queries"
|
|
||||||
import {
|
import {
|
||||||
AdminDeleteShippingProfileRes,
|
AdminDeleteShippingProfileRes,
|
||||||
AdminPostShippingProfilesReq,
|
AdminPostShippingProfilesReq,
|
||||||
AdminShippingProfilesRes,
|
AdminShippingProfilesRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
import { adminShippingProfileKeys } from "./queries"
|
||||||
|
|
||||||
export const useAdminCreateShippingProfile = (
|
export const useAdminCreateShippingProfile = (
|
||||||
options?: UseMutationOptions<
|
options?: UseMutationOptions<
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
AdminShippingProfilesRes,
|
AdminShippingProfilesRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
import { adminStoreKeys } from "./queries"
|
|
||||||
import { AdminPostStoreReq, AdminStoresRes } from "@medusajs/medusa"
|
import { AdminPostStoreReq, AdminStoresRes } from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
import { adminStoreKeys } from "./queries"
|
||||||
|
|
||||||
export const useAdminUpdateStore = (
|
export const useAdminUpdateStore = (
|
||||||
options?: UseMutationOptions<
|
options?: UseMutationOptions<
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
AdminTaxProvidersList,
|
|
||||||
AdminPaymentProvidersList,
|
AdminPaymentProvidersList,
|
||||||
AdminStoresRes,
|
AdminStoresRes,
|
||||||
|
AdminTaxProvidersList,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -5,7 +5,11 @@ import {
|
|||||||
AdminPostOrdersOrderSwapsSwapShipmentsReq,
|
AdminPostOrdersOrderSwapsSwapShipmentsReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { adminOrderKeys } from ".."
|
import { adminOrderKeys } from ".."
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
|
AdminGetSwapsParams,
|
||||||
AdminSwapsListRes,
|
AdminSwapsListRes,
|
||||||
AdminSwapsRes,
|
AdminSwapsRes,
|
||||||
AdminGetSwapsParams,
|
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -1,20 +1,24 @@
|
|||||||
import { adminTaxRateKeys } from "./queries"
|
|
||||||
import {
|
import {
|
||||||
AdminTaxRatesRes,
|
|
||||||
AdminTaxRatesDeleteRes,
|
|
||||||
AdminDeleteTaxRatesTaxRateProductsReq,
|
AdminDeleteTaxRatesTaxRateProductsReq,
|
||||||
AdminDeleteTaxRatesTaxRateProductTypesReq,
|
AdminDeleteTaxRatesTaxRateProductTypesReq,
|
||||||
AdminDeleteTaxRatesTaxRateShippingOptionsReq,
|
AdminDeleteTaxRatesTaxRateShippingOptionsReq,
|
||||||
AdminPostTaxRatesReq,
|
AdminPostTaxRatesReq,
|
||||||
AdminPostTaxRatesTaxRateReq,
|
|
||||||
AdminPostTaxRatesTaxRateProductsReq,
|
AdminPostTaxRatesTaxRateProductsReq,
|
||||||
AdminPostTaxRatesTaxRateProductTypesReq,
|
AdminPostTaxRatesTaxRateProductTypesReq,
|
||||||
|
AdminPostTaxRatesTaxRateReq,
|
||||||
AdminPostTaxRatesTaxRateShippingOptionsReq,
|
AdminPostTaxRatesTaxRateShippingOptionsReq,
|
||||||
|
AdminTaxRatesDeleteRes,
|
||||||
|
AdminTaxRatesRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
import { adminTaxRateKeys } from "./queries"
|
||||||
|
|
||||||
export const useAdminCreateTaxRate = (
|
export const useAdminCreateTaxRate = (
|
||||||
options?: UseMutationOptions<
|
options?: UseMutationOptions<
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
AdminTaxRatesRes,
|
|
||||||
AdminTaxRatesListRes,
|
|
||||||
AdminGetTaxRatesParams,
|
AdminGetTaxRatesParams,
|
||||||
|
AdminTaxRatesListRes,
|
||||||
|
AdminTaxRatesRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
import {
|
import {
|
||||||
AdminDeleteUploadsReq,
|
AdminDeleteUploadsReq,
|
||||||
IAdminPostUploadsFileReq,
|
|
||||||
AdminDeleteUploadsRes,
|
AdminDeleteUploadsRes,
|
||||||
AdminPostUploadsDownloadUrlReq,
|
AdminPostUploadsDownloadUrlReq,
|
||||||
AdminUploadsDownloadUrlRes,
|
AdminUploadsDownloadUrlRes,
|
||||||
AdminUploadsRes,
|
AdminUploadsRes,
|
||||||
|
IAdminPostUploadsFileReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,11 @@ import {
|
|||||||
AdminUpdateUserPayload,
|
AdminUpdateUserPayload,
|
||||||
Response,
|
Response,
|
||||||
} from "@medusajs/medusa-js"
|
} from "@medusajs/medusa-js"
|
||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
import { adminCustomerKeys } from ".."
|
import { adminCustomerKeys } from ".."
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { AdminUsersListRes, AdminUserRes } from "@medusajs/medusa"
|
import { AdminUserRes, AdminUsersListRes } from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { AdminVariantsListRes, AdminGetVariantsParams } from "@medusajs/medusa"
|
import { AdminGetVariantsParams, AdminVariantsListRes } from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
StorePostCartsCartReq,
|
StorePostCartsCartReq,
|
||||||
StorePostCartsCartShippingMethodReq,
|
StorePostCartsCartShippingMethodReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { useMutation, UseMutationOptions } from "react-query"
|
import { useMutation, UseMutationOptions } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
|
|
||||||
export const useCreateCart = (
|
export const useCreateCart = (
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { queryKeysFactory } from "../../utils/index"
|
|
||||||
import { StoreCartsRes } from "@medusajs/medusa"
|
import { StoreCartsRes } from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|
||||||
const CARTS_QUERY_KEY = `carts` as const
|
const CARTS_QUERY_KEY = `carts` as const
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
StoreGetCollectionsParams,
|
StoreGetCollectionsParams,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
StorePostCustomersCustomerReq,
|
StorePostCustomersCustomerReq,
|
||||||
StorePostCustomersReq,
|
StorePostCustomersReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { useMutation, UseMutationOptions } from "react-query"
|
import { useMutation, UseMutationOptions } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts/medusa"
|
import { useMedusa } from "../../../contexts/medusa"
|
||||||
|
|
||||||
export const useCreateCustomer = (
|
export const useCreateCustomer = (
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import {
|
|||||||
StoreCustomersRes,
|
StoreCustomersRes,
|
||||||
StoreGetCustomersCustomerOrdersParams,
|
StoreGetCustomersCustomerOrdersParams,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { useQuery } from "react-query"
|
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { queryKeysFactory } from "../../utils/index"
|
|
||||||
import { StoreGiftCardsRes } from "@medusajs/medusa"
|
import { StoreGiftCardsRes } from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|
||||||
const GIFT_CARDS_QUERY_KEY = `gift_cards` as const
|
const GIFT_CARDS_QUERY_KEY = `gift_cards` as const
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import {
|
import {
|
||||||
StoreCartsRes,
|
StoreCartsRes,
|
||||||
StorePostCartsCartLineItemsReq,
|
|
||||||
StorePostCartsCartLineItemsItemReq,
|
StorePostCartsCartLineItemsItemReq,
|
||||||
|
StorePostCartsCartLineItemsReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { useMutation, UseMutationOptions } from "react-query"
|
import { useMutation, UseMutationOptions } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
|
|
||||||
export const useCreateLineItem = (
|
export const useCreateLineItem = (
|
||||||
|
|||||||
@@ -1,14 +1,18 @@
|
|||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
StoreOrderEditsRes,
|
StoreOrderEditsRes,
|
||||||
StorePostOrderEditsOrderEditDecline,
|
StorePostOrderEditsOrderEditDecline,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
|
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
|
||||||
import { useMedusa } from "../../../contexts"
|
|
||||||
import { orderEditQueryKeys } from "."
|
import { orderEditQueryKeys } from "."
|
||||||
|
import { useMedusa } from "../../../contexts"
|
||||||
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|
||||||
export const useDeclineOrderEdit = (
|
export const useDeclineOrderEdit = (
|
||||||
id: string,
|
id: string,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { queryKeysFactory } from "../../utils"
|
|
||||||
import { StoreOrderEditsRes } from "@medusajs/medusa"
|
import { StoreOrderEditsRes } from "@medusajs/medusa"
|
||||||
import { useQuery } from "react-query"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { queryKeysFactory } from "../../utils"
|
||||||
|
|
||||||
const ORDER_EDITS_QUERY_KEY = `orderEdit` as const
|
const ORDER_EDITS_QUERY_KEY = `orderEdit` as const
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,18 @@
|
|||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
StorePostCustomersCustomerAcceptClaimReq,
|
StorePostCustomersCustomerAcceptClaimReq,
|
||||||
StorePostCustomersCustomerOrderClaimReq,
|
StorePostCustomersCustomerOrderClaimReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
|
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
|
||||||
import { useMedusa } from "../../../contexts"
|
|
||||||
import { orderKeys } from "."
|
import { orderKeys } from "."
|
||||||
|
import { useMedusa } from "../../../contexts"
|
||||||
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|
||||||
export const useRequestOrderAccess = (
|
export const useRequestOrderAccess = (
|
||||||
options?: UseMutationOptions<
|
options?: UseMutationOptions<
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { queryKeysFactory } from "../../utils/index"
|
import { StoreGetOrdersParams, StoreOrdersRes } from "@medusajs/medusa"
|
||||||
import { StoreOrdersRes, StoreGetOrdersParams } from "@medusajs/medusa"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|
||||||
const ORDERS_QUERY_KEY = `orders` as const
|
const ORDERS_QUERY_KEY = `orders` as const
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,21 @@
|
|||||||
import { useMutation, UseMutationOptions, useQueryClient } from "react-query"
|
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import {
|
||||||
|
useMutation,
|
||||||
|
UseMutationOptions,
|
||||||
|
useQueryClient,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
StorePaymentCollectionsRes,
|
|
||||||
StorePostPaymentCollectionsBatchSessionsReq,
|
|
||||||
StorePostPaymentCollectionsBatchSessionsAuthorizeReq,
|
|
||||||
StorePaymentCollectionSessionsReq,
|
StorePaymentCollectionSessionsReq,
|
||||||
|
StorePaymentCollectionsRes,
|
||||||
StorePaymentCollectionsSessionRes,
|
StorePaymentCollectionsSessionRes,
|
||||||
|
StorePostPaymentCollectionsBatchSessionsAuthorizeReq,
|
||||||
|
StorePostPaymentCollectionsBatchSessionsReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
|
|
||||||
import { buildOptions } from "../../utils/buildOptions"
|
|
||||||
import { useMedusa } from "../../../contexts"
|
|
||||||
import { paymentCollectionQueryKeys } from "."
|
import { paymentCollectionQueryKeys } from "."
|
||||||
|
import { useMedusa } from "../../../contexts"
|
||||||
|
import { buildOptions } from "../../utils/buildOptions"
|
||||||
|
|
||||||
export const useManageMultiplePaymentSessions = (
|
export const useManageMultiplePaymentSessions = (
|
||||||
id: string,
|
id: string,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { queryKeysFactory } from "../../utils"
|
|
||||||
import { StorePaymentCollectionsRes } from "@medusajs/medusa"
|
import { StorePaymentCollectionsRes } from "@medusajs/medusa"
|
||||||
import { useQuery } from "react-query"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { queryKeysFactory } from "../../utils"
|
||||||
|
|
||||||
const PAYMENT_COLLECTION_QUERY_KEY = `paymentCollection` as const
|
const PAYMENT_COLLECTION_QUERY_KEY = `paymentCollection` as const
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
StoreProductTypesListRes,
|
StoreProductTypesListRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils"
|
import { queryKeysFactory } from "../../utils"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { Response } from "@medusajs/medusa-js"
|
|
||||||
import {
|
import {
|
||||||
StoreGetProductsParams,
|
StoreGetProductsParams,
|
||||||
StoreProductsListRes,
|
StoreProductsListRes,
|
||||||
StoreProductsRes,
|
StoreProductsRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { useQuery } from "react-query"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
import { queryKeysFactory } from "../../utils/index"
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { queryKeysFactory } from "../../utils/index"
|
import { StoreRegionsListRes, StoreRegionsRes } from "@medusajs/medusa"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
|
||||||
import { useQuery } from "react-query"
|
|
||||||
import { useMedusa } from "../../../contexts"
|
|
||||||
import { StoreRegionsRes, StoreRegionsListRes } from "@medusajs/medusa"
|
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import { useQuery } from "@tanstack/react-query"
|
||||||
|
import { useMedusa } from "../../../contexts"
|
||||||
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|
||||||
const REGIONS_QUERY_KEY = `regions` as const
|
const REGIONS_QUERY_KEY = `regions` as const
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { queryKeysFactory } from "../../utils/index"
|
|
||||||
import {
|
import {
|
||||||
StoreReturnReasonsListRes,
|
StoreReturnReasonsListRes,
|
||||||
StoreReturnReasonsRes,
|
StoreReturnReasonsRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|
||||||
const RETURNS_REASONS_QUERY_KEY = `return_reasons` as const
|
const RETURNS_REASONS_QUERY_KEY = `return_reasons` as const
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { StoreReturnsRes, StorePostReturnsReq } from "@medusajs/medusa"
|
import { StorePostReturnsReq, StoreReturnsRes } from "@medusajs/medusa"
|
||||||
import { useMutation, UseMutationOptions } from "react-query"
|
import { useMutation, UseMutationOptions } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
|
|
||||||
export const useCreateReturn = (
|
export const useCreateReturn = (
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { queryKeysFactory } from "../../utils/index"
|
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
|
||||||
import { useQuery } from "react-query"
|
|
||||||
import { useMedusa } from "../../../contexts"
|
|
||||||
import {
|
import {
|
||||||
StoreShippingOptionsListRes,
|
|
||||||
StoreGetShippingOptionsParams,
|
StoreGetShippingOptionsParams,
|
||||||
|
StoreShippingOptionsListRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
import { useQuery } from "@tanstack/react-query"
|
||||||
|
import { useMedusa } from "../../../contexts"
|
||||||
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|
||||||
const SHIPPING_OPTION_QUERY_KEY = `shipping_options` as const
|
const SHIPPING_OPTION_QUERY_KEY = `shipping_options` as const
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { StoreSwapsRes, StorePostSwapsReq } from "@medusajs/medusa"
|
import { StorePostSwapsReq, StoreSwapsRes } from "@medusajs/medusa"
|
||||||
import { useMutation, UseMutationOptions } from "react-query"
|
import { useMutation, UseMutationOptions } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
|
|
||||||
export const useCreateSwap = (
|
export const useCreateSwap = (
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { queryKeysFactory } from "../../utils/index"
|
|
||||||
import { StoreSwapsRes } from "@medusajs/medusa"
|
import { StoreSwapsRes } from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
import { useQuery } from "react-query"
|
import { useQuery } from "@tanstack/react-query"
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
import { UseQueryOptionsWrapper } from "../../../types"
|
import { UseQueryOptionsWrapper } from "../../../types"
|
||||||
|
import { queryKeysFactory } from "../../utils/index"
|
||||||
|
|
||||||
const SWAPS_QUERY_KEY = `swaps` as const
|
const SWAPS_QUERY_KEY = `swaps` as const
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,18 @@
|
|||||||
import { QueryClient, QueryKey, UseMutationOptions } from "react-query"
|
import {
|
||||||
|
QueryClient,
|
||||||
|
QueryKey,
|
||||||
|
UseMutationOptions,
|
||||||
|
} from "@tanstack/react-query"
|
||||||
|
|
||||||
export const buildOptions = <
|
export const buildOptions = <
|
||||||
TData,
|
TData,
|
||||||
TError,
|
TError,
|
||||||
TVariables,
|
TVariables,
|
||||||
TContext,
|
TContext,
|
||||||
TKey extends Array<QueryKey>
|
TKey extends QueryKey
|
||||||
>(
|
>(
|
||||||
queryClient: QueryClient,
|
queryClient: QueryClient,
|
||||||
queryKey?: TKey[] | TKey,
|
queryKey?: TKey,
|
||||||
options?: UseMutationOptions<TData, TError, TVariables, TContext>
|
options?: UseMutationOptions<TData, TError, TVariables, TContext>
|
||||||
): UseMutationOptions<TData, TError, TVariables, TContext> => {
|
): UseMutationOptions<TData, TError, TVariables, TContext> => {
|
||||||
return {
|
return {
|
||||||
@@ -19,12 +23,8 @@ export const buildOptions = <
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (queryKey !== undefined) {
|
if (queryKey !== undefined) {
|
||||||
if (queryKey.filter(Array.isArray).length > 0) {
|
|
||||||
queryKey.forEach(key => queryClient.invalidateQueries(key))
|
|
||||||
} else {
|
|
||||||
queryClient.invalidateQueries(queryKey)
|
queryClient.invalidateQueries(queryKey)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
Region,
|
Region,
|
||||||
StoreCartsRes,
|
StoreCartsRes,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { QueryKey, UseQueryOptions } from "react-query"
|
import { QueryKey, UseQueryOptions } from "@tanstack/react-query"
|
||||||
|
|
||||||
export type UseQueryOptionsWrapper<
|
export type UseQueryOptionsWrapper<
|
||||||
// Return type of queryFn
|
// Return type of queryFn
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
|
import { QueryClient } from "@tanstack/react-query"
|
||||||
import * as React from "react"
|
import * as React from "react"
|
||||||
import { QueryClient } from "react-query"
|
|
||||||
import {
|
import {
|
||||||
SessionCartProvider,
|
|
||||||
SessionCartState,
|
|
||||||
CartProvider,
|
CartProvider,
|
||||||
MedusaProvider,
|
MedusaProvider,
|
||||||
|
SessionCartProvider,
|
||||||
|
SessionCartState,
|
||||||
} from "../src"
|
} from "../src"
|
||||||
import { Cart } from "../src/types"
|
import { Cart } from "../src/types"
|
||||||
|
|
||||||
|
|||||||
@@ -1895,7 +1895,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.0, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.10.4, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.0, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.5.0, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.6.2, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.9.2, @babel/runtime@npm:^7.9.6":
|
"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.0, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.10.4, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.0, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.3.1, @babel/runtime@npm:^7.5.0, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.9.2, @babel/runtime@npm:^7.9.6":
|
||||||
version: 7.18.6
|
version: 7.18.6
|
||||||
resolution: "@babel/runtime@npm:7.18.6"
|
resolution: "@babel/runtime@npm:7.18.6"
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -7417,6 +7417,32 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@tanstack/query-core@npm:4.22.0":
|
||||||
|
version: 4.22.0
|
||||||
|
resolution: "@tanstack/query-core@npm:4.22.0"
|
||||||
|
checksum: be3f870719ea9c53dfc3398725c92876448a2a5cd8253010226ad88e91b0586d3c5e9bb9366ca27a035d5855517b6883ec0a5d7d4437458ff5bd3acb5553974f
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@tanstack/react-query@npm:^4.22.0":
|
||||||
|
version: 4.22.0
|
||||||
|
resolution: "@tanstack/react-query@npm:4.22.0"
|
||||||
|
dependencies:
|
||||||
|
"@tanstack/query-core": 4.22.0
|
||||||
|
use-sync-external-store: ^1.2.0
|
||||||
|
peerDependencies:
|
||||||
|
react: ^16.8.0 || ^17.0.0 || ^18.0.0
|
||||||
|
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
|
||||||
|
react-native: "*"
|
||||||
|
peerDependenciesMeta:
|
||||||
|
react-dom:
|
||||||
|
optional: true
|
||||||
|
react-native:
|
||||||
|
optional: true
|
||||||
|
checksum: aacb071935c20ec695adfce7594649b6a7683640b82b232727f1b000bb871b6e99bb98bf47b9617eb76829d6b5822a6c98d3cefb1ede90a69cc52c2c79488d14
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@testing-library/dom@npm:^8.0.0":
|
"@testing-library/dom@npm:^8.0.0":
|
||||||
version: 8.16.0
|
version: 8.16.0
|
||||||
resolution: "@testing-library/dom@npm:8.16.0"
|
resolution: "@testing-library/dom@npm:8.16.0"
|
||||||
@@ -11165,7 +11191,7 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"big-integer@npm:^1.6.16, big-integer@npm:^1.6.7":
|
"big-integer@npm:^1.6.7":
|
||||||
version: 1.6.51
|
version: 1.6.51
|
||||||
resolution: "big-integer@npm:1.6.51"
|
resolution: "big-integer@npm:1.6.51"
|
||||||
checksum: c8139662d57f8833a44802f4b65be911679c569535ea73c5cfd3c1c8994eaead1b84b6f63e1db63833e4d4cacb6b6a9e5522178113dfdc8e4c81ed8436f1e8cc
|
checksum: c8139662d57f8833a44802f4b65be911679c569535ea73c5cfd3c1c8994eaead1b84b6f63e1db63833e4d4cacb6b6a9e5522178113dfdc8e4c81ed8436f1e8cc
|
||||||
@@ -11382,22 +11408,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"broadcast-channel@npm:^3.4.1":
|
|
||||||
version: 3.7.0
|
|
||||||
resolution: "broadcast-channel@npm:3.7.0"
|
|
||||||
dependencies:
|
|
||||||
"@babel/runtime": ^7.7.2
|
|
||||||
detect-node: ^2.1.0
|
|
||||||
js-sha3: 0.8.0
|
|
||||||
microseconds: 0.2.0
|
|
||||||
nano-time: 1.0.0
|
|
||||||
oblivious-set: 1.0.0
|
|
||||||
rimraf: 3.0.2
|
|
||||||
unload: 2.2.0
|
|
||||||
checksum: 95978446f24c685be666f5508a91350bcd4075c08feda929d26c0c678fb24bd421901f19fa8d36cb6f5ed480a334072f3bdce48fa177a8cb29793d88693911cc
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"brorand@npm:^1.0.1, brorand@npm:^1.1.0":
|
"brorand@npm:^1.0.1, brorand@npm:^1.1.0":
|
||||||
version: 1.1.0
|
version: 1.1.0
|
||||||
resolution: "brorand@npm:1.1.0"
|
resolution: "brorand@npm:1.1.0"
|
||||||
@@ -14283,13 +14293,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"detect-node@npm:^2.0.4, detect-node@npm:^2.1.0":
|
|
||||||
version: 2.1.0
|
|
||||||
resolution: "detect-node@npm:2.1.0"
|
|
||||||
checksum: f039f601790f2e9d4654e499913259a798b1f5246ae24f86ab5e8bd4aaf3bce50484234c494f11fb00aecb0c6e2733aa7b1cf3f530865640b65fbbd65b2c4e09
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"detect-package-manager@npm:^2.0.1":
|
"detect-package-manager@npm:^2.0.1":
|
||||||
version: 2.0.1
|
version: 2.0.1
|
||||||
resolution: "detect-package-manager@npm:2.0.1"
|
resolution: "detect-package-manager@npm:2.0.1"
|
||||||
@@ -22164,13 +22167,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"js-sha3@npm:0.8.0":
|
|
||||||
version: 0.8.0
|
|
||||||
resolution: "js-sha3@npm:0.8.0"
|
|
||||||
checksum: 43a21dc7967c871bd2c46cb1c2ae97441a97169f324e509f382d43330d8f75cf2c96dba7c806ab08a425765a9c847efdd4bffbac2d99c3a4f3de6c0218f40533
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"js-string-escape@npm:^1.0.1":
|
"js-string-escape@npm:^1.0.1":
|
||||||
version: 1.0.1
|
version: 1.0.1
|
||||||
resolution: "js-string-escape@npm:1.0.1"
|
resolution: "js-string-escape@npm:1.0.1"
|
||||||
@@ -23818,16 +23814,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"match-sorter@npm:^6.0.2":
|
|
||||||
version: 6.3.1
|
|
||||||
resolution: "match-sorter@npm:6.3.1"
|
|
||||||
dependencies:
|
|
||||||
"@babel/runtime": ^7.12.5
|
|
||||||
remove-accents: 0.4.2
|
|
||||||
checksum: fb805e1f8cd1a41846dd5dcbba810a3bff3e1436a34a8226201d3f7518970171a7dbedb0d99677a6dce2a2925e4fc3cf1d0d82a1203ac9ef65d13d5d290b1dad
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"math-random@npm:^1.0.1":
|
"math-random@npm:^1.0.1":
|
||||||
version: 1.0.4
|
version: 1.0.4
|
||||||
resolution: "math-random@npm:1.0.4"
|
resolution: "math-random@npm:1.0.4"
|
||||||
@@ -24706,6 +24692,7 @@ __metadata:
|
|||||||
"@storybook/addon-links": ^6.3.12
|
"@storybook/addon-links": ^6.3.12
|
||||||
"@storybook/addons": ^6.3.12
|
"@storybook/addons": ^6.3.12
|
||||||
"@storybook/react": ^6.3.12
|
"@storybook/react": ^6.3.12
|
||||||
|
"@tanstack/react-query": ^4.22.0
|
||||||
"@testing-library/react": ^12.1.2
|
"@testing-library/react": ^12.1.2
|
||||||
"@testing-library/react-hooks": ^7.0.2
|
"@testing-library/react-hooks": ^7.0.2
|
||||||
"@types/jest": ^27.0.3
|
"@types/jest": ^27.0.3
|
||||||
@@ -24724,14 +24711,13 @@ __metadata:
|
|||||||
react-dom: ^17.0.2
|
react-dom: ^17.0.2
|
||||||
react-is: ^17.0.2
|
react-is: ^17.0.2
|
||||||
react-json-view: ^1.21.3
|
react-json-view: ^1.21.3
|
||||||
react-query: ^3.31.0
|
|
||||||
size-limit: ^6.0.4
|
size-limit: ^6.0.4
|
||||||
ts-jest: ^27.1.4
|
ts-jest: ^27.1.4
|
||||||
tslib: ^2.3.1
|
tslib: ^2.3.1
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
"@medusajs/medusa": ^1.7.1
|
"@medusajs/medusa": ^1.7.1
|
||||||
|
"@tanstack/react-query": ">=4.22.0"
|
||||||
react: ">=16"
|
react: ">=16"
|
||||||
react-query: ">= 3.29.0"
|
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
@@ -25056,13 +25042,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"microseconds@npm:0.2.0":
|
|
||||||
version: 0.2.0
|
|
||||||
resolution: "microseconds@npm:0.2.0"
|
|
||||||
checksum: 59dfae1c696c0bacd79603c4df7cd0dcc9e091b7c5556aaca9b0832017d3c0b40ad8f57ca25e0ee5709ef1973404448c4a2fea6c9c1fad7d9e197ff5c1c9c2d5
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"miller-rabin@npm:^4.0.0":
|
"miller-rabin@npm:^4.0.0":
|
||||||
version: 4.0.1
|
version: 4.0.1
|
||||||
resolution: "miller-rabin@npm:4.0.1"
|
resolution: "miller-rabin@npm:4.0.1"
|
||||||
@@ -25670,15 +25649,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"nano-time@npm:1.0.0":
|
|
||||||
version: 1.0.0
|
|
||||||
resolution: "nano-time@npm:1.0.0"
|
|
||||||
dependencies:
|
|
||||||
big-integer: ^1.6.16
|
|
||||||
checksum: 3bd12e0bcd30867178afdbe8053b3dde5fdd1c665ecd348bf879863049344fbaf05cbb1d7806a825b91efbca011ee115eee52e76fb38b7da9c97931cd9e61f15
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"nanoid@npm:^3.1.30, nanoid@npm:^3.3.1, nanoid@npm:^3.3.4":
|
"nanoid@npm:^3.1.30, nanoid@npm:^3.3.1, nanoid@npm:^3.3.4":
|
||||||
version: 3.3.4
|
version: 3.3.4
|
||||||
resolution: "nanoid@npm:3.3.4"
|
resolution: "nanoid@npm:3.3.4"
|
||||||
@@ -26589,13 +26559,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"oblivious-set@npm:1.0.0":
|
|
||||||
version: 1.0.0
|
|
||||||
resolution: "oblivious-set@npm:1.0.0"
|
|
||||||
checksum: ca8640474ea1e1feb3b5c98d42f5649f114ac4513ef84774e724f22fc7e529f1de3e7f26a0d9593097ab8942ca0bb8c241f7c1bd63c3e33047dd49de3aca9805
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"omggif@npm:^1.0.10, omggif@npm:^1.0.9":
|
"omggif@npm:^1.0.10, omggif@npm:^1.0.9":
|
||||||
version: 1.0.10
|
version: 1.0.10
|
||||||
resolution: "omggif@npm:1.0.10"
|
resolution: "omggif@npm:1.0.10"
|
||||||
@@ -29295,24 +29258,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"react-query@npm:^3.31.0":
|
|
||||||
version: 3.39.1
|
|
||||||
resolution: "react-query@npm:3.39.1"
|
|
||||||
dependencies:
|
|
||||||
"@babel/runtime": ^7.5.5
|
|
||||||
broadcast-channel: ^3.4.1
|
|
||||||
match-sorter: ^6.0.2
|
|
||||||
peerDependencies:
|
|
||||||
react: ^16.8.0 || ^17.0.0 || ^18.0.0
|
|
||||||
peerDependenciesMeta:
|
|
||||||
react-dom:
|
|
||||||
optional: true
|
|
||||||
react-native:
|
|
||||||
optional: true
|
|
||||||
checksum: 5a67610e7d1eb15b6137e939fa3670f5deb8e519338380d19fd7bd47ac7dbea33f15df93c717648160b3c4dc6c3885450ff22eda180cd636afdfc5ba42682384
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"react-refresh@npm:^0.11.0":
|
"react-refresh@npm:^0.11.0":
|
||||||
version: 0.11.0
|
version: 0.11.0
|
||||||
resolution: "react-refresh@npm:0.11.0"
|
resolution: "react-refresh@npm:0.11.0"
|
||||||
@@ -29907,13 +29852,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"remove-accents@npm:0.4.2":
|
|
||||||
version: 0.4.2
|
|
||||||
resolution: "remove-accents@npm:0.4.2"
|
|
||||||
checksum: 5cbc00efa52df29ce947a0c572ff975b011f5f197ebe7b4f6e527de26aba534cba12d502e3040b72e46ad01de3d4f2d5ef57a6593c964965e43ddb60438da0f8
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"remove-trailing-separator@npm:^1.0.1":
|
"remove-trailing-separator@npm:^1.0.1":
|
||||||
version: 1.1.0
|
version: 1.1.0
|
||||||
resolution: "remove-trailing-separator@npm:1.1.0"
|
resolution: "remove-trailing-separator@npm:1.1.0"
|
||||||
@@ -30309,17 +30247,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"rimraf@npm:3.0.2, rimraf@npm:^3.0.0, rimraf@npm:^3.0.2":
|
|
||||||
version: 3.0.2
|
|
||||||
resolution: "rimraf@npm:3.0.2"
|
|
||||||
dependencies:
|
|
||||||
glob: ^7.1.3
|
|
||||||
bin:
|
|
||||||
rimraf: bin.js
|
|
||||||
checksum: 9cb7757acb489bd83757ba1a274ab545eafd75598a9d817e0c3f8b164238dd90eba50d6b848bd4dcc5f3040912e882dc7ba71653e35af660d77b25c381d402e8
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"rimraf@npm:^2.5.4, rimraf@npm:^2.6.2, rimraf@npm:^2.6.3":
|
"rimraf@npm:^2.5.4, rimraf@npm:^2.6.2, rimraf@npm:^2.6.3":
|
||||||
version: 2.7.1
|
version: 2.7.1
|
||||||
resolution: "rimraf@npm:2.7.1"
|
resolution: "rimraf@npm:2.7.1"
|
||||||
@@ -30331,6 +30258,17 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"rimraf@npm:^3.0.0, rimraf@npm:^3.0.2":
|
||||||
|
version: 3.0.2
|
||||||
|
resolution: "rimraf@npm:3.0.2"
|
||||||
|
dependencies:
|
||||||
|
glob: ^7.1.3
|
||||||
|
bin:
|
||||||
|
rimraf: bin.js
|
||||||
|
checksum: 9cb7757acb489bd83757ba1a274ab545eafd75598a9d817e0c3f8b164238dd90eba50d6b848bd4dcc5f3040912e882dc7ba71653e35af660d77b25c381d402e8
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"rimraf@npm:~2.4.0":
|
"rimraf@npm:~2.4.0":
|
||||||
version: 2.4.5
|
version: 2.4.5
|
||||||
resolution: "rimraf@npm:2.4.5"
|
resolution: "rimraf@npm:2.4.5"
|
||||||
@@ -34334,16 +34272,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"unload@npm:2.2.0":
|
|
||||||
version: 2.2.0
|
|
||||||
resolution: "unload@npm:2.2.0"
|
|
||||||
dependencies:
|
|
||||||
"@babel/runtime": ^7.6.2
|
|
||||||
detect-node: ^2.0.4
|
|
||||||
checksum: 0a4f86b502e7aa35d39c27373ebeaad4f2b7da793fb3d6308e5337aab541885cfe7b339ea4a1963477bf73fddabd5d69f4f47023dad71224b4b4a25611ef7dd8
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"unpipe@npm:1.0.0, unpipe@npm:~1.0.0":
|
"unpipe@npm:1.0.0, unpipe@npm:~1.0.0":
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
resolution: "unpipe@npm:1.0.0"
|
resolution: "unpipe@npm:1.0.0"
|
||||||
@@ -34583,6 +34511,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"use-sync-external-store@npm:^1.2.0":
|
||||||
|
version: 1.2.0
|
||||||
|
resolution: "use-sync-external-store@npm:1.2.0"
|
||||||
|
peerDependencies:
|
||||||
|
react: ^16.8.0 || ^17.0.0 || ^18.0.0
|
||||||
|
checksum: ac4814e5592524f242921157e791b022efe36e451fe0d4fd4d204322d5433a4fc300d63b0ade5185f8e0735ded044c70bcf6d2352db0f74d097a238cebd2da02
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"use@npm:^3.1.0":
|
"use@npm:^3.1.0":
|
||||||
version: 3.1.1
|
version: 3.1.1
|
||||||
resolution: "use@npm:3.1.1"
|
resolution: "use@npm:3.1.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user