* collections.create, collections.update, collections.delete API
* collections.archive, collections.restore
* collections.move
* file imports
* remove collectionDestroyer
* remove data field
* remove data field for collections.move
* remove data field for import flow
* use hook for permission_changed event
* simplify event type
* tiny
* Add collaboratorIds support to revision events
- Add database migration to add collaboratorIds column to revisions table
- Update server Revision model to include collaboratorIds field
- Update client Revision model to include collaboratorIds field
- Modify Revision.buildFromDocument to capture document collaborators
- Update revisionCreator to include collaboratorIds in event data
Fixes#6975
* fix to actually work
* test: Add missing methods to mock
* Return collaborators to client and display
---------
Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
- Add 'oauth' to SearchQuery enum in server and client models
- Add database migration to include 'oauth' in enum_search_queries_source
- Fixes 400 validation error when OAuth users search with parameters
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>
* 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>
* Migrate Backlink model to generic Relationship model
- Create new Relationship model with type field to support different relationship types
- Add database migration to create relationships table and migrate existing backlinks
- Update Backlink model to delegate to Relationship model for backward compatibility
- Update BacklinksProcessor to use Relationship model with backlink type
- Update API routes to use new Relationship model
- Update test files to use Relationship model
- Maintain backward compatibility through database view and model delegation
Fixes#9366
* Update migration to rename table instead of creating new one
- Rename existing backlinks table to relationships instead of creating new table
- Add type column with default value to existing table
- Update existing rows to have type='backlink'
- Avoid expensive data migration by keeping existing data in place
- Maintain backward compatibility with database view
- Update rollback to reverse table rename and column addition
This approach is much more efficient for large datasets as it avoids copying millions of rows.
* Remove unnecessary UPDATE statement from migration
The UPDATE statement is not needed since defaultValue automatically
applies to existing rows when adding a column with a default value.
Thanks @tommoor for catching this!
* Wrap up migration in transaction
- Wrap all migration operations in a transaction for atomicity
- Add transaction parameter to all queryInterface calls
- Follow the same pattern as other migrations in the codebase
- Ensures all operations succeed or fail together
* Remove Backlink class entirely and use Relationship everywhere
- Delete server/models/Backlink.ts
- Remove Backlink export from server/models/index.ts
- Remove Backlink import and association from Document model
- All functionality now uses Relationship model with RelationshipType.Backlink
- Maintains same API through Relationship model methods
- Cleaner architecture with single relationship model
* Update documents.test.ts to use RelationshipType enum instead of string
- Import RelationshipType from Relationship model
- Replace type: "backlink" with type: RelationshipType.Backlink
- Improves type safety and consistency with enum usage
* Address code review feedback
- Add transaction wrapper to migration down method for safer rollback
- Remove unused findByTypeForUser method from Relationship model
- Method wasn't used and won't work for all relationship types (e.g., user mentions)
- Clean up code structure and improve safety
* Restore imports
---------
Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
* Upgrade @typescript-eslint dependencies from v6.21.0 to v8.33.0
- Updated @typescript-eslint/eslint-plugin from ^6.21.0 to ^8.33.0
- Updated @typescript-eslint/parser from ^6.21.0 to ^8.33.0
- Tested linting functionality to ensure compatibility
- This brings the latest TypeScript ESLint features and bug fixes
* lint
* tsc
---------
Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
* Add team description column and settings
- Add database migration to add description column to teams table
- Update server-side Team model with description field and validation
- Update client-side Team model to include description field
- Add description input field to team settings page
- Update renderApp to use team description in HTML metadata when public branding is enabled
* Applied automatic fixes
* tweaks
---------
Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
* Add showLastModified option to Share models
- Add showLastModified column to shares table with migration
- Add showLastModified field to client and server Share models
- Add 'Show last modified' toggle in share popover (PublicAccess component)
- Update shares.update API route to handle showLastModified field
- Include share data in documents.info API response for shared documents
- Modify DocumentMeta visibility logic to show timestamp when showLastModified is enabled
- Add proper type definitions across component hierarchy
- Follow existing patterns used by allowIndexing option
* Applied automatic fixes
* refactor
---------
Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
* 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>
Fixes issue where internal document links in shared documents with custom
static URLs would have their share path duplicated, causing malformed URLs.
The bug was in ProsemirrorHelper.replaceInternalUrls() where the replaceUrl
function would replace ALL occurrences of '/doc/' with 'basePath/doc/',
even when the URL already contained the correct share path structure.
Now only URLs that start with '/doc/' get the basePath prepended, preventing
duplication for URLs that already have the share path.
Fixes#9338
Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
* Add installation.create API endpoint
- Add new endpoint that accepts teamName, userName, userEmail
- Use accountProvisioner to create team and user
- Only allow when no existing teams exist (unauthenticated)
- Add comprehensive tests for success, failure, and validation cases
- Add schema validation with Zod
- Include rate limiting (5 per hour)
- Follow existing API patterns and conventions
* Remove changes to .env.test
* fix
* Centralize validation
* test
* test
* test
---------
Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
* 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>
* Fix: Properly escape backslashes in search queries
This commit fixes a bug where backslashes in search queries were not properly escaped, leading to database errors.
The `escapeQuery` method is now applied to quoted queries and URLs to ensure that all parts of the search query are correctly escaped.
A test case has been added to verify that searching with backslashes works as expected.
* Fix: Properly escape backslashes in search query URLs
This commit fixes a bug where backslashes in URLs within search queries were not properly escaped, leading to database errors.
The `escapeQuery` method is now applied to `likelyUrls` before they are used in `iLike` conditions.
Quoted queries were found to be already escaped and are no longer double-escaped.
The existing test case for searching with backslashes remains relevant for verifying URL escaping.
* lint
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* Fix document URL generation for titles with only special characters
* Refactor: Update instance path method to use static getPath method
---------
Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
* Fix misalignment between email and comment mentions
* Add test
* Update ProsemirrorHelper.tsx
* Optimize user mention processing with batch loading
* Add test for multiple mentions
---------
Co-authored-by: codegen-sh[bot] <131295404+codegen-sh[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom@getoutline.com>
This PR contains the necessary work to make Outline an OAuth provider including:
- OAuth app registration
- OAuth app management
- Private / public apps (Public in cloud only)
- Full OAuth 2.0 spec compatible authentication flow
- Granular scopes
- User token management screen in settings
- Associated API endpoints for programatic access