import { IExtendId } from '../autoGenerated'; import { ICategoryCode } from '../categoryCode'; import { EventType } from '../eventType'; import { IOfferCatalog } from '../offerCatalog'; import { OfferType } from '../offerType'; import { OrganizationType } from '../organizationType'; import { PlaceType } from '../placeType'; import { ProductType } from '../product'; import { ITaskAttributes } from '../task'; import { TaskName } from '../taskName'; export type CategoryCodeType = ICategoryCode['typeOf']; export type OfferCatalogType = IOfferCatalog['typeOf']; export type IResourceTypeOf = CategoryCodeType | EventType.ScreeningEventSeries | OrganizationType.Corporation | PlaceType.MovieTheater | ProductType | OfferCatalogType | OfferType.AggregateOffer; export interface IData4common { /** * リソースIDリスト */ id: string[]; project: { id: string; }; typeOf: IResourceTypeOf; isNew: boolean; isDeleted: true; useInform: boolean; /** * typeOf: OfferCatalogのリポジトリを判定するため */ isOfferCatalogItem?: boolean; branchCode?: never; } /** * ルーム変更の場合のタスクデータ */ export interface IData4screeningRoom { /** * ルームコードリスト */ branchCode: string[]; containedInPlace: { /** * 施設ID */ id: string; }; project: { id: string; }; typeOf: PlaceType.ScreeningRoom; isNew?: never; isDeleted: true; useInform: boolean; } export interface IData4pos { /** * コード */ branchCode: string; operator: { /** * 施設ID */ id: string; }; project: { id: string; }; typeOf: 'POS'; isNew: boolean; isDeleted: true; useInform: boolean; } export type IData = IData4common | IData4screeningRoom | IData4pos; export interface IAttributes extends ITaskAttributes { name: TaskName.OnResourceDeleted; data: IData; } /** * リソース変更時タスク */ export type ITask = IExtendId;