@mega-yfue/eufy-sdk / tuya / resolveCountryCode
Function: resolveCountryCode()
ts
function resolveCountryCode(
phoneCode?,
region?,
isoCode?
): string;Resolve the Tuya countryCode login field. Priority:
phoneCode— an explicit numeric dial code (e.g."49") when the caller already has one.isoCode— an ISO 3166-1 alpha-2 code (e.g."DE"fromMegaClientConfig.countryCode) looked up via isoToDialCode. Covers the full eufy market range, so a German user on the EU shard correctly receives"49"rather than the coarse region fallback's"44".region— coarse mega shard prefix fallback:"EU"→"44","CN"→"86", else"1".
Parameters
phoneCode?
string
region?
string
isoCode?
string
Returns
string