mirror of
https://github.com/vercel/commerce.git
synced 2025-06-19 05:31:22 +00:00
Moved endpoints to nested folder
This commit is contained in:
parent
0e546a1f37
commit
bd065a7bfb
@ -1,6 +1,6 @@
|
||||
import { normalizeCart } from '@framework/lib/normalize'
|
||||
import { parseCartItem } from '../utils/parse-item'
|
||||
import getCartCookie from '../utils/get-cart-cookie'
|
||||
import { parseCartItem } from '../../utils/parse-item'
|
||||
import getCartCookie from '../../utils/get-cart-cookie'
|
||||
import type { CartEndpoint } from '.'
|
||||
|
||||
const addItem: CartEndpoint['operations']['addItem'] = async ({
|
@ -1,7 +1,7 @@
|
||||
import { normalizeCart } from '@framework/lib/normalize'
|
||||
import { BigcommerceApiError } from '../utils/errors'
|
||||
import getCartCookie from '../utils/get-cart-cookie'
|
||||
import type { BigcommerceCart } from '../../types'
|
||||
import { BigcommerceApiError } from '../../utils/errors'
|
||||
import getCartCookie from '../../utils/get-cart-cookie'
|
||||
import type { BigcommerceCart } from '../../../types'
|
||||
import type { CartEndpoint } from '.'
|
||||
|
||||
// Return current cart info
|
@ -1,6 +1,6 @@
|
||||
import type { GetAPISchema } from '@commerce/api'
|
||||
import type { CartSchema } from '../../types/cart'
|
||||
import type { BigcommerceAPI } from '..'
|
||||
import type { CartSchema } from '../../../types/cart'
|
||||
import type { BigcommerceAPI } from '../..'
|
||||
import getCart from './get-cart'
|
||||
import addItem from './add-item'
|
||||
import updateItem from './update-item'
|
@ -1,5 +1,5 @@
|
||||
import { normalizeCart } from '@framework/lib/normalize'
|
||||
import getCartCookie from '../utils/get-cart-cookie'
|
||||
import getCartCookie from '../../utils/get-cart-cookie'
|
||||
import type { CartEndpoint } from '.'
|
||||
|
||||
const removeItem: CartEndpoint['operations']['removeItem'] = async ({
|
@ -1,6 +1,6 @@
|
||||
import { normalizeCart } from '@framework/lib/normalize'
|
||||
import { parseCartItem } from '../utils/parse-item'
|
||||
import getCartCookie from '../utils/get-cart-cookie'
|
||||
import { parseCartItem } from '../../utils/parse-item'
|
||||
import getCartCookie from '../../utils/get-cart-cookie'
|
||||
import type { CartEndpoint } from '.'
|
||||
|
||||
const updateItem: CartEndpoint['operations']['updateItem'] = async ({
|
@ -1,4 +1,4 @@
|
||||
import type { GetLoggedInCustomerQuery } from '../../schema'
|
||||
import type { GetLoggedInCustomerQuery } from '../../../schema'
|
||||
import type { CustomerEndpoint } from '.'
|
||||
|
||||
export const getLoggedInCustomerQuery = /* GraphQL */ `
|
@ -1,6 +1,6 @@
|
||||
import type { GetAPISchema } from '@commerce/api'
|
||||
import type { CustomerSchema } from '../../types/customer'
|
||||
import type { BigcommerceAPI } from '..'
|
||||
import type { CustomerSchema } from '../../../types/customer'
|
||||
import type { BigcommerceAPI } from '../..'
|
||||
import getLoggedInCustomer from './get-logged-in-customer'
|
||||
|
||||
export type CustomerAPI = GetAPISchema<BigcommerceAPI, CustomerSchema>
|
@ -1,6 +1,6 @@
|
||||
import type { GetAPISchema } from '@commerce/api'
|
||||
import type { LoginSchema } from '../../types/login'
|
||||
import type { BigcommerceAPI } from '..'
|
||||
import type { LoginSchema } from '../../../types/login'
|
||||
import type { BigcommerceAPI } from '../..'
|
||||
import login from './login'
|
||||
|
||||
export type LoginAPI = GetAPISchema<BigcommerceAPI, LoginSchema>
|
@ -1,6 +1,6 @@
|
||||
import type { GetAPISchema } from '@commerce/api'
|
||||
import type { LogoutSchema } from '../../types/logout'
|
||||
import type { BigcommerceAPI } from '..'
|
||||
import type { LogoutSchema } from '../../../types/logout'
|
||||
import type { BigcommerceAPI } from '../..'
|
||||
import logout from './logout'
|
||||
|
||||
export type LogoutAPI = GetAPISchema<BigcommerceAPI, LogoutSchema>
|
@ -1,6 +1,6 @@
|
||||
import type { GetAPISchema } from '@commerce/api'
|
||||
import type { SignupSchema } from '../../types/signup'
|
||||
import type { BigcommerceAPI } from '..'
|
||||
import type { SignupSchema } from '../../../types/signup'
|
||||
import type { BigcommerceAPI } from '../..'
|
||||
import signup from './signup'
|
||||
|
||||
export type SignupAPI = GetAPISchema<BigcommerceAPI, SignupSchema>
|
@ -1,4 +1,4 @@
|
||||
import { BigcommerceApiError } from '../utils/errors'
|
||||
import { BigcommerceApiError } from '../../utils/errors'
|
||||
import type { SignupEndpoint } from '.'
|
||||
|
||||
const signup: SignupEndpoint['operations']['signup'] = async ({
|
@ -9,11 +9,11 @@ import {
|
||||
import fetchGraphqlApi from './utils/fetch-graphql-api'
|
||||
import fetchStoreApi from './utils/fetch-store-api'
|
||||
|
||||
import type { CartAPI } from './cart'
|
||||
import type { CustomerAPI } from './customer'
|
||||
import type { LoginAPI } from './login'
|
||||
import type { LogoutAPI } from './logout'
|
||||
import type { SignupAPI } from './signup'
|
||||
import type { CartAPI } from './endpoints/cart'
|
||||
import type { CustomerAPI } from './endpoints/customer'
|
||||
import type { LoginAPI } from './endpoints/login'
|
||||
import type { LogoutAPI } from './endpoints/logout'
|
||||
import type { SignupAPI } from './endpoints/signup'
|
||||
import login from './operations/login'
|
||||
|
||||
export interface BigcommerceConfig extends CommerceAPIConfig {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import cart from '@commerce/api/endpoints/cart'
|
||||
import { CartAPI, operations } from '@framework/api/cart'
|
||||
import { CartAPI, operations } from '@framework/api/endpoints/cart'
|
||||
import commerce from '@lib/api/commerce'
|
||||
|
||||
export default commerce.endpoint({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import customer from '@commerce/api/endpoints/customer'
|
||||
import { CustomerAPI, operations } from '@framework/api/customer'
|
||||
import { CustomerAPI, operations } from '@framework/api/endpoints/customer'
|
||||
import commerce from '@lib/api/commerce'
|
||||
|
||||
export default commerce.endpoint({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import login from '@commerce/api/endpoints/login'
|
||||
import { LoginAPI, operations } from '@framework/api/login'
|
||||
import { LoginAPI, operations } from '@framework/api/endpoints/login'
|
||||
import commerce from '@lib/api/commerce'
|
||||
|
||||
export default commerce.endpoint({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import logout from '@commerce/api/endpoints/logout'
|
||||
import { LogoutAPI, operations } from '@framework/api/logout'
|
||||
import { LogoutAPI, operations } from '@framework/api/endpoints/logout'
|
||||
import commerce from '@lib/api/commerce'
|
||||
|
||||
export default commerce.endpoint({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import signup from '@commerce/api/endpoints/signup'
|
||||
import { SignupAPI, operations } from '@framework/api/signup'
|
||||
import { SignupAPI, operations } from '@framework/api/endpoints/signup'
|
||||
import commerce from '@lib/api/commerce'
|
||||
|
||||
export default commerce.endpoint({
|
||||
|
Loading…
x
Reference in New Issue
Block a user