Introduced `ZugferdController` to handle ZUGFeRD-related operations, including detection and extraction of ZUGFeRD XML from PDFs via file upload or Base64-encoded payloads. Integrated `MediatR` for query/command handling. Added `ZugferdSettings` for configurable file names and patterns, and updated `appsettings.json` and `Program.cs` to support this configuration. Implemented `HasZugferdQuery` and `ExtractZugferdCommand` with their respective handlers and validators. Added DTOs (`ZugferdCheckResult`, `ZugferdExtractionResult`) for operation results. Included `ZUGFeRD-Example.pdf` for testing and integrated `Serilog.Ui.Core.Extensions` for logging.
102 lines
3.1 KiB
JSON
102 lines
3.1 KiB
JSON
{
|
|
"Logging": {
|
|
"LogLevel": {
|
|
"Default": "Information",
|
|
"Microsoft.AspNetCore": "Warning"
|
|
}
|
|
},
|
|
"AllowedHosts": "*",
|
|
|
|
"Application": {
|
|
"LogDirectory": "E:\\LogFiles\\Digital Data\\DocumentOperator.API"
|
|
},
|
|
|
|
"SwaggerSettings": {
|
|
"EnableInProduction": true,
|
|
"Title": "DocumentOperator API",
|
|
"Version": "v1",
|
|
"Description": "PDF document processing service using DevExpress"
|
|
},
|
|
|
|
"Serilog": {
|
|
"MinimumLevel": {
|
|
"Default": "Information",
|
|
"Override": {
|
|
"Microsoft": "Warning",
|
|
"Microsoft.AspNetCore": "Warning",
|
|
"System": "Warning"
|
|
}
|
|
},
|
|
"WriteTo": [
|
|
{
|
|
"Name": "Console",
|
|
"Args": {
|
|
"outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj} {Properties:j}{NewLine}{Exception}"
|
|
}
|
|
},
|
|
{
|
|
"Name": "File",
|
|
"Args": {
|
|
"path": "Logs/log-.txt",
|
|
"rollingInterval": "Day",
|
|
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level:u3}] {Message:lj} {Properties:j}{NewLine}{Exception}"
|
|
}
|
|
},
|
|
{
|
|
"Name": "SQLite",
|
|
"Args": {
|
|
"sqliteDbPath": "E:\\LogFiles\\Digital Data\\DocumentOperator.API\\logs.db",
|
|
"tableName": "Logs",
|
|
"storeTimestampInUtc": true
|
|
}
|
|
}
|
|
],
|
|
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ]
|
|
},
|
|
|
|
"DocumentOperatorSettings": {
|
|
"TempFolderPath": "C:\\Temp\\DocumentOperator",
|
|
"TempFileRetentionHours": 24,
|
|
"MaxPdfSizeMB": 50,
|
|
"EnableDetailedLogging": true
|
|
},
|
|
|
|
"ZugferdSettings": {
|
|
"ZugferdFileNames": [
|
|
"factur-x.xml",
|
|
"zugferd-invoice.xml",
|
|
"ZUGFeRD-invoice.xml",
|
|
"xrechnung.xml",
|
|
"XRechnung.xml"
|
|
],
|
|
"ZugferdFileNamePatterns": [
|
|
"factur",
|
|
"zugferd",
|
|
"xrechnung",
|
|
"peppol"
|
|
]
|
|
},
|
|
|
|
"RedisSettings": {
|
|
"ConnectionString": "localhost:6379",
|
|
"InstanceName": "DocumentOperator:",
|
|
"CacheExpirationMinutes": 60
|
|
},
|
|
|
|
"ApiKeySettings": {
|
|
"EnableValidation": true,
|
|
"Keys": {
|
|
"customer-a-key-12345": {
|
|
"TenantId": "customer-a",
|
|
"TenantName": "Customer A GmbH",
|
|
"IsActive": true
|
|
},
|
|
"customer-b-key-67890": {
|
|
"TenantId": "customer-b",
|
|
"TenantName": "Customer B AG",
|
|
"IsActive": true
|
|
}
|
|
}
|
|
},
|
|
"LuckyPennySoftLicenseKey": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ikx1Y2t5UGVubnlTb2Z0d2FyZUxpY2Vuc2VLZXkvYmJiMTNhY2I1OTkwNGQ4OWI0Y2IxYzg1ZjA4OGNjZjkiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2x1Y2t5cGVubnlzb2Z0d2FyZS5jb20iLCJhdWQiOiJMdWNreVBlbm55U29mdHdhcmUiLCJleHAiOiIxODE2MTI4MDAwIiwiaWF0IjoiMTc4NDYyNDU1NyIsImFjY291bnRfaWQiOiIwMTk4M2M1OWU0YjM3MjhlYmZkMzEwM2MyYTQ4NmU4NSIsImN1c3RvbWVyX2lkIjoiMDE5ODNjNTllNGIzNzI4ZWJmZDMxMDNjMmE0ODZlODUiLCJzdWJfaWQiOiItIiwiZWRpdGlvbiI6IjAiLCJ0eXBlIjoiMiJ9.IUUO926m9crYGYxMjjKD_n9BnUm-EDyjFIn0YmMUCo7C-QTwvB8WhXP8veTSFsBq-leIIDJ4jyl7Pgc_7ciwg1XhUSIs4mkQroEUaSFCGOxw7Pi41WM8MK5YFSaqLTYYXec9zxgiJbGzABbh3CHTSup3okGnVm_CMoPEs91l2c0A6N1JyZy74urd_tF0KGVKf0MOvzdlQIWLQ8o73S4pTv2N-F6UlzI0fdMtTHMLNNQyr0NdWdnuBk_jMBXO-gy5RE_oCRfMTTYRX2n3XLK6pTfXE0Ct338o9F5sH8Ph2lTXSu56cpdsfZOQZGqCH0LoFp1Dd7RJgIgNmBiTGfvDnA"
|
|
} |