Commit Graph

64 Commits

Author SHA1 Message Date
codegen-sh[bot] 879c568a2c Upgrade Prettier to v3.6.2 (#9500)
* Upgrade Prettier to v3.6.2 and eslint-plugin-prettier to v5.5.1

- Upgraded prettier from ^2.8.8 to ^3.6.2 (latest version)
- Upgraded eslint-plugin-prettier from ^4.2.1 to ^5.5.1 for compatibility
- Applied automatic formatting changes from new Prettier version
- All existing ESLint and Prettier configurations remain compatible

* Applied automatic fixes

* Trigger CI

---------

Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2025-06-28 10:22:28 -04:00
Tom Moor a9c4dd43d6 fix: options vs rest usage (#9431)
No functional difference here, just avoid extra passed attributes
2025-06-11 20:04:43 -04:00
Tom Moor 0f4c1d7db5 fix: Regression in collections.info endpoint disallowed find by urlId (#9423) 2025-06-10 18:21:39 -04:00
codegen-sh[bot] caaff1c3d6 Add order parameter to addDocumentToStructure function (#9342)
* Add order parameter to addDocumentToStructure function

- Add 'order' parameter with 'prepend' | 'append' options to Collection.addDocumentToStructure
- Update import logic to use 'append' order to preserve document sorting during import
- Fixes issue where exported documents lose their sorting when re-imported
- Maintains backward compatibility by defaulting to append behavior

Fixes #7532

* Fix TypeScript error: rename order parameter to insertOrder

The 'order' parameter in addDocumentToStructure was conflicting with
Sequelize's FindOptions.order property, causing a type intersection
error. Renamed it to 'insertOrder' to avoid the conflict.

Fixes TypeScript compilation errors in:
- server/queues/processors/ImportsProcessor.ts
- server/queues/tasks/ImportTask.ts

---------

Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
2025-05-30 20:45:11 -04:00
codegen-sh[bot] c02a33a74c feat: Disable commenting per collection (#9295)
* Address PR feedback: Move commenting logic to Collection model

- Update openDocumentComments action to use collection.canCreateComment
- Update AuthenticatedLayout to check collection-level commenting setting
- Update DocumentMeta to use collection commenting preference
- Add commenting field to CollectionForm with proper UI
- Maintain backward compatibility with team-level preferences

* Applied automatic fixes

* Disable comment creation UI when collection commenting is disabled

- Update Editor component to use collection-level commenting setting
- Pass onCreateCommentMark as undefined when commenting is disabled
- This removes the shortcut and toolbar icon for comment creation
- Maintains backward compatibility with team-level preferences

* Fix TypeScript error in Editor component

- Fix props destructuring to avoid variable shadowing
- Ensure all required props are properly destructured
- Maintain correct property order from original implementation

* Fix TypeScript error: add missing activeCollectionId parameter

- Add activeCollectionId to import document action perform function
- This parameter was being used but not declared in the function signature
- Fixes TS2304 error: Cannot find name 'activeCollectionId'

* fix form

* docs

---------

Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2025-05-24 18:35:50 -04:00
Tom Moor 201fbb56eb perf: Add cache for document structure (#9196)
* Normalize Collection.findByPk

* Add caching of documentStructure

* fix: Do not set cache before transaction is flushed

* Mock Redis
2025-05-18 18:45:00 -04:00
Hemachandar 052924d816 Resolve index collision when restoring collection (#9229)
* Resolve index collision when restoring collection

* use beforeUpdate hook
2025-05-16 23:56:46 -04:00
Hemachandar 610721eed6 fix: Ensure collection withUser scope is not overriden (#9226) 2025-05-16 08:16:25 -04:00
Tom Moor 08b7c11461 Normalize Collection.findByPk (#9193) 2025-05-14 00:05:45 -04:00
Tom Moor b9387734c7 perf: Remove documentStructure from default query select (#9141)
* perf: Remove documentStructure from default query select

* test
2025-05-07 07:47:57 -04:00
Hemachandar 877b7ad0df fix: Handle index collision when creating a collection (#8803)
* fix: Handle index collision when creating a collection

* move to sequelize hooks

* index maxLen parity between api and model

* remove beforeUpdate hook

* use common indexLen in model

* beforeUpdate hook..

* test
2025-03-27 02:50:40 -07:00
Hemachandar 6e98568e5b API importer for Notion (#8710) 2025-03-23 12:19:13 -07:00
Hemachandar 8e4844fd84 Convert UserMembership mutations (#8285)
* handle collections.add_user, collections.remove_user

* handle documents.add_user, documents.remove_user

* don't publish event in collection creation flow
2025-01-28 17:52:31 -08:00
Hemachandar b527048b76 Remove namespace filter for publishing events (#8252)
* groupuser namespace

* remove namespace

* handle reactions

* handle group memberships

* cache changeset before all create and update flows
2025-01-22 17:16:05 -08:00
Hemachandar 3c86b48533 Convert GroupMembership mutations (#8242)
* Convert 'GroupMembership' mutations

* cleanup collectionGroupMemberships

* remove duplicate data
2025-01-16 15:23:09 -08:00
Apoorv Mishra 35ff70bf14 Archive collections (#7266)
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2024-10-06 05:37:11 -07:00
Tom Moor f61689abdc feat: Invite groups to documents (#7275) 2024-09-01 06:51:52 -07:00
Tom Moor 1426c4e6ab fix: Index calculation does not take into account user scope (#7294)
* fix: Index calculation does not take into account user scope

* Standardize sort index maxlength to 256
2024-07-23 04:20:30 -07:00
Hemachandar bbbc00baaa fix: Set doc slug on importing collections (#7270)
* fix: Set doc slug on importing collections

* review
2024-07-21 17:42:22 -07:00
Tom Moor f48c05bef3 chore: CollectionGroupMembership -> GroupMembership (#7269)
* chore: CollectionGroupMembership -> GroupMembership

* Backwards compat

* docs
2024-07-17 18:39:13 -07:00
Tom Moor f675a04735 chore: Rename GroupPermission -> GroupMembership (#7214)
* GroupPermission -> GroupMembership

* Add group membership source

* wip
2024-07-17 16:31:20 -07:00
Tom Moor e52719c38e chore: Rename GroupMembership -> GroupUser (#7268)
* Rename GroupMembership -> GroupUserMembership

* GroupUser
2024-07-17 16:14:59 -07:00
Hemachandar 6fd3a0fa8a feat: Unified icon picker (#7038) 2024-06-23 06:31:18 -07:00
Tom Moor f103d73b48 Move collection description rendering to JSON (#6944)
* First pass, moving collection description rendering to JSON

* tsc

* docs

* refactor

* test
2024-05-25 15:17:19 -07:00
Apoorv Mishra fd34a6d19c Refactor and regroup urlHelpers utils (#6462)
* fix: refactor urlHelpers

* fix: move to /plugins/slack/shared

* fix: remove .babelrc

* fix: remove Outline class

* fix: Slack -> SlackUtils

* fix: UrlHelper class
2024-02-29 11:41:03 +05:30
Tom Moor 47d168a29b Add notifications for document and collection access (#6460)
* Add notification for added to document

* Add notifications for document and collection access

* Add notification delay

* fix: Collection notifications not appearing

* Add notification settings
2024-01-31 15:01:27 -08:00
Apoorv Mishra 1490c3a14b Individual document sharing with permissions (#5814)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
2024-01-30 17:48:22 -08:00
Apoorv Mishra 7e61a519f1 Type server models (#6326)
* fix: type server models

* fix: make ParanoidModel generic

* fix: ApiKey

* fix: Attachment

* fix: AuthenticationProvider

* fix: Backlink

* fix: Collection

* fix: Comment

* fix: Document

* fix: FileOperation

* fix: Group

* fix: GroupPermission

* fix: GroupUser

* fix: Integration

* fix: IntegrationAuthentication

* fix: Notification

* fix: Pin

* fix: Revision

* fix: SearchQuery

* fix: Share

* fix: Star

* fix: Subscription

* fix: TypeError

* fix: Imports

* fix: Team

* fix: TeamDomain

* fix: User

* fix: UserAuthentication

* fix: UserPermission

* fix: View

* fix: WebhookDelivery

* fix: WebhookSubscription

* Remove type duplication

---------

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2024-01-12 22:33:05 +05:30
Tom Moor 2505fea103 fix: Prevent duplicate documents in collection structure 2024-01-11 22:18:50 -05:00
Tom Moor 7c319c17c6 fix: Correct user on documents in deleted collection (#6116) 2023-11-05 06:43:38 -08:00
Tom Moor e7b7032284 feat: Allow deletion of imports (#5907) 2023-10-01 18:24:50 -07:00
Tom Moor 41a6f77998 fix: Types on overridden findByPk methods (#5908) 2023-10-01 12:02:56 -07:00
Apoorv Mishra 7145f7ef51 UserPermission and GroupPermission models (#5860)
* fix: rename to group_permissions

* fix: delete null collectionId records before setting non null constraint

* fix: use scope with collectionId not null

* fix: update model with documentId

* fix: rename to GroupPermission

* fix: rename collection_users to user_permissions

* fix: teamPermanentDeleter test

* fix: use scope with collectionId not null

* fix: update model with documentId

* fix: rename to UserPermission

* fix: create views upon table rename for zero downtime

* fix: remove comments
2023-09-25 10:51:29 +05:30
Tom Moor 0856f5f6ae Move template management to settings (#5811) 2023-09-10 12:46:12 -07:00
Tom Moor b7bfc4bb1a chore: Remove optimize imports to allow vite upgrade (#5691) 2023-08-14 11:44:58 -07:00
Apoorv Mishra 401ae73a04 Request validation for /api/collections.* (#5619) 2023-08-06 09:54:13 -07:00
Tom Moor 88775cd287 fix: Database transaction used after committed 2023-06-30 17:15:40 -04:00
Tom Moor f76f2e61d8 Increase maximum index size, closes #5426 2023-06-19 12:54:04 -04:00
Tom Moor 137c33c323 fix: Grammar in error message 2023-06-10 22:14:59 +03: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
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 d02d3cb55d feat: Add import/export of documents as JSON (#4621)
* feat: Add export of documents as JSON

* Rename, add structured collection description

* stash

* ui

* Add entity creation data to JSON archive

* Import JSON UI plumbing

* stash

* Messy, but working

* tsc

* tsc
2023-01-29 10:24:44 -08:00
Apoorv Mishra ad902af52c Move tree implementation out of collections store (#4763)
* refactor: attaching emoji in tree node is unnecessary

* refactor: pass depth and hasChildren as separate props

* refactor: move tree impl into a separate hook

* refactor: separate out as DocumentExplorer for reuse

* fix: separate search and node

* fix: review comments

* fix: tsc
2023-01-27 11:33:51 +05:30
Tom Moor e347404502 chore: Improvements to document move behavior (#4689)
* chore: Improvements to document move behavior

* test
2023-01-12 18:48:09 -08:00
Tom Moor 622f464b9f Store import<->document relationship (#4415)
* Store import<->document relationship

* Update 20221112152649-import-document-relationship.js

* Store importId on collection, UI tweaks on import screen
2022-11-12 08:22:41 -08:00
Tom Moor 212985e18f feat: Allow viewers to be upgraded to editors on individual collections (#4023)
* Improve types

* More types, fix default permission for viewers added to collection

* fix change of default role for CollectionGroup

* Restore policy

* test

* tests
2022-08-30 23:12:27 -07:00
Tom Moor ec35af4bc5 Refactor validations 2022-07-24 13:40:04 +01:00
Tom Moor 7ae892fe06 fix: Long collection description prevents import (#3847)
* fix: Long collection description prevents import
fix: Parallelize attachment upload during import

* fix: Improve Notion image import matching

* chore: Bump JSZIP (perf)

* fix: Allow redirect from /doc/<id> to canonical url

* fix: Importing document with only title duplicates title in body
2022-07-24 01:37:20 -07:00
Tom Moor 8bb88b8550 chore: Audit of all model column validations (#3757)
* chore: Updating all model validations before the white-hatters get to it ;)

* test

* Remove isUrl validation, thinking about it need to account for minio and other weird urls here
2022-07-09 08:04:40 -07:00
Tom Moor 4a46d19846 fix: Improved model validation for Collection (#3749)
* fix: Added improved model validation for Collection attributes

* sp

* fix: Enforce title length in UI
2022-07-08 11:10:22 -07:00