Refact js sdk