Rocket.Chat.ReactNative icon indicating copy to clipboard operation
Rocket.Chat.ReactNative copied to clipboard

chore: Add @rocket.chat/rest-typings

Open diegolmello opened this issue 1 year ago • 8 comments

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 avatar Mar 12 '25 17:03 diegolmello

@diegolmello I would like to work on this one .

Demiserular avatar Apr 07 '25 13:04 Demiserular

Hey @Demiserular are your working on this issue?

Amarta113 avatar Jul 21 '25 06:07 Amarta113

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 avatar Jul 22 '25 14:07 Amarta113

@Amarta113 That's correct. You'll have to understand these assumptions and make the necessary changes.

diegolmello avatar Jul 22 '25 14:07 diegolmello

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?

Amarta113 avatar Jul 22 '25 15:07 Amarta113

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.

diegolmello avatar Jul 23 '25 13:07 diegolmello

@Amarta113 Take your time to understand the codebase. It's ok.

diegolmello avatar Jul 23 '25 13:07 diegolmello

Okay, thank you for the advice! I’ll keep that in mind. Appreciate your understanding.

Amarta113 avatar Jul 23 '25 13:07 Amarta113