import { ItemAvailability } from './itemAvailability'; import { IAddOn, ICategory, IEligibleCategoryCode, IName, IOffer } from './offer'; import { OfferType } from './offerType'; import { IAccounting } from './priceSpecification'; import { IPriceSpecification as IUnitPriceSpecification } from './priceSpecification/unitPriceSpecification'; import { IAddOnProduct, ProductType } from './product'; import { SortType } from './sortType'; import { IOfferMerchantReturnPolicy, IOfferMerchantReturnPolicySearchConditions, IOfferMerchantReturnPolicySortOrder } from './unitPriceOffer/merchantReturnPolicy'; export type IHasMerchantReturnPolicy = (Pick & { id: string; identifier: string; })[]; export { IOfferMerchantReturnPolicy, IOfferMerchantReturnPolicySearchConditions, IOfferMerchantReturnPolicySortOrder }; /** * 単価オファーの提供アイテム */ export interface IItemOffered { typeOf: ProductType; serviceOutput?: never; /** * 特典 */ pointAward?: never; } /** * 単価オファーの価格仕様 */ export type IUnitPriceOfferPriceSpecification = Pick; export type IAddOnItemOffered = Pick; export interface IAddOn4unitPriceOffer extends Pick { itemOffered: IAddOnItemOffered; } export interface ISettings { /** * 区分加算料金を適用しない */ ignoreCategoryCodeChargeSpec?: boolean; /** * 予約集計対象かどうか(2024-11-09~) */ includedInAggregateReservation?: boolean; } export type IAvailability = ItemAvailability.InStock | ItemAvailability.OutOfStock; /** * 単価オファー */ export interface IUnitPriceOffer extends Pick { availability: IAvailability; /** * コード */ identifier: string; /** * 名称 */ name: IName; /** * 単価仕様 */ priceSpecification: IUnitPriceOfferPriceSpecification; /** * プロダクト */ itemOffered?: IItemOffered; /** * アドオン */ addOn?: IAddOn4unitPriceOffer[]; typeOf: OfferType.Offer; /** * 返品ポリシー */ hasMerchantReturnPolicy?: IHasMerchantReturnPolicy; /** * オプション */ settings?: ISettings; } export type ICreateParams = Pick & { /** * アドオン */ addOn?: { itemOffered: { /** * アドオンID */ id: string; }; }[]; /** * カテゴリー */ category?: Pick; /** * 対象メンバーシップ */ eligibleMembershipType?: [Pick]; eligibleSeatingType?: [Pick]; /** * 返品ポリシー */ hasMerchantReturnPolicy?: { /** * 返品ポリシーコード */ identifier: string; }[]; /** * 価格仕様 */ priceSpecification: Pick & { /** * 勘定内容 */ accounting?: Pick; }; }; /** * ソート条件 */ export interface ISortOrder { identifier?: SortType; 'priceSpecification.price'?: SortType; } /** * 価格仕様検索条件 */ export interface IPriceSpecificationSearchConditions { appliesToMovieTicket?: { /** * 適用決済カード数 */ $size?: number; /** * 適用決済カード区分 */ serviceType?: { /** * 適用決済カード区分が存在するかどうか */ $exists?: boolean; $eq?: string; }; serviceOutput?: { /** * 適用決済方法区分 */ typeOf?: { $eq?: string; $all?: string[]; $nin?: string[]; }; }; }; price?: { $gte?: number; $lte?: number; }; referenceQuantity?: { value?: { $eq?: number; }; }; accounting?: { accountsReceivable?: { $gte?: number; $lte?: number; }; operatingRevenue?: { codeValue?: { $eq?: string; $in?: string[]; }; }; }; } /** * 検索条件 */ export interface ISearchConditions { limit?: number; page?: number; sort?: ISortOrder; addOn?: { itemOffered?: { /** * アドオンプロダクトID */ id?: { $eq?: string; $in?: string[]; }; }; }; acceptedPaymentMethod?: { identifier?: { $in?: string[]; }; }; availability?: { $eq?: IAvailability; }; availableAtOrFrom?: { id?: { $eq?: string; $in?: string[]; }; }; project?: { id?: { $eq?: string; }; }; eligibleMembershipType?: { /** * 対象メンバーシップ区分 */ codeValue?: { $eq?: string; }; }; eligibleSeatingType?: { /** * 対象座席区分 */ codeValue?: { $eq?: string; }; }; hasMerchantReturnPolicy?: { id?: { $eq?: string; }; }; id?: { $eq?: string; $in?: string[]; }; identifier?: { $eq?: string; $in?: string[]; $regex?: string; }; name?: { $regex?: string; }; priceSpecification?: IPriceSpecificationSearchConditions; category?: { codeValue?: { $in?: string[]; }; }; itemOffered?: { typeOf?: { $eq?: string; }; }; additionalProperty?: { $all?: { $elemMatch: { name?: { $eq?: string; }; value?: { $in?: string[]; }; }; }[]; $elemMatch?: { name?: { /** * 一致する名称の追加特性がひとつでも存在する */ $eq?: string; }; value?: { $eq?: string; }; }; }; /** * 有効期間設定がない、あるいは、有効期間内 */ onlyValid?: boolean; parentOffer?: { /** * 集計オファーID */ id?: { $in?: string[]; }; }; includedInDataCatalog?: { /** * 記載カタログID */ id?: { $in?: string[]; }; }; }