import type { COAFactory } from '@coasystems/factory'; import { IParticipantAsPerson, IParticipantAsProject, IParticipantAsWebApplication } from './action'; import { ICategoryChargePriceComponent, IMovieTicketTypeChargePriceComponent, IUnitPriceComponent, IIssuedThrough, IServiceTypeOfIssuedThrough, ITicketType } from './assetTransaction/reserve'; import { ICreativeWork as IWebApplication } from './creativeWork/softwareApplication/webApplication'; import { ICustomer as ICustomerOrganization } from './customer'; import { ICOAInfo, ISuperEvent as IEventSeries } from './event/screeningEvent'; import { EventType } from './eventType'; import { IMonetaryAmount } from './monetaryAmount'; import { IMultilingualString } from './multilingualString'; import { IOffer } from './offer'; import { OrderStatus } from './orderStatus'; import { OrderType } from './orderType'; import { OrganizationType } from './organizationType'; import { PaymentStatusType } from './paymentStatusType'; import { IPerson, IProfile } from './person'; import { PersonType } from './personType'; import { PlaceType } from './placeType'; import { PriceCurrency } from './priceCurrency'; import { IPriceSpecification as ICompoundPriceSpecification } from './priceSpecification/compoundPriceSpecification'; import { ProductType } from './product'; import { IPropertyValue } from './propertyValue'; import { IOptimizedSuperEventLegacy, IOptimizedWorkPerformedLegacy, IReservation as IRawReservation, IReservationForLegacy, IReservedTicket as IRawReservedTicket } from './reservation/event'; import { ReservationType } from './reservationType'; import { ISeller as IBaseSeller } from './seller'; import { IPaymentMethodAsServiceOutput, PaymentServiceType } from './service/paymentService'; import { SortType } from './sortType'; import { UnitCode } from './unitCode'; export { OrderType }; export interface IProject { typeOf: OrganizationType.Project; id: string; } export interface IOrderPaymentMethodIssuedThrough { typeOf: PaymentServiceType; /** * 発行決済サービスID */ id: string; } export interface ITotalPaymentDue extends Pick { value: number; /** * 決済カードIFの場合C62 * それ以外ではJPY */ currency: UnitCode.C62 | PriceCurrency.JPY; } export type IPaymentMethodOfInvoice = Pick & { /** * 決済方法区分コード */ identifier: string; }; /** * 請求 */ export interface IReferencedInvoice { /** * The identifier for the account the payment will be applied to. */ accountId?: string; /** * 決済方法名称 */ name: string; /** * The name of the credit card or other method of payment for the order. * 追加(2023-08-13~) * 存在を保証(2023-08-28~) * OrderPaymentDueの状態では存在しない可能性あり */ paymentMethod?: IPaymentMethodOfInvoice; /** * An identifier for the method of payment used (e.g.the last 4 digits of the credit card). */ paymentMethodId: string; /** * 自動決済かどうか判定するために追加(2023-08-23~) */ paymentStatus?: PaymentStatusType.PaymentAutomaticallyApplied | PaymentStatusType.PaymentDue; /** * The total amount due. */ totalPaymentDue?: ITotalPaymentDue; /** * 追加特性 */ additionalProperty: IPropertyValue[]; issuedThrough: IOrderPaymentMethodIssuedThrough; referencesOrder?: never; } export type IWorkPerformed = Pick; export type ISuperEvent = Pick & { workPerformed: IWorkPerformed; identifier?: never; alternativeHeadline?: never; duration?: never; coaInfo?: never; }; /** * COAの場合の施設コンテンツ */ export type ICOASuperEvent = Pick & Pick & { workPerformed: IWorkPerformed; }; export type IEventAsReservationFor = Omit & { superEvent: ISuperEvent; /** * COA予約でのみ使用されている */ identifier?: never; /** * その他COA情報 * 基本的にsskts対応 */ coaInfo?: never; }; /** * COAの場合のイベント */ export type ICOAEventAsReservationFor = Omit & { superEvent: ICOASuperEvent; /** * COA予約でのみ使用されている */ identifier?: string; /** * その他COA情報 * 基本的にsskts対応 */ coaInfo?: ICOAInfo; }; /** * COA券種情報 */ export type ICOATicketInfoWithDetails = COAFactory.reserve.IUpdReserveTicket & { /** * チケット名 */ ticketName: string; /** * チケット名(カナ) */ ticketNameKana: string; /** * チケット名(英) */ ticketNameEng: string; /** * ポイント割引の場合の消費ポイント */ usePoint: number; }; export type ITicketTypeInOrder = Pick; export type IReservedTicket = Pick & { ticketType: ITicketTypeInOrder; ticketNumber?: never; dateIssued?: never; ticketToken?: never; coaTicketInfo?: never; coaReserveAmount?: never; }; export type ICOATicketType = Pick; /** * COAの場合の予約チケット */ export type ICOAReservedTicket = Pick & { ticketType: ICOATicketType; /** * COA券種情報 */ coaTicketInfo?: ICOATicketInfoWithDetails; coaReserveAmount?: number; }; export interface ICOAIssuedThrough { typeOf: ProductType.EventService; serviceType?: never; /** * 興行管理をしていないためid未定義 */ id?: never; } export type IEventReservation = Pick & { issuedThrough: IIssuedThrough; reservationFor: IEventAsReservationFor; reservedTicket: IReservedTicket; }; /** * COAの場合の予約 */ export type ICOAEventReservation = Pick & { issuedThrough: ICOAIssuedThrough; reservationFor: ICOAEventAsReservationFor; reservedTicket: ICOAReservedTicket; }; /** * オファー提供アイテムとしての予約 */ export type IReservation = IEventReservation | ICOAEventReservation; /** * 注文アイテム */ export type IItemOffered = IReservation; export { ICategoryChargePriceComponent }; export { IMovieTicketTypeChargePriceComponent }; export { IUnitPriceComponent }; export type ITicketPriceComponent = ICategoryChargePriceComponent | IMovieTicketTypeChargePriceComponent | IUnitPriceComponent; /** * 注文オファーの価格仕様 */ export type ITicketPriceSpecification = Pick, 'priceComponent' | 'priceCurrency' | 'typeOf' | 'valueAddedTaxIncluded'>; export type IOfferOptimized4acceptedOffer = Pick; /** * 受け入れオファー */ export interface IAcceptedOffer extends IOfferOptimized4acceptedOffer { /** * オファー対象アイテム */ itemOffered: IItemOffered; priceSpecification?: ITicketPriceSpecification; /** * 資産取引を特定する番号(2024-01-30~) */ serialNumber?: string; } /** * 販売者 */ export interface ISeller extends Pick { id: string; name: string; } /** * ウェブアプリケーションとしてのカスタマー */ export type IWebApplicationCustomer = Pick & IProfile; /** * 顧客組織としてのカスタマー */ export type IOrganizationCustomer = Pick & IProfile; export type IPersonCustomer = Pick & IProfile; /** * カスタマー */ export type ICustomer = IPersonCustomer | IWebApplicationCustomer | IOrganizationCustomer; export type IBroker = Pick; /** * 返品者 */ export type IParticipantAsReturner = IParticipantAsPerson | IParticipantAsProject | IParticipantAsWebApplication; export type IReturner = Pick; export type IIdentifier = IPropertyValue[]; export interface ISimpleOrder { /** * object type */ typeOf: OrderType; /** * The merchant- specific identifier for the transaction. */ orderNumber: string; /** * Date order was placed. */ orderDate: Date; } export interface IReservationFor4EventServiceOrderedItem { location?: { branchCode: string; name?: IMultilingualString; typeOf: PlaceType.ScreeningRoom; }; typeOf: EventType.ScreeningEvent; id: string; name?: IMultilingualString; startDate?: Date; endDate?: Date; } export interface IEventServiceAsOrderedItem { typeOf: ProductType.EventService; serviceOutput: { typeOf: ReservationType.EventReservation | ReservationType.ReservationPackage; reservationFor: IReservationFor4EventServiceOrderedItem; }; serviceType?: IServiceTypeOfIssuedThrough; /** * 興行id * 興行管理をしていない場合id未定義 */ id?: string; } /** * 注文アイテム * {@link https://schema.org/OrderItem} */ export interface IOrderedItem { typeOf: 'OrderItem'; orderedItem: IEventServiceAsOrderedItem; } /** * 注文 * {@link https://schema.org/Order} */ export interface IOrder extends ISimpleOrder { id?: string; project: IProject; /** * An entity that arranges for an exchange between a buyer and a seller. * In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. */ broker?: IBroker; /** * A number that confirms the given order or payment has been received. */ confirmationNumber: string; customer: ICustomer; /** * Date order was returned. */ dateReturned?: Date; /** * The identifier property represents any kind of identifier for any kind of Thing */ identifier?: IIdentifier; /** * Was the offer accepted as a gift for someone other than the buyer. */ isGift?: boolean; /** * 注文名称 */ name?: string; orderedItem?: IOrderedItem[]; /** * OrderStatus (recommended for confirmation cards/ Search Answers) * The current status of the order. */ orderStatus: OrderStatus; /** * payment methods */ paymentMethods: IReferencedInvoice[]; previousOrderStatus?: OrderStatus; /** * The total price of the entire transaction. */ price: number; /** * The currency (in 3 - letter ISO 4217 format) of the order price. */ priceCurrency: PriceCurrency; /** * Returner */ returner?: IReturner; /** * The party taking the order (e.g. Amazon.com is a merchant for many sellers). Also accepts a string (e.g. "Amazon.com"). */ seller: ISeller; /** * URL (recommended for confirmation cards/ Search Answers) * URL of the Order, typically a link to the merchant's website where the user can retrieve further details about an order. */ url?: string; } /** * ソート条件 */ export interface ISortOrder { orderDate?: SortType; } /** * 予約対象検索条件 */ export interface IReservationForSearchConditions { ids?: string[]; /** * 開催中 from */ inSessionFrom?: Date; /** * 開催中 through */ inSessionThrough?: Date; /** * 開始日時 from */ startFrom?: Date; /** * 開始日時 through */ startThrough?: Date; /** * イベント開催場所 */ location?: { branchCodes?: string[]; }; /** * 親イベント情報 */ superEvent?: { ids?: string[]; location?: { /** * 親イベントが実施される場所の枝番号 */ branchCodes?: string[]; }; workPerformed?: { /** * コンテンツコードリスト */ identifiers?: string[]; }; }; } export interface ISellerSearchConditions { /** * 販売者IDリスト */ ids?: string[]; id?: { $eq?: string; }; } export interface ICustomerSearchConditions { typeOf?: PersonType; ids?: string[]; identifiers?: IIdentifier; identifier?: { $all?: IIdentifier; $in?: IIdentifier; }; givenName?: string | { $eq?: string; $regex?: string; }; familyName?: string | { $eq?: string; $regex?: string; }; email?: string | { $eq?: string; $regex?: string; }; telephone?: string | { $eq?: string; $regex?: string; }; } export interface IPaymentMethodsSearchConditions { /** * 決済アカウントID * 決済カードコード、ペイメントカード番号など */ accountIds?: string[]; /** * 追加特性 */ additionalProperty?: { /** * すべてに一致する */ $all?: IIdentifier; /** * どれかに一致する */ $in?: IIdentifier; }; /** * 決済方法区分コード * @deprecated Use paymentMethod.identifier */ typeOfs?: string[]; /** * 決済方法ID * 決済代行オーダーIDなど */ paymentMethodIds?: string[]; paymentMethod?: { /** * 決済方法区分コード */ identifier?: { $in?: string[]; }; }; } export interface IAcceptedOffersSearchConditions { itemOffered?: { /** * アイテムID * 予約IDなど */ ids?: string[]; reservationFor?: IReservationForSearchConditions; /** * 予約番号 */ reservationNumbers?: string[]; reservedTicket?: { /** * 予約チケット識別子 */ identifier?: { $eq?: string; }; }; }; serialNumber?: { $eq?: string; }; } /** * 注文検索条件 */ export interface ISearchConditions { limit?: number; page?: number; sort?: ISortOrder; project?: { id?: { $eq?: string; }; }; broker?: { id?: { $eq?: string; }; }; name?: { /** * 名称完全一致 */ $eq?: string; /** * 名称部分一致 */ $regex?: string; }; /** * 販売者条件 */ seller?: ISellerSearchConditions; /** * 販売者条件(リクエストによるフィルター専用) */ provider?: { id?: { $eq?: string; }; }; /** * 顧客条件 */ customer?: ICustomerSearchConditions; /** * 注文番号リスト */ orderNumbers?: string[]; /** * 注文ステータスリスト */ orderStatuses?: OrderStatus[]; /** * 注文日時 */ orderDate?: { /** * 注文日時(まで) */ $gte?: Date; /** * 注文日時(から) */ $lte?: Date; }; /** * 確認番号リスト */ confirmationNumbers?: string[]; /** * 決済方法 */ paymentMethods?: IPaymentMethodsSearchConditions; /** * 注文アイテム条件 */ acceptedOffers?: IAcceptedOffersSearchConditions; }