This commit is contained in:
Your Name committed 2026-06-28 05:52:46 -04:00
1 parent 5fac4524c8
commit e1d793ce37
69 files changed
+1892 -610

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
export declare const SUPPORTED_LANGS: readonly ["th", "en", "ja", "zh", "vi", "ko"];
export type AttributeType = 'TEXT' | 'NUMBER' | 'BOOLEAN' | 'SELECT' | 'JSON';
export declare function normalizeAttributeType(type: unknown): AttributeType;
export declare function resolveLocalizedText(baseValue: string | null | undefined, translations: Array<{
langCode: string;
valueText?: string | null;
}> | undefined, lang: string): string;
export declare function resolveDefinitionLocalizedField<T extends {
langCode: string;
label: string;
description?: string | null;
}>(baseValue: string | null | undefined, translations: T[] | undefined, lang: string, field: 'label' | 'description'): string | null;
export declare function getPrimaryOptionValue(value: any): string;
export declare function getLocalizedOptionLabel(value: any, lang: string): string;
export declare function getSelectOptionDisplay(options: any, storedValue: string, lang: string): string;
export declare function validateAttributeValue(type: AttributeType, payload: Record<string, any>): void;
export declare function validateSelectOption(options: any, storedValue: string): void;
export declare function localizeAttributeDefinition(definition: any, lang: string): any;
export declare function localizeProductAttribute(attribute: any, lang: string): any;
//# sourceMappingURL=productAttributes.d.ts.map