import { IPaymentMethod, IPurposeAsReturnAction } from '../action/trade/pay'; import { IAttributes as IRefundActionAttributes, IInstrument, IRecipient as IRefundRecipient } from '../action/trade/refund'; import { IAgentAsSeller, ISearchConditions as IBaseSearchConditions, IStartParams as IBaseStartParams, IAttributes as IBaseAttributes } from '../assetTransaction'; import { AssetTransactionType } from '../assetTransactionType'; import { IExtendId } from '../autoGenerated'; import { IPotentialAction as IPotentialInformAction, PaymentServiceType } from '../service/paymentService'; export type IAgent = IAgentAsSeller; export type IRecipient = IRefundRecipient; /** * 取引対象物 */ export interface IObject { accountId: string; paymentMethodId: string; typeOf: PaymentServiceType; /** * 発行決済サービスID */ id: string; paymentMethod: Pick; refundFee?: number; } export type IObjectWithoutDetail = Pick; export type IPotentialAction = IPotentialInformAction; export interface IStartParamsWithoutDetail extends IBaseStartParams { /** * add(2025-02-18~) */ instrument: IInstrument[]; } export interface IStartParams extends IBaseStartParams { potentialAction?: IPotentialAction[]; /** * add(2025-02-18~) */ instrument?: IInstrument[]; } export type IRefundPurpose = IPurposeAsReturnAction; export interface IPotentialActionsParams { refund: { purpose: IRefundPurpose; }; } /** * 確定パラメータ */ export interface IConfirmParams { id?: string; transactionNumber?: string; endDate?: Date; potentialActions: IPotentialActionsParams; } export type IResult = any; export type IError = any; export type IPotentialRefundActionAttributes = Pick & { purpose: IRefundPurpose; }; export interface IPotentialActions { /** * 返金アクション */ refund: IPotentialRefundActionAttributes[]; } export type ITransaction = IExtendId; /** * refund transaction */ export interface IAttributes extends IBaseAttributes { potentialAction?: IPotentialAction[]; } export interface ISearchConditions extends IBaseSearchConditions { object?: { accountId?: { $eq?: string; }; paymentMethodId?: { $eq?: string; $in?: string[]; }; }; }