-
-
Notifications
You must be signed in to change notification settings - Fork 5
Add client for document types #370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
✔️ 1db9c23...d0d618f - Conventional commits check succeeded. |
There was a problem hiding this 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
_pageSizewas set to 'taskId' instead of 'page_size', which is incorrect. This has been fixed by replacing it with the properPageSizeconstant, 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.
tests/VMelnalksnis.PaperlessDotNet.Tests/Filters/FilterExpressionTestCases.cs
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is 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. |
Fixes #7