import EntriesDependencyService, { EntryFieldCheck } from '../services/EntriesDependencyService'; export type EntryDependencyMeta = { contentTypeId: string; dependencyLevel: number; entryId: string; entryTitle: string; fieldIdPath: string; uri?: string; /** Are we looking to avoid migrating this entry */ isDirty?: boolean; }; export type TagDependencyMeta = { groupId: string; tagId: string; label: string; fieldIdPath: string; }; export type EntryDependenciesMeta = { [entryId: string]: EntryDependencyMeta[]; }; export type TagDependenciesMeta = { [tagId: string]: TagDependencyMeta[]; }; export type EntryDependencyOrigin = EntryDependencyMeta & { type: 'entry' | 'asset' | 'node' | 'tag' | 'tagGroup'; }; /** * [nodeId, dependencyLevel, path, entryId] */ export type NodeDependencyMeta = [string, number, string, string] | [string, number, string, undefined] | [string, number]; /** * [sourceId, [nodeId, path, entryId]] */ export type NodeDependenciesMeta = [string, NodeDependencyMeta[]]; /** * Provide existing dependencies to merge field dependencies into */ export type ExistingDependenciesMeta = { dependencyIds: EntryFieldCheck['dependencyIds']; entryIds: EntryFieldCheck['entryIds']; assetUris: EntryFieldCheck['assetUris']; nodeIds: EntryFieldCheck['nodeIds']; tagGroupIds: EntryFieldCheck['tagGroupIds']; tagIds: EntryFieldCheck['tagIds']; total: number; required: number; }; /** * Provide existing dependencies to merge an entry's dependencies into */ export type DependenciesMeta = { dependencyIds: EntriesDependencyService['dependencyIds']; entryIds: EntriesDependencyService['entryIds']; assetUris: EntriesDependencyService['assetUris']; nodeIds: EntriesDependencyService['nodeIds']; tagGroupIds: EntriesDependencyService['tagGroupIds']; tagIds: EntriesDependencyService['tagIds']; total: number; required: number; };