import { PagedList } from 'contensis-core-api'; import { Entry } from 'contensis-management-api'; import EntriesDependencyService from './EntriesDependencyService'; import RepositoryBaseService from './RepositoryBaseService'; import ContensisRepository from '../repositories/ContensisRepository'; import { AssetEntryBuilder } from '../transformations/AssetEntryBuilder'; import { EntryBuilder } from '../transformations/EntryBuilder'; import { BuildEntryOptions } from '../models'; declare class EntriesService extends RepositoryBaseService { private searchEntries; private useDelivery; dependencies: EntriesDependencyService; /** * Keep a record of built entries to migrate */ migrate: (EntryBuilder | AssetEntryBuilder)[]; raw: Entry[]; stopAtLevel?: number | undefined; /** List of entryIds to resolve in a target repo for an entries migration */ get entryIds(): string[]; constructor(contensis: ContensisRepository, source: ContensisRepository); /** * Find a dependent entry from the modeling context or resolve from the fetched entries * @param value the source entry to find * @returns the found entry or undefined */ findDependent: (value: Entry) => Entry | undefined; /** * Resolves an entry we have fetched * @param entryId the id of the entry to resolve * @returns the resolved entry or undefined if not found */ resolve: (entryId: string) => Entry | undefined; /** * Resolves an entry we have fetched in the source repository * to cover cases where we have stopped fetching dependencies at a certain level * so we can infer the entry will be migrated from the source repository * rather than omitting a link when that entry is actually built and migrated * at the same time as this entry * @param originalId the id of the entry to resolve from the source repository * @returns the resolved entry or undefined if not found */ resolveInSource: (originalId: string) => Entry | undefined; GetEntries: (entryIds?: string[]) => Promise; GetEntriesIncludingDependents: (getBy?: { assetUris?: string[]; entryIds?: string[]; }, withDependents?: boolean) => Promise; GetEntriesAllPages: (pageSize?: number, getBy?: { assetUris?: string[]; entryIds?: string[]; }, outputProgress?: boolean, versionStatus?: import("contensis-core-api").VersionStatus) => Promise; GetEntriesPage: (pageSize?: number, pageIndex?: number, getBy?: { assetUris?: string[]; entryIds?: string[]; }, versionStatus?: import("contensis-core-api").VersionStatus) => Promise>; CheckDependentEntriesAndNodes: (entries: Entry[], { level, stopAtLevel, getEntries, getNodes, }: { level?: number | undefined; stopAtLevel?: number | undefined; getEntries?: boolean | undefined; getNodes?: boolean | undefined; }) => Promise; GetDependentEntries: (entryIds: string[], count: number, what: "entries" | "nodes" | "content types", level?: number, stopAtLevel?: number | undefined) => Promise; GetDependentNodes: (nodeIds: Map, depth?: number, dependentOf?: string) => Promise; BuildMigrateEntries: ({ onError, outputProgress, }: BuildEntryOptions) => Promise; /** After building entries to migrate, prune any that are not needed * For example, if an entry is a dependency of another entry * that is not being migrated (status ignore or error) * and the dependency is not required by any other entry * we will ignore this entry too */ PruneMigrateEntries: () => void; /** * Recursive check an excluded entry for any dependencies and if they are not * required anywhere else mark those as ignored too * @param entry an entry that has been marked as ignore */ PruneIgnoredEntryDependencies: (entry: EntryBuilder) => void; } export default EntriesService;