@@ -26,7 +26,7 @@ export interface CookieConfig {
2626 * Locale persistence configuration
2727 * Currently only supports cookie-based persistence
2828 */
29- export type LocalePersistenceConfig = { type : "cookie" ; cookieName ?: string } ;
29+ export type LocalePersistenceConfig = { type : "cookie" ; config : CookieConfig } ;
3030
3131/**
3232 * Field that we require users to fill in the config. The rest could be taken from defaults.
@@ -163,17 +163,11 @@ export type LingoConfig = {
163163 translationServerUrl ?: string ;
164164 } ;
165165
166- /**
167- * Cookie configuration for locale persistence
168- * Used by both client-side LocaleSwitcher and server-side locale resolver
169- */
170- cookieConfig : CookieConfig ;
171-
172166 /**
173167 * Locale persistence configuration
174168 * Defines how locale changes should be persisted
175169 *
176- * @default { type: 'cookie', cookieName: 'locale' }
170+ * @default { type: 'cookie', config: { name: 'locale' } }
177171 */
178172 localePersistence : LocalePersistenceConfig ;
179173
@@ -189,21 +183,6 @@ export type LingoConfig = {
189183 buildMode : "translate" | "cache-only" ;
190184} ;
191185
192- /**
193- * Minimal config needed for metadata operations
194- * Used by metadata manager functions
195- */
196- export type MetadataConfig = Pick < LingoConfig , "sourceRoot" | "lingoDir" > ;
197-
198- /**
199- * Config needed for translation operations
200- * Includes translator configuration
201- */
202- export type TranslationConfig = Pick <
203- LingoConfig ,
204- "sourceRoot" | "lingoDir" | "sourceLocale" | "models" | "prompt"
205- > ;
206-
207186/**
208187 * Config needed for translation middleware and server
209188 * Extends TranslationConfig with optional fields
0 commit comments