import { HTTPBody } from '@fastify-modular/route'; import { pito } from 'pito'; import { NeedLogin } from '../defines'; // ========================================================================== export const SendInterimParam = pito.Obj({ dealId: pito.Num(), }); export type SendInterimParam = pito.Type; // ========================================================================== export const SendInterimInput = pito.Obj({ price: pito.Num(), // 납부금액 }); export type SendInterimInput = pito.Type; // ========================================================================== export const SendInterimOutput = pito.Obj({ pmntId : pito.UUID(), expiredAt: pito.Datetime(), }); export type SendInterimOutput = pito.Type; // ========================================================================== export const SendInterim = HTTPBody('POST', '/api/v1/product/deal/interim/send/:dealId', 'deal') .params(SendInterimParam) .body(SendInterimInput) .response(SendInterimOutput) .presets(NeedLogin) .build();