import { ICreativeWork as IBaseCreativeWork } from '../creativeWork'; import { CreativeWorkType } from '../creativeWorkType'; import { IOrder } from '../order'; import { OrganizationType } from '../organizationType'; import { IPerson } from '../person'; import { IProduct } from '../product'; import { IProject } from '../project'; import { SortType } from '../sortType'; export type IAboutAsOrder = Pick & { /** * リソースID */ id: string; }; export type IAboutAsProduct = Pick & { /** * リソースID */ id: string; }; export type IAbout = IAboutAsOrder | IAboutAsProduct; export type ICreator = Pick; export type IEditor = Pick; export interface IProviderAsSeller { /** * 販売者ID */ id: string; typeOf: OrganizationType.Corporation; } export interface IProviderAsProject { /** * プロジェクトID */ id: string; typeOf: OrganizationType.Project; } export declare enum DigitalDocumentPermissionType { ReadPermission = "ReadPermission", WritePermission = "WritePermission" } export declare enum PermissionGranteeAudienceType { Public = "public" } export interface IPermissionGrantee { typeOf: 'Audience'; audienceType: PermissionGranteeAudienceType; } export interface IDigitalDocumentPermission { typeOf: 'DigitalDocumentPermission'; permissionType: DigitalDocumentPermissionType; grantee: IPermissionGrantee; } export interface INoteCommonAttributes extends Pick { /** * メモ識別子 */ identifier: string; /** * メモコンテンツ */ text: string; project: Pick; dateCreated: Date; dateModified?: Date; /** * 作成者 */ creator: ICreator; /** * 変更者 */ editor?: IEditor; /** * バージョン */ version: string; typeOf: CreativeWorkType.NoteDigitalDocument; hasDigitalDocumentPermission?: IDigitalDocumentPermission[]; } export interface INoteAboutOrder extends INoteCommonAttributes { about: IAboutAsOrder; provider: IProviderAsSeller; } export interface INoteAboutProduct extends INoteCommonAttributes { about: IAboutAsProduct; provider: IProviderAsProject; } /** * メモ */ export type INoteDigitalDocument = INoteAboutOrder | INoteAboutProduct; /** * ソート条件 */ export interface ISortOrder { dateCreated?: SortType; } /** * 検索条件 */ export interface ISearchConditions { limit?: number; page?: number; sort?: ISortOrder; id?: { $in?: string[]; }; project?: { id?: { $eq?: string; }; }; provider?: { id?: { $eq?: string; }; }; about?: { id?: { $eq?: string; $in?: string[]; }; orderNumber?: { $eq?: string; $in?: string[]; }; typeOf?: { $eq?: string; }; }; identifier?: { $eq?: string; $in?: string[]; }; hasDigitalDocumentPermission?: { grantee?: { audienceType?: { $eq?: string; }; }; }; }