medusa-plugin-tolgee
Version:
Medusa V2 Plugin to easily add translations to your models with Tolgee
28 lines (27 loc) • 985 B
TypeScript
import type { AdminCollection, AdminProduct, AdminProductCategory, AdminShippingOption } from "@medusajs/framework/types";
interface SupportedModelsMap {
product: AdminProduct;
product_category: AdminProductCategory;
product_collection: AdminCollection;
shipping_option: AdminShippingOption;
}
export declare const defaultSupportedProperties: {
product: string[];
product_category: string[];
product_collection: string[];
shipping_option: string[];
};
export type TolgeeAdminOptions = {
defaultLanguage: Language["tag"];
availableLanguages: Language[];
apiKey: string;
apiUrl: string;
};
export declare const deletionEvents: ("product.deleted" | "product-category.deleted" | "product-collection.deleted" | "shipping-option.deleted")[];
export type SupportedModels = keyof SupportedModelsMap;
export type WidgetType<K extends SupportedModels> = SupportedModelsMap[K];
interface Language {
label: string;
tag: string;
}
export {};