import { CategorySetIdentifier, ICategoryCode, ICategoryCodeSet } from './categoryCode'; import { IMultilingualString } from './multilingualString'; import { IName as IOfferName, IOffer as IBaseOffer } from './offer'; import { OfferType } from './offerType'; import { IPermit } from './permit'; import { IAppliesToCategoryCode, IPriceSpecification as ICategoryCodeChargeSpecification } from './priceSpecification/categoryCodeChargeSpecification'; import { IPriceSpecification as ICompoundPriceSpecification } from './priceSpecification/compoundPriceSpecification'; import { IPriceSpecification as IMovieTicketTypeChargeSpecification } from './priceSpecification/movieTicketTypeChargeSpecification'; import { IPriceSpecification as IUnitPriceSpecification } from './priceSpecification/unitPriceSpecification'; import { IProject } from './project'; import { IPropertyValue } from './propertyValue'; import { SortType } from './sortType'; import { IThing } from './thing'; import { IAddOn4unitPriceOffer, IItemOffered } from './unitPriceOffer'; /** * プロダクトタイプ */ export declare enum ProductType { /** * 興行 */ EventService = "EventService", /** * アドオン */ Product = "Product" } export interface IOfferCatalogItem { /** * カタログID * サブカタログではなくカタログ */ id: string; } export interface IHasOfferCatalog { typeOf: 'OfferCatalog'; /** * カタログリスト */ itemListElement: IOfferCatalogItem[]; } export type IServiceOutput = Pick; export interface INoCredentials { authorizeServerDomain?: never; clientId?: never; clientSecret?: never; } export interface INoAvailableChannel { typeOf: 'ServiceChannel'; serviceUrl?: never; credentials?: INoCredentials; } export type IServiceType = Pick; export interface ICommonAttributes extends Pick { project: Pick; typeOf: ProductType; id?: string; /** * 説明 */ description?: Pick; /** * Indicates an OfferCatalog listing for this Organization, Person, or Service. */ hasOfferCatalog?: IHasOfferCatalog; /** * 名称 */ name?: Pick; /** * The product identifier, such as ISBN. For example: meta itemprop="productID" content="isbn:123-456-789". * プロジェクト内でユニークなプロダクトコード */ productID: string; additionalProperty?: IPropertyValue[]; potentialAction?: never; } /** * 興行などのプロダクト */ export interface IEventServiceProduct extends ICommonAttributes { typeOf: ProductType.EventService; availableChannel?: INoAvailableChannel; serviceOutput?: never; /** * The type of service being offered, e.g. veterans' benefits, emergency relief, etc. * 興行区分 */ serviceType?: IServiceType; } /** * アドオンプロダクト */ export interface IAddOnProduct extends ICommonAttributes { typeOf: ProductType.Product; availableChannel?: INoAvailableChannel; serviceOutput?: never; serviceType?: never; } /** * プロダクト * {@link https://schema.org/Product} */ export type IProduct = IEventServiceProduct | IAddOnProduct; export interface IHasOfferCatalogOnCreate { /** * IDを指定する場合 */ id?: string; /** * カタログコードを指定する場合 */ identifier?: string; } /** * プロダクト作成パラメータ */ export type ICreateParams = Pick & { /** * 興行のみ追加特性を設定可能 */ additionalProperty?: IPropertyValue[]; /** * 興行に複数設定の場合はArray * 最大数: 2 */ hasOfferCatalog?: IHasOfferCatalogOnCreate[]; /** * サービスタイプ * 興行->興行区分 */ serviceType?: Pick; }; export interface ISortOrder { productID?: SortType; } export interface ISearchConditions { limit?: number; page?: number; sort?: ISortOrder; project?: { id?: { $eq?: string; }; }; hasOfferCatalog?: { /** * hasOfferCatalog.itemListElement.idで検索(2024-09-30~) */ id?: { $eq?: string; }; }; id?: { $eq?: string; $in?: string[]; }; name?: { $regex?: string; }; productID?: { $eq?: string; $in?: string[]; $regex?: string; }; typeOf?: { $eq?: ProductType; $in?: ProductType[]; }; serviceOutput?: { typeOf?: { $eq?: string; }; amount?: { currency?: { $eq?: string; }; }; }; serviceType?: { codeValue?: { $eq?: string; }; }; additionalPropertyMatch?: { /** * 一致する名称の追加特性がひとつでも存在する */ nameEq?: string; }; } /** * サービスアウトプット検索条件 */ export interface IServiceOutputSearchConditions { limit?: number; page?: number; project?: { id?: { $eq?: string; }; }; accessCode?: { $eq?: string; }; id?: { $eq?: string; }; identifier?: { $eq?: string; $in?: string[]; }; issuedBy?: { id?: { $eq?: string; }; }; issuedThrough?: { id?: { $eq?: string; }; serviceType?: { codeValue?: { $eq?: string; }; }; typeOf?: { $eq?: ProductType; }; }; typeOf?: { $eq?: string; }; } export type IPriceComponentAppliesToCategoryCode = Pick & { inCodeSet: Pick & { identifier: CategorySetIdentifier.SoundFormatType | CategorySetIdentifier.VideoFormatType; }; }; export type ICategoryCodeChargePriceComponent = Pick & { appliesToCategoryCode: IPriceComponentAppliesToCategoryCode[]; }; export type IMovieTicketTypeChargePriceComponent = Pick; export type ITicketUnitPriceComponent = Pick; export type IPotentialAppliesToSeatingType = Pick & { inCodeSet: Pick & { identifier: CategorySetIdentifier.SeatingType; }; }; /** * 潜在的な区分加算料金 */ export type IPotentialCategoryCodeChargePriceComponent = Pick & { appliesToCategoryCode: IPotentialAppliesToSeatingType[]; id?: never; name?: never; /** * 潜在的なので価格不明 */ price?: never; }; /** * プロダクトオファーの価格仕様要素 */ export type ITicketPriceComponent = ICategoryCodeChargePriceComponent | IMovieTicketTypeChargePriceComponent | ITicketUnitPriceComponent | IPotentialCategoryCodeChargePriceComponent; /** * プロダクトオファーの価格仕様 */ export type ITicketPriceSpecification = Omit, 'project'>; export type IMinimizedTicketAddOn = IAddOn4unitPriceOffer; /** * プロダクトオファー */ export interface ITicketOffer extends Pick { addOn?: IMinimizedTicketAddOn[]; identifier: string; name: IOfferName; priceSpecification: ITicketPriceSpecification; itemOffered?: IItemOffered; offerIndex?: number; /** * カタログ内ソートインデックス */ sortIndex?: number; typeOf: OfferType.Offer; }