import { Result } from "@webiny/feature/api"; import type { CmsEntry, CmsEntryValues, CmsModel, UpdateCmsEntryInput, UpdateCmsEntryOptionsInput } from "../../../types/index.js"; import type { EntryLockedError, EntryNotAuthorizedError, EntryNotFoundError, EntryPersistenceError, EntryValidationError } from "../../../domain/contentEntry/errors.js"; /** * UpdateEntry Use Case */ export interface IUpdateEntryUseCase { execute(model: CmsModel, id: string, input: UpdateCmsEntryInput, options?: UpdateCmsEntryOptionsInput): Promise, UseCaseError>>; } export interface IUpdateEntryUseCaseErrors { notAuthorized: EntryNotAuthorizedError; notFound: EntryNotFoundError; locked: EntryLockedError; validation: EntryValidationError; repository: RepositoryError; } type UseCaseError = IUpdateEntryUseCaseErrors[keyof IUpdateEntryUseCaseErrors]; /** Update a content entry. */ export declare const UpdateEntryUseCase: import("@webiny/di").Abstraction; export declare namespace UpdateEntryUseCase { type Interface = IUpdateEntryUseCase; type Input = UpdateCmsEntryInput; type Options = UpdateCmsEntryOptionsInput; type Error = UseCaseError; type Return = Promise, UseCaseError>>; } /** * UpdateEntryRepository - Persists entry updates to storage. * Takes a domain CmsEntry object and updates it. */ export interface IUpdateEntryRepository { execute(model: CmsModel, entry: CmsEntry): Promise>; } export interface IUpdateEntryRepositoryErrors { storage: EntryPersistenceError; } type RepositoryError = IUpdateEntryRepositoryErrors[keyof IUpdateEntryRepositoryErrors]; export declare const UpdateEntryRepository: import("@webiny/di").Abstraction; export declare namespace UpdateEntryRepository { type Interface = IUpdateEntryRepository; type Error = RepositoryError; } export {};