import type { Core, UID, Modules } from '@strapi/types';
import type { DocumentMetadata } from '../../../shared/contracts/collection-types';
export interface DocumentVersion {
    id: string | number;
    documentId: Modules.Documents.ID;
    locale?: string;
    localizations?: DocumentVersion[];
    updatedAt?: string | null | Date;
    publishedAt?: string | null | Date;
}
/**
 * Controls the metadata properties to be returned
 *
 * If `availableLocales` is set to `true` (default), the returned metadata will include
 * the available locales of the document for its current status.
 *
 * If `availableStatus` is set to `true` (default), the returned metadata will include
 * the available status of the document for its current locale.
 */
export interface GetMetadataOptions {
    availableLocales?: boolean;
    availableStatus?: boolean;
}
declare const _default: ({ strapi }: {
    strapi: Core.Strapi;
}) => {
    /**
     * Returns available locales of a document for the current status.
     *
     * The result is sorted with the default locale (as defined by the i18n plugin)
     * at index 0 when present. This is the canonical-source invariant relied on by
     * `useDocument.getInitialFormValues` in the admin: when creating a new locale
     * draft, non-localized scalar/media values are inherited from
     * `availableLocales[0]`. Putting the default locale first means inheritance
     * stays predictable when sibling locales have drifted on non-localized fields
     * (which can happen because the server only syncs non-localized fields at
     * locale-creation time, not on subsequent updates — see
     * `copyNonLocalizedFields` in document-service/internationalization.ts).
     */
    getAvailableLocales(uid: UID.ContentType, version: DocumentVersion, allVersions: DocumentVersion[]): Promise<import("../../../shared/contracts/collection-types").AvailableLocaleDocument[]>;
    /**
     * Returns available status of a document for the current locale
     */
    getAvailableStatus(version: DocumentVersion, allVersions: DocumentVersion[]): Partial<DocumentVersion> | undefined;
    /**
     * Get the available status of many documents, useful for batch operations
     * @param uid
     * @param documents
     * @returns
     */
    getManyAvailableStatus(uid: UID.ContentType, documents: DocumentVersion[]): Promise<any[]>;
    getStatus(version: DocumentVersion, otherDocumentStatuses?: DocumentMetadata["availableStatus"]): string;
    getMetadata(uid: UID.ContentType, version: DocumentVersion, { availableLocales, availableStatus }?: GetMetadataOptions): Promise<{
        availableLocales: never[];
        availableStatus: Pick<any, string>[];
        versions: DocumentVersion[];
    } | {
        availableLocales: import("../../../shared/contracts/collection-types").AvailableLocaleDocument[];
        availableStatus: Partial<DocumentVersion>[];
        versions: any[];
    }>;
    /**
     * Returns associated metadata of a document:
     * - Available locales of the document for the current status
     * - Available status of the document for the current locale
     */
    formatDocumentWithMetadata(uid: UID.ContentType, document: DocumentVersion, opts?: GetMetadataOptions): Promise<{
        data: {
            status: string | undefined;
            id: string | number;
            documentId: Modules.Documents.ID;
            locale?: string;
            localizations?: DocumentVersion[];
            updatedAt?: string | null | Date;
            publishedAt?: string | null | Date;
        };
        meta: {
            availableLocales: never[];
            availableStatus: Pick<any, string>[];
        } | {
            availableLocales: import("../../../shared/contracts/collection-types").AvailableLocaleDocument[];
            availableStatus: Partial<DocumentVersion>[];
        };
    }>;
};
export default _default;
//# sourceMappingURL=document-metadata.d.ts.map