import { IParticipantAsSeller, IParticipant, IAction as IBaseAction, IAttributes as IBaseAttributes } from '../../action'; import { ActionType } from '../../actionType'; import { IOrder } from '../../order'; import { IAlterTranResult, IRecipe as IRefundCreditCardRecipe, IResultAsError as IRefundCreditCardResultAsError } from '../../recipe/refundCreditCard'; import { IRecipe as IRefundMovieTicketRecipe, IResultAsError as IRefundMovieTicketResultAsError, ISeatInfoSyncCancelIn, ISeatInfoSyncCancelResult, ISeatInfoSyncIn, ISeatInfoSyncResult } from '../../recipe/refundMovieTicket'; import { TransactionType } from '../../transactionType'; import { IRefundTransactionAsPurpose } from '../interact/inform'; import { IAction as IReturnInvoiceAction } from '../transfer/return/invoice'; import { IOrderAsPayPurpose, IPaymentMethod, IPaymentService as IPaymentServiceOnPay, IPurposeAsReturnAction } from './pay'; export { IAlterTranResult, ISeatInfoSyncCancelIn, ISeatInfoSyncCancelResult, ISeatInfoSyncIn, ISeatInfoSyncResult, IRefundCreditCardRecipe, IRefundMovieTicketRecipe }; export type IAgent = IParticipantAsSeller; export type IRecipient = IParticipant; export type IPaymentService = Omit & { refundFee?: number; paymentMethod: Pick; }; export type IObject = [IPaymentService]; export type IAlterTranResultAsError = IRefundCreditCardResultAsError; export type ISearchTradeResultAsError = IRefundCreditCardResultAsError; export type ISeatInfoSyncResultAsError = IRefundMovieTicketResultAsError; export interface IResult { /** * ペイメントカード決済の場合 */ accountTransaction?: { transactionNumber: string; }; } export interface IInformPayment { purpose: IRefundTransactionAsPurpose; recipient?: never; /** * potentialAction id */ id: string; } export interface IPotentialActions { add2report: boolean; informPayment?: IInformPayment[]; } export interface IPurposeAsPlaceOrder { typeOf: TransactionType.PlaceOrder; id: string; } export { IOrderAsPayPurpose, IPurposeAsReturnAction }; export type IPurpose = IOrderAsPayPurpose | IPurposeAsReturnAction | IPurposeAsPlaceOrder; export type IOrderAsInstrument = Pick; export type IReturnActionAsInstrument = Pick; export type IInstrument = IOrderAsInstrument | IReturnActionAsInstrument; export interface IAttributes extends Pick, 'agent' | 'error' | 'object' | 'potentialActions' | 'purpose' | 'recipient' | 'result' | 'project' | 'sameAs' | 'typeOf'> { agent: IAgent; recipient?: IRecipient; purpose: IPurpose; potentialActions?: IPotentialActions; /** * add(2025-02-17~) */ instrument?: IInstrument[]; } /** * refund action */ export type IAction = IBaseAction;