import { ModuleClassParams } from '../../types'; import BaseImportSetup from './base-setup'; export default class TaxonomiesImportSetup extends BaseImportSetup { private taxonomiesFilePath; private taxonomiesFolderPath; private taxonomiesConfig; private termsSuccessPath; private taxSuccessPath; private taxonomiesMapperDirPath; private termsMapperDirPath; private localesFilePath; private isLocaleBasedStructure; taxonomiesMapper: Record; termsMapper: Record; masterLocaleFilePath: string; constructor({ config, stackAPIClient }: ModuleClassParams); /** * Start the taxonomies import setup * This method reads the taxonomies from the content folder and generates a mapper file * @returns {Promise} */ start(): Promise; /** * Setup taxonomies using legacy format (root-level taxonomy files) */ setupTaxonomiesLegacy(taxonomies: any, progress: any): Promise; /** * Setup taxonomies using locale-based format (taxonomies organized by locale) * For locale-based structure, we query the target stack for each taxonomy+locale combination */ setupTaxonomiesByLocale(taxonomies: any, progress: any): Promise; /** * Detect if locale-based folder structure exists * @returns {boolean} true if locale-based structure detected, false otherwise */ detectLocaleBasedStructure(): boolean; /** * Get the master locale code * First tries to read from master-locale.json, then falls back to config, then 'en-us' * @returns {string} The master locale code */ getMasterLocaleCode(): string; /** * Load available locales from locales file * @returns {Record} Map of locale codes */ loadAvailableLocales(): Record; /** * Retrieves the taxonomies based on the provided taxonomy UID. * * @param taxonomy - The UID of the taxonomy to retrieve. * @param locale - Optional locale code to query taxonomy in specific locale * @returns A promise that resolves to the retrieved taxonomies. */ getTaxonomies(taxonomy: any, locale?: string): Promise; /** * Sanitizes the attributes of a taxonomy object. * * @param taxonomy - The taxonomy object to sanitize. * @returns The sanitized taxonomy object with invalid keys omitted. */ sanitizeTaxonomyAttribs(taxonomy: Record): import("lodash").Omit, string>; /** * Retrieves all terms of a taxonomy. * * @param taxonomy - The taxonomy object. * @param locale - Optional locale code to query terms in specific locale * @param skip - The number of terms to skip (default: 0). * @param terms - An array to store the retrieved terms (default: []). * @returns A promise that resolves to an array of terms. */ getAllTermsOfTaxonomy(taxonomy: any, locale?: string, skip?: number, terms?: any[]): Promise; /** * Sanitizes the attributes of the given terms. * * @param terms - An array of terms to sanitize. * @returns The sanitized terms. */ sanitizeTermsAttribs(terms: Record[]): Record[]; handleTaxonomyErrorMsg(err: any, taxonomyUid?: string, locale?: string): void; }