chore: Add @rocket.chat/rest-typings
When this repo was migrated to TS, we didn't have any source of truth to get REST API definitions from, so we just duplicated typings from the backend and adapted them a little bit to our repo.
https://github.com/RocketChat/Rocket.Chat.ReactNative/tree/develop/app/definitions
Let's refactor that to use this instead https://www.npmjs.com/package/@rocket.chat/rest-typings
I can't emphasize how important this work is and how much it's going to improve our app maintainability and readability.
Some work was done here, but the scope was bigger https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/5918 Let's focus on this issue first and then we can focus that PR on migrating the SDK.
@diegolmello I would like to work on this one .
Hey @Demiserular are your working on this issue?
Hi @diegolmello, I'm diving deeper into understanding how the migration works, and I want to make sure I'm grasping the connections correctly.
For example, I'm looking at how:
import { ICustomEmojis } from '../definitions'; can be replaced with the official types from @rocket.chat/rest-typings , such as using EmojiCustomEndpoints from the rest package.
I haven’t tested this yet. Just sharing my perspective after reviewing the code. Please let me know if I’m understanding this correctly.
@Amarta113 That's correct. You'll have to understand these assumptions and make the necessary changes.
Thanks for the feedback. @diegolmello I’m still learning and new to the codebase, I’ll be progressing gradually. Just wanted to check if it’s okay to move at a slower pace, if this isn’t an urgent issue.
also is it okay to tag you?
In general, I'd say avoid tagging open source maintainers. We always read all messages eventually anyway, so some people might just assume you're pressuring them, being passive aggressive, etc.
@Amarta113 Take your time to understand the codebase. It's ok.
Okay, thank you for the advice! I’ll keep that in mind. Appreciate your understanding.