Commit Graph

26 Commits

Author SHA1 Message Date
307c81001a Update project version to 1.4.0-beta
Updated the `DigitalData.TaskFlow.API` project version from `1.3.0-beta` to `1.4.0-beta`. This includes updates to the `FileVersion` and `AssemblyVersion` from `1.3.0.0` to `1.4.0.0`, reflecting a new release with potential new features, improvements, or fixes.
2026-11-09 16:15:17 +01:00
9c5346213e Add GetAuthorizedUsersQuery and UsersController
Introduced the `GetAuthorizedUsersQuery` feature to retrieve
authorized users, including the query, result, metadata, and
handler implementation. The handler interacts with the
`IUserRepository` to fetch user data.

Added a new `UsersController` with an `[HttpGet("authorized")]`
endpoint to expose the query via a RESTful API. The endpoint
returns appropriate HTTP status codes (`200 OK`, `401
Unauthorized`, `500 Internal Server Error`) based on the
result metadata.

Included necessary `using` directives for MediatR, ASP.NET
Core, and application features.
2026-11-09 15:59:09 +01:00
6ec2187361 Update project version to 1.3.0-beta
Updated the `DigitalData.TaskFlow.API` project version from `1.2.0-beta` to `1.3.0-beta`. This includes updates to the `FileVersion` and `AssemblyVersion` from `1.2.0.0` to `1.3.0.0`, reflecting a new release with potential new features, improvements, or changes.
2026-11-09 15:01:56 +01:00
8c6102d161 Refactor workflow closure logic and enhance API
Updated `CloseWorkflowCommand` to use nullable `Code` and `Message` properties for better result representation. Refactored `CloseWorkflowCommandHandler` to use a capitalized `Repo` and improved exception handling with `InvalidWorkflowPayloadException`. Enhanced `WorkflowsController` by implementing the `CloseAsync` method, which now processes `CloseWorkflowReqBody` and returns appropriate HTTP status codes. Updated XML documentation for clarity.
2026-11-04 10:07:33 +01:00
3c3744c0ce Add CloseWorkflowReqBody and CloseWorkflowReqResponse
Introduce two new classes in the DigitalData.TaskFlow.API.Models namespace to handle workflow closure requests and responses.

- CloseWorkflowReqBody.cs:
  - Added CloseWorkflowReqBody class with properties:
    - ClosingMethodId: int, mapped to "closing_method_id".
    - Comment: nullable string.
    - RejectionReasonId: nullable byte, mapped to "rejection_reason_id".

- CloseWorkflowReqResponse.cs:
  - Added CloseWorkflowReqResponse class with Meta property:
    - Meta: List of CloseWorkflowResult, initialized to an empty list.
2026-11-04 10:07:03 +01:00
f3784d24bd Set API key in appsettings for all environments
Updated the `appsettings.Development.json` and `appsettings.json` files to replace the `ApiKey` value from `null` to `"jGXP7m536fnyTVCh4NROu1wgjaSOrJ5"`. This ensures that a specific API key is used in both development and production environments.
2026-10-31 22:56:32 +01:00
7d032c4a2c Update project version to 1.2.0-beta
The versioning information for the `DigitalData.TaskFlow.API` project has been updated. The `<Version>`, `<FileVersion>`, and `<AssemblyVersion>` elements have been incremented from `1.1.0-beta` to `1.2.0-beta`, and from `1.1.0.0` to `1.2.0.0` respectively. This minor version update likely includes new features or improvements that maintain backward compatibility.
2026-10-31 21:26:20 +01:00
1a6baef807 Add new endpoint and improve exception handling
Removed the `asByte` parameter from XML documentation in `DocumentController.cs`, indicating the method no longer supports byte array returns. Added a new HTTP POST endpoint `CloseAsync` in `WorkflowsController.cs`, which is currently not implemented and throws a `NotImplementedException`. Enhanced `ExceptionHandlingMiddleware.cs` to handle `NotImplementedException` by logging a warning and returning a `501 Not Implemented` response in a problem details format.
2026-10-31 21:25:49 +01:00
893b063ae9 refactor(api): update document endpoints and middleware contracts 2026-10-31 17:09:33 +01:00
569bf360e6 Update project version to 1.1.0
The versioning information for the DigitalData.TaskFlow.API project has been updated. The <Version>, <FileVersion>, and <AssemblyVersion> elements have been incremented from 1.0.0-beta, 1.0.0.0, and 1.0.0.0 respectively to 1.1.0-beta, 1.1.0.0, and 1.1.0.0. This indicates a minor version update, suggesting that new features or improvements have been added to the project while maintaining backward compatibility.
2026-10-26 11:46:37 +01:00
232491d4ac Update development ports in launchSettings.json
Updated the `applicationUrl` property in the `https` profile of
`launchSettings.json` to use new ports:
- Changed `https://localhost:7049` to `https://localhost:7050`
- Changed `http://localhost:5298` to `http://localhost:5299`

This ensures the application runs on the updated ports during
development.
2026-10-20 11:21:46 +02:00
d07bc2418b Add API key authentication middleware support
Introduced `ApiKeyAuthOptions` for API key configuration,
including a `Key` property and `SectionName` for binding.
Updated `ApiKeyAuthMiddleware` to validate the `X-Api-Key`
header against the configured API key.

