import { Result } from "@webiny/feature/api"; import type { CmsEntry, CmsEntryValues, CmsModel } from "../../../types/index.js"; import type { EntryNotAuthorizedError, EntryNotFoundError, EntryPersistenceError, EntryValidationError } from "../../../domain/contentEntry/errors.js"; /** * UnpublishEntry Use Case */ export interface IUnpublishEntryUseCase { execute(model: CmsModel, id: string): Promise, UseCaseError>>; } export interface IUnpublishEntryUseCaseErrors { notAuthorized: EntryNotAuthorizedError; notFound: EntryNotFoundError; validation: EntryValidationError; repository: RepositoryError; } type UseCaseError = IUnpublishEntryUseCaseErrors[keyof IUnpublishEntryUseCaseErrors]; /** Unpublish a content entry. */ export declare const UnpublishEntryUseCase: import("@webiny/di").Abstraction; export declare namespace UnpublishEntryUseCase { type Interface = IUnpublishEntryUseCase; type Error = UseCaseError; type Return = Promise, UseCaseError>>; } /** * UnpublishEntryRepository - Persists entry unpublish to storage. * Takes a domain CmsEntry object and unpublishes it. */ export interface IUnpublishEntryRepository { execute(model: CmsModel, entry: CmsEntry): Promise, RepositoryError>>; } export interface IUnpublishEntryRepositoryErrors { storage: EntryPersistenceError; } type RepositoryError = IUnpublishEntryRepositoryErrors[keyof IUnpublishEntryRepositoryErrors]; export declare const UnpublishEntryRepository: import("@webiny/di").Abstraction; export declare namespace UnpublishEntryRepository { type Interface = IUnpublishEntryRepository; type Error = RepositoryError; } export {};