Moved endpoints to nested folder

This commit is contained in:
Luis Alvarez 2021-05-20 14:03:52 -05:00
parent 0e546a1f37
commit bd065a7bfb
19 changed files with 30 additions and 30 deletions

View File

@ -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 ({

View File

@ -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

View File

@ -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'

View File

@ -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 ({

View File

@ -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 ({

View File

@ -1,4 +1,4 @@
import type { GetLoggedInCustomerQuery } from '../../schema'
import type { GetLoggedInCustomerQuery } from '../../../schema'
import type { CustomerEndpoint } from '.'
export const getLoggedInCustomerQuery = /* GraphQL */ `

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -1,4 +1,4 @@
import { BigcommerceApiError } from '../utils/errors'
import { BigcommerceApiError } from '../../utils/errors'
import type { SignupEndpoint } from '.'
const signup: SignupEndpoint['operations']['signup'] = async ({

View File

@ -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 {

View File

@ -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({

View File

@ -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({

View File

@ -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({

View File

@ -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({

View File

@ -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({