Skip to content

move create document to documents hex#1609

Merged
whutchinson98 merged 11 commits intomainfrom
hutch/move-create-document-to-documents
Feb 23, 2026
Merged

move create document to documents hex#1609
whutchinson98 merged 11 commits intomainfrom
hutch/move-create-document-to-documents

Conversation

@whutchinson98
Copy link
Copy Markdown
Member

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 20, 2026

@whutchinson98 whutchinson98 marked this pull request as ready for review February 20, 2026 21:43
@whutchinson98 whutchinson98 requested review from a team as code owners February 20, 2026 21:43
Add DocumentRepo::create_document, update_upload_job, delete_document_by_id.
Add PresignedUploadUrlPort and TaskPropertiesPort traits.
Add DocumentService::create_document with full orchestration logic.
Add CreateDocumentRepoArgs domain model and new DocumentError variants.
…Repo

Add create_document with full transactional SQL: insert Document,
document_sub_type, DocumentBom/DocumentInstance, SharePermission,
DocumentPermission, UserHistory, ItemLastAccessed, UserItemAccess,
and document_email. Add update_upload_job and delete_document_by_id.
Add macro_uuid dependency for UUID v7 generation.
Add POST / handler with file type parsing, internal-only email
validation, and ProjectBodyAccessLevelExtractor for access checks.
Restructure router to separate document-exists middleware from
create route. Add Conflict and BadRequest DocumentError variants.
Apply cargo fmt, fix clippy collapsible_if, update SQLX offline cache
for new queries, add NoOp port impls to documents_toolset example,
and add macro_project_utils + entity_access to justfile setup_test_envs.
Remove create_document handler, business logic, and utils from
document_storage_service. The documents hex crate now serves the
POST /documents route via its axum router (both public and internal).

- Add S3UploadUrlAdapter and TaskPropertiesAdapter in DSS context to
  bridge DSS concrete types to the documents hex port traits
- Update DocumentServiceImpl construction in main.rs with adapters
- Update create_task.rs to call hex service directly
- Update internal router to use hex handler with full generic params
- Update swagger to reference hex handler
- Remove unused handle_document_creation_error_cleanup utility
@whutchinson98 whutchinson98 force-pushed the hutch/move-create-document-to-documents branch from 7b93ebc to c33c125 Compare February 23, 2026 14:24
Copy link
Copy Markdown
Contributor

@seanaye seanaye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments mostly looks good

@whutchinson98 whutchinson98 merged commit 04dd6a6 into main Feb 23, 2026
41 checks passed
@whutchinson98 whutchinson98 deleted the hutch/move-create-document-to-documents branch February 23, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants