This PR converts src/api/db/models/utils.js to TypeScript.
How I did it
Add types for mongodb-query-parser to get around the following issue:
Could not find a declaration file for module 'mongodb-query-parser'. '/Users/alukach/Projects/devseed/animl/animl-api/node_modules/mongodb-query-parser/dist/.esm-wrapper.mjs' implicitly has an 'any' type.
There are types at '/Users/alukach/Projects/devseed/animl/animl-api/node_modules/mongodb-query-parser/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The 'mongodb-query-parser' library may need to update its package.json or typings. ts(7016)
Merge src/api/db/models/utils-model.ts into src/api/db/models/utils.ts
Schema changes (same as #222)
Fix src/api/db/models/Camera.ts and src/api/db/models/ImageError.ts as they both had been mistakenly using @hasRole rather than @roleCheck
What I'm changing
This PR converts
src/api/db/models/utils.js
to TypeScript.How I did it
mongodb-query-parser
to get around the following issue:src/api/db/models/utils-model.ts
intosrc/api/db/models/utils.ts
src/api/db/models/Camera.ts
andsrc/api/db/models/ImageError.ts
as they both had been mistakenly using@hasRole
rather than@roleCheck
part of #187