mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
19 lines
534 B
TypeScript
19 lines
534 B
TypeScript
import { createEndpoint, GetAPISchema } from "@commerce/api"
|
|
import loginEndpoint from "@commerce/api/endpoints/login"
|
|
import { LoginSchema } from "@commerce/types/login"
|
|
import { OrdercloudAPI } from "@framework/api"
|
|
import login from "./login"
|
|
|
|
export type LoginAPI = GetAPISchema<OrdercloudAPI, LoginSchema>
|
|
|
|
export type LoginEndpoint = LoginAPI['endpoint']
|
|
|
|
export const handlers: LoginEndpoint['handlers'] = { login }
|
|
|
|
const loginApi = createEndpoint<LoginAPI>({
|
|
handler: loginEndpoint,
|
|
handlers,
|
|
})
|
|
|
|
export default loginApi
|