import { ActionStatusType } from './actionStatusType'; import { ActionType } from './actionType'; import { AssetTransactionType } from './assetTransactionType'; import { IExtendId } from './autoGenerated'; import { CreativeWorkType } from './creativeWorkType'; import { IEntryPoint } from './entryPoint'; import { OrganizationType } from './organizationType'; import { IPersonAttributes } from './person'; import { IProject } from './project'; import { SortType } from './sortType'; export interface IParticipantOptionalAttributes { name?: string; } export type IRecipientAsAnonymousWebApplication = IParticipantOptionalAttributes & { typeOf: CreativeWorkType.WebApplication; id?: never; }; export type IParticipantAsWebApplication = IParticipantOptionalAttributes & { typeOf: CreativeWorkType.WebApplication; id: string; identifier?: never; }; export type IParticipantAsSoftwareApplication = IParticipantOptionalAttributes & { typeOf: CreativeWorkType.SoftwareApplication; id: string; }; export type IParticipantAsPerson = IParticipantOptionalAttributes & Pick; export type IParticipantAsSeller = IParticipantOptionalAttributes & { typeOf: OrganizationType.Corporation; id: string; identifier?: never; }; export type IParticipantAsProject = IParticipantOptionalAttributes & { typeOf: OrganizationType.Project; id: string; identifier?: never; }; export type IParticipantAsCustomer = IParticipantOptionalAttributes & { typeOf: OrganizationType.Organization; id: string; identifier?: never; }; /** * アクションへの関係者 */ export type IParticipant = IParticipantAsWebApplication | IParticipantAsSoftwareApplication | IParticipantAsPerson | IParticipantAsSeller | IParticipantAsProject | IParticipantAsCustomer; /** * アクション目的 */ export interface IPurpose { typeOf: string; id?: string; } export type IRecipient = IParticipant | IRecipientAsAnonymousWebApplication; export interface ISameAs { /** * タスクID or 資産取引ID */ id: string; typeOf: 'Task' | AssetTransactionType.Pay; } /** * アクション属性 */ export interface IAttributes { project: Pick; agent: IParticipant; description?: string; error?: any; /** * The location of, for example, where an event is happening, where an organization is located, or where an action takes place. */ location?: any; instrument?: any; object: TObject; potentialActions?: any; purpose?: IPurpose; recipient?: IRecipient; result?: TResult; sameAs?: ISameAs; /** * アクションタイプ */ typeOf: T; amount?: any; fromLocation?: any; toLocation?: any; replacer?: any; targetCollection?: any; cancelAction?: any; about?: any; target?: IEntryPoint; /** * globally unique identifier(2025-02-25~) */ identifier?: string; } /** * アクション動的属性 * リポジトリに保管時にセット、あるいは変更される */ export interface IDynamicAttributes { actionStatus: ActionStatusType; startDate: Date; endDate?: Date; } /** * アクション * {@link https://schema.org/Action} */ export type IAction> = IExtendId; /** * ソート条件 */ export interface ISortOrder { startDate?: SortType; } /** * 検索条件 */ export interface ISearchConditions { limit?: number; page?: number; sort?: ISortOrder; id?: { $in?: string[]; $nin?: string[]; }; project?: { id?: { $eq?: string; }; }; typeOf?: ActionType | { $eq?: ActionType; }; actionStatus?: { $in?: ActionStatusType[]; }; actionStatusTypes?: ActionStatusType[]; agent?: { typeOf?: { $in?: string[]; }; id?: { $in?: string[]; }; }; about?: { orderNumber?: { $eq?: string; }; }; instrument?: { typeOf?: { $eq?: string; }; transactionNumber?: { $eq?: string; }; /** * returnPolicy.identifier etc. */ identifier?: { $eq?: string; }; id?: { $eq?: string; }; orderNumber?: { $eq?: string; }; }; location?: { id?: { $eq?: string; }; identifier?: { $eq?: string; }; }; object?: { id?: { $eq?: string; $in?: string[]; }; movieTickets?: { identifier?: { $eq?: string; }; serviceOutput?: { reservationFor?: { id?: { $eq?: string; }; }; }; }; object?: { /** * 通知アクション(決済、返金)の決済方法ID */ paymentMethodId?: { $eq?: string; }; }; orderNumber?: { $in?: string[]; }; reservationFor?: { id?: { $eq?: string; }; }; reservationNumber?: { $eq?: string; $in?: string[]; }; paymentMethod?: { accountId?: { $eq?: string; }; /** * 決済アクションの決済方法ID */ paymentMethodId?: { $eq?: string; $in?: string[]; }; typeOf?: { $eq?: string; }; }; /** * 承認アクションの決済方法ID */ paymentMethodId?: { $eq?: string; }; event?: { id?: { $in?: string[]; }; }; typeOf?: { $eq?: string; $in?: string[]; }; /** * 確定アクション、採用アクションなどの資産取引番号 */ transactionNumber?: { $eq?: string; }; }; startFrom?: Date; startThrough?: Date; purpose?: { typeOf?: { $in?: string[]; }; id?: { $in?: string[]; }; orderNumber?: { $in?: string[]; }; }; result?: { typeOf?: { $in?: string[]; }; id?: { $in?: string[]; }; orderNumber?: { $in?: string[]; }; code?: { $in?: string[]; }; }; sameAs?: { id?: { $eq?: string; }; }; fromLocation?: { typeOf?: { $in?: string[]; }; accountNumber?: { $in?: string[]; }; accountType?: { $in?: string[]; }; }; toLocation?: { typeOf?: { $in?: string[]; }; accountNumber?: { $in?: string[]; }; accountType?: { $in?: string[]; }; }; }