mirror of
https://github.com/vercel/commerce.git
synced 2025-06-19 05:31:22 +00:00
* Add codegen, update fragments & schemas * Update checkout-create.ts * Update checkout-create.ts * Update README.md * Update product mutations & queries * Uptate customer fetch types * Update schemas * Start updates * Moved Page, AllPages & Site Info * Moved product, all products (paths) * Add translations, update operations & fixes * Update api endpoints, types & fixes * Add api checkout endpoint * Updates * Fixes * Update commerce.config.json Co-authored-by: B <curciobelen@gmail.com>
19 lines
576 B
TypeScript
19 lines
576 B
TypeScript
import { GetAPISchema, createEndpoint } from '@commerce/api'
|
|
import checkoutEndpoint from '@commerce/api/endpoints/checkout'
|
|
import type { CheckoutSchema } from '../../../types/checkout'
|
|
import type { ShopifyAPI } from '../..'
|
|
import checkout from './checkout'
|
|
|
|
export type CheckoutAPI = GetAPISchema<ShopifyAPI, CheckoutSchema>
|
|
|
|
export type CheckoutEndpoint = CheckoutAPI['endpoint']
|
|
|
|
export const handlers: CheckoutEndpoint['handlers'] = { checkout }
|
|
|
|
const checkoutApi = createEndpoint<CheckoutAPI>({
|
|
handler: checkoutEndpoint,
|
|
handlers,
|
|
})
|
|
|
|
export default checkoutApi
|