import { Context, CreateTranslationDTO, CreateTranslationSettingsDTO, DAL, FilterableTranslationProps, FindConfig, ITranslationModuleService, ModulesSdkTypes, TranslationTypes, UpdateTranslationSettingsDTO } from "@medusajs/framework/types"; import Locale from "../models/locale"; import Translation from "../models/translation"; import Settings from "../models/settings"; type InjectedDependencies = { baseRepository: DAL.RepositoryService; translationService: ModulesSdkTypes.IMedusaInternalService; localeService: ModulesSdkTypes.IMedusaInternalService; translationSettingsService: ModulesSdkTypes.IMedusaInternalService; }; declare const TranslationModuleService_base: import("@medusajs/framework/utils").MedusaServiceReturnType<{ Locale: { dto: TranslationTypes.LocaleDTO; }; Translation: { dto: TranslationTypes.TranslationDTO; }; TranslationSettings: { dto: TranslationTypes.TranslationSettingsDTO; }; }>; export default class TranslationModuleService extends TranslationModuleService_base implements ITranslationModuleService { protected baseRepository_: DAL.RepositoryService; protected translationService_: ModulesSdkTypes.IMedusaInternalService; protected localeService_: ModulesSdkTypes.IMedusaInternalService; protected settingsService_: ModulesSdkTypes.IMedusaInternalService; constructor({ baseRepository, translationService, localeService, translationSettingsService, }: InjectedDependencies); __hooks: { onApplicationStart: () => Promise; }; protected onApplicationStart_(): Promise; getTranslatableFields(entityType?: string, sharedContext?: Context): Promise>; getInactiveTranslatableFields(entityType?: string, sharedContext?: Context): Promise>; static prepareFilters(filters: FilterableTranslationProps): FilterableTranslationProps; retrieveTranslation(id: string, config?: FindConfig, sharedContext?: Context): Promise; /** * Ensures the 'reference' field is included in the select config. * This is needed for filtering translations by translatable fields. */ static ensureReferenceFieldInConfig(config: FindConfig): FindConfig; listTranslations(filters?: FilterableTranslationProps, config?: FindConfig, sharedContext?: Context): Promise; listAndCountTranslations(filters?: FilterableTranslationProps, config?: FindConfig, sharedContext?: Context): Promise<[TranslationTypes.TranslationDTO[], number]>; createLocales(data: TranslationTypes.CreateLocaleDTO[], sharedContext?: Context): Promise; createLocales(data: TranslationTypes.CreateLocaleDTO, sharedContext?: Context): Promise; createTranslations(data: CreateTranslationDTO, sharedContext?: Context): Promise; createTranslations(data: CreateTranslationDTO[], sharedContext?: Context): Promise; updateTranslations(data: TranslationTypes.UpdateTranslationDTO, sharedContext?: Context): Promise; updateTranslations(data: TranslationTypes.UpdateTranslationDTO[], sharedContext?: Context): Promise; createTranslationSettings(data: CreateTranslationSettingsDTO[] | CreateTranslationSettingsDTO, sharedContext?: Context): Promise; updateTranslationSettings(data: UpdateTranslationSettingsDTO | UpdateTranslationSettingsDTO[], sharedContext?: Context): Promise; getStatistics(input: TranslationTypes.TranslationStatisticsInput, sharedContext?: Context): Promise; /** * Validates the translation settings to create or update against the translatable entities and their translatable fields configuration. * @param dataToValidate - The data to validate. */ static validateSettings(dataToValidate: (CreateTranslationSettingsDTO | (UpdateTranslationSettingsDTO & { entity_type: string; }))[]): void; /** * Ensures the entity type is set for the settings to be created or updated. This is useful for validation purposes and recomputing the translated field count. * @param settings - The settings to ensure the entity type for. * @param sharedContext - A context used to share resources, such as transaction manager, between the application and the module. * @returns The settings with the entity type set. */ protected ensureEntityType_(settings: (CreateTranslationSettingsDTO | UpdateTranslationSettingsDTO)[], sharedContext?: Context): Promise<(CreateTranslationSettingsDTO | (UpdateTranslationSettingsDTO & { entity_type: string; }))[]>; } export {}; //# sourceMappingURL=translation-module.d.ts.map