Skip to content

Conversation

@VMelnalksnis
Copy link
Owner

@VMelnalksnis VMelnalksnis commented Sep 28, 2025

Fixes #7

@cocogitto-bot
Copy link

cocogitto-bot bot commented Sep 28, 2025

✔️ 1db9c23...d0d618f - Conventional commits check succeeded.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new client for document types functionality to the PaperlessDotNet library. The implementation follows the existing pattern established by other clients (correspondents, documents, tags) to provide CRUD operations for document types.

  • Adds a complete DocumentType client implementation with support for filtering, pagination, and CRUD operations
  • Integrates document types into the main PaperlessClient and dependency injection configuration
  • Updates existing code to support nullable return types in ordering expressions

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
DocumentTypes/DocumentType.cs Defines the DocumentType model with properties like Id, Name, Slug, Match, etc.
DocumentTypes/DocumentTypeClient.cs Implements the document types API client with GetAll, Get, Create, Delete methods
DocumentTypes/IDocumentTypeClient.cs Defines the interface for document type operations
DocumentTypes/DocumentTypeCreation.cs Model for creating new document types
DocumentTypes/DocumentTypeFilter.cs Filter class for querying document types
PaperlessClient.cs Integrates DocumentTypeClient into the main client
Routes.cs Adds routing support for document types API endpoints
Filters/ExpressionExtensions.cs Updates to support document type filtering and nullable ordering
ServiceCollectionExtensions.cs Adds dependency injection configuration for document type client
Comments suppressed due to low confidence (1)

source/VMelnalksnis.PaperlessDotNet/Routes.cs:1

  • The constant _pageSize was set to 'taskId' instead of 'page_size', which is incorrect. This has been fixed by replacing it with the proper PageSize constant, but this suggests there was a bug in the original code.
// Copyright 2022 Valters Melnalksnis

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Sep 28, 2025

Codecov Report

❌ Patch coverage is 89.23077% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.94%. Comparing base (0422dd2) to head (d0d618f).
⚠️ Report is 6 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...is.PaperlessDotNet/Filters/ExpressionExtensions.cs 16.66% 4 Missing and 1 partial ⚠️
...aperlessDotNet/DocumentTypes/DocumentTypeClient.cs 95.65% 1 Missing ⚠️
...aperlessDotNet/DocumentTypes/DocumentTypeFilter.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #370      +/-   ##
==========================================
+ Coverage   80.28%   80.94%   +0.66%     
==========================================
  Files          40       44       +4     
  Lines         700      761      +61     
  Branches       87       88       +1     
==========================================
+ Hits          562      616      +54     
- Misses        107      113       +6     
- Partials       31       32       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@VMelnalksnis VMelnalksnis marked this pull request as ready for review September 28, 2025 09:32
@VMelnalksnis VMelnalksnis merged commit d0d618f into master Sep 28, 2025
6 checks passed
@VMelnalksnis VMelnalksnis deleted the document-types branch September 28, 2025 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add methods for document types API

2 participants