* fix: refactor to accommodate authentication, transaction and pagination together into ctx.state
* feat: allow passing response type to APIContext
* feat: preliminary work for initial review
* fix: use unknown for base types
* fix: api/attachments
* fix: api/documents
* fix: jsdoc comment for input
* fix: replace at() with index access for compatibility
* fix: validation err message
* fix: error handling
* fix: remove unnecessary extend
* fix: server side error handling
* fix: push only unknown 500 errors to sentry
* fix: use in-house onerror in favor of errorHandling middleware
* fix: split error template into dev and prod envs
* fix: check Error instance
* fix: error routes in test env
* fix: review comments
* Remove koa-onerror
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Remove home link on desktop app
* Spellcheck, installation toasts, background styling, …
* Add email,slack, auth support
* More desktop style tweaks
* Move redirect to client
* cleanup
* Record desktop usage
* docs
* fix: Selection state in search input when double clicking header
* chore(server): use zod for validations
* fix(server): use ctx.input for documents.list
* fix(server): schema for documents.archived
* fix(server): documents.deleted, documents.viewed & documents.drafts
* fix(server): documents.info
* fix(server): documents.export & documents.restore
* fix(server): documents.search_titles & documents.search
* fix(server): documents.templatize
* fix(server): replace nullish() with optional()
* fix(server): documents.update
* fix(server): documents.move
* fix(server): remaining
* fix(server): add validation for snippet min and max words
* fix(server): fix update types
* fix(server): remove DocumentSchema
* fix(server): collate duplicate schemas
* fix: typos
* fix: reviews
* chore: Fixed case of Metrics import
* fix: restructure /api
* fix: loosen validation for id as it can be a slug too
* Add test for query by slug
Simplify import
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Improve types
* More types, fix default permission for viewers added to collection
* fix change of default role for CollectionGroup
* Restore policy
* test
* tests
* feat: Put request rate limit at application server
This PR contains implementation for a blanket rate limiter at
application server level. Currently the allowed throughput is set high
only to be changed later as per the actual data gathered.
* Simplify implementation
1. Remove shutdown handler to purge rate limiter keys
2. Have separate keys for default and custom(route-based) rate limiters
3. Do not kill default rate limiter because it is not needed anymore due
to (2) above
* Set 60s as default for rate limiting window
* Fix env types
This PR moves the entire project to Typescript. Due to the ~1000 ignores this will lead to a messy codebase for a while, but the churn is worth it – all of those ignore comments are places that were never type-safe previously.
closes#1282
* feat: Normalize logging
* Remove scattered console.error + Sentry.captureException
* Remove mention of debug
* cleanup dev output
* Edge cases, docs
* Refactor: Move logger, metrics, sentry under 'logging' folder.
Trying to reduce the amount of things under generic 'utils'
* cleanup, last few console calls
- Added `accountProvisioner`
- Move authentication to use passport strategies
- Make authentication more pluggable
- Change language of services -> providers
closes#1120
* tweaking effect details
* wrap work on this feature
* adds correct color to drop cursor
* simplify logic for early return
* much better comment so Tom doesn't fire me
* feat: Allow changing sort order of collections
* refactor: Move validation to model
feat: Make custom order the default (in prep for dnd)
* feat: Add sort choice to edit collection modal
fix: Improved styling of generic InputSelect
* fix: Vertical space left after removing previous collection description
* chore: Tweak language, menu contents, add auto-disclosure on sub menus
* only show drop-to-reorder cursor when sort is set to manual
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* chore: Add additional missing events
signed in
profile updated
team setting updated
* Minor refactor to DRY existing code
* Add events
* lint
* flow: Add missing ip to event types
* fix: Use get request instead of cookie to transfer token between domains
* Add domain to database
Add redirects to team domain when present
* 30s -> 1m
* fix: Avoid redirect loop if subdomain and domain set
* fix: Create a transfer specific token to prevent replay requests
* refactor: Move isCustomDomain out of shared as it won't work on the client