mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 23:46:58 +00:00
Fixed imports
This commit is contained in:
parent
50b5984bce
commit
40dcb39451
@ -6,7 +6,7 @@ import {
|
|||||||
GetAllPagesQuery,
|
GetAllPagesQuery,
|
||||||
GetAllPagesQueryVariables,
|
GetAllPagesQueryVariables,
|
||||||
PageEdge,
|
PageEdge,
|
||||||
} from '../../schema'
|
} from '../../../schema'
|
||||||
import { normalizePages } from '../../utils'
|
import { normalizePages } from '../../utils'
|
||||||
import type { ShopifyConfig, Provider } from '..'
|
import type { ShopifyConfig, Provider } from '..'
|
||||||
import type { GetAllPagesOperation, Page } from '../../types/page'
|
import type { GetAllPagesOperation, Page } from '../../types/page'
|
||||||
|
@ -7,7 +7,7 @@ import {
|
|||||||
GetAllProductPathsQuery,
|
GetAllProductPathsQuery,
|
||||||
GetAllProductPathsQueryVariables,
|
GetAllProductPathsQueryVariables,
|
||||||
ProductEdge,
|
ProductEdge,
|
||||||
} from '../../schema'
|
} from '../../../schema'
|
||||||
import type { ShopifyConfig, Provider } from '..'
|
import type { ShopifyConfig, Provider } from '..'
|
||||||
import { getAllProductsQuery } from '../../utils'
|
import { getAllProductsQuery } from '../../utils'
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import {
|
|||||||
GetAllProductsQuery,
|
GetAllProductsQuery,
|
||||||
GetAllProductsQueryVariables,
|
GetAllProductsQueryVariables,
|
||||||
Product as ShopifyProduct,
|
Product as ShopifyProduct,
|
||||||
} from '../../schema'
|
} from '../../../schema'
|
||||||
import type { ShopifyConfig, Provider } from '..'
|
import type { ShopifyConfig, Provider } from '..'
|
||||||
import getAllProductsQuery from '../../utils/queries/get-all-products-query'
|
import getAllProductsQuery from '../../utils/queries/get-all-products-query'
|
||||||
import { normalizeProduct } from '../../utils'
|
import { normalizeProduct } from '../../utils'
|
||||||
|
@ -8,7 +8,7 @@ import {
|
|||||||
GetPageQuery,
|
GetPageQuery,
|
||||||
GetPageQueryVariables,
|
GetPageQueryVariables,
|
||||||
Page as ShopifyPage,
|
Page as ShopifyPage,
|
||||||
} from '../../schema'
|
} from '../../../schema'
|
||||||
import { GetPageOperation } from '../../types/page'
|
import { GetPageOperation } from '../../types/page'
|
||||||
import getPageQuery from '../../utils/queries/get-page-query'
|
import getPageQuery from '../../utils/queries/get-page-query'
|
||||||
|
|
||||||
|
@ -5,7 +5,10 @@ import type {
|
|||||||
import { GetProductOperation } from '../../types/product'
|
import { GetProductOperation } from '../../types/product'
|
||||||
import { normalizeProduct, getProductQuery } from '../../utils'
|
import { normalizeProduct, getProductQuery } from '../../utils'
|
||||||
import type { ShopifyConfig, Provider } from '..'
|
import type { ShopifyConfig, Provider } from '..'
|
||||||
import { GetProductBySlugQuery, Product as ShopifyProduct } from '../../schema'
|
import {
|
||||||
|
GetProductBySlugQuery,
|
||||||
|
Product as ShopifyProduct,
|
||||||
|
} from '../../../schema'
|
||||||
|
|
||||||
export default function getProductOperation({
|
export default function getProductOperation({
|
||||||
commerce,
|
commerce,
|
||||||
|
@ -2,7 +2,7 @@ import type {
|
|||||||
OperationContext,
|
OperationContext,
|
||||||
OperationOptions,
|
OperationOptions,
|
||||||
} from '@commerce/api/operations'
|
} from '@commerce/api/operations'
|
||||||
import { GetSiteInfoQueryVariables } from '../../schema'
|
import { GetSiteInfoQueryVariables } from '../../../schema'
|
||||||
import type { ShopifyConfig, Provider } from '..'
|
import type { ShopifyConfig, Provider } from '..'
|
||||||
import { GetSiteInfoOperation } from '../../types/site'
|
import { GetSiteInfoOperation } from '../../types/site'
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import {
|
|||||||
setCustomerToken,
|
setCustomerToken,
|
||||||
throwUserErrors,
|
throwUserErrors,
|
||||||
} from '../../utils'
|
} from '../../utils'
|
||||||
import { CustomerAccessTokenCreateMutation } from '../../schema'
|
import { CustomerAccessTokenCreateMutation } from '../../../schema'
|
||||||
|
|
||||||
export default function loginOperation({
|
export default function loginOperation({
|
||||||
commerce,
|
commerce,
|
||||||
|
@ -10,7 +10,7 @@ import {
|
|||||||
throwUserErrors,
|
throwUserErrors,
|
||||||
customerAccessTokenCreateMutation,
|
customerAccessTokenCreateMutation,
|
||||||
} from '../utils'
|
} from '../utils'
|
||||||
import { Mutation, MutationCustomerAccessTokenCreateArgs } from '../schema'
|
import { Mutation, MutationCustomerAccessTokenCreateArgs } from '../../schema'
|
||||||
|
|
||||||
export default useLogin as UseLogin<typeof handler>
|
export default useLogin as UseLogin<typeof handler>
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import { CommerceError } from '@commerce/utils/errors'
|
|||||||
import useSignup, { UseSignup } from '@commerce/auth/use-signup'
|
import useSignup, { UseSignup } from '@commerce/auth/use-signup'
|
||||||
import type { SignupHook } from '../types/signup'
|
import type { SignupHook } from '../types/signup'
|
||||||
import useCustomer from '../customer/use-customer'
|
import useCustomer from '../customer/use-customer'
|
||||||
import { Mutation, MutationCustomerCreateArgs } from '../schema'
|
import { Mutation, MutationCustomerCreateArgs } from '../../schema'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
handleAutomaticLogin,
|
handleAutomaticLogin,
|
||||||
|
@ -11,7 +11,7 @@ import {
|
|||||||
checkoutToCart,
|
checkoutToCart,
|
||||||
checkoutCreate,
|
checkoutCreate,
|
||||||
} from '../utils'
|
} from '../utils'
|
||||||
import { Mutation, MutationCheckoutLineItemsAddArgs } from '../schema'
|
import { Mutation, MutationCheckoutLineItemsAddArgs } from '../../schema'
|
||||||
|
|
||||||
export default useAddItem as UseAddItem<typeof handler>
|
export default useAddItem as UseAddItem<typeof handler>
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ import {
|
|||||||
checkoutToCart,
|
checkoutToCart,
|
||||||
} from '../utils'
|
} from '../utils'
|
||||||
|
|
||||||
import { Mutation, MutationCheckoutLineItemsRemoveArgs } from '../schema'
|
import { Mutation, MutationCheckoutLineItemsRemoveArgs } from '../../schema'
|
||||||
|
|
||||||
export const handler = {
|
export const handler = {
|
||||||
fetchOptions: {
|
fetchOptions: {
|
||||||
|
@ -15,7 +15,7 @@ import {
|
|||||||
checkoutLineItemUpdateMutation,
|
checkoutLineItemUpdateMutation,
|
||||||
checkoutToCart,
|
checkoutToCart,
|
||||||
} from '../utils'
|
} from '../utils'
|
||||||
import { Mutation, MutationCheckoutLineItemsUpdateArgs } from '../schema'
|
import { Mutation, MutationCheckoutLineItemsUpdateArgs } from '../../schema'
|
||||||
|
|
||||||
export type UpdateItemActionInput<T = any> = T extends LineItem
|
export type UpdateItemActionInput<T = any> = T extends LineItem
|
||||||
? Partial<UpdateItemHook['actionInput']>
|
? Partial<UpdateItemHook['actionInput']>
|
||||||
|
@ -2,7 +2,7 @@ import useCustomer, { UseCustomer } from '@commerce/customer/use-customer'
|
|||||||
import type { CustomerHook } from '../types/customer'
|
import type { CustomerHook } from '../types/customer'
|
||||||
import { SWRHook } from '@commerce/utils/types'
|
import { SWRHook } from '@commerce/utils/types'
|
||||||
import { getCustomerQuery, getCustomerToken } from '../utils'
|
import { getCustomerQuery, getCustomerToken } from '../utils'
|
||||||
import { GetCustomerQuery, GetCustomerQueryVariables } from '../schema'
|
import { GetCustomerQuery, GetCustomerQueryVariables } from '../../schema'
|
||||||
|
|
||||||
export default useCustomer as UseCustomer<typeof handler>
|
export default useCustomer as UseCustomer<typeof handler>
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import {
|
|||||||
GetProductsFromCollectionQueryVariables,
|
GetProductsFromCollectionQueryVariables,
|
||||||
Product as ShopifyProduct,
|
Product as ShopifyProduct,
|
||||||
ProductEdge,
|
ProductEdge,
|
||||||
} from '../schema'
|
} from '../../schema'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getAllProductsQuery,
|
getAllProductsQuery,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as Core from '@commerce/types/login'
|
import * as Core from '@commerce/types/login'
|
||||||
import type { CustomerAccessTokenCreateInput } from '../schema'
|
import type { CustomerAccessTokenCreateInput } from '../../schema'
|
||||||
|
|
||||||
export * from '@commerce/types/login'
|
export * from '@commerce/types/login'
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ import {
|
|||||||
CheckoutLineItemInput,
|
CheckoutLineItemInput,
|
||||||
Mutation,
|
Mutation,
|
||||||
MutationCheckoutCreateArgs,
|
MutationCheckoutCreateArgs,
|
||||||
} from '../schema'
|
} from '../../schema'
|
||||||
import { FetcherOptions } from '@commerce/utils/types'
|
import { FetcherOptions } from '@commerce/utils/types'
|
||||||
|
|
||||||
export const checkoutCreate = async (
|
export const checkoutCreate = async (
|
||||||
|
@ -9,7 +9,7 @@ import {
|
|||||||
CheckoutUserError,
|
CheckoutUserError,
|
||||||
Checkout,
|
Checkout,
|
||||||
Maybe,
|
Maybe,
|
||||||
} from '../schema'
|
} from '../../schema'
|
||||||
|
|
||||||
import { normalizeCart } from './normalize'
|
import { normalizeCart } from './normalize'
|
||||||
import throwUserErrors from './throw-user-errors'
|
import throwUserErrors from './throw-user-errors'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
GetAllProductVendorsQuery,
|
GetAllProductVendorsQuery,
|
||||||
GetAllProductVendorsQueryVariables,
|
GetAllProductVendorsQueryVariables,
|
||||||
} from '../schema'
|
} from '../../schema'
|
||||||
import { ShopifyConfig } from '../api'
|
import { ShopifyConfig } from '../api'
|
||||||
import getAllProductVendors from './queries/get-all-product-vendors-query'
|
import getAllProductVendors from './queries/get-all-product-vendors-query'
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import type { Category } from '../types/site'
|
import type { Category } from '../types/site'
|
||||||
import { ShopifyConfig } from '../api'
|
import { ShopifyConfig } from '../api'
|
||||||
import { CollectionEdge } from '../schema'
|
import { CollectionEdge } from '../../schema'
|
||||||
import { normalizeCategory } from './normalize'
|
import { normalizeCategory } from './normalize'
|
||||||
import getSiteCollectionsQuery from './queries/get-all-collections-query'
|
import getSiteCollectionsQuery from './queries/get-all-collections-query'
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@ import throwUserErrors from './throw-user-errors'
|
|||||||
import {
|
import {
|
||||||
MutationCustomerActivateArgs,
|
MutationCustomerActivateArgs,
|
||||||
MutationCustomerActivateByUrlArgs,
|
MutationCustomerActivateByUrlArgs,
|
||||||
} from '../schema'
|
} from '../../schema'
|
||||||
import { Mutation } from '../schema'
|
import { Mutation } from '../../schema'
|
||||||
import { customerActivateByUrlMutation } from './mutations'
|
import { customerActivateByUrlMutation } from './mutations'
|
||||||
|
|
||||||
const handleAccountActivation = async (
|
const handleAccountActivation = async (
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { FetcherOptions } from '@commerce/utils/types'
|
import { FetcherOptions } from '@commerce/utils/types'
|
||||||
import { CustomerAccessTokenCreateInput } from '../schema'
|
import { CustomerAccessTokenCreateInput } from '../../schema'
|
||||||
import { setCustomerToken } from './customer-token'
|
import { setCustomerToken } from './customer-token'
|
||||||
import { customerAccessTokenCreateMutation } from './mutations'
|
import { customerAccessTokenCreateMutation } from './mutations'
|
||||||
import throwUserErrors from './throw-user-errors'
|
import throwUserErrors from './throw-user-errors'
|
||||||
|
@ -15,7 +15,7 @@ import {
|
|||||||
Page as ShopifyPage,
|
Page as ShopifyPage,
|
||||||
PageEdge,
|
PageEdge,
|
||||||
Collection,
|
Collection,
|
||||||
} from '../schema'
|
} from '../../schema'
|
||||||
import { colorMap } from '@lib/colors'
|
import { colorMap } from '@lib/colors'
|
||||||
|
|
||||||
const money = ({ amount, currencyCode }: MoneyV2) => {
|
const money = ({ amount, currencyCode }: MoneyV2) => {
|
||||||
|
@ -5,7 +5,7 @@ import {
|
|||||||
CheckoutUserError,
|
CheckoutUserError,
|
||||||
CustomerErrorCode,
|
CustomerErrorCode,
|
||||||
CustomerUserError,
|
CustomerUserError,
|
||||||
} from '../schema'
|
} from '../../schema'
|
||||||
|
|
||||||
export type UserErrors = Array<CheckoutUserError | CustomerUserError>
|
export type UserErrors = Array<CheckoutUserError | CustomerUserError>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Shopify doesn't have a wishlist
|
// Shopify doesn't have a wishlist
|
||||||
|
|
||||||
import { HookFetcher } from '@commerce/utils/types'
|
import { HookFetcher } from '@commerce/utils/types'
|
||||||
import { Product } from '../schema'
|
import { Product } from '../../schema'
|
||||||
|
|
||||||
const defaultOpts = {}
|
const defaultOpts = {}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Page } from '../../schema'
|
import { Page } from '../../../schema'
|
||||||
import { SwellConfig, Provider } from '..'
|
import { SwellConfig, Provider } from '..'
|
||||||
import { OperationContext, OperationOptions } from '@commerce/api/operations'
|
import { OperationContext, OperationOptions } from '@commerce/api/operations'
|
||||||
import { GetPageOperation } from '../../types/page'
|
import { GetPageOperation } from '../../types/page'
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
CustomerUserError,
|
CustomerUserError,
|
||||||
Mutation,
|
Mutation,
|
||||||
MutationCheckoutCreateArgs,
|
MutationCheckoutCreateArgs,
|
||||||
} from '../schema'
|
} from '../../schema'
|
||||||
import useLogin, { UseLogin } from '@commerce/auth/use-login'
|
import useLogin, { UseLogin } from '@commerce/auth/use-login'
|
||||||
import { LoginHook } from '../types/login'
|
import { LoginHook } from '../types/login'
|
||||||
import { setCustomerToken } from '../utils'
|
import { setCustomerToken } from '../utils'
|
||||||
|
@ -6,7 +6,7 @@ import {
|
|||||||
CheckoutLineItemsRemovePayload,
|
CheckoutLineItemsRemovePayload,
|
||||||
CheckoutLineItemsUpdatePayload,
|
CheckoutLineItemsUpdatePayload,
|
||||||
Maybe,
|
Maybe,
|
||||||
} from '../../schema'
|
} from '../../../schema'
|
||||||
import { normalizeCart } from '../../utils'
|
import { normalizeCart } from '../../utils'
|
||||||
|
|
||||||
export type CheckoutPayload =
|
export type CheckoutPayload =
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Customer } from '../types/customer'
|
import { Customer } from '../types/customer'
|
||||||
import { Product, ProductOption } from '../types/product'
|
import { Product, ProductOption } from '../types/product'
|
||||||
import { MoneyV2 } from '../schema'
|
import { MoneyV2 } from '../../schema'
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
Cart,
|
Cart,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Swell doesn't have a wishlist
|
// Swell doesn't have a wishlist
|
||||||
|
|
||||||
import { HookFetcher } from '@commerce/utils/types'
|
import { HookFetcher } from '@commerce/utils/types'
|
||||||
import { Product } from '../schema'
|
import { Product } from '../../schema'
|
||||||
|
|
||||||
const defaultOpts = {}
|
const defaultOpts = {}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { OperationContext, OperationOptions } from '@commerce/api/operations'
|
import { OperationContext, OperationOptions } from '@commerce/api/operations'
|
||||||
import type { GetAllProductPathsQuery } from '../../schema'
|
import type { GetAllProductPathsQuery } from '../../../schema'
|
||||||
import { Provider } from '../index'
|
import { Provider } from '../index'
|
||||||
import { getAllProductPathsQuery } from '../../utils/queries/get-all-product-paths-query'
|
import { getAllProductPathsQuery } from '../../utils/queries/get-all-product-paths-query'
|
||||||
import { GetAllProductPathsOperation } from '@commerce/types/product'
|
import { GetAllProductPathsOperation } from '@commerce/types/product'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Product } from '@commerce/types/product'
|
import { Product } from '@commerce/types/product'
|
||||||
import { Provider, VendureConfig } from '../'
|
import { Provider, VendureConfig } from '../'
|
||||||
import { GetAllProductsQuery } from '../../schema'
|
import { GetAllProductsQuery } from '../../../schema'
|
||||||
import { normalizeSearchResult } from '../../utils/normalize'
|
import { normalizeSearchResult } from '../../utils/normalize'
|
||||||
import { getAllProductsQuery } from '../../utils/queries/get-all-products-query'
|
import { getAllProductsQuery } from '../../utils/queries/get-all-products-query'
|
||||||
import { OperationContext } from '@commerce/api/operations'
|
import { OperationContext } from '@commerce/api/operations'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Product } from '@commerce/types/product'
|
import { Product } from '@commerce/types/product'
|
||||||
import { OperationContext } from '@commerce/api/operations'
|
import { OperationContext } from '@commerce/api/operations'
|
||||||
import { Provider, VendureConfig } from '../'
|
import { Provider, VendureConfig } from '../'
|
||||||
import { GetProductQuery } from '../../schema'
|
import { GetProductQuery } from '../../../schema'
|
||||||
import { getProductQuery } from '../../utils/queries/get-product-query'
|
import { getProductQuery } from '../../utils/queries/get-product-query'
|
||||||
|
|
||||||
export default function getProductOperation({
|
export default function getProductOperation({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Provider, VendureConfig } from '../'
|
import { Provider, VendureConfig } from '../'
|
||||||
import { GetCollectionsQuery } from '../../schema'
|
import { GetCollectionsQuery } from '../../../schema'
|
||||||
import { arrayToTree } from '../../utils/array-to-tree'
|
import { arrayToTree } from '../../utils/array-to-tree'
|
||||||
import { getCollectionsQuery } from '../../utils/queries/get-collections-query'
|
import { getCollectionsQuery } from '../../utils/queries/get-collections-query'
|
||||||
import { OperationContext } from '@commerce/api/operations'
|
import { OperationContext } from '@commerce/api/operations'
|
||||||
|
@ -5,7 +5,7 @@ import type {
|
|||||||
} from '@commerce/api/operations'
|
} from '@commerce/api/operations'
|
||||||
import { ValidationError } from '@commerce/utils/errors'
|
import { ValidationError } from '@commerce/utils/errors'
|
||||||
import type { LoginOperation } from '../../types/login'
|
import type { LoginOperation } from '../../types/login'
|
||||||
import type { LoginMutation } from '../../schema'
|
import type { LoginMutation } from '../../../schema'
|
||||||
import { Provider, VendureConfig } from '..'
|
import { Provider, VendureConfig } from '..'
|
||||||
import { loginMutation } from '../../utils/mutations/log-in-mutation'
|
import { loginMutation } from '../../utils/mutations/log-in-mutation'
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import useLogin, { UseLogin } from '@commerce/auth/use-login'
|
|||||||
import { LoginHook } from '../types/login'
|
import { LoginHook } from '../types/login'
|
||||||
import { CommerceError, ValidationError } from '@commerce/utils/errors'
|
import { CommerceError, ValidationError } from '@commerce/utils/errors'
|
||||||
import useCustomer from '../customer/use-customer'
|
import useCustomer from '../customer/use-customer'
|
||||||
import { LoginMutation, LoginMutationVariables } from '../schema'
|
import { LoginMutation, LoginMutationVariables } from '../../schema'
|
||||||
import { loginMutation } from '../utils/mutations/log-in-mutation'
|
import { loginMutation } from '../utils/mutations/log-in-mutation'
|
||||||
|
|
||||||
export default useLogin as UseLogin<typeof handler>
|
export default useLogin as UseLogin<typeof handler>
|
||||||
|
@ -2,7 +2,7 @@ import { useCallback } from 'react'
|
|||||||
import { MutationHook } from '@commerce/utils/types'
|
import { MutationHook } from '@commerce/utils/types'
|
||||||
import useLogout, { UseLogout } from '@commerce/auth/use-logout'
|
import useLogout, { UseLogout } from '@commerce/auth/use-logout'
|
||||||
import useCustomer from '../customer/use-customer'
|
import useCustomer from '../customer/use-customer'
|
||||||
import { LogoutMutation } from '../schema'
|
import { LogoutMutation } from '../../schema'
|
||||||
import { logoutMutation } from '../utils/mutations/log-out-mutation'
|
import { logoutMutation } from '../utils/mutations/log-out-mutation'
|
||||||
import { LogoutHook } from '../types/logout'
|
import { LogoutHook } from '../types/logout'
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import {
|
|||||||
RegisterCustomerInput,
|
RegisterCustomerInput,
|
||||||
SignupMutation,
|
SignupMutation,
|
||||||
SignupMutationVariables,
|
SignupMutationVariables,
|
||||||
} from '../schema'
|
} from '../../schema'
|
||||||
import { signupMutation } from '../utils/mutations/sign-up-mutation'
|
import { signupMutation } from '../utils/mutations/sign-up-mutation'
|
||||||
import { SignupHook } from '../types/signup'
|
import { SignupHook } from '../types/signup'
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { CommerceError } from '@commerce/utils/errors'
|
|||||||
import { MutationHook } from '@commerce/utils/types'
|
import { MutationHook } from '@commerce/utils/types'
|
||||||
import { useCallback } from 'react'
|
import { useCallback } from 'react'
|
||||||
import useCart from './use-cart'
|
import useCart from './use-cart'
|
||||||
import { AddItemToOrderMutation } from '../schema'
|
import { AddItemToOrderMutation } from '../../schema'
|
||||||
import { normalizeCart } from '../utils/normalize'
|
import { normalizeCart } from '../utils/normalize'
|
||||||
import { addItemToOrderMutation } from '../utils/mutations/add-item-to-order-mutation'
|
import { addItemToOrderMutation } from '../utils/mutations/add-item-to-order-mutation'
|
||||||
import { AddItemHook } from '../types/cart'
|
import { AddItemHook } from '../types/cart'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { SWRHook } from '@commerce/utils/types'
|
import { SWRHook } from '@commerce/utils/types'
|
||||||
import useCart, { UseCart } from '@commerce/cart/use-cart'
|
import useCart, { UseCart } from '@commerce/cart/use-cart'
|
||||||
import { ActiveOrderQuery, CartFragment } from '../schema'
|
import { ActiveOrderQuery, CartFragment } from '../../schema'
|
||||||
import { normalizeCart } from '../utils/normalize'
|
import { normalizeCart } from '../utils/normalize'
|
||||||
import { useMemo } from 'react'
|
import { useMemo } from 'react'
|
||||||
import { getCartQuery } from '../utils/queries/get-cart-query'
|
import { getCartQuery } from '../utils/queries/get-cart-query'
|
||||||
|
@ -12,7 +12,7 @@ import useCart from './use-cart'
|
|||||||
import {
|
import {
|
||||||
RemoveOrderLineMutation,
|
RemoveOrderLineMutation,
|
||||||
RemoveOrderLineMutationVariables,
|
RemoveOrderLineMutationVariables,
|
||||||
} from '../schema'
|
} from '../../schema'
|
||||||
import { normalizeCart } from '../utils/normalize'
|
import { normalizeCart } from '../utils/normalize'
|
||||||
import { RemoveItemHook } from '../types/cart'
|
import { RemoveItemHook } from '../types/cart'
|
||||||
import { removeOrderLineMutation } from '../utils/mutations/remove-order-line-mutation'
|
import { removeOrderLineMutation } from '../utils/mutations/remove-order-line-mutation'
|
||||||
|
@ -11,7 +11,7 @@ import useCart from './use-cart'
|
|||||||
import {
|
import {
|
||||||
AdjustOrderLineMutation,
|
AdjustOrderLineMutation,
|
||||||
AdjustOrderLineMutationVariables,
|
AdjustOrderLineMutationVariables,
|
||||||
} from '../schema'
|
} from '../../schema'
|
||||||
import { normalizeCart } from '../utils/normalize'
|
import { normalizeCart } from '../utils/normalize'
|
||||||
import { adjustOrderLineMutation } from '../utils/mutations/adjust-order-line-mutation'
|
import { adjustOrderLineMutation } from '../utils/mutations/adjust-order-line-mutation'
|
||||||
import { UpdateItemHook } from '../types/cart'
|
import { UpdateItemHook } from '../types/cart'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { SWRHook } from '@commerce/utils/types'
|
import { SWRHook } from '@commerce/utils/types'
|
||||||
import useCustomer, { UseCustomer } from '@commerce/customer/use-customer'
|
import useCustomer, { UseCustomer } from '@commerce/customer/use-customer'
|
||||||
import { ActiveCustomerQuery } from '../schema'
|
import { ActiveCustomerQuery } from '../../schema'
|
||||||
import { activeCustomerQuery } from '../utils/queries/active-customer-query'
|
import { activeCustomerQuery } from '../utils/queries/active-customer-query'
|
||||||
import { CustomerHook } from '../types/customer'
|
import { CustomerHook } from '../types/customer'
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { SWRHook } from '@commerce/utils/types'
|
import { SWRHook } from '@commerce/utils/types'
|
||||||
import useSearch, { UseSearch } from '@commerce/product/use-search'
|
import useSearch, { UseSearch } from '@commerce/product/use-search'
|
||||||
import { Product } from '@commerce/types/product'
|
import { Product } from '@commerce/types/product'
|
||||||
import { SearchQuery, SearchQueryVariables } from '../schema'
|
import { SearchQuery, SearchQueryVariables } from '../../schema'
|
||||||
import { normalizeSearchResult } from '../utils/normalize'
|
import { normalizeSearchResult } from '../utils/normalize'
|
||||||
import { searchQuery } from '../utils/queries/search-query'
|
import { searchQuery } from '../utils/queries/search-query'
|
||||||
import { SearchProductsHook } from '../types/product'
|
import { SearchProductsHook } from '../types/product'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as Core from '@commerce/types/login'
|
import * as Core from '@commerce/types/login'
|
||||||
import type { LoginMutationVariables } from '../schema'
|
import type { LoginMutationVariables } from '../../schema'
|
||||||
import { LoginBody, LoginTypes } from '@commerce/types/login'
|
import { LoginBody, LoginTypes } from '@commerce/types/login'
|
||||||
|
|
||||||
export * from '@commerce/types/login'
|
export * from '@commerce/types/login'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Product } from '@commerce/types/product'
|
import { Product } from '@commerce/types/product'
|
||||||
import { Cart } from '@commerce/types/cart'
|
import { Cart } from '@commerce/types/cart'
|
||||||
import { CartFragment, SearchResultFragment } from '../schema'
|
import { CartFragment, SearchResultFragment } from '../../schema'
|
||||||
|
|
||||||
export function normalizeSearchResult(item: SearchResultFragment): Product {
|
export function normalizeSearchResult(item: SearchResultFragment): Product {
|
||||||
return {
|
return {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// Vendure doesn't have a built-in wishlist
|
// Vendure doesn't have a built-in wishlist
|
||||||
|
|
||||||
import { HookFetcher } from '@commerce/utils/types'
|
import { HookFetcher } from '@commerce/utils/types'
|
||||||
import { Product } from '../schema'
|
import { Product } from '../../schema'
|
||||||
|
|
||||||
const defaultOpts = {}
|
const defaultOpts = {}
|
||||||
|
|
||||||
|
65
package-lock.json
generated
65
package-lock.json
generated
@ -1442,6 +1442,10 @@
|
|||||||
"resolved": "packages/ordercloud",
|
"resolved": "packages/ordercloud",
|
||||||
"link": true
|
"link": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@vercel/commerce-saleor": {
|
||||||
|
"resolved": "packages/saleor",
|
||||||
|
"link": true
|
||||||
|
},
|
||||||
"node_modules/@vercel/fetch": {
|
"node_modules/@vercel/fetch": {
|
||||||
"version": "6.1.1",
|
"version": "6.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@vercel/fetch/-/fetch-6.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@vercel/fetch/-/fetch-6.1.1.tgz",
|
||||||
@ -9659,6 +9663,42 @@
|
|||||||
"node": ">=4.2.0"
|
"node": ">=4.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"packages/saleor": {
|
||||||
|
"version": "0.0.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@vercel/commerce": "^0.0.1",
|
||||||
|
"@vercel/fetch": "^6.1.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^15.12.4",
|
||||||
|
"@types/react": "^17.0.8",
|
||||||
|
"lint-staged": "^12.1.7",
|
||||||
|
"next": "^12.0.3",
|
||||||
|
"prettier": "^2.5.1",
|
||||||
|
"react": "^17.0.2",
|
||||||
|
"react-dom": "^17.0.2",
|
||||||
|
"typescript": "^4.6.0-dev.20220108"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"next": "^12",
|
||||||
|
"react": "^17",
|
||||||
|
"react-dom": "^17"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"packages/saleor/node_modules/typescript": {
|
||||||
|
"version": "4.6.0-dev.20220114",
|
||||||
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.0-dev.20220114.tgz",
|
||||||
|
"integrity": "sha512-WcHfPkRCvsoV3BozLL1T8Eb7VPlsoA6yyRLFxoR1zVOyUdILHGL9GzXG5e2yzMCg4rQBTkTYZmkXTBZUwO5ONA==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"tsc": "bin/tsc",
|
||||||
|
"tsserver": "bin/tsserver"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"site": {
|
"site": {
|
||||||
"name": "next-commerce",
|
"name": "next-commerce",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
@ -10905,7 +10945,30 @@
|
|||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"stripe": "*",
|
"stripe": "^8.197.0",
|
||||||
|
"typescript": "^4.6.0-dev.20220108"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"typescript": {
|
||||||
|
"version": "4.6.0-dev.20220114",
|
||||||
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.0-dev.20220114.tgz",
|
||||||
|
"integrity": "sha512-WcHfPkRCvsoV3BozLL1T8Eb7VPlsoA6yyRLFxoR1zVOyUdILHGL9GzXG5e2yzMCg4rQBTkTYZmkXTBZUwO5ONA==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@vercel/commerce-saleor": {
|
||||||
|
"version": "file:packages/saleor",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "^15.12.4",
|
||||||
|
"@types/react": "^17.0.8",
|
||||||
|
"@vercel/commerce": "^0.0.1",
|
||||||
|
"@vercel/fetch": "^6.1.1",
|
||||||
|
"lint-staged": "^12.1.7",
|
||||||
|
"next": "^12.0.3",
|
||||||
|
"prettier": "^2.5.1",
|
||||||
|
"react": "^17.0.2",
|
||||||
|
"react-dom": "^17.0.2",
|
||||||
"typescript": "^4.6.0-dev.20220108"
|
"typescript": "^4.6.0-dev.20220108"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { GetLoggedInCustomerQuery } from '../../../schema'
|
import type { GetLoggedInCustomerQuery } from '../../../../schema'
|
||||||
import type { CustomerEndpoint } from '.'
|
import type { CustomerEndpoint } from '.'
|
||||||
|
|
||||||
export const getLoggedInCustomerQuery = /* GraphQL */ `
|
export const getLoggedInCustomerQuery = /* GraphQL */ `
|
||||||
|
@ -2,7 +2,7 @@ import type {
|
|||||||
OperationContext,
|
OperationContext,
|
||||||
OperationOptions,
|
OperationOptions,
|
||||||
} from '@vercel/commerce/api/operations'
|
} from '@vercel/commerce/api/operations'
|
||||||
import type { GetAllProductPathsQuery } from '../../schema'
|
import type { GetAllProductPathsQuery } from '../../../schema'
|
||||||
import type { GetAllProductPathsOperation } from '../../types/product'
|
import type { GetAllProductPathsOperation } from '../../types/product'
|
||||||
import type { RecursivePartial, RecursiveRequired } from '../utils/types'
|
import type { RecursivePartial, RecursiveRequired } from '../utils/types'
|
||||||
import filterEdges from '../utils/filter-edges'
|
import filterEdges from '../utils/filter-edges'
|
||||||
|
@ -5,7 +5,7 @@ import type {
|
|||||||
import type {
|
import type {
|
||||||
GetAllProductsQuery,
|
GetAllProductsQuery,
|
||||||
GetAllProductsQueryVariables,
|
GetAllProductsQueryVariables,
|
||||||
} from '../../schema'
|
} from '../../../schema'
|
||||||
import type { GetAllProductsOperation } from '../../types/product'
|
import type { GetAllProductsOperation } from '../../types/product'
|
||||||
import type { RecursivePartial, RecursiveRequired } from '../utils/types'
|
import type { RecursivePartial, RecursiveRequired } from '../utils/types'
|
||||||
import filterEdges from '../utils/filter-edges'
|
import filterEdges from '../utils/filter-edges'
|
||||||
|
@ -3,7 +3,7 @@ import type {
|
|||||||
OperationOptions,
|
OperationOptions,
|
||||||
} from '@vercel/commerce/api/operations'
|
} from '@vercel/commerce/api/operations'
|
||||||
import type { GetProductOperation } from '../../types/product'
|
import type { GetProductOperation } from '../../types/product'
|
||||||
import type { GetProductQuery, GetProductQueryVariables } from '../../schema'
|
import type { GetProductQuery, GetProductQueryVariables } from '../../../schema'
|
||||||
import setProductLocaleMeta from '../utils/set-product-locale-meta'
|
import setProductLocaleMeta from '../utils/set-product-locale-meta'
|
||||||
import { productInfoFragment } from '../fragments/product'
|
import { productInfoFragment } from '../fragments/product'
|
||||||
import { BigcommerceConfig, Provider } from '..'
|
import { BigcommerceConfig, Provider } from '..'
|
||||||
|
@ -3,7 +3,7 @@ import type {
|
|||||||
OperationOptions,
|
OperationOptions,
|
||||||
} from '@vercel/commerce/api/operations'
|
} from '@vercel/commerce/api/operations'
|
||||||
import type { GetSiteInfoOperation } from '../../types/site'
|
import type { GetSiteInfoOperation } from '../../types/site'
|
||||||
import type { GetSiteInfoQuery } from '../../schema'
|
import type { GetSiteInfoQuery } from '../../../schema'
|
||||||
import filterEdges from '../utils/filter-edges'
|
import filterEdges from '../utils/filter-edges'
|
||||||
import type { BigcommerceConfig, Provider } from '..'
|
import type { BigcommerceConfig, Provider } from '..'
|
||||||
import { categoryTreeItemFragment } from '../fragments/category-tree'
|
import { categoryTreeItemFragment } from '../fragments/category-tree'
|
||||||
|
@ -4,7 +4,7 @@ import type {
|
|||||||
OperationOptions,
|
OperationOptions,
|
||||||
} from '@vercel/commerce/api/operations'
|
} from '@vercel/commerce/api/operations'
|
||||||
import type { LoginOperation } from '../../types/login'
|
import type { LoginOperation } from '../../types/login'
|
||||||
import type { LoginMutation } from '../../schema'
|
import type { LoginMutation } from '../../../schema'
|
||||||
import type { RecursivePartial } from '../utils/types'
|
import type { RecursivePartial } from '../utils/types'
|
||||||
import concatHeader from '../utils/concat-cookie'
|
import concatHeader from '../utils/concat-cookie'
|
||||||
import type { BigcommerceConfig, Provider } from '..'
|
import type { BigcommerceConfig, Provider } from '..'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { GetCustomerIdQuery } from '../../schema'
|
import type { GetCustomerIdQuery } from '../../../schema'
|
||||||
import type { BigcommerceConfig } from '../'
|
import type { BigcommerceConfig } from '../'
|
||||||
|
|
||||||
export const getCustomerIdQuery = /* GraphQL */ `
|
export const getCustomerIdQuery = /* GraphQL */ `
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as Core from '@vercel/commerce/types/login'
|
import * as Core from '@vercel/commerce/types/login'
|
||||||
import type { LoginMutationVariables } from '../schema'
|
import type { LoginMutationVariables } from '../../schema'
|
||||||
|
|
||||||
export * from '@vercel/commerce/types/login'
|
export * from '@vercel/commerce/types/login'
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as Core from '@vercel/commerce/types/site'
|
import * as Core from '@vercel/commerce/types/site'
|
||||||
import type { GetSiteInfoQuery, GetSiteInfoQueryVariables } from '../schema'
|
import type { GetSiteInfoQuery, GetSiteInfoQueryVariables } from '../../schema'
|
||||||
|
|
||||||
export * from '@vercel/commerce/types/site'
|
export * from '@vercel/commerce/types/site'
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import CookieHandler from '../../../api/utils/cookie-handler'
|
import CookieHandler from '../../../api/utils/cookie-handler'
|
||||||
import { normalizeCart } from '../../../lib/normalize'
|
import { normalizeCart } from '../../../lib/normalize'
|
||||||
import { Cart } from '../../../../schema'
|
import { Cart } from '../../../../../schema'
|
||||||
import type { CartEndpoint } from '.'
|
import type { CartEndpoint } from '.'
|
||||||
import { getCartQuery } from '../../queries/get-cart-query'
|
import { getCartQuery } from '../../queries/get-cart-query'
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import type { KiboCommerceConfig, KiboCommerceProvider } from '..'
|
|||||||
import { normalizePage } from '../../lib/normalize'
|
import { normalizePage } from '../../lib/normalize'
|
||||||
import { getPageQuery } from '../queries/get-page-query'
|
import { getPageQuery } from '../queries/get-page-query'
|
||||||
import type { Page, GetPageQueryParams } from "../../types/page";
|
import type { Page, GetPageQueryParams } from "../../types/page";
|
||||||
import type { Document } from '../../../schema'
|
import type { Document } from '../../../../schema'
|
||||||
|
|
||||||
export default function getPageOperation({
|
export default function getPageOperation({
|
||||||
commerce,
|
commerce,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import update from './immutability'
|
import update from './immutability'
|
||||||
import getSlug from './get-slug'
|
import getSlug from './get-slug'
|
||||||
import type { PrCategory, CustomerAccountInput, Document } from '../../schema'
|
import type { PrCategory, CustomerAccountInput, Document } from '../../../schema'
|
||||||
import { Page } from '../types/page';
|
import { Page } from '../types/page';
|
||||||
import { Customer } from '../types/customer'
|
import { Customer } from '../types/customer'
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as Core from '@vercel/commerce/types/login'
|
import * as Core from '@vercel/commerce/types/login'
|
||||||
import type { CustomerUserAuthInfoInput } from '../../schema'
|
import type { CustomerUserAuthInfoInput } from '../../../schema'
|
||||||
|
|
||||||
export * from '@vercel/commerce/types/login'
|
export * from '@vercel/commerce/types/login'
|
||||||
|
|
||||||
|
2
packages/saleor/.prettierignore
Normal file
2
packages/saleor/.prettierignore
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
node_modules
|
||||||
|
dist
|
6
packages/saleor/.prettierrc
Normal file
6
packages/saleor/.prettierrc
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"useTabs": false
|
||||||
|
}
|
73
packages/saleor/package.json
Normal file
73
packages/saleor/package.json
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
{
|
||||||
|
"name": "@vercel/commerce-saleor",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"license": "MIT",
|
||||||
|
"scripts": {
|
||||||
|
"build": "rm -fr dist/* && tsc",
|
||||||
|
"dev": "npm run build -- --watch",
|
||||||
|
"prettier-fix": "prettier --write ."
|
||||||
|
},
|
||||||
|
"sideEffects": false,
|
||||||
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
".": "./dist/index.js",
|
||||||
|
"./*": [
|
||||||
|
"./dist/*.js",
|
||||||
|
"./dist/*/index.js"
|
||||||
|
],
|
||||||
|
"./next.config": "./dist/next.config.cjs"
|
||||||
|
},
|
||||||
|
"typesVersions": {
|
||||||
|
"*": {
|
||||||
|
"*": [
|
||||||
|
"dist/*",
|
||||||
|
"dist/*/index"
|
||||||
|
],
|
||||||
|
"next.config": [
|
||||||
|
"dist/next.config.d.cts"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist",
|
||||||
|
"schema.d.ts"
|
||||||
|
],
|
||||||
|
"publishConfig": {
|
||||||
|
"typesVersions": {
|
||||||
|
"*": {
|
||||||
|
"*": [
|
||||||
|
"src/*.d.ts",
|
||||||
|
"src/*/index.d.ts"
|
||||||
|
],
|
||||||
|
"next.config": [
|
||||||
|
"dist/next.config.d.cts"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@vercel/commerce": "^0.0.1",
|
||||||
|
"@vercel/fetch": "^6.1.1"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"next": "^12",
|
||||||
|
"react": "^17",
|
||||||
|
"react-dom": "^17"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^15.12.4",
|
||||||
|
"@types/react": "^17.0.8",
|
||||||
|
"lint-staged": "^12.1.7",
|
||||||
|
"next": "^12.0.3",
|
||||||
|
"prettier": "^2.5.1",
|
||||||
|
"react": "^17.0.2",
|
||||||
|
"react-dom": "^17.0.2",
|
||||||
|
"typescript": "^4.6.0-dev.20220108"
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"**/*.{js,jsx,ts,tsx,json}": [
|
||||||
|
"prettier --write",
|
||||||
|
"git add"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
import { CommerceAPI, GetAPISchema, createEndpoint } from '@commerce/api'
|
import { CommerceAPI, GetAPISchema, createEndpoint } from '@vercel/commerce/api'
|
||||||
import checkoutEndpoint from '@commerce/api/endpoints/checkout'
|
import checkoutEndpoint from '@vercel/commerce/api/endpoints/checkout'
|
||||||
import { CheckoutSchema } from '@commerce/types/checkout'
|
import { CheckoutSchema } from '@vercel/commerce/types/checkout'
|
||||||
|
|
||||||
export type CheckoutAPI = GetAPISchema<CommerceAPI, CheckoutSchema>
|
export type CheckoutAPI = GetAPISchema<CommerceAPI, CheckoutSchema>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { CommerceAPI, CommerceAPIConfig, getCommerceApi as commerceApi } from '@commerce/api'
|
import { CommerceAPI, CommerceAPIConfig, getCommerceApi as commerceApi } from '@vercel/commerce/api'
|
||||||
import * as operations from './operations'
|
import * as operations from './operations'
|
||||||
import * as Const from '../const'
|
import * as Const from '../const'
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import type { OperationContext } from '@commerce/api/operations'
|
import type { OperationContext } from '@vercel/commerce/api/operations'
|
||||||
|
|
||||||
import { QueryPagesArgs, PageCountableEdge } from '../../schema'
|
import { QueryPagesArgs, PageCountableEdge } from '../../../schema'
|
||||||
import type { SaleorConfig, Provider } from '..'
|
import type { SaleorConfig, Provider } from '..'
|
||||||
import * as Query from '../../utils/queries'
|
import * as Query from '../../utils/queries'
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { OperationContext } from '@commerce/api/operations'
|
import type { OperationContext } from '@vercel/commerce/api/operations'
|
||||||
import { ProductCountableEdge } from '../../schema'
|
import { ProductCountableEdge } from '../../../schema'
|
||||||
import type { Provider, SaleorConfig } from '..'
|
import type { Provider, SaleorConfig } from '..'
|
||||||
|
|
||||||
import { getAllProductsPathsQuery } from '../../utils/queries'
|
import { getAllProductsPathsQuery } from '../../utils/queries'
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import type { OperationContext } from '@commerce/api/operations'
|
import type { OperationContext } from '@vercel/commerce/api/operations'
|
||||||
import { Product } from '@commerce/types/product'
|
import { Product } from '@vercel/commerce/types/product'
|
||||||
|
|
||||||
import { ProductCountableEdge } from '../../schema'
|
import { ProductCountableEdge } from '../../../schema'
|
||||||
import type { Provider, SaleorConfig } from '..'
|
import type { Provider, SaleorConfig } from '..'
|
||||||
import { normalizeProduct } from '../../utils'
|
import { normalizeProduct } from '../../utils'
|
||||||
|
|
||||||
import * as Query from '../../utils/queries'
|
import * as Query from '../../utils/queries'
|
||||||
import { GraphQLFetcherResult } from '@commerce/api'
|
import { GraphQLFetcherResult } from '@vercel/commerce/api'
|
||||||
|
|
||||||
type ReturnType = {
|
type ReturnType = {
|
||||||
products: Product[]
|
products: Product[]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import type { OperationContext } from '@commerce/api/operations'
|
import type { OperationContext } from '@vercel/commerce/api/operations'
|
||||||
import type { Provider, SaleorConfig } from '..'
|
import type { Provider, SaleorConfig } from '..'
|
||||||
import { QueryPageArgs } from '../../schema'
|
import { QueryPageArgs } from '../../../schema'
|
||||||
|
|
||||||
import * as Query from '../../utils/queries'
|
import * as Query from '../../utils/queries'
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { OperationContext } from '@commerce/api/operations'
|
import type { OperationContext } from '@vercel/commerce/api/operations'
|
||||||
import { normalizeProduct } from '../../utils'
|
import { normalizeProduct } from '../../utils'
|
||||||
import type { Provider, SaleorConfig } from '..'
|
import type { Provider, SaleorConfig } from '..'
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { OperationContext } from '@commerce/api/operations'
|
import type { OperationContext } from '@vercel/commerce/api/operations'
|
||||||
import { Category } from '@commerce/types/site'
|
import { Category } from '@vercel/commerce/types/site'
|
||||||
import type { SaleorConfig, Provider } from '..'
|
import type { SaleorConfig, Provider } from '..'
|
||||||
|
|
||||||
import { getCategories, getVendors } from '../../utils'
|
import { getCategories, getVendors } from '../../utils'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { ServerResponse } from 'http'
|
import type { ServerResponse } from 'http'
|
||||||
import type { OperationContext } from '@commerce/api/operations'
|
import type { OperationContext } from '@vercel/commerce/api/operations'
|
||||||
import type { Provider, SaleorConfig } from '..'
|
import type { Provider, SaleorConfig } from '..'
|
||||||
import { throwUserErrors } from '../../utils'
|
import { throwUserErrors } from '../../utils'
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ProductCountableEdge } from '../../schema'
|
import { ProductCountableEdge } from '../../../schema'
|
||||||
import { SaleorConfig } from '..'
|
import { SaleorConfig } from '..'
|
||||||
|
|
||||||
const fetchAllProducts = async ({
|
const fetchAllProducts = async ({
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { GraphQLFetcher } from '@commerce/api'
|
import type { GraphQLFetcher } from '@vercel/commerce/api'
|
||||||
import fetch from './fetch'
|
import fetch from './fetch'
|
||||||
|
|
||||||
import { API_URL } from '../../const'
|
import { API_URL } from '../../const'
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { useCallback } from 'react'
|
import { useCallback } from 'react'
|
||||||
|
|
||||||
import type { MutationHook } from '@commerce/utils/types'
|
import type { MutationHook } from '@vercel/commerce/utils/types'
|
||||||
import { CommerceError } from '@commerce/utils/errors'
|
import { CommerceError } from '@vercel/commerce/utils/errors'
|
||||||
import useCustomer from '../customer/use-customer'
|
import useCustomer from '../customer/use-customer'
|
||||||
import * as mutation from '../utils/mutations'
|
import * as mutation from '../utils/mutations'
|
||||||
import { Mutation, MutationTokenCreateArgs } from '../schema'
|
import { Mutation, MutationTokenCreateArgs } from '../../schema'
|
||||||
import useLogin, { UseLogin } from '@commerce/auth/use-login'
|
import useLogin, { UseLogin } from '@vercel/commerce/auth/use-login'
|
||||||
import { setCSRFToken, setToken, throwUserErrors, checkoutAttach, getCheckoutId } from '../utils'
|
import { setCSRFToken, setToken, throwUserErrors, checkoutAttach, getCheckoutId } from '../utils'
|
||||||
import { LoginHook } from '@commerce/types/login'
|
import { LoginHook } from '@vercel/commerce/types/login'
|
||||||
|
|
||||||
export default useLogin as UseLogin<typeof handler>
|
export default useLogin as UseLogin<typeof handler>
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { useCallback } from 'react'
|
import { useCallback } from 'react'
|
||||||
import type { MutationHook } from '@commerce/utils/types'
|
import type { MutationHook } from '@vercel/commerce/utils/types'
|
||||||
import useLogout, { UseLogout } from '@commerce/auth/use-logout'
|
import useLogout, { UseLogout } from '@vercel/commerce/auth/use-logout'
|
||||||
import useCustomer from '../customer/use-customer'
|
import useCustomer from '../customer/use-customer'
|
||||||
import * as mutation from '../utils/mutations'
|
import * as mutation from '../utils/mutations'
|
||||||
import { setCSRFToken, setToken, setCheckoutToken } from '../utils/customer-token'
|
import { setCSRFToken, setToken, setCheckoutToken } from '../utils/customer-token'
|
||||||
import { LogoutHook } from '@commerce/types/logout'
|
import { LogoutHook } from '@vercel/commerce/types/logout'
|
||||||
|
|
||||||
export default useLogout as UseLogout<typeof handler>
|
export default useLogout as UseLogout<typeof handler>
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { useCallback } from 'react'
|
import { useCallback } from 'react'
|
||||||
import type { MutationHook } from '@commerce/utils/types'
|
import type { MutationHook } from '@vercel/commerce/utils/types'
|
||||||
import { CommerceError } from '@commerce/utils/errors'
|
import { CommerceError } from '@vercel/commerce/utils/errors'
|
||||||
import useSignup, { UseSignup } from '@commerce/auth/use-signup'
|
import useSignup, { UseSignup } from '@vercel/commerce/auth/use-signup'
|
||||||
import useCustomer from '../customer/use-customer'
|
import useCustomer from '../customer/use-customer'
|
||||||
import { AccountRegisterInput, Mutation, MutationAccountRegisterArgs } from '../schema'
|
import { AccountRegisterInput, Mutation, MutationAccountRegisterArgs } from '../../schema'
|
||||||
|
|
||||||
import * as mutation from '../utils/mutations'
|
import * as mutation from '../utils/mutations'
|
||||||
import { handleAutomaticLogin, throwUserErrors } from '../utils'
|
import { handleAutomaticLogin, throwUserErrors } from '../utils'
|
||||||
import { SignupHook } from '@commerce/types/signup'
|
import { SignupHook } from '@vercel/commerce/types/signup'
|
||||||
|
|
||||||
export default useSignup as UseSignup<typeof handler>
|
export default useSignup as UseSignup<typeof handler>
|
||||||
|
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import { useCallback } from 'react'
|
import { useCallback } from 'react'
|
||||||
import type { MutationHook } from '@commerce/utils/types'
|
import type { MutationHook } from '@vercel/commerce/utils/types'
|
||||||
import { CommerceError } from '@commerce/utils/errors'
|
import { CommerceError } from '@vercel/commerce/utils/errors'
|
||||||
import useAddItem, { UseAddItem } from '@commerce/cart/use-add-item'
|
import useAddItem, { UseAddItem } from '@vercel/commerce/cart/use-add-item'
|
||||||
import useCart from './use-cart'
|
import useCart from './use-cart'
|
||||||
|
|
||||||
import * as mutation from '../utils/mutations'
|
import * as mutation from '../utils/mutations'
|
||||||
|
|
||||||
import { getCheckoutId, checkoutToCart } from '../utils'
|
import { getCheckoutId, checkoutToCart } from '../utils'
|
||||||
|
|
||||||
import { Mutation, MutationCheckoutLinesAddArgs } from '../schema'
|
import { Mutation, MutationCheckoutLinesAddArgs } from '../../schema'
|
||||||
import { AddItemHook } from '@commerce/types/cart'
|
import { AddItemHook } from '@vercel/commerce/types/cart'
|
||||||
|
|
||||||
export default useAddItem as UseAddItem<typeof handler>
|
export default useAddItem as UseAddItem<typeof handler>
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { useMemo } from 'react'
|
import { useMemo } from 'react'
|
||||||
import useCommerceCart, { UseCart } from '@commerce/cart/use-cart'
|
import useCommerceCart, { UseCart } from '@vercel/commerce/cart/use-cart'
|
||||||
|
|
||||||
import { SWRHook } from '@commerce/utils/types'
|
import { SWRHook } from '@vercel/commerce/utils/types'
|
||||||
import { checkoutCreate, checkoutToCart, getCheckoutId } from '../utils'
|
import { checkoutCreate, checkoutToCart, getCheckoutId } from '../utils'
|
||||||
import * as query from '../utils/queries'
|
import * as query from '../utils/queries'
|
||||||
import { GetCartHook } from '@commerce/types/cart'
|
import { GetCartHook } from '@vercel/commerce/types/cart'
|
||||||
|
|
||||||
export default useCommerceCart as UseCart<typeof handler>
|
export default useCommerceCart as UseCart<typeof handler>
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { useCallback } from 'react'
|
import { useCallback } from 'react'
|
||||||
import type { MutationHookContext, HookFetcherContext, MutationHook } from '@commerce/utils/types'
|
import type { MutationHookContext, HookFetcherContext, MutationHook } from '@vercel/commerce/utils/types'
|
||||||
import useRemoveItem, { UseRemoveItem } from '@commerce/cart/use-remove-item'
|
import useRemoveItem, { UseRemoveItem } from '@vercel/commerce/cart/use-remove-item'
|
||||||
import useCart from './use-cart'
|
import useCart from './use-cart'
|
||||||
import * as mutation from '../utils/mutations'
|
import * as mutation from '../utils/mutations'
|
||||||
import { getCheckoutId, checkoutToCart } from '../utils'
|
import { getCheckoutId, checkoutToCart } from '../utils'
|
||||||
import { Mutation, MutationCheckoutLineDeleteArgs } from '../schema'
|
import { Mutation, MutationCheckoutLineDeleteArgs } from '../../schema'
|
||||||
import { LineItem, RemoveItemHook } from '../types/cart'
|
import { LineItem, RemoveItemHook } from '../types/cart'
|
||||||
|
|
||||||
export default useRemoveItem as UseRemoveItem<typeof handler>
|
export default useRemoveItem as UseRemoveItem<typeof handler>
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
import { useCallback } from 'react'
|
import { useCallback } from 'react'
|
||||||
import debounce from 'lodash.debounce'
|
import debounce from 'lodash.debounce'
|
||||||
import type { HookFetcherContext, MutationHookContext } from '@commerce/utils/types'
|
import type { HookFetcherContext, MutationHookContext } from '@vercel/commerce/utils/types'
|
||||||
import { ValidationError } from '@commerce/utils/errors'
|
import { ValidationError } from '@vercel/commerce/utils/errors'
|
||||||
import useUpdateItem, { UseUpdateItem } from '@commerce/cart/use-update-item'
|
import useUpdateItem, { UseUpdateItem } from '@vercel/commerce/cart/use-update-item'
|
||||||
|
|
||||||
import useCart from './use-cart'
|
import useCart from './use-cart'
|
||||||
import { handler as removeItemHandler } from './use-remove-item'
|
import { handler as removeItemHandler } from './use-remove-item'
|
||||||
import type { LineItem } from '../types'
|
import type { LineItem } from '../types'
|
||||||
import { checkoutToCart } from '../utils'
|
import { checkoutToCart } from '../utils'
|
||||||
import { getCheckoutId } from '../utils'
|
import { getCheckoutId } from '../utils'
|
||||||
import { Mutation, MutationCheckoutLinesUpdateArgs } from '../schema'
|
import { Mutation, MutationCheckoutLinesUpdateArgs } from '../../schema'
|
||||||
|
|
||||||
import * as mutation from '../utils/mutations'
|
import * as mutation from '../utils/mutations'
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { SWRHook } from '@commerce/utils/types'
|
import { SWRHook } from '@vercel/commerce/utils/types'
|
||||||
import useCheckout, { UseCheckout } from '@commerce/checkout/use-checkout'
|
import useCheckout, { UseCheckout } from '@vercel/commerce/checkout/use-checkout'
|
||||||
|
|
||||||
export default useCheckout as UseCheckout<typeof handler>
|
export default useCheckout as UseCheckout<typeof handler>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import useAddItem, { UseAddItem } from '@commerce/customer/address/use-add-item'
|
import useAddItem, { UseAddItem } from '@vercel/commerce/customer/address/use-add-item'
|
||||||
import { MutationHook } from '@commerce/utils/types'
|
import { MutationHook } from '@vercel/commerce/utils/types'
|
||||||
|
|
||||||
export default useAddItem as UseAddItem<typeof handler>
|
export default useAddItem as UseAddItem<typeof handler>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import useAddItem, { UseAddItem } from '@commerce/customer/card/use-add-item'
|
import useAddItem, { UseAddItem } from '@vercel/commerce/customer/card/use-add-item'
|
||||||
import { MutationHook } from '@commerce/utils/types'
|
import { MutationHook } from '@vercel/commerce/utils/types'
|
||||||
|
|
||||||
export default useAddItem as UseAddItem<typeof handler>
|
export default useAddItem as UseAddItem<typeof handler>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import useCustomer, { UseCustomer } from '@commerce/customer/use-customer'
|
import useCustomer, { UseCustomer } from '@vercel/commerce/customer/use-customer'
|
||||||
import { CustomerHook } from '@commerce/types/customer'
|
import { CustomerHook } from '@vercel/commerce/types/customer'
|
||||||
import { SWRHook } from '@commerce/utils/types'
|
import { SWRHook } from '@vercel/commerce/utils/types'
|
||||||
|
|
||||||
import * as query from '../utils/queries'
|
import * as query from '../utils/queries'
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Fetcher } from '@commerce/utils/types'
|
import { Fetcher } from '@vercel/commerce/utils/types'
|
||||||
import { API_URL } from './const'
|
import { API_URL } from './const'
|
||||||
import { getToken, handleFetchResponse } from './utils'
|
import { getToken, handleFetchResponse } from './utils'
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { getCommerceProvider, useCommerce as useCoreCommerce } from '@commerce'
|
import { getCommerceProvider, useCommerce as useCoreCommerce } from '@vercel/commerce'
|
||||||
import { saleorProvider, SaleorProvider } from './provider'
|
import { saleorProvider, SaleorProvider } from './provider'
|
||||||
|
|
||||||
export { saleorProvider }
|
export { saleorProvider }
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
export * from '@commerce/product/use-price'
|
export * from '@vercel/commerce/product/use-price'
|
||||||
export { default } from '@commerce/product/use-price'
|
export { default } from '@vercel/commerce/product/use-price'
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { SWRHook } from '@commerce/utils/types'
|
import { SWRHook } from '@vercel/commerce/utils/types'
|
||||||
import { Product } from '@commerce/types/product'
|
import { Product } from '@vercel/commerce/types/product'
|
||||||
import useSearch, { UseSearch } from '@commerce/product/use-search'
|
import useSearch, { UseSearch } from '@vercel/commerce/product/use-search'
|
||||||
|
|
||||||
import { ProductCountableEdge } from '../schema'
|
import { ProductCountableEdge } from '../../schema'
|
||||||
import { getSearchVariables, normalizeProduct } from '../utils'
|
import { getSearchVariables, normalizeProduct } from '../utils'
|
||||||
|
|
||||||
import * as query from '../utils/queries'
|
import * as query from '../utils/queries'
|
||||||
import { SearchProductsHook } from '@commerce/types/product'
|
import { SearchProductsHook } from '@vercel/commerce/types/product'
|
||||||
|
|
||||||
export default useSearch as UseSearch<typeof handler>
|
export default useSearch as UseSearch<typeof handler>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { Cart as CoreCart } from '@commerce/types'
|
import type { Cart as CoreCart } from '@vercel/commerce/types'
|
||||||
import { CheckoutLine } from './schema'
|
import { CheckoutLine } from '../schema'
|
||||||
|
|
||||||
export type SaleorCheckout = {
|
export type SaleorCheckout = {
|
||||||
id: string
|
id: string
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import * as Core from '@commerce/types/cart'
|
import * as Core from '@vercel/commerce/types/cart'
|
||||||
|
|
||||||
export * from '@commerce/types/cart'
|
export * from '@vercel/commerce/types/cart'
|
||||||
|
|
||||||
export type SaleorCart = {}
|
export type SaleorCart = {}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as mutation from './mutations'
|
import * as mutation from './mutations'
|
||||||
import { CheckoutCustomerAttach } from '../schema'
|
import { CheckoutCustomerAttach } from '../../schema'
|
||||||
|
|
||||||
export const checkoutAttach = async (fetch: any, { variables, headers }: any): Promise<CheckoutCustomerAttach> => {
|
export const checkoutAttach = async (fetch: any, { variables, headers }: any): Promise<CheckoutCustomerAttach> => {
|
||||||
const data = await fetch({
|
const data = await fetch({
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
|
|
||||||
import * as mutation from './mutations'
|
import * as mutation from './mutations'
|
||||||
import { CheckoutCreate } from '../schema'
|
import { CheckoutCreate } from '../../schema'
|
||||||
import { CHECKOUT_ID_COOKIE } from '@framework/const'
|
import { CHECKOUT_ID_COOKIE } from '../const'
|
||||||
|
|
||||||
export const checkoutCreate = async (fetch: any): Promise<CheckoutCreate> => {
|
export const checkoutCreate = async (fetch: any): Promise<CheckoutCreate> => {
|
||||||
const data = await fetch({ query: mutation.CheckoutCreate })
|
const data = await fetch({ query: mutation.CheckoutCreate })
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Cart } from '../types'
|
import { Cart } from '../types'
|
||||||
import { CommerceError } from '@commerce/utils/errors'
|
import { CommerceError } from '@vercel/commerce/utils/errors'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
CheckoutLinesAdd,
|
CheckoutLinesAdd,
|
||||||
@ -9,7 +9,7 @@ import {
|
|||||||
Checkout,
|
Checkout,
|
||||||
Maybe,
|
Maybe,
|
||||||
CheckoutLineDelete,
|
CheckoutLineDelete,
|
||||||
} from '../schema'
|
} from '../../schema'
|
||||||
|
|
||||||
import { normalizeCart } from './normalize'
|
import { normalizeCart } from './normalize'
|
||||||
import throwUserErrors from './throw-user-errors'
|
import throwUserErrors from './throw-user-errors'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Category } from '@commerce/types/site'
|
import { Category } from '@vercel/commerce/types/site'
|
||||||
import { SaleorConfig } from '../api'
|
import { SaleorConfig } from '../api'
|
||||||
import { CollectionCountableEdge } from '../schema'
|
import { CollectionCountableEdge } from '../../schema'
|
||||||
import * as query from './queries'
|
import * as query from './queries'
|
||||||
|
|
||||||
const getCategories = async (config: SaleorConfig): Promise<Category[]> => {
|
const getCategories = async (config: SaleorConfig): Promise<Category[]> => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { FetcherError } from '@commerce/utils/errors'
|
import { FetcherError } from '@vercel/commerce/utils/errors'
|
||||||
|
|
||||||
export function getError(errors: any[], status: number) {
|
export function getError(errors: any[], status: number) {
|
||||||
errors = errors ?? [{ message: 'Failed to fetch Saleor API' }]
|
errors = errors ?? [{ message: 'Failed to fetch Saleor API' }]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { FetcherOptions } from '@commerce/utils/types'
|
import { FetcherOptions } from '@vercel/commerce/utils/types'
|
||||||
import { CreateToken, Mutation, MutationTokenCreateArgs } from '../schema'
|
import { CreateToken, Mutation, MutationTokenCreateArgs } from '../../schema'
|
||||||
import { setToken, setCSRFToken } from './customer-token'
|
import { setToken, setCSRFToken } from './customer-token'
|
||||||
import * as mutation from './mutations'
|
import * as mutation from './mutations'
|
||||||
import throwUserErrors from './throw-user-errors'
|
import throwUserErrors from './throw-user-errors'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Product } from '@commerce/types/product'
|
import { Product } from '@vercel/commerce/types/product'
|
||||||
|
|
||||||
import { Product as SaleorProduct, Checkout, CheckoutLine, Money, ProductVariant } from '../schema'
|
import { Product as SaleorProduct, Checkout, CheckoutLine, Money, ProductVariant } from '../../schema'
|
||||||
|
|
||||||
import type { Cart, LineItem } from '../types'
|
import type { Cart, LineItem } from '../types'
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { ValidationError } from '@commerce/utils/errors'
|
import { ValidationError } from '@vercel/commerce/utils/errors'
|
||||||
|
|
||||||
import { CheckoutError, CheckoutErrorCode, AppError, AccountError, AccountErrorCode } from '../schema'
|
import { CheckoutError, CheckoutErrorCode, AppError, AccountError, AccountErrorCode } from '../../schema'
|
||||||
|
|
||||||
export type UserErrors = Array<CheckoutError | AccountError | AppError>
|
export type UserErrors = Array<CheckoutError | AccountError | AppError>
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user