import type { COAFactory } from '@coasystems/factory'; import { IParticipantAsWebApplication, IAction as IBaseAction } from '../../action'; import { ActionType } from '../../actionType'; import { IAcceptedTicketOfferItemOffered, IAcceptedTicketOfferWithoutDetail as IAcceptedOfferWithoutDetail4chevre } from '../../assetTransaction/reserve'; import { AssetTransactionType } from '../../assetTransactionType'; import { IOffer } from '../../offer'; import { OfferType } from '../../offerType'; import { ITicketPriceSpecification } from '../../order'; import { IRecipe, IUpdTmpReserveSeatArgs, IUpdTmpReserveSeatResult } from '../../recipe/acceptCOAOffer'; import { TransactionType } from '../../transactionType'; import { IAttributes as IBaseAttributes } from '../accept'; export interface ICOATicketInfo { /** * チケットコード */ ticketCode: string; /** * ムビチケ・MG計上単価 * ムビチケ・MGの場合、計上単価(興収報告単価)をセット * (ムビチケ・MG以外は0をセット) */ mvtkAppPrice: number; /** * 枚数 */ ticketCount: number; /** * メガネ単価 * メガネ代が別途発生した場合は、メガネ代をセット。それ以外は0をセット(ムビチケの場合も同様) */ addGlasses: number; /** * ムビチケ・MG映写方式区分 * ムビチケ・MG連携情報より */ kbnEisyahousiki: string; /** * ムビチケ・MG購入管理番号 * ムビチケ・MG連携情報より(ムビチケ・MG以外は"") */ mvtkNum: string; /** * ムビチケ・MG電子券区分 * ムビチケ・MG連携情報より(01:電子、02:紙) * ※ムビチケ・MG以外は"00"をセット * ※MGはチケット媒体区分 */ mvtkKbnDenshiken: string; /** * ムビチケ・MG前売券区分 * ムビチケ・MG連携情報より(01:全国券、02:劇場券) * ※ムビチケ・MG以外は"00"をセット * ※MGはスコープ区分 */ mvtkKbnMaeuriken: string; /** * ムビチケ・MG券種区分 * ムビチケ・MG連携情報より(01:一般2D、02:小人2D、03:一般3D、…) * ※ムビチケ・MG以外は"00"をセット */ mvtkKbnKensyu: string; /** * ムビチケ・MG販売単価 * ムビチケ・MG連携情報より(ムビチケ・MG以外は0をセット) */ mvtkSalesPrice: number; /** * MGチケット区分 * MGチケットの場合は"MG"(MG以外は""をセット) */ kbnMgtk?: string; /** * ポイント割引の場合の消費ポイント */ usePoint?: number; /** * クーポンコード * クーポン(割引)利用の場合に指定(2024-08-27~) */ couponCode?: string; } /** * COA券種情報 */ export type ICOATicketInfoWithDetails = COAFactory.reserve.IUpdReserveTicket & { /** * チケット名 */ ticketName: string; /** * チケット名(カナ) */ ticketNameKana: string; /** * チケット名(英) */ ticketNameEng: string; /** * ポイント割引の場合の消費ポイント */ usePoint: number; /** * 制限単位(001:n人単位、002:n人以上) */ limitUnit: string; /** * 人数制限 */ limitCount: number; /** * 販売可能チケットのsalePrice * COA予約確定時に指定するsalePriceと異なる */ salesTicketSalePrice: number; }; /** * 座席予約供給情報インターフェース */ export interface IAcceptedCOAOffer { /** * seat section */ seatSection: string; /** * seat number */ seatNumber: string; /** * ticket info */ ticketInfo: ICOATicketInfo; } export interface IAppliesToSurfrock { /** * コード */ identifier: string; serviceOutput: { /** * 決済方法区分 */ typeOf: string; }; } export interface IPriceSpecification4COA { appliesToSurfrock?: IAppliesToSurfrock; } export type IAcceptedOfferWithoutDetail4COA = IAcceptedCOAOffer & { priceSpecification?: IPriceSpecification4COA; }; export interface IObjectWithoutDetail4COA { acceptedOffer: IAcceptedOfferWithoutDetail4COA[]; event: { id: string; }; } /** * 受入COA興行オファー */ export type IAcceptedOffer4COA = Pick & Pick & { /** * 単価オファーid */ id: string; /** * 単価オファーコード */ identifier: string; itemOffered: IAcceptedTicketOfferItemOffered; ticketInfo: ICOATicketInfoWithDetails; /** * COAイベントでは、priceSpecificationで価格を表現しきれないので、numberとしてのpriceが必要 */ price: number; priceSpecification: ITicketPriceSpecification; seatNumber?: never; seatSection?: never; }; /** * 承認前の受入オファー(COA仮予約済) */ export type IAcceptedOfferBeforeAuthorize4COA = Pick & Pick & { itemOffered: Pick; ticketInfo: Omit; /** * 適用surfrock指定 * interfacesのmemberClients設定に含まれるクライアントでの注文取引であれば、強制的に指定される */ priceSpecification: IPriceSpecification4COA; }; export { IRecipe, IUpdTmpReserveSeatArgs, IUpdTmpReserveSeatResult }; export type IAgent = IParticipantAsWebApplication; /** * COA会員用フラグ */ export declare enum FlgMember { /** * 非会員 */ NonMember = "0", /** * 会員 */ Member = "1" } export interface IObject extends Pick { appliesToSurfrock: IAppliesToSurfrock; typeOf: OfferType.AggregateOffer; } export interface IAuthorizeCOAOfferResult { responseBody: Pick; } export interface IResult { /** * 承認アクションID * 仮予約済の場合に指定 */ id?: string; object: { acceptedOffer: IAcceptedOfferBeforeAuthorize4COA[]; event: { id: string; }; }; /** * 仮予約実行時は存在する */ result?: IAuthorizeCOAOfferResult; typeOf: ActionType.AuthorizeAction; } export interface IPurpose { typeOf: TransactionType.PlaceOrder; id: string; } export interface IPotentialActions { /** * 承認アクションID * 仮予約済の場合に指定 */ id?: string; typeOf: ActionType.AuthorizeAction; } export interface IInstrument { typeOf: AssetTransactionType.COAReserveTransaction; } export interface IAttributes extends Pick, 'agent' | 'error' | 'instrument' | 'object' | 'potentialActions' | 'purpose' | 'result' | 'project' | 'sameAs' | 'typeOf'> { agent: IAgent; instrument: IInstrument; object: IObject; purpose: IPurpose; potentialActions: IPotentialActions; typeOf: ActionType.AcceptAction; } /** * COA興行オファー採用アクション */ export type IAction = IBaseAction;