Added conditional middleware application in `Program.cs`
based on the presence of a configured API key. Bound the
`ApiKey` section in `appsettings.json` and
`appsettings.Development.json` to store the API key, with
a default value of `null`. This improves security and
centralizes API key management.
2026-10-20 11:21:18 +02:00
048456ddc7 Ignore IISProfileNet8.pubxml.user and remove its content
Updated the `.gitignore` file to exclude the `IISProfileNet8.pubxml.user` file from version control. Removed the `IISProfileNet8.pubxml.user` file entirely, which contained environment-specific configuration details such as a `History` property with timestamps and an empty `LastFailureDetails` property. This change prevents sensitive or local configuration data from being tracked in the repository.
2026-10-12 09:02:05 +02:00
b57de5a97d Add metadata and XML doc generation to project
Enhanced the project configuration by enabling XML documentation file generation with the `<GenerateDocumentationFile>` property. Added metadata properties such as `<PackageId>`, `<Authors>`, `<Company>`, `<Product>`, and versioning details to prepare the project for packaging and distribution. Configured the `<DocumentationFile>` property to specify the output path for the generated documentation.
2026-10-10 21:21:03 +02:00
2513d0f5b6 Add IIS publish profiles and update project file
Added `IISProfileNet8.pubxml` to define publish settings for the
application, including target framework `net8.0`, runtime
identifier `win-x64`, and deployment configuration for IIS.

Included `IISProfileNet8.pubxml.user` for user-specific metadata
such as publish history. Updated `DigitalData.TaskFlow.API.csproj`
to track the `.user` file under the `<None>` item group.
2026-10-10 21:18:49 +02:00
70e82567d8 Refactor workflows and improve API responses
- Added `BackToPerMethodId` constant and updated validation rules in `CloseWorkflowCommandValidator`.
- Refactored `GetWorkflowsQueryHandler` for simpler `hasListingData` logic.
- Replaced strongly-typed properties with `JsonElement` in `ContractsSourceBlock` and `FerdinandSourceBlock`.
- Updated `WorkflowListingReadModel` to use smaller data types for efficiency.
- Refactored `WorkflowRepository` to use JSON-based data retrieval and parsing.
- Introduced `MetaOnlyResponse` and `WorkflowsResponse` for consistent API responses.
- Updated `DocumentsController` and `WorkflowsController` to use new response types.
- Added `ApiKeyAuthMiddleware` for API key validation and integrated it into the middleware pipeline.
- Refactored `ExceptionHandlingMiddleware` to use `MetaOnlyResponse` for error handling.
- Performed general cleanup and modernization for improved readability and maintainability.
2026-10-10 20:47:31 +02:00
600374a6f0 feat(api): integrate Serilog bootstrap and in-app log viewer 2026-10-10 16:53:37 +02:00
1754aa64a2 chore(api): configure Serilog settings and logging packages 2026-10-10 16:53:03 +02:00
1c2c9cf3b8 Remove Microsoft.OpenApi package reference
The `Microsoft.OpenApi` package reference (version 3.10.2) was removed from the `DigitalData.TaskFlow.API.csproj` file. This change suggests that the project no longer requires this dependency, potentially due to a shift in functionality or the use of an alternative library.
2026-10-10 16:26:48 +02:00
41d49e4b89 fix(api): fail fast on unexpected null document payload 2026-10-10 16:12:56 +02:00
c5a43ef2a0 feat(api): surface 403/404/409 responses via middleware and docs 2026-10-10 14:58:01 +02:00
3126f025be Add workflow and document APIs, middleware, and Swagger
Introduced `CloseWorkflowRequest` for closing workflows.
Added `DocumentsController` for document downloads and
`WorkflowsController` for workflow retrieval and closing.

Implemented `ExceptionHandlingMiddleware` for global exception
handling with structured API responses.

Enhanced Swagger configuration with metadata and production
support. Added `Scalar.AspNetCore` for API reference mapping.

Updated project dependencies and improved API documentation.
2026-10-10 13:50:26 +02:00
4fa57efca4 docs: add layer readmes for architecture boundaries 2026-10-09 23:06:49 +02:00
b0fd71e193 Add MediatR, FluentValidation, AutoMapper, and EF Core
Updated application and infrastructure layers to include MediatR, FluentValidation, AutoMapper, and Entity Framework Core.

- Added new dependencies to `DigitalData.TaskFlow.Application.csproj` and `DigitalData.TaskFlow.Infrastructure.csproj` for MediatR, FluentValidation, AutoMapper, and EF Core.
- Configured MediatR with options and license key support.
- Registered validators and AutoMapper profiles in the application layer.
- Introduced `MediatROptions` and `SwaggerOptions` for configuration.
- Updated `appsettings.json` with connection strings and configuration sections for MediatR and Swagger.
- Replaced placeholder comments in `DependencyInjection` classes with actual service registrations.
- Upgraded `Swashbuckle.AspNetCore` and added `FluentValidation.AspNetCore` for API validation.
2026-10-09 16:29:58 +02:00
ee107d74c4 Add DI setup for modular architecture
Introduced `DependencyInjection.cs` in Application and Infrastructure layers to centralize service registration. Updated project files to include necessary package references (`Microsoft.Extensions.Configuration.Abstractions` and `Microsoft.Extensions.DependencyInjection.Abstractions`) and project dependencies between layers. Integrated service registration in `Program.cs` to enable modular architecture for the API.
2026-10-09 15:24:17 +02:00
3c6d1b14de Add initial ASP.NET Core project structure
This commit introduces the initial setup for the DigitalData.TaskFlow solution:
- Added `DigitalData.TaskFlow.sln` to organize the project structure into `src`, `presentation`, `core`, and `infrastructure` folders.
- Created `DigitalData.TaskFlow.API` project targeting .NET 8.0 with nullable reference types and Swagger/OpenAPI support.
- Added `Program.cs` to configure the ASP.NET Core application with services, middleware, and Swagger UI.
- Added `launchSettings.json` for development profiles and environment variables.
- Added `appsettings.json` and `appsettings.Development.json` for logging and configuration.
2026-10-09 15:14:33 +02:00