import { IIamportPayment } from "iamport-server-api/lib/structures/IIamportPayment"; import { ITossPayment } from "toss-payments-server-api/lib/structures/ITossPayment"; import { tags } from "typia"; import { IPaymentCancelHistory } from "./IPaymentCancelHistory"; import { IPaymentSource } from "./IPaymentSource"; import { IPaymentVendor } from "./IPaymentVendor"; export type IPaymentHistory = IPaymentHistory.IamportType | IPaymentHistory.TossType; export declare namespace IPaymentHistory { type IamportType = BaseType<"iamport", IIamportPayment>; type TossType = BaseType<"toss.payments", ITossPayment>; interface BaseType { id: string & tags.Format<"uuid">; vendor_code: VendorCode; vendor: IPaymentVendor; source: IPaymentSource; data: Data; currency: string; price: number & tags.Minimum<0>; refund: null | (number & tags.Minimum<0>); webhook_url: null | (string & tags.Format<"url">); created_at: string & tags.Format<"date-time">; paid_at: null | (string & tags.Format<"date-time">); cancelled_at: null | (string & tags.Format<"date-time">); cancels: IPaymentCancelHistory[]; } interface IStore { vendor: IPaymentVendor<"iamport" | "toss.payments">; source: IPaymentSource; price: number & tags.Minimum<0>; password: string; webhook_url: string & tags.Format<"url">; } interface IProps { currency: string; price: number; refund: null | number; paid_at: null | Date; cancelled_at: null | Date; cancels: IPaymentCancelHistory.IProps[]; data: object; } }