Commit Graph

257 Commits

Author SHA1 Message Date
Gleidson Daniel Silva 89e0a40d95
Chore: remove lib/rocketchat step 2 (#4035)
* create index file

* remove roomTypeToApiType from rocketchat and fix imports

* move TOKEN_KEY to const file

* move CURRENT_SERVER to const file

* move CERTIFICATE_KEY to const file

* getRoom

* rename getSlashCommands

* getSlashCommands

* readMessages

* getRooms

* loadThreadMessages

* loadNextMessages

* loadSurroundingMessages

* loadMessagesForRoom

* loadMissedMessages

* clearCache

* canOpenRoom

* setUser

* userPreferencesMethods

* getCustomEmojis

* callJtisi

* triggerActions

* getPermissions

* getRoles

* getSettings

* getUsersPresence

* logout

* sendFileMessage

* shareExtension

* sendMessage

* enterpriseModules

* getPermalinks

* search

* change RocketChat.metodo to direct call

* fix types

* Fix login

* Fix createChannel

* migrate service methods to Service.method call

* change call directly to RocketChat because the use of this

* rollback

* rollback

* fix create discussion

* fix import

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2022-04-28 17:37:25 -03:00
Reinaldo Neto 8012031cd3
[NEW] On-Hold chats for Omnichannel (#4051)
* [NEW] Implementing On-Hold Livechat for Omnichannel

* added onHold to database

* list header title open livechats

* update rooms list view

* remove placeOnHold after clicked

* fix mesasgebox reactive to on hold

* navigate to roomslistview

* minor tweaks

* for grouping too

* fix chat on-hold when the agent is fully

* show on hold system messages
2022-04-20 17:53:11 -03:00
Reinaldo Neto b75ac1de8b
[IMPROVE] Support Omnichannel icons (#3959)
* [IMPROVE] Support Channel Icons for Omnichannel

* Prop drilling sourceType

* create a column for source in WatermelonDB

* Add sms icon

* start of fetching

* removed usefetch

* custom icon to RoomHeader, RoomActions, RoomInfo

* minor tweak in interface

* fix margin

* add connected to sourceType

* make ts happy

* minor tweak

* fix storyshot

* refactor omnichannel source interface

* minor tweak roomActionsview

* Added storyshot

* minor tweak

* fix storyshot

* fix display extended without avatar

* fix connected object

* wip android build

Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: GleidsonDaniel <gleidson10daniel@hotmail.com>
2022-04-14 23:27:36 -03:00
Gerzon Z 99ea5d8e2a
Chore: TypeScript migration - move `notifications/push` to `lib/notifications` (#3999)
* chore: move `notifications/push` to `lib/notifications/push`

* update: move `lib/notifications/push` to `lib/notifications`

* remove: push.ios.ts
2022-04-12 12:37:28 -04:00
Alex Junior b0d408ebc8
Chore: add eslint-plugin-react-hooks lib (#4021)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2022-04-11 15:01:43 -03:00
Gleidson Daniel Silva e525392713
Chore: Move services and methods away from rocketchat folder (#4033)
* move services to lib

* move methods to lib

* fix imports
2022-04-07 13:53:07 -03:00
Gleidson Daniel Silva d38c17bcd8
Chore: Create app/lib/store folder (#4028)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2022-04-07 11:19:54 -03:00
Gleidson Daniel Silva bdf83e546e
Chore: Move constants away from rocketchat folder - Typescript (#4022)
* create keys file and export all consts

* fix import E2E_MESSAGE_TYPE

* fix constants import

* fix constants import

* fix E2E_BANNER_TYPE import

* fix E2E_ROOM_TYPES import

* fix THEME_PREFERENCES_KEY import

* fix CRASH_REPORT_KEY and ANALYTICS_EVENTS_KEY import

* fix MIN_ROCKETCHAT_VERSION import

* fix constantDisplayMode import

* fix environment imports

* fix links imports

* fix localAuthentication imports

* fix localPath imports

* fix messagesStatus imports

* fix messageTypeLoad imports

* fix defaultSettings imports

* fix tablet imports

* update with todo for colors

* move to lib folder

* change constant/colors to constant
2022-04-07 11:10:03 -03:00
Gleidson Daniel Silva 474ea98a3b
Chore: Create app/lib/navigation folder (#4027)
* change Navigation to appNavigation and move to navigation folder

* change ShareNavigation to shareNavigation and move to navigation folder

* fix navigation import

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2022-04-07 10:22:19 -03:00
Gleidson Daniel Silva 7d2ae5ea7c
Chore: Evaluate helpers and methods - Typescript (#4030)
* move userPreferences to methods folder

* create formatAttachmentUrl file

* create compareServerVersion file

* create generateLoadMoreId file
2022-04-07 10:13:19 -03:00
Gleidson Daniel Silva 2eba327396
Chore: Evaluate lib/rocketchat structure and files (#3986)
* create TSubscription type

* move logoutOtherLocations to restApis

* mvoe getUserInfo to restApi

* move constants to lib folder

* change Rocketchat methods to sdk methods

* move toggleFavorite to restApis

* move functions to rocketchat folder

* delete old rocketchat file :)

* fix imports

* fix lint and return types

* Fix subscribe to rooms not getting called

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2022-04-04 16:15:29 -03:00
Diego Mello 2af88a5544
[FIX] Not properly fetching users presence on some startup situations (#3967) 2022-03-30 18:27:53 -03:00
Gleidson Daniel Silva 8a12924904
[FIX] Messages not loading for unjoined channels (#3904)
* Fix message loading for unjoined channels

* Update updateMessages.ts

* log -> console.log

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2022-03-21 15:57:23 -03:00
Reinaldo Neto 823d4c658c
Chore: Migrate methods/actions to Typescript and refactor UiKit folder (#3716)
* Chore: Migrate methods/actions to Typescript

* tweak in actions

* Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>

* refactor sdk.current

* interface and uikit done

* refactor interface, index and utils from UiKit

* minor tweak

* minor tweak

Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
2022-03-16 16:07:49 -03:00
Diego Mello 65c9aec2b4
[FIX] Issues after reconnecting (#3815) 2022-03-11 11:12:25 -03:00
Alex Junior cd00366613
Chore: Update react-native-mmkv-storage to 0.6.12 (#3634)
* chore: updating mmkv library

* feat: updating android ejson to use the getSecureKey new version

* feat: updating IOS files to use the getSecureKey new version

* feat: changing all mmkv methods to use sync calls

* feat: changing mmkv methods from Screen lock

* feat: changing all mmkv methods from login, ssl certificate and change/add server

* feat: changing all mmkv methods from login, ssl certificate and change/add server

* feat: changing all mmkv methods from logout

* feat: changing all mmkv methods from e2e

* fix: small fix at encryption and server drop down

* feat: changing all mmkv methods from set theme

* feat: changing all mmkv methods from openLink

* fix: setting up mmkv to works property on Android

* fix: fix an error to set the theme when open the app

* refactor: change the react-native branch (temporary)

* refactor: removing all `Async` from mmkv functions name

* refactor: removing await from unnecessary functions, removing console.log and update cocoapods

* refactor: removing unnecessary undefined from methods

* feat: creating a custom hook for mmkv

* refactor: changing the fetchPasscode to use the useUserPreferences hook

* refactor: changing setTheme from app/index

* refactor: small fix on setTheme

* chore: update mmkv to 0.6.11

* chore: update mmkv to 0.6.11

* chore: minor tweak

* chore: update mmkv to 0.6.12

* chore: mock NativeModules

* chore: fix test mmkv

* chore: removing custom MMKV JSI module, since is no more necessary after 0.6.11 version

* feat: removing some async calls from mmkv after update from develop

* feat: creating a function to get the initialTheme

* feat: removing unnecessary try/catch

* fix: fixing the blink white when open the app

* feat: changing useMMKVStorage to create from mmkv lib

* test: creating a mock for mmkv create function

* chore: fix errors on tablet

* minor tweak
2022-03-09 16:41:26 -03:00
Diego Mello 7a9cdde474
[FIX] Merge subscription and room logic using unparsed data (#3859) 2022-03-08 18:17:05 -03:00
Gerzon Z 80918f56fa
Chore: Dehydrate login methods from rocketchat.js (#3759)
* dehydrate login methods from rocketchat.js
2022-03-08 14:54:26 -04:00
Diego Mello 09f73aee3d
Chore: Create IServerRoom and IServerSubscription (#3782) 2022-03-08 13:25:27 -03:00
Gerzon Z 8decd0f4b6
Chore: Migrate normalizeMessage to TS (#3743)
* migrate normalizeMessage to ts

* fix: missing null validations and type aliases
2022-03-07 22:54:34 -04:00
Alex Junior 3a7ec74e5a
Chore: Migrate subscriptions/room to TS (#3752)
* chore: initial commit

* chore: fix readMessages

* chore: removing some `any`

* chore: removing some `any`

* chore: removing some `any`

* chore: fix erros after merge develop inside this branch

* chore: minor tweak

* chore: applying changes requested

* minor tweak

Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
2022-03-03 21:49:20 -03:00
Alex Junior 765e526bbf
Chore: Migrate subscriptions/rooms to TS (#3748)
* chore: migrate subscriptions rooms to ts

* chore: adding a TODO to remember this problem

* chore: removing unnecessary todos

* chore: minor tweak after develop updates

* chore: migrate message service to ts

* chore: minor tweaks

* chore: minor tweak

* chore: minor tweak after merge develop into this branch

* chore: minor tweak after merge with dev

* minor tweak
2022-03-03 21:23:11 -03:00
Reinaldo Neto b06be5a2ac
Chore: Migrate methods/loadSurroundingMessages to Typescript (#3733)
* Chore: Migrate methods/loadSurroundingMessages to Typescript

* tweaks

* tweak

* tweak

* tweaks to make ts happy

* instead as IMessage is optional u

* enum to MessageTypeLoad

* minor tweaks
2022-03-03 17:25:03 -03:00
Alex Junior 214cf52cf9
Chore: Server API types - teams.updateRoom (#3774)
* chore: type the API call `teams.updateRoom`

* chore: creating the interface `IServerTeamUpdateRoom`

* chore: minor tweak after merge
2022-03-02 23:22:59 -03:00
Gerzon Z 5f92a509d1
Chore: Migrate loadThreadMessages to TS (#3718)
* Migrate loadThreadMessages to TypeScript
* Update interfaces
2022-03-02 11:41:15 -04:00
Diego Mello 6626510f50
Chore: Migrate RoomActionsView to Typescript (#3750) 2022-03-02 11:49:43 -03:00
Diego Mello 6b3730ce43
Chore: Migrate RoomView to Typescript (#3754) 2022-03-02 11:18:01 -03:00
Gleidson Daniel Silva 4172d563b7
Chore: Server API types POC - loadMessagesForRoom (#3765)
* create interface and implements base types

* fix some types

* Update app/lib/methods/updateMessages.ts

Co-authored-by: Diego Mello <diegolmello@gmail.com>

* fix date type

* apply types changes

* fix type

* fix date value

* fix types

* typescript things...

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2022-02-25 18:32:03 -03:00
Alex Junior 91de74ed9f
Chore: Migrate views/RoomListView to typescript (#3758)
* chore: migrating RoomListView to ts

* chore: migrating RoomListView to ts

* chore: implementing types for RoomListView

* chore: change ChatsStackParamList for fix RoomListView errors

* chore: minor tweak

* chore: minor tweak

* chore: fix setTimeout type

* chore: applying changes requested

* chore: minor tweak
2022-02-25 15:59:39 -03:00
Gleidson Daniel Silva 531ad9b9b4
fix: fix mergeSubscriptionsRooms (#3770) 2022-02-23 15:55:38 -03:00
Gleidson Daniel Silva b5d964095e
Chore: Migrate method canOpenRoom to Typescript (#3650)
* chore: migrate canOpenRoom to ts

* chore: update rocketchat types

* change types to Isubscription types
2022-02-22 17:00:33 -03:00
Alex Junior cbfca132c5
Chore: Migrate methods/getThreadName to typescript (#3707)
* chore: change getThreadName to typescript

* chore: change types after merge develop into current

* chore: minor tweak
2022-02-22 13:01:35 -03:00
Gerzon Z c5cc192dc9
Chore: Migrate methods/enterpriseModules to TS (#3706)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2022-02-22 09:07:54 -03:00
Gerzon Z e58bdb8fe7
Chore: Migrate sendMessage to TS (#3712)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2022-02-22 09:04:01 -03:00
Gleidson Daniel Silva 753dec9e27
Chore: Migrate to Typescript mergeSubscriptionRooms and findSubscriptionsRooms (#3747)
* fix fromJSONValue type

* migrate findSubscription and mergeSubscription to typescript

* chore: fix subscription param returning null
2022-02-21 16:41:49 -03:00
Alex Junior f27ddf2e22
chore: migrate getFileUrlFromMessage to ts (#3734) 2022-02-21 15:19:40 -03:00
Alex Junior 6f27126f5e
Chore: Migrate methods/loadNextMessages to typescript (#3719)
* feat: update loadNextMessages to ts

* minor tweak

* chore: minor tweaks after merge with developer
2022-02-21 15:04:17 -03:00
Alex Junior 17c63c717b
Chore: Migrate methods/sendFileMessage to typescript (#3683)
* chore: start the migration

* chore: update sendFileMessage to ts

* chore: removing an `any` from uploadQueue

* chore: minor tweak

* chore: minor tweak

* chore: minor tweaks after merge with developer

* chore: minor tweak after merge develop into current
2022-02-21 13:06:57 -03:00
Alex Junior a3a4b66810
Chore: Migrate methods/loadMessagesForRoom to Typescript (#3701)
* chore: change loadMessagesForRoom to typescript

* minor tweak

* chore: minor tweaks after merge with developer

* chore: minor tweaks after merge with developer

* chore: minor tweak

* chore: minor tweaks

* Fix return

Co-authored-by: Diego Mello <diegolmello@gmail.com>
Co-authored-by: Gleidson Daniel Silva <gleidson10daniel@hotmail.com>
2022-02-21 11:40:57 -03:00
Alex Junior 113cfb043e
Chore: Migrate methods/getRoles to Typescript (#3741)
* chore: migrate getRoles to ts

* chore: removing unused const

* chore: minor tweak

* Type batch

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2022-02-21 11:26:10 -03:00
Gleidson Daniel Silva bdd1ce4abf
Chore: Migrate loadMissedMessages to typescript (#3704)
* chore: migrate loadMissedMessages to typescript

* remove loaderItem

* remove this from functions
2022-02-21 10:59:44 -03:00
Gerzon Z 5e39cc0ba5
Chore: Migrate getUsersPresence to TS (#3717)
* migrate getUsersPresence to ts

* use sdk and remove this context from getUsersPresence
2022-02-18 22:31:38 -04:00
Gerzon Z 8237b3e673
Chore: Migrate getSlashCommands to TS (#3711)
* migrate getSlashCommands to TS

* use sdk and update getSlashCommands

* minor tweak

* Remove implicit anys

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2022-02-18 22:19:33 -04:00
Gerzon Z 1cfa45eeec
Chore: Migrate methods/getRoomInfo to TS (#3695)
* migrate getRoomInfo to TS

* update room type

* update types

* Fix lint error
2022-02-18 22:09:05 -04:00
Gerzon Z 4e24b7cd82
[FIX] getRooms request using param with wrong name (#3761) 2022-02-18 17:49:46 -04:00
Gerzon Z 8bb248890c
Chore: Migrate getCustomEmojis to TS (#3724)
* update customEmoji interface and getCustomEmoji

* add sdk

* updated emojiCustom rest definition

* minor refactor

* update params object
2022-02-18 12:20:16 -04:00
Gleidson Daniel Silva 370798f100
Chore: Migrate method getSettings to typescript (#3703)
* chore: migrate getSettings to typescript and and some types

* chore: remove this and add current to code

* chore: add current
2022-02-18 11:49:47 -03:00
Gleidson Daniel Silva eb38761a37
Chore: Migrate methods/callJitsi to typescript (#3660)
* chore: migrate callJitsi to typescript

* change fixed string to type

* wip

* wip

* back to old times :)

* back to typescript
2022-02-17 15:45:21 -03:00
Diego Mello a58b27e4f1
Chore: Migrate getPermissions to Typescript (#3720)
* Migrating...

* Fix IPermission

* Playing with types

* Remove `as const`

* Fix lint

* Fix test

* Apply sdk

* Fix lint and autocomplete
2022-02-17 10:06:31 -03:00
Gerzon Z 86cc8a7d16
Chore: Migrate buildMessage to TS (#3732)
* migrate buildMessage to TS

* Fix lint

* minor tweak

* minor tweaks
2022-02-16 20:07:24 -04:00