* Rename for consistency with obs photos
* Refactor to be similar to obs photos
* Include Sound as type
* Revert "Include Sound as type"
This reverts commit 3db88ae031.
* Revert "Refactor to be similar to obs photos"
This reverts commit 8ed7454be0.
* Revert "Rename for consistency with obs photos"
This reverts commit 674b921bab.
* Git mv without changes
* Add types
* Type api sound param
* Type fields s const
* Type fields as const
* Type api param
* Type new param
* The only call site of this function passes in only defined strings
* Adapted from Photo check for local path before deleting
* Type fct params
* Refactor constructor to only have a uri as param
* Refactor Sound constructor to have string as param
* Update Sound.ts
* Remove unused param
* Type fct params
* Type realm
* Also collect unsyncedSounds
* Create operations for sound uploads based on Sound only
* Add Evidence type
* Change a sound upload operation to work with a RealmSound
* Update realmSync to also just pass through Sounds
* Use server ID for attaching obs_sound to obs
* Also split photo pipeline for clarity
This is not a functional change. Also previously, only RealmPhoto s are uploaded, only RealmObservationPhoto s are attached or modified. Same as for sounds now.
* Update realmSync.ts
* Remove log
* Update realmSync.test.js
* Update mocks
* Update Sound map test
* Update prepareMediaForUpload.test.js
* Update prepareMediaForUpload.test.js
* Update mediaUploader.test.js
* Don't require TS extensions in imports
* Resolve all import extension errors
* Remove file extension from import paths used in mocks
* Remove .d of type definition file paths
* Remove .d of type definition file and import as type
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>
* Update import
* Import realm models as types
* Remove unused import
* Add function param types
* Add function param types
* Rename param for consistency
* Remove unused function param
* Type param
* Update type
* Add TODO
* Import function param type
* File rename without change
* Update imports
* Add some fct types
* Add fct param types
* Add function param types
* Update ObservationPhoto.ts
* Remove unused param
* Type fct param
* Add type
* Remove unused param
* Update comment
* Add fct param type as accessed by local context
* Add types from what is accessed in function
* Add types
* Remove unused types
* Add basic type, as is used in local context
* Bring require statement back
* Import other function param types
* Add property types
* Fix wrong extends
* Assert inputs and outputs for mapping a local observation photo to server action
* Update unit tests for errors
* Rename file
* Update imports
* Create module for realm syncing and write unit tests before refactoring
* Refactor realmSync functions for readability & make sure realm errors aren't silently swallowed
* unit tests
* Update tests to use factory functions for media
* Update tests to use factory
* Remove sanitize function since it's redundant with mapping; move mapping & add unit tests
---------
Co-authored-by: Johannes Klein <johannes.t.klein@gmail.com>