Commit Graph

33 Commits

Author SHA1 Message Date
Apoorv Mishra
1c7bb65c7a Document emoji picker (#4338)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2023-09-03 06:11:14 -07:00
Tom Moor
fa03f9c08d Add additional rate limits on documents API endpoints 2023-08-30 20:28:22 -04:00
Tom Moor
ccdcda372f chore: Move last usage of sequelize.transaction to middleware 2023-07-29 22:30:26 -04:00
Tom Moor
479b805613 Add per-document control over who can see viewer insights (#5594) 2023-07-23 09:01:36 -07:00
Tom Moor
4b14fa5dd7 Inherit 'full width' setting creating new child document
towards #5562
2023-07-15 23:21:59 -04:00
Tom Moor
89d5527d39 Handle promise linting (#5488) 2023-06-28 17:18:18 -07:00
Tom Moor
7940cef517 Improve document revision creation (#5474) 2023-06-25 05:29:24 -07:00
Tom Moor
9ef375d83c fix: Import max length not correctly communicated on import (#5434) 2023-06-17 00:52:57 -07:00
dependabot[bot]
fbd16d4b9a chore(deps-dev): bump prettier from 2.1.2 to 2.8.8 (#5372)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2023-05-22 19:14:56 -07:00
Tom Moor
d8b4fef554 feat: Collection admins (#5273
* Split permissions for reading documents from updating collection

* fix: Admins should have collection read permission, tests

* tsc

* Add admin option to permission selector

* Combine publish and create permissions, update -> createDocuments where appropriate

* Plural -> singular

* wip

* Quick version of collection structure loading, will revisit

* Remove documentIds method

* stash

* fixing tests to account for admin creation

* Add self-hosted migration

* fix: Allow groups to have admin permission

* Prefetch collection documents

* fix: Document explorer (move/publish) not working with async documents

* fix: Cannot re-parent document to collection by drag and drop

* fix: Cannot drag to import into collection item without admin permission

* Remove unused isEditor getter
2023-04-30 06:38:47 -07:00
Apoorv Mishra
86062f396d Deleting a collection should detach associated drafts from it (#5082)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2023-04-23 12:20:44 -07:00
Apoorv Mishra
21d6fbed87 Collection memberships required to be preloaded before publishing a document (#5187) 2023-04-11 16:38:25 -07:00
Tom Moor
db73879918 Assorted cleanup, minor bug fixes, styling fixes, eslint rules (#5165
* fix: Logic error in toast
fix: Remove useless component

* fix: Logout not clearing all stores

* Add icons to notification settings

* Add eslint rule to enforce spaced comment

* Add eslint rule for arrow-body-style

* Add eslint rule to enforce self-closing components

* Add menu to api key settings
Fix: Deleting webhook subscription does not remove from UI
Split webhook subscriptions into active and inactive
Styling updates
2023-04-08 05:25:20 -07:00
Tom Moor
4a99f9f386 fix: Mentions do not show any options in public collections (#5150)
* Mentions do not show any options in public collections

* Avoid reset data while loading
2023-04-03 18:05:22 -07:00
Tom Moor
980e613a7b fix: Download as Markdown should use .md extension
closes #5113
2023-03-29 07:43:40 -04:00
Tom Moor
a2f1f059c7 fix: Users not mentionable when not in seamless editing mode 2023-03-28 22:32:47 -04:00
Tom Moor
7ba6a9379b Removal of non-collaborative editing code paths (#4210) 2023-03-28 19:13:42 -07:00
Apoorv Mishra
1b1cd1c8d4 API to fetch users who have read/write permission on a document collection (#5047) 2023-03-28 17:54:32 -07:00
dependabot[bot]
05c5d0637e chore(deps): bump koa-body from 4.2.0 to 6.0.1 (#4806)
* chore(deps): bump koa-body from 4.2.0 to 6.0.1

Bumps [koa-body](https://github.com/koajs/koa-body) from 4.2.0 to 6.0.1.
- [Release notes](https://github.com/koajs/koa-body/releases)
- [Changelog](https://github.com/koajs/koa-body/blob/master/CHANGELOG.md)
- [Commits](https://github.com/koajs/koa-body/compare/v4.2.0...v6.0.1)

---
updated-dependencies:
- dependency-name: koa-body
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update types

* test

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2023-02-24 05:11:49 -08:00
Tom Moor
70beb7524f feat: Custom accent color (#4897)
* types

* Working, but messy

* Add InputColor component

* types

* Show default theme values when not customized

* Support custom theme on team sign-in page

* Payload validation

* Custom theme on shared documents

* Improve theme validation

* Team -> Workspace in settings
2023-02-19 07:43:03 -08:00
Tom Moor
534eeacc97 fix: Documents with images exported as HTML have broken images
closes #4822
2023-02-04 14:04:38 -05:00
Tom Moor
788450136e test: documents.update apiVersion 2 response 2023-01-15 09:43:56 -05:00
Tom Moor
0c269081d9 fix: Sidebar jumps when publish or unpublish document (#4706)
* Return updated collection in API response for documents.unpublish and documents.update
Allows for improved UX on clientside

* test

* tsc

* tsc
2023-01-15 06:01:06 -08:00
Tom Moor
17a8dbb3f0 fix: Prevent moving documents into drafts 2023-01-12 11:15:54 -05:00
Apoorv Mishra
b6141442b7 Validate API request query (#4642)
* 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
2023-01-05 20:24:03 +05:30
Apoorv Mishra
f4461573de Refactor to accommodate authentication, transaction and pagination states together (#4636)
* fix: refactor to accommodate authentication, transaction and pagination together into ctx.state

* feat: allow passing response type to APIContext
2023-01-04 23:51:44 +05:30
Tom Moor
1c9eee2134 fix: Search on shared documents with custom slug not working
fix: Should not be able to export a document with shareId
2023-01-03 19:28:04 -05:00
Tom Moor
05a4f050bb chore: Improve graceful server shutdown (#4625)
* chore: Improve graceful server shutdown

* Replace node timers with custom promise timeout
2022-12-31 13:56:27 -08:00
Tom Moor
1b8dd9399c chore: Export improvements (#4617)
* wip

* i18n
2022-12-27 09:51:39 -08:00
Tom Moor
82c565f1d4 Add additional filters to search_titles endpoint (#4563)
* Add additional filters to search_titles endpoint

* tests, fixes for drafts

* fix: dateFilter results in 500

* fix: Draft documents returned in collection-only search
2022-12-24 03:44:22 -08:00
Apoorv Mishra
79829a3129 Ability to create share url slug (#4550)
* feat: share url slug

* feat: add col urlId

* feat: allow updating urlId

* fix: typo

* fix: migrations

* fix: urlId model validation

* fix: input label

* fix: debounce slug request

* feat: link preview

* fix: send slug variant in response if available

* fix: temporary redirect to slug variant if available

* fix: move up the custom link field

* fix: process and display backend err

* fix: reset custom link state on popover close and remove isCopied

* fix: document link preview

* fix: set urlId when available

* fix: keep unique(urlId, teamId)

* fix: codeql

* fix: get rid of preview type

* fix: width not needed for block elem

* fix: migrations

* fix: array not required

* fix: use val

* fix: validation on shareId and test

* fix: allow clearing urlId

* fix: do not escape

* fix: unique error text

* fix: keep team
2022-12-13 17:26:36 -08:00
Tom Moor
b0b7c7d647 fix: Document import schema 2022-12-04 22:31:54 -05:00
Apoorv Mishra
a6125be6f1 Introduce zod for server-side validations (#4397)
* 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>
2022-11-24 10:11:43 +05:30