import { DocumentActionDescription, DocumentActionProps, DocumentLanguageFilterContext, FieldDefinition, ObjectSchemaType, Reference, SanityClient, SanityDocument, SanityDocumentLike } from "sanity"; import { InternationalizedArrayItem, PluginConfig as PluginConfig$1 } from "sanity-plugin-internationalized-array"; declare function useDeleteTranslationAction(props: DocumentActionProps): DocumentActionDescription; declare namespace useDeleteTranslationAction { var action: string; var displayName: string; } /** * @deprecated use useDeleteTranslationAction instead * Will be removed in the next major version */ declare const DeleteTranslationAction: (props: DocumentActionProps) => DocumentActionDescription; declare function useDuplicateWithTranslationsAction({ id, type, onComplete }: DocumentActionProps): DocumentActionDescription; declare namespace useDuplicateWithTranslationsAction { var action: string; var displayName: string; } declare function DuplicateWithTranslationsAction(props: DocumentActionProps): DocumentActionDescription; declare namespace DuplicateWithTranslationsAction { var action: string; var displayName: string; } type Language = { id: Intl.UnicodeBCP47LocaleIdentifier; title: string; }; type SupportedLanguages = Language[] | ((client: SanityClient) => Promise); type PluginCallbackArgs = { sourceDocument: SanityDocument; newDocument: SanityDocument; sourceLanguageId: string; destinationLanguageId: string; metaDocumentId: string; client: SanityClient; }; type PluginConfig = { supportedLanguages: SupportedLanguages; schemaTypes: string[]; languageField?: string; weakReferences?: boolean; bulkPublish?: boolean; metadataFields?: FieldDefinition[]; apiVersion?: string; allowCreateMetaDoc?: boolean; callback?: ((args: PluginCallbackArgs) => Promise) | null; hideLanguageFilter?: boolean | string[] | ((ctx: DocumentLanguageFilterContext) => boolean); /** * Controls whether the translation metadata document type appears in Omnisearch. * * Set to false to hide `translation.metadata` documents from Omnisearch. */ metadataOmnisearchVisibility?: boolean; /** * Allows configuring the behavior of the internationalized array for the metadata document. */ metadataInternationalization?: Pick; /** * Set to false to prevent templates from being created for each schemaType and language. */ addTemplates?: boolean; }; type PluginConfigContext = Required> & { supportedLanguages: Language[]; metadataInternationalization?: Pick; }; type TranslationReference = InternationalizedArrayItem & { _type: 'internationalizedArrayReferenceValue'; value: Reference; }; type Metadata = { _id: string; _createdAt: string; translations: TranslationReference[]; }; type MetadataDocument = SanityDocumentLike & { schemaTypes: string[]; translations: TranslationReference[]; }; type DocumentInternationalizationMenuProps = { schemaType: ObjectSchemaType; documentId: string; }; interface DocumentInternationalizationSchemaOpts { documentInternationalization?: { /** Set to true to disable duplication of this field or type */ exclude?: boolean; }; } declare module 'sanity' { interface ArrayOptions extends DocumentInternationalizationSchemaOpts {} interface BlockOptions extends DocumentInternationalizationSchemaOpts {} interface BooleanOptions extends DocumentInternationalizationSchemaOpts {} interface CrossDatasetReferenceOptions extends DocumentInternationalizationSchemaOpts {} interface DateOptions extends DocumentInternationalizationSchemaOpts {} interface DatetimeOptions extends DocumentInternationalizationSchemaOpts {} interface FileOptions extends DocumentInternationalizationSchemaOpts {} interface GeopointOptions extends DocumentInternationalizationSchemaOpts {} interface ImageOptions extends DocumentInternationalizationSchemaOpts {} interface NumberOptions extends DocumentInternationalizationSchemaOpts {} interface ObjectOptions extends DocumentInternationalizationSchemaOpts {} interface ReferenceBaseOptions extends DocumentInternationalizationSchemaOpts {} interface SlugOptions extends DocumentInternationalizationSchemaOpts {} interface StringOptions extends DocumentInternationalizationSchemaOpts {} interface TextOptions extends DocumentInternationalizationSchemaOpts {} interface UrlOptions extends DocumentInternationalizationSchemaOpts {} interface EmailOptions extends DocumentInternationalizationSchemaOpts {} } declare function useDocumentInternationalizationContext(): PluginConfigContext; declare function DocumentInternationalizationMenu(props: DocumentInternationalizationMenuProps): React.JSX.Element | null; declare const documentInternationalization: import("sanity").Plugin; export { DeleteTranslationAction, DocumentInternationalizationMenu, DocumentInternationalizationMenuProps, DocumentInternationalizationSchemaOpts, DuplicateWithTranslationsAction, Language, Metadata, MetadataDocument, PluginCallbackArgs, PluginConfig, PluginConfigContext, SupportedLanguages, TranslationReference, documentInternationalization, useDeleteTranslationAction, useDocumentInternationalizationContext, useDuplicateWithTranslationsAction }; //# sourceMappingURL=index.d.ts.map