import { IResultAsInvoice } from './action/authorize/paymentMethod/any'; import { IEventOfferToken } from './assetTransaction/reserve'; import { CreativeWorkType } from './creativeWorkType'; import { IInvoice } from './invoice'; import { OfferType } from './offerType'; import { IOrder } from './order'; import { OrganizationType } from './organizationType'; import { IOwnershipInfo } from './ownershipInfo'; import { PersonType } from './personType'; import { ProductType } from './product'; import { IProject } from './project'; import { ReservationType } from './reservationType'; import { PaymentServiceType } from './service/paymentService'; import { SortType } from './sortType'; import { TransactionType } from './transactionType'; /** * 発券対象の注文 */ export type IOrderAsObject = Pick; /** * 決済方法チケットの請求情報 */ export interface IInvoiceAsPaymentMethodServiceOutput extends Pick { typeOf: IInvoice['typeOf']; } /** * 決済サービス発行のチケット * new(2025-11-11~) */ export interface IPaymentMethodAsTypeOfGood { id: string; typeOf: PaymentServiceType.CreditCard | PaymentServiceType.MovieTicket; serviceOutput: IInvoiceAsPaymentMethodServiceOutput; issuedThrough?: never; } /** * 対面決済サービス発行のチケット */ export interface IFaceToFacePaymentMethodAsTypeOfGood { /** * 対面決済サービスIDはなし */ id?: never; typeOf: PaymentServiceType.FaceToFace; serviceOutput: IInvoiceAsPaymentMethodServiceOutput; issuedThrough?: never; } /** * 決済方法所有権 * support(2025-11-11~) */ export type IPaymentMethodOwnershipInfo = Pick, 'typeOf' | 'typeOfGood'>; /** * 対面決済方法所有権 * support(2025-11-12~) */ export type IFaceToFacePaymentMethodOwnershipInfo = Pick, 'typeOf' | 'typeOfGood'>; /** * Permit所有権あるいは決済方法所有権 */ export type IOwnershipInfoAsObject = IPaymentMethodOwnershipInfo | IFaceToFacePaymentMethodOwnershipInfo; /** * 承認対象としての興行オファー */ export interface IOfferAsObject { typeOf: OfferType.Offer; itemOffered: { typeOf: ProductType.EventService; serviceOutput: { typeOf: ReservationType.ReservationPackage; reservationFor: { /** * イベントID */ id: string; }; }; }; /** * 拡張イベントオファーID * 拡張イベントオファー使用の場合、必須 */ id?: string; /** * イベントオファートークン * 2025-10-21~ */ token?: IEventOfferToken; } export type IObject = IOrderAsObject | IOwnershipInfoAsObject | IOfferAsObject; export interface IAudienceAsPlaceOrder { /** * 取引ID */ id: string; typeOf: TransactionType.PlaceOrder; } export interface IAudienceAsApplication { /** * クライアントID */ id: string; typeOf: CreativeWorkType.SoftwareApplication | CreativeWorkType.WebApplication; } export type IAudience = IAudienceAsApplication | IAudienceAsPlaceOrder; /** * 承認作成者 * 現時点でSoftwareApplicationは認めない */ export interface IAuthor { id: string; typeOf: PersonType.Person | CreativeWorkType.WebApplication; } /** * 承認発行組織 */ export interface IIssuedBy { id: string; typeOf: OrganizationType.Corporation | OrganizationType.Project; } /** * 承認 * 任意の情報をチケット化するために使用 */ export interface IAuthorization { project: Pick; typeOf: 'Authorization'; id?: string; /** * 承認コード */ code: string; /** * 承認対象 */ object: IObject; /** * 有効期間 */ validFrom: Date; /** * 有効期間 */ validUntil: Date; audience?: IAudience; /** * 承認作成者 */ author: IAuthor; /** * 承認発行組織 */ issuedBy: IIssuedBy; } /** * ソート条件 */ export interface ISortOrder { validFrom?: SortType; } export interface IObjectSearchConditions { typeOfs?: string[]; ids?: string[]; typeOfGood?: { typeOfs?: string[]; ids?: string[]; }; orderNumber?: { $eq?: string; }; } /** * 承認検索条件 */ export interface ISearchConditions { limit?: number; page?: number; sort?: ISortOrder; project?: { id?: { $eq?: string; }; }; id?: { $eq?: string; $in?: string[]; }; code?: { $eq?: string; $in?: string[]; }; validFrom?: Date; validThrough?: Date; object?: IObjectSearchConditions; audience?: { id?: { $eq?: string; }; }; }