cc nasazeni
This commit is contained in:
@@ -0,0 +1,27 @@
|
|||||||
|
using System.Net;
|
||||||
|
using IdokladSdk.Response;
|
||||||
|
|
||||||
|
namespace Idoklad.Client;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Helpers that unwrap the SDK's <see cref="ApiResult{TData}"/> envelope, returning the payload
|
||||||
|
/// on success and translating failures into <see cref="IdokladApiException"/>.
|
||||||
|
/// </summary>
|
||||||
|
public static class ApiResultExtensions
|
||||||
|
{
|
||||||
|
public static TData Unwrap<TData>(this ApiResult<TData> result)
|
||||||
|
{
|
||||||
|
if (result is null)
|
||||||
|
{
|
||||||
|
throw new IdokladApiException(HttpStatusCode.BadGateway, default, "Empty response from iDoklad API.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!result.IsSuccess)
|
||||||
|
{
|
||||||
|
var status = result.StatusCode == 0 ? HttpStatusCode.BadGateway : result.StatusCode;
|
||||||
|
throw new IdokladApiException(status, result.ErrorCode, result.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.Data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
using IdokladSdk;
|
||||||
|
using IdokladSdk.Builders;
|
||||||
|
using Idoklad.Configuration;
|
||||||
|
using Idoklad.Credentials;
|
||||||
|
|
||||||
|
namespace Idoklad.Client;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Builds <see cref="DokladApi"/> instances from resolved per-request credentials, using the
|
||||||
|
/// official iDoklad .NET SDK (IdokladSdk) and an <see cref="IHttpClientFactory"/>-managed
|
||||||
|
/// <see cref="HttpClient"/>. This is the iDoklad analogue of microsoft-365-service's graph_client.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class DokladApiFactory
|
||||||
|
{
|
||||||
|
public const string HttpClientName = "IdokladApi";
|
||||||
|
|
||||||
|
private readonly IHttpClientFactory _httpClientFactory;
|
||||||
|
private readonly IdokladSettings _settings;
|
||||||
|
|
||||||
|
public DokladApiFactory(IHttpClientFactory httpClientFactory, IdokladSettings settings)
|
||||||
|
{
|
||||||
|
_httpClientFactory = httpClientFactory;
|
||||||
|
_settings = settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DokladApi Create(IdokladCredentials credentials)
|
||||||
|
{
|
||||||
|
var httpClient = _httpClientFactory.CreateClient(HttpClientName);
|
||||||
|
|
||||||
|
var builder = new DokladApiBuilder(_settings.AppName, _settings.AppVersion)
|
||||||
|
.AddClientCredentialsAuthentication(credentials.ClientId, credentials.ClientSecret, credentials.ApplicationId)
|
||||||
|
.AddHttpClient(httpClient)
|
||||||
|
.AddApiContextOptions(options => options.Language = credentials.Language);
|
||||||
|
|
||||||
|
if (_settings.HasCustomUrls)
|
||||||
|
{
|
||||||
|
builder = builder.AddCustomApiUrls(_settings.ApiUrl, _settings.IdentityServerUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
return builder.Build();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using IdokladSdk;
|
||||||
|
using Idoklad.Credentials;
|
||||||
|
|
||||||
|
namespace Idoklad.Client;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Scoped accessor that resolves the credentials for the current request and lazily builds a
|
||||||
|
/// single <see cref="DokladApi"/> shared by all services handling that request.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class IdokladApiAccessor
|
||||||
|
{
|
||||||
|
private readonly RequestCredentialsProvider _credentialsProvider;
|
||||||
|
private readonly DokladApiFactory _factory;
|
||||||
|
private DokladApi? _api;
|
||||||
|
|
||||||
|
public IdokladApiAccessor(RequestCredentialsProvider credentialsProvider, DokladApiFactory factory)
|
||||||
|
{
|
||||||
|
_credentialsProvider = credentialsProvider;
|
||||||
|
_factory = factory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DokladApi Api => _api ??= _factory.Create(_credentialsProvider.Resolve());
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using System.Net;
|
||||||
|
using IdokladSdk.Enums;
|
||||||
|
|
||||||
|
namespace Idoklad.Client;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raised when an upstream iDoklad API call does not succeed. Carries the upstream HTTP status
|
||||||
|
/// code, message and iDoklad error code so the failure can be surfaced to the caller.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class IdokladApiException : Exception
|
||||||
|
{
|
||||||
|
public HttpStatusCode StatusCode { get; }
|
||||||
|
public DokladErrorCode ErrorCode { get; }
|
||||||
|
|
||||||
|
public IdokladApiException(HttpStatusCode statusCode, DokladErrorCode errorCode, string? message)
|
||||||
|
: base(string.IsNullOrWhiteSpace(message) ? "iDoklad API request failed." : message)
|
||||||
|
{
|
||||||
|
StatusCode = statusCode;
|
||||||
|
ErrorCode = errorCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
using IdokladSdk.Enums;
|
||||||
|
|
||||||
|
namespace Idoklad.Configuration;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Service configuration resolved from environment variables.
|
||||||
|
///
|
||||||
|
/// Mirrors the structure used by the sibling microsoft-365-service (config.py): non-secret
|
||||||
|
/// configuration and credential defaults live in environment variables. Per-request callers
|
||||||
|
/// can override the credential values through request headers (see
|
||||||
|
/// <see cref="Credentials.RequestCredentialsProvider"/>).
|
||||||
|
/// </summary>
|
||||||
|
public sealed class IdokladSettings
|
||||||
|
{
|
||||||
|
public string AppName { get; init; } = GetEnv("APP_NAME", "iDoklad Service");
|
||||||
|
public string AppVersion { get; init; } = GetEnv("APP_VERSION", "1.0.0");
|
||||||
|
public string RootPath { get; init; } = GetEnv("ROOT_PATH", string.Empty);
|
||||||
|
|
||||||
|
/// <summary>Default iDoklad OAuth2 client id (client credentials flow).</summary>
|
||||||
|
public string ClientId { get; init; } = GetEnv("IDOKLAD_CLIENT_ID", string.Empty);
|
||||||
|
|
||||||
|
/// <summary>Default iDoklad OAuth2 client secret (client credentials flow).</summary>
|
||||||
|
public string ClientSecret { get; init; } = GetEnv("IDOKLAD_CLIENT_SECRET", string.Empty);
|
||||||
|
|
||||||
|
/// <summary>Default iDoklad application id from the developer portal (required by client credentials flow).</summary>
|
||||||
|
public string ApplicationId { get; init; } = GetEnv("IDOKLAD_APPLICATION_ID", string.Empty);
|
||||||
|
|
||||||
|
/// <summary>Optional custom iDoklad API base url (defaults to the SDK production url when empty).</summary>
|
||||||
|
public string ApiUrl { get; init; } = GetEnv("IDOKLAD_API_URL", string.Empty);
|
||||||
|
|
||||||
|
/// <summary>Optional custom Identity Server token url (defaults to the SDK production url when empty).</summary>
|
||||||
|
public string IdentityServerUrl { get; init; } = GetEnv("IDOKLAD_IDENTITY_URL", string.Empty);
|
||||||
|
|
||||||
|
/// <summary>Default response language for the iDoklad API (Cz, Sk, En). Defaults to Cz.</summary>
|
||||||
|
public Language Language { get; init; } = ParseLanguage(GetEnv("IDOKLAD_LANGUAGE", "Cz"));
|
||||||
|
|
||||||
|
public int RequestTimeoutSeconds { get; init; } = ParseInt(GetEnv("IDOKLAD_REQUEST_TIMEOUT_SECONDS", "100"), 100);
|
||||||
|
|
||||||
|
/// <summary>True when both custom urls are configured (e.g. for a sandbox environment).</summary>
|
||||||
|
public bool HasCustomUrls => !string.IsNullOrWhiteSpace(ApiUrl) && !string.IsNullOrWhiteSpace(IdentityServerUrl);
|
||||||
|
|
||||||
|
/// <summary>True when the default credential triplet is fully configured via environment variables.</summary>
|
||||||
|
public bool HasDefaultCredentials =>
|
||||||
|
!string.IsNullOrWhiteSpace(ClientId)
|
||||||
|
&& !string.IsNullOrWhiteSpace(ClientSecret)
|
||||||
|
&& !string.IsNullOrWhiteSpace(ApplicationId);
|
||||||
|
|
||||||
|
private static string GetEnv(string name, string fallback)
|
||||||
|
{
|
||||||
|
var value = Environment.GetEnvironmentVariable(name);
|
||||||
|
return string.IsNullOrWhiteSpace(value) ? fallback : value;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int ParseInt(string value, int fallback) =>
|
||||||
|
int.TryParse(value, out var parsed) && parsed > 0 ? parsed : fallback;
|
||||||
|
|
||||||
|
private static Language ParseLanguage(string value) =>
|
||||||
|
Enum.TryParse<Language>(value, ignoreCase: true, out var parsed) ? parsed : Language.Cz;
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Idoklad.Services;
|
||||||
|
|
||||||
|
namespace Idoklad.Controllers;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Account agenda: the current agenda (company) and current user. Requires iDoklad credentials
|
||||||
|
/// (headers or environment defaults).
|
||||||
|
/// </summary>
|
||||||
|
[ApiController]
|
||||||
|
[Route("account")]
|
||||||
|
[Produces("application/json")]
|
||||||
|
[Tags("Account")]
|
||||||
|
public sealed class AccountController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly AccountService _service;
|
||||||
|
|
||||||
|
public AccountController(AccountService service) => _service = service;
|
||||||
|
|
||||||
|
/// <summary>Get information about the current agenda (company).</summary>
|
||||||
|
[HttpGet("agenda")]
|
||||||
|
public async Task<IActionResult> Agenda(CancellationToken ct)
|
||||||
|
=> Ok(await _service.CurrentAgendaAsync(ct));
|
||||||
|
|
||||||
|
/// <summary>Get information about the current user.</summary>
|
||||||
|
[HttpGet("user")]
|
||||||
|
public async Task<IActionResult> CurrentUser(CancellationToken ct)
|
||||||
|
=> Ok(await _service.CurrentUserAsync(ct));
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
using IdokladSdk.Models.Contact;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Idoklad.Services;
|
||||||
|
|
||||||
|
namespace Idoklad.Controllers;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Contacts (customers/suppliers) agenda.
|
||||||
|
///
|
||||||
|
/// All endpoints require iDoklad credentials. Provide them as request headers
|
||||||
|
/// (<c>X-ClientId</c>, <c>X-ClientSecret</c>, <c>X-ApplicationId</c>) or rely on the service
|
||||||
|
/// environment defaults. See the Swagger description for details.
|
||||||
|
/// </summary>
|
||||||
|
[ApiController]
|
||||||
|
[Route("contacts")]
|
||||||
|
[Produces("application/json")]
|
||||||
|
[Tags("Contacts")]
|
||||||
|
public sealed class ContactsController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly ContactsService _service;
|
||||||
|
|
||||||
|
public ContactsController(ContactsService service) => _service = service;
|
||||||
|
|
||||||
|
/// <summary>List contacts (paged).</summary>
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<IActionResult> List([FromQuery] int page = 1, [FromQuery] int pageSize = 20, CancellationToken ct = default)
|
||||||
|
=> Ok(await _service.ListAsync(page, pageSize, ct));
|
||||||
|
|
||||||
|
/// <summary>Get a contact detail by id.</summary>
|
||||||
|
[HttpGet("{id:int}")]
|
||||||
|
public async Task<IActionResult> Detail(int id, CancellationToken ct)
|
||||||
|
=> Ok(await _service.DetailAsync(id, ct));
|
||||||
|
|
||||||
|
/// <summary>Get a pre-filled default contact model for creating a new contact.</summary>
|
||||||
|
[HttpGet("default")]
|
||||||
|
public async Task<IActionResult> Default(CancellationToken ct)
|
||||||
|
=> Ok(await _service.DefaultAsync(ct));
|
||||||
|
|
||||||
|
/// <summary>Create a new contact.</summary>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IActionResult> Create([FromBody] ContactPostModel model, CancellationToken ct)
|
||||||
|
=> Ok(await _service.CreateAsync(model, ct));
|
||||||
|
|
||||||
|
/// <summary>Update an existing contact (the model id identifies the contact).</summary>
|
||||||
|
[HttpPatch]
|
||||||
|
public async Task<IActionResult> Update([FromBody] ContactPatchModel model, CancellationToken ct)
|
||||||
|
=> Ok(await _service.UpdateAsync(model, ct));
|
||||||
|
|
||||||
|
/// <summary>Delete a contact by id.</summary>
|
||||||
|
[HttpDelete("{id:int}")]
|
||||||
|
public async Task<IActionResult> Delete(int id, CancellationToken ct)
|
||||||
|
=> Ok(await _service.DeleteAsync(id, ct));
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
using IdokladSdk.Models.IssuedInvoice;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Idoklad.Services;
|
||||||
|
|
||||||
|
namespace Idoklad.Controllers;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Issued (outgoing) invoices agenda. Requires iDoklad credentials (headers or environment
|
||||||
|
/// defaults).
|
||||||
|
/// </summary>
|
||||||
|
[ApiController]
|
||||||
|
[Route("issued-invoices")]
|
||||||
|
[Produces("application/json")]
|
||||||
|
[Tags("IssuedInvoices")]
|
||||||
|
public sealed class IssuedInvoicesController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly IssuedInvoicesService _service;
|
||||||
|
|
||||||
|
public IssuedInvoicesController(IssuedInvoicesService service) => _service = service;
|
||||||
|
|
||||||
|
/// <summary>List issued invoices (paged).</summary>
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<IActionResult> List([FromQuery] int page = 1, [FromQuery] int pageSize = 20, CancellationToken ct = default)
|
||||||
|
=> Ok(await _service.ListAsync(page, pageSize, ct));
|
||||||
|
|
||||||
|
/// <summary>Get an issued invoice detail by id.</summary>
|
||||||
|
[HttpGet("{id:int}")]
|
||||||
|
public async Task<IActionResult> Detail(int id, CancellationToken ct)
|
||||||
|
=> Ok(await _service.DetailAsync(id, ct));
|
||||||
|
|
||||||
|
/// <summary>Get a pre-filled default model for creating a new issued invoice.</summary>
|
||||||
|
[HttpGet("default")]
|
||||||
|
public async Task<IActionResult> Default(CancellationToken ct)
|
||||||
|
=> Ok(await _service.DefaultAsync(ct));
|
||||||
|
|
||||||
|
/// <summary>Create a new issued invoice.</summary>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IActionResult> Create([FromBody] IssuedInvoicePostModel model, CancellationToken ct)
|
||||||
|
=> Ok(await _service.CreateAsync(model, ct));
|
||||||
|
|
||||||
|
/// <summary>Update an existing issued invoice (the model id identifies the invoice).</summary>
|
||||||
|
[HttpPatch]
|
||||||
|
public async Task<IActionResult> Update([FromBody] IssuedInvoicePatchModel model, CancellationToken ct)
|
||||||
|
=> Ok(await _service.UpdateAsync(model, ct));
|
||||||
|
|
||||||
|
/// <summary>Create a copy (draft) of an existing issued invoice.</summary>
|
||||||
|
[HttpPost("{id:int}/copy")]
|
||||||
|
public async Task<IActionResult> Copy(int id, CancellationToken ct)
|
||||||
|
=> Ok(await _service.CopyAsync(id, ct));
|
||||||
|
|
||||||
|
/// <summary>Delete an issued invoice by id.</summary>
|
||||||
|
[HttpDelete("{id:int}")]
|
||||||
|
public async Task<IActionResult> Delete(int id, CancellationToken ct)
|
||||||
|
=> Ok(await _service.DeleteAsync(id, ct));
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Idoklad.Configuration;
|
||||||
|
|
||||||
|
namespace Idoklad.Controllers;
|
||||||
|
|
||||||
|
/// <summary>Service metadata endpoints. These do not require iDoklad credentials.</summary>
|
||||||
|
[ApiController]
|
||||||
|
[Produces("application/json")]
|
||||||
|
[Tags("Meta")]
|
||||||
|
public sealed class MetaController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly IdokladSettings _settings;
|
||||||
|
|
||||||
|
public MetaController(IdokladSettings settings) => _settings = settings;
|
||||||
|
|
||||||
|
/// <summary>Liveness probe.</summary>
|
||||||
|
[HttpGet("/health")]
|
||||||
|
public IActionResult Health() => Ok(new { status = "ok" });
|
||||||
|
|
||||||
|
/// <summary>Service name, version and language.</summary>
|
||||||
|
[HttpGet("/version")]
|
||||||
|
public IActionResult Version() => Ok(new
|
||||||
|
{
|
||||||
|
app = _settings.AppName,
|
||||||
|
version = _settings.AppVersion,
|
||||||
|
language = "dotnet",
|
||||||
|
sdk = "IdokladSdk 5.3.0",
|
||||||
|
root_path = _settings.RootPath,
|
||||||
|
});
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reports whether the service has default iDoklad credentials configured through
|
||||||
|
/// environment variables. Per-request callers can always override them with headers.
|
||||||
|
/// </summary>
|
||||||
|
[HttpGet("/status")]
|
||||||
|
public IActionResult Status() => Ok(new
|
||||||
|
{
|
||||||
|
default_credentials_configured = _settings.HasDefaultCredentials,
|
||||||
|
client_id = !string.IsNullOrWhiteSpace(_settings.ClientId),
|
||||||
|
client_secret = !string.IsNullOrWhiteSpace(_settings.ClientSecret),
|
||||||
|
application_id = !string.IsNullOrWhiteSpace(_settings.ApplicationId),
|
||||||
|
custom_urls = _settings.HasCustomUrls,
|
||||||
|
idoklad_language = _settings.Language.ToString(),
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
using IdokladSdk.Models.ReceivedInvoice;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Idoklad.Services;
|
||||||
|
|
||||||
|
namespace Idoklad.Controllers;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Received (incoming) invoices agenda. Requires iDoklad credentials (headers or environment
|
||||||
|
/// defaults).
|
||||||
|
/// </summary>
|
||||||
|
[ApiController]
|
||||||
|
[Route("received-invoices")]
|
||||||
|
[Produces("application/json")]
|
||||||
|
[Tags("ReceivedInvoices")]
|
||||||
|
public sealed class ReceivedInvoicesController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly ReceivedInvoicesService _service;
|
||||||
|
|
||||||
|
public ReceivedInvoicesController(ReceivedInvoicesService service) => _service = service;
|
||||||
|
|
||||||
|
/// <summary>List received invoices (paged).</summary>
|
||||||
|
[HttpGet]
|
||||||
|
public async Task<IActionResult> List([FromQuery] int page = 1, [FromQuery] int pageSize = 20, CancellationToken ct = default)
|
||||||
|
=> Ok(await _service.ListAsync(page, pageSize, ct));
|
||||||
|
|
||||||
|
/// <summary>Get a received invoice detail by id.</summary>
|
||||||
|
[HttpGet("{id:int}")]
|
||||||
|
public async Task<IActionResult> Detail(int id, CancellationToken ct)
|
||||||
|
=> Ok(await _service.DetailAsync(id, ct));
|
||||||
|
|
||||||
|
/// <summary>Get a pre-filled default model for creating a new received invoice.</summary>
|
||||||
|
[HttpGet("default")]
|
||||||
|
public async Task<IActionResult> Default(CancellationToken ct)
|
||||||
|
=> Ok(await _service.DefaultAsync(ct));
|
||||||
|
|
||||||
|
/// <summary>Create a new received invoice.</summary>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IActionResult> Create([FromBody] ReceivedInvoicePostModel model, CancellationToken ct)
|
||||||
|
=> Ok(await _service.CreateAsync(model, ct));
|
||||||
|
|
||||||
|
/// <summary>Update an existing received invoice (the model id identifies the invoice).</summary>
|
||||||
|
[HttpPatch]
|
||||||
|
public async Task<IActionResult> Update([FromBody] ReceivedInvoicePatchModel model, CancellationToken ct)
|
||||||
|
=> Ok(await _service.UpdateAsync(model, ct));
|
||||||
|
|
||||||
|
/// <summary>Delete a received invoice by id.</summary>
|
||||||
|
[HttpDelete("{id:int}")]
|
||||||
|
public async Task<IActionResult> Delete(int id, CancellationToken ct)
|
||||||
|
=> Ok(await _service.DeleteAsync(id, ct));
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
using IdokladSdk.Models.BankAccount;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Idoklad.Services;
|
||||||
|
|
||||||
|
namespace Idoklad.Controllers;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Supporting registers: bank accounts, VAT rates and numeric sequences. Requires iDoklad
|
||||||
|
/// credentials (headers or environment defaults).
|
||||||
|
/// </summary>
|
||||||
|
[ApiController]
|
||||||
|
[Route("registers")]
|
||||||
|
[Produces("application/json")]
|
||||||
|
[Tags("Registers")]
|
||||||
|
public sealed class RegistersController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly RegistersService _service;
|
||||||
|
|
||||||
|
public RegistersController(RegistersService service) => _service = service;
|
||||||
|
|
||||||
|
// ---- Bank accounts ----
|
||||||
|
|
||||||
|
/// <summary>List bank accounts (paged).</summary>
|
||||||
|
[HttpGet("bank-accounts")]
|
||||||
|
public async Task<IActionResult> ListBankAccounts([FromQuery] int page = 1, [FromQuery] int pageSize = 20, CancellationToken ct = default)
|
||||||
|
=> Ok(await _service.ListBankAccountsAsync(page, pageSize, ct));
|
||||||
|
|
||||||
|
/// <summary>Get a bank account detail by id.</summary>
|
||||||
|
[HttpGet("bank-accounts/{id:int}")]
|
||||||
|
public async Task<IActionResult> BankAccountDetail(int id, CancellationToken ct)
|
||||||
|
=> Ok(await _service.BankAccountDetailAsync(id, ct));
|
||||||
|
|
||||||
|
/// <summary>Create a new bank account.</summary>
|
||||||
|
[HttpPost("bank-accounts")]
|
||||||
|
public async Task<IActionResult> CreateBankAccount([FromBody] BankAccountPostModel model, CancellationToken ct)
|
||||||
|
=> Ok(await _service.CreateBankAccountAsync(model, ct));
|
||||||
|
|
||||||
|
/// <summary>Update an existing bank account (the model id identifies the account).</summary>
|
||||||
|
[HttpPatch("bank-accounts")]
|
||||||
|
public async Task<IActionResult> UpdateBankAccount([FromBody] BankAccountPatchModel model, CancellationToken ct)
|
||||||
|
=> Ok(await _service.UpdateBankAccountAsync(model, ct));
|
||||||
|
|
||||||
|
/// <summary>Delete a bank account by id.</summary>
|
||||||
|
[HttpDelete("bank-accounts/{id:int}")]
|
||||||
|
public async Task<IActionResult> DeleteBankAccount(int id, CancellationToken ct)
|
||||||
|
=> Ok(await _service.DeleteBankAccountAsync(id, ct));
|
||||||
|
|
||||||
|
// ---- VAT rates (read-only) ----
|
||||||
|
|
||||||
|
/// <summary>List VAT rates (paged).</summary>
|
||||||
|
[HttpGet("vat-rates")]
|
||||||
|
public async Task<IActionResult> ListVatRates([FromQuery] int page = 1, [FromQuery] int pageSize = 20, CancellationToken ct = default)
|
||||||
|
=> Ok(await _service.ListVatRatesAsync(page, pageSize, ct));
|
||||||
|
|
||||||
|
/// <summary>Get a VAT rate detail by id.</summary>
|
||||||
|
[HttpGet("vat-rates/{id:int}")]
|
||||||
|
public async Task<IActionResult> VatRateDetail(int id, CancellationToken ct)
|
||||||
|
=> Ok(await _service.VatRateDetailAsync(id, ct));
|
||||||
|
|
||||||
|
// ---- Numeric sequences (read-only) ----
|
||||||
|
|
||||||
|
/// <summary>List numeric (document) sequences (paged).</summary>
|
||||||
|
[HttpGet("numeric-sequences")]
|
||||||
|
public async Task<IActionResult> ListNumericSequences([FromQuery] int page = 1, [FromQuery] int pageSize = 20, CancellationToken ct = default)
|
||||||
|
=> Ok(await _service.ListNumericSequencesAsync(page, pageSize, ct));
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
namespace Idoklad.Credentials;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Names of the HTTP headers that carry per-request iDoklad credentials.
|
||||||
|
///
|
||||||
|
/// Secrets are never accepted in the query string or request body: they are required in
|
||||||
|
/// request headers (and documented as such in Swagger). Each header carries the credential
|
||||||
|
/// value directly and must therefore only be sent over TLS.
|
||||||
|
/// </summary>
|
||||||
|
public static class CredentialConstants
|
||||||
|
{
|
||||||
|
public const string ClientIdHeader = "X-ClientId";
|
||||||
|
public const string ClientSecretHeader = "X-ClientSecret";
|
||||||
|
public const string ApplicationIdHeader = "X-ApplicationId";
|
||||||
|
|
||||||
|
/// <summary>Header carrying the response language override (Cz, Sk, En).</summary>
|
||||||
|
public const string LanguageHeader = "X-Idoklad-Language";
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using IdokladSdk.Enums;
|
||||||
|
|
||||||
|
namespace Idoklad.Credentials;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fully resolved set of credentials and request options used to build a <c>DokladApi</c>
|
||||||
|
/// instance for a single request.
|
||||||
|
/// </summary>
|
||||||
|
public sealed record IdokladCredentials
|
||||||
|
{
|
||||||
|
public required string ClientId { get; init; }
|
||||||
|
public required string ClientSecret { get; init; }
|
||||||
|
public required string ApplicationId { get; init; }
|
||||||
|
public required Language Language { get; init; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
namespace Idoklad.Credentials;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Raised when the request does not provide a complete set of iDoklad credentials,
|
||||||
|
/// neither through request headers nor through the service environment defaults.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class MissingCredentialsException : Exception
|
||||||
|
{
|
||||||
|
public IReadOnlyList<string> MissingHeaders { get; }
|
||||||
|
|
||||||
|
public MissingCredentialsException(IReadOnlyList<string> missingHeaders)
|
||||||
|
: base("Incomplete iDoklad credentials. Provide the missing values as request headers or configure the service defaults.")
|
||||||
|
{
|
||||||
|
MissingHeaders = missingHeaders;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
using IdokladSdk.Enums;
|
||||||
|
using Idoklad.Configuration;
|
||||||
|
|
||||||
|
namespace Idoklad.Credentials;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Resolves the iDoklad credentials for the current request.
|
||||||
|
///
|
||||||
|
/// Mirrors <c>get_request_settings</c> from the sibling microsoft-365-service: each credential
|
||||||
|
/// value is taken from its request header when present and otherwise falls back to the
|
||||||
|
/// environment-configured default. Secrets are only ever read from headers (never query/body).
|
||||||
|
/// If, after applying the fallbacks, any required value is still missing, the request is rejected.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class RequestCredentialsProvider
|
||||||
|
{
|
||||||
|
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||||
|
private readonly IdokladSettings _settings;
|
||||||
|
|
||||||
|
public RequestCredentialsProvider(IHttpContextAccessor httpContextAccessor, IdokladSettings settings)
|
||||||
|
{
|
||||||
|
_httpContextAccessor = httpContextAccessor;
|
||||||
|
_settings = settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IdokladCredentials Resolve()
|
||||||
|
{
|
||||||
|
var headers = _httpContextAccessor.HttpContext?.Request.Headers;
|
||||||
|
|
||||||
|
var clientId = HeaderOrDefault(headers, CredentialConstants.ClientIdHeader, _settings.ClientId);
|
||||||
|
var clientSecret = HeaderOrDefault(headers, CredentialConstants.ClientSecretHeader, _settings.ClientSecret);
|
||||||
|
var applicationId = HeaderOrDefault(headers, CredentialConstants.ApplicationIdHeader, _settings.ApplicationId);
|
||||||
|
|
||||||
|
var missing = new List<string>();
|
||||||
|
if (string.IsNullOrWhiteSpace(clientId)) missing.Add(CredentialConstants.ClientIdHeader);
|
||||||
|
if (string.IsNullOrWhiteSpace(clientSecret)) missing.Add(CredentialConstants.ClientSecretHeader);
|
||||||
|
if (string.IsNullOrWhiteSpace(applicationId)) missing.Add(CredentialConstants.ApplicationIdHeader);
|
||||||
|
if (missing.Count > 0)
|
||||||
|
{
|
||||||
|
throw new MissingCredentialsException(missing);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new IdokladCredentials
|
||||||
|
{
|
||||||
|
ClientId = clientId!,
|
||||||
|
ClientSecret = clientSecret!,
|
||||||
|
ApplicationId = applicationId!,
|
||||||
|
Language = ResolveLanguage(headers),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private Language ResolveLanguage(IHeaderDictionary? headers)
|
||||||
|
{
|
||||||
|
var raw = headers is not null && headers.TryGetValue(CredentialConstants.LanguageHeader, out var value)
|
||||||
|
? value.ToString()
|
||||||
|
: null;
|
||||||
|
|
||||||
|
return Enum.TryParse<Language>(raw, ignoreCase: true, out var parsed) ? parsed : _settings.Language;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string? HeaderOrDefault(IHeaderDictionary? headers, string name, string fallback)
|
||||||
|
{
|
||||||
|
if (headers is not null && headers.TryGetValue(name, out var value))
|
||||||
|
{
|
||||||
|
var headerValue = value.ToString();
|
||||||
|
if (!string.IsNullOrWhiteSpace(headerValue))
|
||||||
|
{
|
||||||
|
return headerValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return string.IsNullOrWhiteSpace(fallback) ? null : fallback;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,5 +3,14 @@
|
|||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<RootNamespace>Idoklad</RootNamespace>
|
||||||
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
|
<NoWarn>$(NoWarn);1591</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="IdokladSdk" Version="5.3.0" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.11" />
|
||||||
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.9.0" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
using Microsoft.OpenApi.Any;
|
||||||
|
using Microsoft.OpenApi.Models;
|
||||||
|
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||||
|
using Idoklad.Controllers;
|
||||||
|
using Idoklad.Credentials;
|
||||||
|
|
||||||
|
namespace Idoklad.Infrastructure;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Documents the per-request credential headers in Swagger for every operation that talks to
|
||||||
|
/// iDoklad. The headers are marked optional because the service can fall back to environment
|
||||||
|
/// defaults, but the description makes the requirement and secret handling explicit.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class CredentialHeadersOperationFilter : IOperationFilter
|
||||||
|
{
|
||||||
|
public void Apply(OpenApiOperation operation, OperationFilterContext context)
|
||||||
|
{
|
||||||
|
// Metadata endpoints (health/version/status) do not talk to iDoklad and need no credentials.
|
||||||
|
if (context.MethodInfo.DeclaringType == typeof(MetaController))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
operation.Parameters ??= new List<OpenApiParameter>();
|
||||||
|
|
||||||
|
AddHeader(operation, CredentialConstants.ClientIdHeader,
|
||||||
|
"iDoklad OAuth2 ClientId (client credentials flow). Overrides the IDOKLAD_CLIENT_ID environment default. Required if no environment default is configured.");
|
||||||
|
|
||||||
|
AddHeader(operation, CredentialConstants.ClientSecretHeader,
|
||||||
|
"iDoklad OAuth2 ClientSecret (SENSITIVE). Must be sent in this header over TLS only — never in the URL or body. Overrides the IDOKLAD_CLIENT_SECRET environment default. Required if no environment default is configured.");
|
||||||
|
|
||||||
|
AddHeader(operation, CredentialConstants.ApplicationIdHeader,
|
||||||
|
"iDoklad ApplicationId from the developer portal. Overrides the IDOKLAD_APPLICATION_ID environment default. Required by the client credentials flow if no environment default is configured.");
|
||||||
|
|
||||||
|
AddHeader(operation, CredentialConstants.LanguageHeader,
|
||||||
|
"Optional response language override for the iDoklad API: Cz, Sk or En.", example: "Cz");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void AddHeader(OpenApiOperation operation, string name, string description, string? example = null)
|
||||||
|
{
|
||||||
|
operation.Parameters.Add(new OpenApiParameter
|
||||||
|
{
|
||||||
|
Name = name,
|
||||||
|
In = ParameterLocation.Header,
|
||||||
|
Required = false,
|
||||||
|
Description = description,
|
||||||
|
Schema = new OpenApiSchema
|
||||||
|
{
|
||||||
|
Type = "string",
|
||||||
|
Example = example is null ? null : new OpenApiString(example),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
using System.Net;
|
||||||
|
using IdokladSdk.Exceptions;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Idoklad.Client;
|
||||||
|
using Idoklad.Credentials;
|
||||||
|
|
||||||
|
namespace Idoklad.Infrastructure;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Translates domain exceptions into JSON <see cref="ProblemDetails"/> responses:
|
||||||
|
/// missing credentials become 401, and upstream iDoklad failures surface the upstream status.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class ExceptionHandlingMiddleware
|
||||||
|
{
|
||||||
|
private readonly RequestDelegate _next;
|
||||||
|
private readonly ILogger<ExceptionHandlingMiddleware> _logger;
|
||||||
|
|
||||||
|
public ExceptionHandlingMiddleware(RequestDelegate next, ILogger<ExceptionHandlingMiddleware> logger)
|
||||||
|
{
|
||||||
|
_next = next;
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task InvokeAsync(HttpContext context)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await _next(context);
|
||||||
|
}
|
||||||
|
catch (MissingCredentialsException ex)
|
||||||
|
{
|
||||||
|
await WriteProblem(context, HttpStatusCode.Unauthorized, ex.Message, new Dictionary<string, object?>
|
||||||
|
{
|
||||||
|
["missingHeaders"] = ex.MissingHeaders,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (IdokladApiException ex)
|
||||||
|
{
|
||||||
|
// Never log decoded credentials; only the upstream status and message.
|
||||||
|
_logger.LogWarning("iDoklad API call failed: {Status} {ErrorCode} {Message}", ex.StatusCode, ex.ErrorCode, ex.Message);
|
||||||
|
await WriteProblem(context, ex.StatusCode, ex.Message, new Dictionary<string, object?>
|
||||||
|
{
|
||||||
|
["idokladErrorCode"] = ex.ErrorCode.ToString(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (IdokladAuthenticationException ex)
|
||||||
|
{
|
||||||
|
// OAuth2 token acquisition failed (bad client id/secret/application id).
|
||||||
|
_logger.LogWarning("iDoklad authentication failed: {Error}", ex.AuthenticationError?.Error ?? ex.Message);
|
||||||
|
await WriteProblem(context, HttpStatusCode.Unauthorized, ex.AuthenticationError?.ErrorDescription ?? ex.Message, new Dictionary<string, object?>
|
||||||
|
{
|
||||||
|
["idokladError"] = ex.AuthenticationError?.Error,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (IdokladBaseException ex)
|
||||||
|
{
|
||||||
|
// Other SDK-level failures (malformed responses, batch errors, etc.).
|
||||||
|
_logger.LogWarning("iDoklad SDK error: {Message}", ex.Message);
|
||||||
|
await WriteProblem(context, HttpStatusCode.BadGateway, ex.Message, null);
|
||||||
|
}
|
||||||
|
catch (HttpRequestException ex)
|
||||||
|
{
|
||||||
|
// The iDoklad API / identity server is unreachable.
|
||||||
|
_logger.LogWarning(ex, "iDoklad API unreachable.");
|
||||||
|
await WriteProblem(context, HttpStatusCode.BadGateway, "iDoklad API is unreachable.", null);
|
||||||
|
}
|
||||||
|
catch (ArgumentException ex)
|
||||||
|
{
|
||||||
|
// Thrown by the SDK when required credential fields are blank/invalid.
|
||||||
|
await WriteProblem(context, HttpStatusCode.BadRequest, ex.Message, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static async Task WriteProblem(HttpContext context, HttpStatusCode status, string detail, IDictionary<string, object?>? extensions)
|
||||||
|
{
|
||||||
|
if (context.Response.HasStarted)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var problem = new ProblemDetails
|
||||||
|
{
|
||||||
|
Status = (int)status,
|
||||||
|
Title = ReasonPhrase(status),
|
||||||
|
Detail = detail,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (extensions is not null)
|
||||||
|
{
|
||||||
|
foreach (var (key, value) in extensions)
|
||||||
|
{
|
||||||
|
problem.Extensions[key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
context.Response.Clear();
|
||||||
|
context.Response.StatusCode = (int)status;
|
||||||
|
context.Response.ContentType = "application/problem+json";
|
||||||
|
await context.Response.WriteAsJsonAsync(problem);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string ReasonPhrase(HttpStatusCode status) => status switch
|
||||||
|
{
|
||||||
|
HttpStatusCode.Unauthorized => "Unauthorized",
|
||||||
|
HttpStatusCode.BadRequest => "Bad Request",
|
||||||
|
HttpStatusCode.BadGateway => "Upstream iDoklad API error",
|
||||||
|
_ => status.ToString(),
|
||||||
|
};
|
||||||
|
}
|
||||||
+79
-12
@@ -1,22 +1,89 @@
|
|||||||
|
using Microsoft.OpenApi.Models;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using Idoklad.Client;
|
||||||
|
using Idoklad.Configuration;
|
||||||
|
using Idoklad.Credentials;
|
||||||
|
using Idoklad.Infrastructure;
|
||||||
|
using Idoklad.Services;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
// Configuration resolved from environment variables (single shared instance).
|
||||||
|
var settings = new IdokladSettings();
|
||||||
|
builder.Services.AddSingleton(settings);
|
||||||
|
|
||||||
|
// HttpClient for the iDoklad SDK, managed by IHttpClientFactory (recommended SDK usage).
|
||||||
|
builder.Services.AddHttpClient(DokladApiFactory.HttpClientName, client =>
|
||||||
|
{
|
||||||
|
client.Timeout = TimeSpan.FromSeconds(settings.RequestTimeoutSeconds);
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.Services.AddHttpContextAccessor();
|
||||||
|
|
||||||
|
// Credential resolution + SDK client wiring.
|
||||||
|
builder.Services.AddScoped<RequestCredentialsProvider>();
|
||||||
|
builder.Services.AddScoped<DokladApiFactory>();
|
||||||
|
builder.Services.AddScoped<IdokladApiAccessor>();
|
||||||
|
|
||||||
|
// Agenda services.
|
||||||
|
builder.Services.AddScoped<ContactsService>();
|
||||||
|
builder.Services.AddScoped<IssuedInvoicesService>();
|
||||||
|
builder.Services.AddScoped<ReceivedInvoicesService>();
|
||||||
|
builder.Services.AddScoped<RegistersService>();
|
||||||
|
builder.Services.AddScoped<AccountService>();
|
||||||
|
|
||||||
|
// Use Newtonsoft.Json so request/response binding matches the iDoklad SDK model attributes.
|
||||||
|
builder.Services
|
||||||
|
.AddControllers()
|
||||||
|
.AddNewtonsoftJson(options =>
|
||||||
|
{
|
||||||
|
options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
|
||||||
|
});
|
||||||
|
|
||||||
|
builder.Services.AddEndpointsApiExplorer();
|
||||||
|
builder.Services.AddSwaggerGen(options =>
|
||||||
|
{
|
||||||
|
options.SwaggerDoc("v1", new OpenApiInfo
|
||||||
|
{
|
||||||
|
Title = settings.AppName,
|
||||||
|
Version = settings.AppVersion,
|
||||||
|
Description =
|
||||||
|
"REST integration with iDoklad built on the official IdokladSdk (.NET) 5.3.0, " +
|
||||||
|
"using the OAuth2 client credentials flow.\n\n" +
|
||||||
|
"**Credentials.** Every agenda endpoint needs an iDoklad ClientId, ClientSecret and ApplicationId. " +
|
||||||
|
"Sensitive values are required in request headers and are never accepted in the query string or body:\n\n" +
|
||||||
|
"- `X-ClientId` — iDoklad OAuth2 ClientId\n" +
|
||||||
|
"- `X-ClientSecret` — iDoklad OAuth2 ClientSecret (sensitive; TLS only)\n" +
|
||||||
|
"- `X-ApplicationId` — iDoklad ApplicationId from the developer portal\n" +
|
||||||
|
"- `X-Idoklad-Language` — optional response language (Cz, Sk, En)\n\n" +
|
||||||
|
"If a header is omitted, the matching environment default " +
|
||||||
|
"(`IDOKLAD_CLIENT_ID`, `IDOKLAD_CLIENT_SECRET`, `IDOKLAD_APPLICATION_ID`) is used. " +
|
||||||
|
"If neither a header nor a default is available, the request is rejected with 401.",
|
||||||
|
});
|
||||||
|
options.OperationFilter<CredentialHeadersOperationFilter>();
|
||||||
|
|
||||||
|
var xmlPath = Path.Combine(AppContext.BaseDirectory, $"{System.Reflection.Assembly.GetExecutingAssembly().GetName().Name}.xml");
|
||||||
|
if (File.Exists(xmlPath))
|
||||||
|
{
|
||||||
|
options.IncludeXmlComments(xmlPath, includeControllerXmlComments: true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
var rootPath = Environment.GetEnvironmentVariable("ROOT_PATH");
|
if (!string.IsNullOrWhiteSpace(settings.RootPath))
|
||||||
if (!string.IsNullOrWhiteSpace(rootPath))
|
|
||||||
{
|
{
|
||||||
app.UsePathBase(rootPath);
|
app.UsePathBase(settings.RootPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
app.MapGet("/", () => Results.Json(new
|
app.UseMiddleware<ExceptionHandlingMiddleware>();
|
||||||
{
|
|
||||||
name = "iDoklad",
|
|
||||||
service = "idoklad",
|
|
||||||
status = "ok"
|
|
||||||
}));
|
|
||||||
|
|
||||||
app.MapGet("/health", () => Results.Json(new
|
app.UseSwagger();
|
||||||
|
app.UseSwaggerUI(options =>
|
||||||
{
|
{
|
||||||
status = "ok"
|
options.SwaggerEndpoint("v1/swagger.json", $"{settings.AppName} v1");
|
||||||
}));
|
});
|
||||||
|
|
||||||
|
app.MapControllers();
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
|
|||||||
@@ -1,8 +1,131 @@
|
|||||||
# iDoklad
|
# iDoklad
|
||||||
|
|
||||||
.NET API služba vytvořená přes CSBot Services Portal.
|
.NET 8 API služba pro server-to-server komunikaci s [iDoklad](https://www.idoklad.cz/) postavená nad
|
||||||
|
oficiálním **IdokladSdk** (.NET) verze **5.3.0** s OAuth2 *client credentials* flow.
|
||||||
|
|
||||||
## Endpointy
|
Struktura projektu odpovídá sousední službě microsoft-365-service: konfigurace z prostředí,
|
||||||
|
přihlašovací údaje z hlaviček s fallbackem na proměnné prostředí, tenká service vrstva nad SDK,
|
||||||
|
controllery a samostatná dokumentace ve Swaggeru.
|
||||||
|
|
||||||
- GET /
|
## Konfigurace (proměnné prostředí)
|
||||||
- GET /health
|
|
||||||
|
Aplikace, ClientId, ClientSecret a ApplicationId získáte ve vývojářském portálu iDoklad. Tyto
|
||||||
|
hodnoty lze nastavit jako výchozí přes proměnné prostředí, nebo je předávat per-request v hlavičkách
|
||||||
|
(viz níže).
|
||||||
|
|
||||||
|
```env
|
||||||
|
# Výchozí přihlašovací údaje iDoklad (client credentials flow)
|
||||||
|
IDOKLAD_CLIENT_ID=
|
||||||
|
IDOKLAD_CLIENT_SECRET=
|
||||||
|
IDOKLAD_APPLICATION_ID=
|
||||||
|
|
||||||
|
# Volitelné
|
||||||
|
IDOKLAD_LANGUAGE=Cz # Cz | Sk | En (jazyk odpovědí iDoklad API)
|
||||||
|
IDOKLAD_REQUEST_TIMEOUT_SECONDS=100
|
||||||
|
IDOKLAD_API_URL= # vlastní URL API (jen pokud je nastavena i identity URL)
|
||||||
|
IDOKLAD_IDENTITY_URL= # vlastní URL token endpointu Identity Serveru
|
||||||
|
|
||||||
|
# Obecné (sdílené napříč službami portálu)
|
||||||
|
APP_NAME=iDoklad Service
|
||||||
|
APP_VERSION=1.0.0
|
||||||
|
ROOT_PATH= # base path při běhu za reverzní proxy
|
||||||
|
```
|
||||||
|
|
||||||
|
> `IDOKLAD_API_URL` a `IDOKLAD_IDENTITY_URL` se použijí pouze pokud jsou nastavené **obě**; jinak
|
||||||
|
> SDK použije produkční URL iDokladu.
|
||||||
|
|
||||||
|
## Přihlašovací údaje v request hlavičkách
|
||||||
|
|
||||||
|
Citlivé proměnné (zejména **secret**) se **nepředávají v query stringu ani v těle** požadavku –
|
||||||
|
**vyžadují se v HTTP hlavičkách**. To je zohledněno i ve Swaggeru: u každého agendového endpointu
|
||||||
|
jsou hlavičky vtypu `X-...` zdokumentované jako parametry.
|
||||||
|
|
||||||
|
| Hlavička | Význam | Fallback (env) |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `X-ClientId` | iDoklad OAuth2 ClientId | `IDOKLAD_CLIENT_ID` |
|
||||||
|
| `X-ClientSecret` | iDoklad OAuth2 ClientSecret (**citlivé – jen přes TLS**) | `IDOKLAD_CLIENT_SECRET` |
|
||||||
|
| `X-ApplicationId` | iDoklad ApplicationId z vývojářského portálu | `IDOKLAD_APPLICATION_ID` |
|
||||||
|
| `X-Idoklad-Language` | volitelný jazyk odpovědí (`Cz`/`Sk`/`En`) | `IDOKLAD_LANGUAGE` |
|
||||||
|
|
||||||
|
Každá hodnota se nejprve čte z hlavičky a teprve pokud chybí, použije se výchozí proměnná prostředí.
|
||||||
|
Pokud po aplikaci fallbacku některý z údajů `ClientId`/`ClientSecret`/`ApplicationId` chybí, vrátí
|
||||||
|
služba `401` se seznamem chybějících hlaviček. Dekódované secrety se nikdy nelogují.
|
||||||
|
|
||||||
|
Příklad požadavku:
|
||||||
|
|
||||||
|
```http
|
||||||
|
GET /issued-invoices?page=1&pageSize=20
|
||||||
|
X-ClientId: <client id>
|
||||||
|
X-ClientSecret: <client secret>
|
||||||
|
X-ApplicationId: <application id>
|
||||||
|
```
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
```http
|
||||||
|
GET /health
|
||||||
|
GET /version
|
||||||
|
GET /status
|
||||||
|
|
||||||
|
# Account
|
||||||
|
GET /account/agenda
|
||||||
|
GET /account/user
|
||||||
|
|
||||||
|
# Contacts
|
||||||
|
GET /contacts?page=1&pageSize=20
|
||||||
|
GET /contacts/default
|
||||||
|
GET /contacts/{id}
|
||||||
|
POST /contacts
|
||||||
|
PATCH /contacts
|
||||||
|
DELETE /contacts/{id}
|
||||||
|
|
||||||
|
# Issued invoices (vydané faktury)
|
||||||
|
GET /issued-invoices?page=1&pageSize=20
|
||||||
|
GET /issued-invoices/default
|
||||||
|
GET /issued-invoices/{id}
|
||||||
|
POST /issued-invoices
|
||||||
|
PATCH /issued-invoices
|
||||||
|
POST /issued-invoices/{id}/copy
|
||||||
|
DELETE /issued-invoices/{id}
|
||||||
|
|
||||||
|
# Received invoices (přijaté faktury)
|
||||||
|
GET /received-invoices?page=1&pageSize=20
|
||||||
|
GET /received-invoices/default
|
||||||
|
GET /received-invoices/{id}
|
||||||
|
POST /received-invoices
|
||||||
|
PATCH /received-invoices
|
||||||
|
DELETE /received-invoices/{id}
|
||||||
|
|
||||||
|
# Registry
|
||||||
|
GET /registers/bank-accounts?page=1&pageSize=20
|
||||||
|
GET /registers/bank-accounts/{id}
|
||||||
|
POST /registers/bank-accounts
|
||||||
|
PATCH /registers/bank-accounts
|
||||||
|
DELETE /registers/bank-accounts/{id}
|
||||||
|
GET /registers/vat-rates?page=1&pageSize=20
|
||||||
|
GET /registers/vat-rates/{id}
|
||||||
|
GET /registers/numeric-sequences?page=1&pageSize=20
|
||||||
|
```
|
||||||
|
|
||||||
|
Request/response těla odpovídají modelům iDoklad SDK (`*PostModel`, `*PatchModel`, `*GetModel`).
|
||||||
|
Serializace používá Newtonsoft.Json, aby se chování shodovalo s atributy modelů v SDK. Chyby z
|
||||||
|
iDoklad API se propagují jako `application/problem+json` s odpovídajícím HTTP statusem.
|
||||||
|
|
||||||
|
## Lokální spuštění
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dotnet run
|
||||||
|
```
|
||||||
|
|
||||||
|
Swagger UI je na `/swagger`, OpenAPI dokument na `/swagger/v1/swagger.json`.
|
||||||
|
|
||||||
|
## Architektura
|
||||||
|
|
||||||
|
| Vrstva | Soubor(y) | Odpovídá v microsoft-365-service |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Konfigurace | `Configuration/IdokladSettings.cs` | `config.py` |
|
||||||
|
| Přihlašovací údaje z hlaviček | `Credentials/` | `credentials.py` |
|
||||||
|
| Klient SDK | `Client/DokladApiFactory.cs`, `Client/IdokladApiAccessor.cs` | `graph_client.py` |
|
||||||
|
| Service vrstva | `Services/*.cs` | `services.py` |
|
||||||
|
| Controllery | `Controllers/*.cs` | `routes.py` |
|
||||||
|
| Mapování chyb + Swagger | `Infrastructure/*.cs` | – |
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using IdokladSdk.Models.Account;
|
||||||
|
using Idoklad.Client;
|
||||||
|
|
||||||
|
namespace Idoklad.Services;
|
||||||
|
|
||||||
|
/// <summary>Account agenda: information about the current agenda and the current user.</summary>
|
||||||
|
public sealed class AccountService
|
||||||
|
{
|
||||||
|
private readonly IdokladApiAccessor _accessor;
|
||||||
|
|
||||||
|
public AccountService(IdokladApiAccessor accessor) => _accessor = accessor;
|
||||||
|
|
||||||
|
public async Task<AgendaGetModel> CurrentAgendaAsync(CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.AccountClient.Agendas.Current().GetAsync(ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<UserGetModel> CurrentUserAsync(CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.AccountClient.Users.Current().GetAsync(ct)).Unwrap();
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
using IdokladSdk.Models.Contact;
|
||||||
|
using IdokladSdk.Response;
|
||||||
|
using Idoklad.Client;
|
||||||
|
|
||||||
|
namespace Idoklad.Services;
|
||||||
|
|
||||||
|
/// <summary>Contacts (customers/suppliers) agenda.</summary>
|
||||||
|
public sealed class ContactsService
|
||||||
|
{
|
||||||
|
private readonly IdokladApiAccessor _accessor;
|
||||||
|
|
||||||
|
public ContactsService(IdokladApiAccessor accessor) => _accessor = accessor;
|
||||||
|
|
||||||
|
public async Task<Page<ContactListGetModel>> ListAsync(int page, int pageSize, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.ContactClient.List().Page(page).PageSize(pageSize).GetAsync(ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<ContactGetModel> DetailAsync(int id, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.ContactClient.Detail(id).GetAsync(ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<ContactPostModel> DefaultAsync(CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.ContactClient.DefaultAsync(ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<ContactGetModel> CreateAsync(ContactPostModel model, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.ContactClient.PostAsync(model, ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<ContactGetModel> UpdateAsync(ContactPatchModel model, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.ContactClient.UpdateAsync(model, ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<bool> DeleteAsync(int id, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.ContactClient.DeleteAsync(id, ct)).Unwrap();
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
using IdokladSdk.Models.IssuedInvoice;
|
||||||
|
using IdokladSdk.Response;
|
||||||
|
using Idoklad.Client;
|
||||||
|
|
||||||
|
namespace Idoklad.Services;
|
||||||
|
|
||||||
|
/// <summary>Issued (outgoing) invoices agenda.</summary>
|
||||||
|
public sealed class IssuedInvoicesService
|
||||||
|
{
|
||||||
|
private readonly IdokladApiAccessor _accessor;
|
||||||
|
|
||||||
|
public IssuedInvoicesService(IdokladApiAccessor accessor) => _accessor = accessor;
|
||||||
|
|
||||||
|
public async Task<Page<IssuedInvoiceListGetModel>> ListAsync(int page, int pageSize, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.IssuedInvoiceClient.List().Page(page).PageSize(pageSize).GetAsync(ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<IssuedInvoiceGetModel> DetailAsync(int id, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.IssuedInvoiceClient.Detail(id).GetAsync(ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<IssuedInvoiceDefaultGetModel> DefaultAsync(CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.IssuedInvoiceClient.DefaultAsync(ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<IssuedInvoiceGetModel> CreateAsync(IssuedInvoicePostModel model, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.IssuedInvoiceClient.PostAsync(model, ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<IssuedInvoiceGetModel> UpdateAsync(IssuedInvoicePatchModel model, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.IssuedInvoiceClient.UpdateAsync(model, ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<IssuedInvoiceCopyGetModel> CopyAsync(int id, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.IssuedInvoiceClient.CopyAsync(id, ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<bool> DeleteAsync(int id, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.IssuedInvoiceClient.DeleteAsync(id, ct)).Unwrap();
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
using IdokladSdk.Models.ReceivedInvoice;
|
||||||
|
using IdokladSdk.Response;
|
||||||
|
using Idoklad.Client;
|
||||||
|
|
||||||
|
namespace Idoklad.Services;
|
||||||
|
|
||||||
|
/// <summary>Received (incoming) invoices agenda.</summary>
|
||||||
|
public sealed class ReceivedInvoicesService
|
||||||
|
{
|
||||||
|
private readonly IdokladApiAccessor _accessor;
|
||||||
|
|
||||||
|
public ReceivedInvoicesService(IdokladApiAccessor accessor) => _accessor = accessor;
|
||||||
|
|
||||||
|
public async Task<Page<ReceivedInvoiceListGetModel>> ListAsync(int page, int pageSize, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.ReceivedInvoiceClient.List().Page(page).PageSize(pageSize).GetAsync(ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<ReceivedInvoiceGetModel> DetailAsync(int id, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.ReceivedInvoiceClient.Detail(id).GetAsync(ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<ReceivedInvoiceDefaultGetModel> DefaultAsync(CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.ReceivedInvoiceClient.DefaultAsync(ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<ReceivedInvoiceGetModel> CreateAsync(ReceivedInvoicePostModel model, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.ReceivedInvoiceClient.PostAsync(model, ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<ReceivedInvoiceGetModel> UpdateAsync(ReceivedInvoicePatchModel model, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.ReceivedInvoiceClient.UpdateAsync(model, ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<bool> DeleteAsync(int id, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.ReceivedInvoiceClient.DeleteAsync(id, ct)).Unwrap();
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
using IdokladSdk.Models.BankAccount;
|
||||||
|
using IdokladSdk.Models.NumericSequence;
|
||||||
|
using IdokladSdk.Models.ReadOnly.VatRate;
|
||||||
|
using IdokladSdk.Response;
|
||||||
|
using Idoklad.Client;
|
||||||
|
|
||||||
|
namespace Idoklad.Services;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Supporting registers: bank accounts, VAT rates and numeric (document) sequences.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class RegistersService
|
||||||
|
{
|
||||||
|
private readonly IdokladApiAccessor _accessor;
|
||||||
|
|
||||||
|
public RegistersService(IdokladApiAccessor accessor) => _accessor = accessor;
|
||||||
|
|
||||||
|
// Bank accounts
|
||||||
|
public async Task<Page<BankAccountListGetModel>> ListBankAccountsAsync(int page, int pageSize, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.BankAccountClient.List().Page(page).PageSize(pageSize).GetAsync(ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<BankAccountGetModel> BankAccountDetailAsync(int id, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.BankAccountClient.Detail(id).GetAsync(ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<BankAccountGetModel> CreateBankAccountAsync(BankAccountPostModel model, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.BankAccountClient.PostAsync(model, ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<BankAccountGetModel> UpdateBankAccountAsync(BankAccountPatchModel model, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.BankAccountClient.UpdateAsync(model, ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<bool> DeleteBankAccountAsync(int id, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.BankAccountClient.DeleteAsync(id, ct)).Unwrap();
|
||||||
|
|
||||||
|
// VAT rates (read-only)
|
||||||
|
public async Task<Page<VatRateListGetModel>> ListVatRatesAsync(int page, int pageSize, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.VatRateClient.List().Page(page).PageSize(pageSize).GetAsync(ct)).Unwrap();
|
||||||
|
|
||||||
|
public async Task<VatRateGetModel> VatRateDetailAsync(int id, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.VatRateClient.Detail(id).GetAsync(ct)).Unwrap();
|
||||||
|
|
||||||
|
// Numeric sequences (read-only list)
|
||||||
|
public async Task<Page<NumericSequenceGetModel>> ListNumericSequencesAsync(int page, int pageSize, CancellationToken ct)
|
||||||
|
=> (await _accessor.Api.NumericSequenceClient.List().Page(page).PageSize(pageSize).GetAsync(ct)).Unwrap();
|
||||||
|
}
|
||||||
Binary file not shown.
@@ -0,0 +1,313 @@
|
|||||||
|
{
|
||||||
|
"runtimeTarget": {
|
||||||
|
"name": ".NETCoreApp,Version=v8.0",
|
||||||
|
"signature": ""
|
||||||
|
},
|
||||||
|
"compilationOptions": {},
|
||||||
|
"targets": {
|
||||||
|
".NETCoreApp,Version=v8.0": {
|
||||||
|
"Idoklad/1.0.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"IdokladSdk": "5.3.0",
|
||||||
|
"Microsoft.AspNetCore.Mvc.NewtonsoftJson": "8.0.11",
|
||||||
|
"Swashbuckle.AspNetCore": "6.9.0"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"Idoklad.dll": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"IbanNet/5.16.1": {
|
||||||
|
"runtime": {
|
||||||
|
"lib/net8.0/IbanNet.dll": {
|
||||||
|
"assemblyVersion": "5.16.1.0",
|
||||||
|
"fileVersion": "5.16.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"resources": {
|
||||||
|
"lib/net8.0/ca/IbanNet.resources.dll": {
|
||||||
|
"locale": "ca"
|
||||||
|
},
|
||||||
|
"lib/net8.0/de/IbanNet.resources.dll": {
|
||||||
|
"locale": "de"
|
||||||
|
},
|
||||||
|
"lib/net8.0/nl/IbanNet.resources.dll": {
|
||||||
|
"locale": "nl"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"IdokladSdk/5.3.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"IbanNet": "5.16.1",
|
||||||
|
"Newtonsoft.Json": "13.0.3",
|
||||||
|
"System.IdentityModel.Tokens.Jwt": "7.6.0"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/netstandard2.0/IdokladSdk.dll": {
|
||||||
|
"assemblyVersion": "5.3.0.0",
|
||||||
|
"fileVersion": "5.3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Microsoft.AspNetCore.JsonPatch/8.0.11": {
|
||||||
|
"dependencies": {
|
||||||
|
"Newtonsoft.Json": "13.0.3"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/net8.0/Microsoft.AspNetCore.JsonPatch.dll": {
|
||||||
|
"assemblyVersion": "8.0.11.0",
|
||||||
|
"fileVersion": "8.0.1124.52116"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Microsoft.AspNetCore.Mvc.NewtonsoftJson/8.0.11": {
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.AspNetCore.JsonPatch": "8.0.11",
|
||||||
|
"Newtonsoft.Json": "13.0.3",
|
||||||
|
"Newtonsoft.Json.Bson": "1.0.2"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/net8.0/Microsoft.AspNetCore.Mvc.NewtonsoftJson.dll": {
|
||||||
|
"assemblyVersion": "8.0.11.0",
|
||||||
|
"fileVersion": "8.0.1124.52116"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Microsoft.IdentityModel.Abstractions/7.6.0": {
|
||||||
|
"runtime": {
|
||||||
|
"lib/net8.0/Microsoft.IdentityModel.Abstractions.dll": {
|
||||||
|
"assemblyVersion": "7.6.0.0",
|
||||||
|
"fileVersion": "7.6.0.50527"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Microsoft.IdentityModel.JsonWebTokens/7.6.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.IdentityModel.Tokens": "7.6.0"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/net8.0/Microsoft.IdentityModel.JsonWebTokens.dll": {
|
||||||
|
"assemblyVersion": "7.6.0.0",
|
||||||
|
"fileVersion": "7.6.0.50527"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Microsoft.IdentityModel.Logging/7.6.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.IdentityModel.Abstractions": "7.6.0"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/net8.0/Microsoft.IdentityModel.Logging.dll": {
|
||||||
|
"assemblyVersion": "7.6.0.0",
|
||||||
|
"fileVersion": "7.6.0.50527"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Microsoft.IdentityModel.Tokens/7.6.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.IdentityModel.Logging": "7.6.0"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/net8.0/Microsoft.IdentityModel.Tokens.dll": {
|
||||||
|
"assemblyVersion": "7.6.0.0",
|
||||||
|
"fileVersion": "7.6.0.50527"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Microsoft.OpenApi/1.6.14": {
|
||||||
|
"runtime": {
|
||||||
|
"lib/netstandard2.0/Microsoft.OpenApi.dll": {
|
||||||
|
"assemblyVersion": "1.6.14.0",
|
||||||
|
"fileVersion": "1.6.14.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Newtonsoft.Json/13.0.3": {
|
||||||
|
"runtime": {
|
||||||
|
"lib/net6.0/Newtonsoft.Json.dll": {
|
||||||
|
"assemblyVersion": "13.0.0.0",
|
||||||
|
"fileVersion": "13.0.3.27908"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Newtonsoft.Json.Bson/1.0.2": {
|
||||||
|
"dependencies": {
|
||||||
|
"Newtonsoft.Json": "13.0.3"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/netstandard2.0/Newtonsoft.Json.Bson.dll": {
|
||||||
|
"assemblyVersion": "1.0.0.0",
|
||||||
|
"fileVersion": "1.0.2.22727"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Swashbuckle.AspNetCore/6.9.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"Swashbuckle.AspNetCore.Swagger": "6.9.0",
|
||||||
|
"Swashbuckle.AspNetCore.SwaggerGen": "6.9.0",
|
||||||
|
"Swashbuckle.AspNetCore.SwaggerUI": "6.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Swashbuckle.AspNetCore.Swagger/6.9.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.OpenApi": "1.6.14"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/net8.0/Swashbuckle.AspNetCore.Swagger.dll": {
|
||||||
|
"assemblyVersion": "6.9.0.0",
|
||||||
|
"fileVersion": "6.9.0.799"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Swashbuckle.AspNetCore.SwaggerGen/6.9.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"Swashbuckle.AspNetCore.Swagger": "6.9.0"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/net8.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {
|
||||||
|
"assemblyVersion": "6.9.0.0",
|
||||||
|
"fileVersion": "6.9.0.799"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Swashbuckle.AspNetCore.SwaggerUI/6.9.0": {
|
||||||
|
"runtime": {
|
||||||
|
"lib/net8.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {
|
||||||
|
"assemblyVersion": "6.9.0.0",
|
||||||
|
"fileVersion": "6.9.0.799"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"System.IdentityModel.Tokens.Jwt/7.6.0": {
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.IdentityModel.JsonWebTokens": "7.6.0",
|
||||||
|
"Microsoft.IdentityModel.Tokens": "7.6.0"
|
||||||
|
},
|
||||||
|
"runtime": {
|
||||||
|
"lib/net8.0/System.IdentityModel.Tokens.Jwt.dll": {
|
||||||
|
"assemblyVersion": "7.6.0.0",
|
||||||
|
"fileVersion": "7.6.0.50527"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"libraries": {
|
||||||
|
"Idoklad/1.0.0": {
|
||||||
|
"type": "project",
|
||||||
|
"serviceable": false,
|
||||||
|
"sha512": ""
|
||||||
|
},
|
||||||
|
"IbanNet/5.16.1": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-07IXXs6sKXL1edCNju4u0fJJSB/4WAUHjkkLIcSUD9u3yRqqKy7jwMWxyaOviheXV0NoagnXSmaKcpu3R5JNLw==",
|
||||||
|
"path": "ibannet/5.16.1",
|
||||||
|
"hashPath": "ibannet.5.16.1.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"IdokladSdk/5.3.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-oJZC8K2YzvnNHQ2vwKAfvfkwk+WCPbeELdyuS8A8sX2y/KEo5KBl9S5PJfCAYpH/1y+0hyspiY1KoJToUxj0eQ==",
|
||||||
|
"path": "idokladsdk/5.3.0",
|
||||||
|
"hashPath": "idokladsdk.5.3.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Microsoft.AspNetCore.JsonPatch/8.0.11": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-l1tFnQm2LtFE3M9YRM/bdwtxxCV50Y5jnN0LjliQH1sqvWsN46++Uu3QCJL9IdOweFvXSf3Shi7DI/Vc1jkdKA==",
|
||||||
|
"path": "microsoft.aspnetcore.jsonpatch/8.0.11",
|
||||||
|
"hashPath": "microsoft.aspnetcore.jsonpatch.8.0.11.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Microsoft.AspNetCore.Mvc.NewtonsoftJson/8.0.11": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-XcfFd8e0g2M0mcAKVNgoHJtWYJfKrPntHhgqiZ1Ci37i3AEJbM0GHIa715i0UPSksiKmDxsJWXnM3rg8keF/Zg==",
|
||||||
|
"path": "microsoft.aspnetcore.mvc.newtonsoftjson/8.0.11",
|
||||||
|
"hashPath": "microsoft.aspnetcore.mvc.newtonsoftjson.8.0.11.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Microsoft.IdentityModel.Abstractions/7.6.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-q4MZ8d0LlWKWtQfxNl9ZRZVOQ7IPEAR6CF4rFKITfuqEUOhqrbwHbqBanReI37155IKb8V/tPJqpPa3KXm9wQQ==",
|
||||||
|
"path": "microsoft.identitymodel.abstractions/7.6.0",
|
||||||
|
"hashPath": "microsoft.identitymodel.abstractions.7.6.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Microsoft.IdentityModel.JsonWebTokens/7.6.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-lsleZbCuh3wZ3RfKd8WJ7E52nIeQQzJsDrgHN+B3Zhzd32UTQ1V3Vjn1N9PssnSulAoEMF0aAiue7ucX+TPoQA==",
|
||||||
|
"path": "microsoft.identitymodel.jsonwebtokens/7.6.0",
|
||||||
|
"hashPath": "microsoft.identitymodel.jsonwebtokens.7.6.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Microsoft.IdentityModel.Logging/7.6.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-7AVJhNY4y/i96XGfaXovX8aAyYWz6HHtPEPHPpbg5JCchwVaoO08VmmpHe0L2gVagW/iHG0w4a4Xg9gxLXQ/8A==",
|
||||||
|
"path": "microsoft.identitymodel.logging/7.6.0",
|
||||||
|
"hashPath": "microsoft.identitymodel.logging.7.6.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Microsoft.IdentityModel.Tokens/7.6.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-xvEil42RUe4Si/TuLDvglNXpklgCWMSecPduczXPS2BAypjheUehPqKLwIy8vSdzB4K2zza3yLgmODBt+J6ZxQ==",
|
||||||
|
"path": "microsoft.identitymodel.tokens/7.6.0",
|
||||||
|
"hashPath": "microsoft.identitymodel.tokens.7.6.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Microsoft.OpenApi/1.6.14": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-tTaBT8qjk3xINfESyOPE2rIellPvB7qpVqiWiyA/lACVvz+xOGiXhFUfohcx82NLbi5avzLW0lx+s6oAqQijfw==",
|
||||||
|
"path": "microsoft.openapi/1.6.14",
|
||||||
|
"hashPath": "microsoft.openapi.1.6.14.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Newtonsoft.Json/13.0.3": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==",
|
||||||
|
"path": "newtonsoft.json/13.0.3",
|
||||||
|
"hashPath": "newtonsoft.json.13.0.3.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Newtonsoft.Json.Bson/1.0.2": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-QYFyxhaABwmq3p/21VrZNYvCg3DaEoN/wUuw5nmfAf0X3HLjgupwhkEWdgfb9nvGAUIv3osmZoD3kKl4jxEmYQ==",
|
||||||
|
"path": "newtonsoft.json.bson/1.0.2",
|
||||||
|
"hashPath": "newtonsoft.json.bson.1.0.2.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Swashbuckle.AspNetCore/6.9.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-lvI+XHF21tkwXd2nDCLGJsdhdUYsY3Ax2fWUlvw81Oa6EedtnIAf5tThy8ZnPcz/9/TwsLgjgtX9ifOCIjbEPA==",
|
||||||
|
"path": "swashbuckle.aspnetcore/6.9.0",
|
||||||
|
"hashPath": "swashbuckle.aspnetcore.6.9.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Swashbuckle.AspNetCore.Swagger/6.9.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-P316kpxx5DnDvJwNWW8iTAXkh9DVenAxFGe9v4OUS0gil+vitH7F1feXhCtVeHN/616EFNTMh4pV2lcr9kkw/w==",
|
||||||
|
"path": "swashbuckle.aspnetcore.swagger/6.9.0",
|
||||||
|
"hashPath": "swashbuckle.aspnetcore.swagger.6.9.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Swashbuckle.AspNetCore.SwaggerGen/6.9.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-FjeMR3fBzwVc5plfYjoHw9ptf8SOWMupvO9X35J5EgzT3L9dRqSxa+cBKzL8PwCyemY0xNrggQSB5+MFWx1axg==",
|
||||||
|
"path": "swashbuckle.aspnetcore.swaggergen/6.9.0",
|
||||||
|
"hashPath": "swashbuckle.aspnetcore.swaggergen.6.9.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"Swashbuckle.AspNetCore.SwaggerUI/6.9.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-0OxlWBFLl2gUESZX/K7QCTz9KctKy0VxHTvLIBcyWGD4z/fv5MCMW02qzYGcReLJr4yBnNDRzApKtLh6oBpe9A==",
|
||||||
|
"path": "swashbuckle.aspnetcore.swaggerui/6.9.0",
|
||||||
|
"hashPath": "swashbuckle.aspnetcore.swaggerui.6.9.0.nupkg.sha512"
|
||||||
|
},
|
||||||
|
"System.IdentityModel.Tokens.Jwt/7.6.0": {
|
||||||
|
"type": "package",
|
||||||
|
"serviceable": true,
|
||||||
|
"sha512": "sha512-LIuEbv/kFpuw00yI/mPu+T9NAVdH/u7Y5ChCGzYQQeCg9Pft2C7HFWuO/P+Z7c2RcySNjVk1FmuAheKjYIbOkw==",
|
||||||
|
"path": "system.identitymodel.tokens.jwt/7.6.0",
|
||||||
|
"hashPath": "system.identitymodel.tokens.jwt.7.6.0.nupkg.sha512"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"runtimeOptions": {
|
||||||
|
"tfm": "net8.0",
|
||||||
|
"frameworks": [
|
||||||
|
{
|
||||||
|
"name": "Microsoft.NETCore.App",
|
||||||
|
"version": "8.0.0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Microsoft.AspNetCore.App",
|
||||||
|
"version": "8.0.0"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configProperties": {
|
||||||
|
"System.GC.Server": true,
|
||||||
|
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
|
||||||
|
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"Version":1,"ManifestType":"Build","Endpoints":[]}
|
||||||
@@ -0,0 +1,266 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>Idoklad</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:Idoklad.Client.ApiResultExtensions">
|
||||||
|
<summary>
|
||||||
|
Helpers that unwrap the SDK's <see cref="T:IdokladSdk.Response.ApiResult`1"/> envelope, returning the payload
|
||||||
|
on success and translating failures into <see cref="T:Idoklad.Client.IdokladApiException"/>.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Client.DokladApiFactory">
|
||||||
|
<summary>
|
||||||
|
Builds <see cref="T:IdokladSdk.DokladApi"/> instances from resolved per-request credentials, using the
|
||||||
|
official iDoklad .NET SDK (IdokladSdk) and an <see cref="T:System.Net.Http.IHttpClientFactory"/>-managed
|
||||||
|
<see cref="T:System.Net.Http.HttpClient"/>. This is the iDoklad analogue of microsoft-365-service's graph_client.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Client.IdokladApiAccessor">
|
||||||
|
<summary>
|
||||||
|
Scoped accessor that resolves the credentials for the current request and lazily builds a
|
||||||
|
single <see cref="T:IdokladSdk.DokladApi"/> shared by all services handling that request.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Client.IdokladApiException">
|
||||||
|
<summary>
|
||||||
|
Raised when an upstream iDoklad API call does not succeed. Carries the upstream HTTP status
|
||||||
|
code, message and iDoklad error code so the failure can be surfaced to the caller.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Configuration.IdokladSettings">
|
||||||
|
<summary>
|
||||||
|
Service configuration resolved from environment variables.
|
||||||
|
|
||||||
|
Mirrors the structure used by the sibling microsoft-365-service (config.py): non-secret
|
||||||
|
configuration and credential defaults live in environment variables. Per-request callers
|
||||||
|
can override the credential values through request headers (see
|
||||||
|
<see cref="T:Idoklad.Credentials.RequestCredentialsProvider"/>).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.ClientId">
|
||||||
|
<summary>Default iDoklad OAuth2 client id (client credentials flow).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.ClientSecret">
|
||||||
|
<summary>Default iDoklad OAuth2 client secret (client credentials flow).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.ApplicationId">
|
||||||
|
<summary>Default iDoklad application id from the developer portal (required by client credentials flow).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.ApiUrl">
|
||||||
|
<summary>Optional custom iDoklad API base url (defaults to the SDK production url when empty).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.IdentityServerUrl">
|
||||||
|
<summary>Optional custom Identity Server token url (defaults to the SDK production url when empty).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.Language">
|
||||||
|
<summary>Default response language for the iDoklad API (Cz, Sk, En). Defaults to Cz.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.HasCustomUrls">
|
||||||
|
<summary>True when both custom urls are configured (e.g. for a sandbox environment).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.HasDefaultCredentials">
|
||||||
|
<summary>True when the default credential triplet is fully configured via environment variables.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Controllers.AccountController">
|
||||||
|
<summary>
|
||||||
|
Account agenda: the current agenda (company) and current user. Requires iDoklad credentials
|
||||||
|
(headers or environment defaults).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.AccountController.Agenda(System.Threading.CancellationToken)">
|
||||||
|
<summary>Get information about the current agenda (company).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.AccountController.CurrentUser(System.Threading.CancellationToken)">
|
||||||
|
<summary>Get information about the current user.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Controllers.ContactsController">
|
||||||
|
<summary>
|
||||||
|
Contacts (customers/suppliers) agenda.
|
||||||
|
|
||||||
|
All endpoints require iDoklad credentials. Provide them as request headers
|
||||||
|
(<c>X-ClientId</c>, <c>X-ClientSecret</c>, <c>X-ApplicationId</c>) or rely on the service
|
||||||
|
environment defaults. See the Swagger description for details.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ContactsController.List(System.Int32,System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>List contacts (paged).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ContactsController.Detail(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Get a contact detail by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ContactsController.Default(System.Threading.CancellationToken)">
|
||||||
|
<summary>Get a pre-filled default contact model for creating a new contact.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ContactsController.Create(IdokladSdk.Models.Contact.ContactPostModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Create a new contact.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ContactsController.Update(IdokladSdk.Models.Contact.ContactPatchModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Update an existing contact (the model id identifies the contact).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ContactsController.Delete(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Delete a contact by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Controllers.IssuedInvoicesController">
|
||||||
|
<summary>
|
||||||
|
Issued (outgoing) invoices agenda. Requires iDoklad credentials (headers or environment
|
||||||
|
defaults).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.IssuedInvoicesController.List(System.Int32,System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>List issued invoices (paged).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.IssuedInvoicesController.Detail(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Get an issued invoice detail by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.IssuedInvoicesController.Default(System.Threading.CancellationToken)">
|
||||||
|
<summary>Get a pre-filled default model for creating a new issued invoice.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.IssuedInvoicesController.Create(IdokladSdk.Models.IssuedInvoice.IssuedInvoicePostModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Create a new issued invoice.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.IssuedInvoicesController.Update(IdokladSdk.Models.IssuedInvoice.IssuedInvoicePatchModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Update an existing issued invoice (the model id identifies the invoice).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.IssuedInvoicesController.Copy(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Create a copy (draft) of an existing issued invoice.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.IssuedInvoicesController.Delete(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Delete an issued invoice by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Controllers.MetaController">
|
||||||
|
<summary>Service metadata endpoints. These do not require iDoklad credentials.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.MetaController.Health">
|
||||||
|
<summary>Liveness probe.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.MetaController.Version">
|
||||||
|
<summary>Service name, version and language.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.MetaController.Status">
|
||||||
|
<summary>
|
||||||
|
Reports whether the service has default iDoklad credentials configured through
|
||||||
|
environment variables. Per-request callers can always override them with headers.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Controllers.ReceivedInvoicesController">
|
||||||
|
<summary>
|
||||||
|
Received (incoming) invoices agenda. Requires iDoklad credentials (headers or environment
|
||||||
|
defaults).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ReceivedInvoicesController.List(System.Int32,System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>List received invoices (paged).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ReceivedInvoicesController.Detail(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Get a received invoice detail by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ReceivedInvoicesController.Default(System.Threading.CancellationToken)">
|
||||||
|
<summary>Get a pre-filled default model for creating a new received invoice.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ReceivedInvoicesController.Create(IdokladSdk.Models.ReceivedInvoice.ReceivedInvoicePostModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Create a new received invoice.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ReceivedInvoicesController.Update(IdokladSdk.Models.ReceivedInvoice.ReceivedInvoicePatchModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Update an existing received invoice (the model id identifies the invoice).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ReceivedInvoicesController.Delete(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Delete a received invoice by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Controllers.RegistersController">
|
||||||
|
<summary>
|
||||||
|
Supporting registers: bank accounts, VAT rates and numeric sequences. Requires iDoklad
|
||||||
|
credentials (headers or environment defaults).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.ListBankAccounts(System.Int32,System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>List bank accounts (paged).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.BankAccountDetail(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Get a bank account detail by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.CreateBankAccount(IdokladSdk.Models.BankAccount.BankAccountPostModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Create a new bank account.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.UpdateBankAccount(IdokladSdk.Models.BankAccount.BankAccountPatchModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Update an existing bank account (the model id identifies the account).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.DeleteBankAccount(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Delete a bank account by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.ListVatRates(System.Int32,System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>List VAT rates (paged).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.VatRateDetail(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Get a VAT rate detail by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.ListNumericSequences(System.Int32,System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>List numeric (document) sequences (paged).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Credentials.CredentialConstants">
|
||||||
|
<summary>
|
||||||
|
Names of the HTTP headers that carry per-request iDoklad credentials.
|
||||||
|
|
||||||
|
Secrets are never accepted in the query string or request body: they are required in
|
||||||
|
request headers (and documented as such in Swagger). Each header carries the credential
|
||||||
|
value directly and must therefore only be sent over TLS.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:Idoklad.Credentials.CredentialConstants.LanguageHeader">
|
||||||
|
<summary>Header carrying the response language override (Cz, Sk, En).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Credentials.IdokladCredentials">
|
||||||
|
<summary>
|
||||||
|
Fully resolved set of credentials and request options used to build a <c>DokladApi</c>
|
||||||
|
instance for a single request.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Credentials.MissingCredentialsException">
|
||||||
|
<summary>
|
||||||
|
Raised when the request does not provide a complete set of iDoklad credentials,
|
||||||
|
neither through request headers nor through the service environment defaults.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Credentials.RequestCredentialsProvider">
|
||||||
|
<summary>
|
||||||
|
Resolves the iDoklad credentials for the current request.
|
||||||
|
|
||||||
|
Mirrors <c>get_request_settings</c> from the sibling microsoft-365-service: each credential
|
||||||
|
value is taken from its request header when present and otherwise falls back to the
|
||||||
|
environment-configured default. Secrets are only ever read from headers (never query/body).
|
||||||
|
If, after applying the fallbacks, any required value is still missing, the request is rejected.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Infrastructure.CredentialHeadersOperationFilter">
|
||||||
|
<summary>
|
||||||
|
Documents the per-request credential headers in Swagger for every operation that talks to
|
||||||
|
iDoklad. The headers are marked optional because the service can fall back to environment
|
||||||
|
defaults, but the description makes the requirement and secret handling explicit.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Infrastructure.ExceptionHandlingMiddleware">
|
||||||
|
<summary>
|
||||||
|
Translates domain exceptions into JSON <see cref="T:Microsoft.AspNetCore.Mvc.ProblemDetails"/> responses:
|
||||||
|
missing credentials become 401, and upstream iDoklad failures surface the upstream status.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Services.AccountService">
|
||||||
|
<summary>Account agenda: information about the current agenda and the current user.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Services.ContactsService">
|
||||||
|
<summary>Contacts (customers/suppliers) agenda.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Services.IssuedInvoicesService">
|
||||||
|
<summary>Issued (outgoing) invoices agenda.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Services.ReceivedInvoicesService">
|
||||||
|
<summary>Received (incoming) invoices agenda.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Services.RegistersService">
|
||||||
|
<summary>
|
||||||
|
Supporting registers: bank accounts, VAT rates and numeric (document) sequences.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Information",
|
||||||
|
"Microsoft.AspNetCore": "Warning"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AllowedHosts": "*"
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,4 @@
|
|||||||
|
// <autogenerated />
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
[assembly: System.Reflection.AssemblyCompanyAttribute("Idoklad")]
|
||||||
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||||
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+bbec747bb707894338c78c901bf8175f40773f12")]
|
||||||
|
[assembly: System.Reflection.AssemblyProductAttribute("Idoklad")]
|
||||||
|
[assembly: System.Reflection.AssemblyTitleAttribute("Idoklad")]
|
||||||
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
|
||||||
|
// Generated by the MSBuild WriteCodeFragment class.
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
4d956995fcb6242da55b1ce331ee5915e0498e0501326f960a23ce2e1059f1e7
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
is_global = true
|
||||||
|
build_property.TargetFramework = net8.0
|
||||||
|
build_property.TargetFrameworkIdentifier = .NETCoreApp
|
||||||
|
build_property.TargetFrameworkVersion = v8.0
|
||||||
|
build_property.TargetPlatformMinVersion =
|
||||||
|
build_property.UsingMicrosoftNETSdkWeb = true
|
||||||
|
build_property.ProjectTypeGuids =
|
||||||
|
build_property.InvariantGlobalization =
|
||||||
|
build_property.PlatformNeutralAssembly =
|
||||||
|
build_property.EnforceExtendedAnalyzerRules =
|
||||||
|
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||||
|
build_property.RootNamespace = Idoklad
|
||||||
|
build_property.RootNamespace = Idoklad
|
||||||
|
build_property.ProjectDir = D:\GitHubRepository\Hracicky\x\idoklad\
|
||||||
|
build_property.EnableComHosting =
|
||||||
|
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||||
|
build_property.RazorLangVersion = 8.0
|
||||||
|
build_property.SupportLocalizedComponentNames =
|
||||||
|
build_property.GenerateRazorMetadataSourceChecksumAttributes =
|
||||||
|
build_property.MSBuildProjectDirectory = D:\GitHubRepository\Hracicky\x\idoklad
|
||||||
|
build_property._RazorSourceGeneratorDebug =
|
||||||
|
build_property.EffectiveAnalysisLevelStyle = 8.0
|
||||||
|
build_property.EnableCodeStyleSeverity =
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
global using Microsoft.AspNetCore.Builder;
|
||||||
|
global using Microsoft.AspNetCore.Hosting;
|
||||||
|
global using Microsoft.AspNetCore.Http;
|
||||||
|
global using Microsoft.AspNetCore.Routing;
|
||||||
|
global using Microsoft.Extensions.Configuration;
|
||||||
|
global using Microsoft.Extensions.DependencyInjection;
|
||||||
|
global using Microsoft.Extensions.Hosting;
|
||||||
|
global using Microsoft.Extensions.Logging;
|
||||||
|
global using System;
|
||||||
|
global using System.Collections.Generic;
|
||||||
|
global using System.IO;
|
||||||
|
global using System.Linq;
|
||||||
|
global using System.Net.Http;
|
||||||
|
global using System.Net.Http.Json;
|
||||||
|
global using System.Threading;
|
||||||
|
global using System.Threading.Tasks;
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,92 @@
|
|||||||
|
{
|
||||||
|
"format": 1,
|
||||||
|
"restore": {
|
||||||
|
"D:\\GitHubRepository\\Hracicky\\x\\idoklad\\Idoklad.csproj": {}
|
||||||
|
},
|
||||||
|
"projects": {
|
||||||
|
"D:\\GitHubRepository\\Hracicky\\x\\idoklad\\Idoklad.csproj": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"restore": {
|
||||||
|
"projectUniqueName": "D:\\GitHubRepository\\Hracicky\\x\\idoklad\\Idoklad.csproj",
|
||||||
|
"projectName": "Idoklad",
|
||||||
|
"projectPath": "D:\\GitHubRepository\\Hracicky\\x\\idoklad\\Idoklad.csproj",
|
||||||
|
"packagesPath": "C:\\Users\\GamingPC\\.nuget\\packages\\",
|
||||||
|
"outputPath": "D:\\GitHubRepository\\Hracicky\\x\\idoklad\\obj\\",
|
||||||
|
"projectStyle": "PackageReference",
|
||||||
|
"fallbackFolders": [
|
||||||
|
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||||
|
],
|
||||||
|
"configFilePaths": [
|
||||||
|
"C:\\Users\\GamingPC\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||||
|
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||||
|
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||||
|
],
|
||||||
|
"originalTargetFrameworks": [
|
||||||
|
"net8.0"
|
||||||
|
],
|
||||||
|
"sources": {
|
||||||
|
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||||
|
"C:\\Program Files\\dotnet\\library-packs": {},
|
||||||
|
"D:\\CustomNuGetPackages": {},
|
||||||
|
"https://api.nuget.org/v3/index.json": {}
|
||||||
|
},
|
||||||
|
"frameworks": {
|
||||||
|
"net8.0": {
|
||||||
|
"targetAlias": "net8.0",
|
||||||
|
"projectReferences": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"warningProperties": {
|
||||||
|
"warnAsError": [
|
||||||
|
"NU1605"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"restoreAuditProperties": {
|
||||||
|
"enableAudit": "true",
|
||||||
|
"auditLevel": "low",
|
||||||
|
"auditMode": "direct"
|
||||||
|
},
|
||||||
|
"SdkAnalysisLevel": "10.0.200"
|
||||||
|
},
|
||||||
|
"frameworks": {
|
||||||
|
"net8.0": {
|
||||||
|
"targetAlias": "net8.0",
|
||||||
|
"dependencies": {
|
||||||
|
"IdokladSdk": {
|
||||||
|
"target": "Package",
|
||||||
|
"version": "[5.3.0, )"
|
||||||
|
},
|
||||||
|
"Microsoft.AspNetCore.Mvc.NewtonsoftJson": {
|
||||||
|
"target": "Package",
|
||||||
|
"version": "[8.0.11, )"
|
||||||
|
},
|
||||||
|
"Swashbuckle.AspNetCore": {
|
||||||
|
"target": "Package",
|
||||||
|
"version": "[6.9.0, )"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"imports": [
|
||||||
|
"net461",
|
||||||
|
"net462",
|
||||||
|
"net47",
|
||||||
|
"net471",
|
||||||
|
"net472",
|
||||||
|
"net48",
|
||||||
|
"net481"
|
||||||
|
],
|
||||||
|
"assetTargetFallback": true,
|
||||||
|
"warn": true,
|
||||||
|
"frameworkReferences": {
|
||||||
|
"Microsoft.AspNetCore.App": {
|
||||||
|
"privateAssets": "none"
|
||||||
|
},
|
||||||
|
"Microsoft.NETCore.App": {
|
||||||
|
"privateAssets": "all"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\10.0.204/PortableRuntimeIdentifierGraph.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||||
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||||
|
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||||
|
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||||
|
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||||
|
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||||
|
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\GamingPC\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||||
|
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||||
|
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">7.0.0</NuGetToolVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||||
|
<SourceRoot Include="C:\Users\GamingPC\.nuget\packages\" />
|
||||||
|
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||||
|
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.props" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.props')" />
|
||||||
|
<Import Project="$(NuGetPackageRoot)swashbuckle.aspnetcore\6.9.0\build\Swashbuckle.AspNetCore.props" Condition="Exists('$(NuGetPackageRoot)swashbuckle.aspnetcore\6.9.0\build\Swashbuckle.AspNetCore.props')" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||||
|
<PkgMicrosoft_Extensions_ApiDescription_Server Condition=" '$(PkgMicrosoft_Extensions_ApiDescription_Server)' == '' ">C:\Users\GamingPC\.nuget\packages\microsoft.extensions.apidescription.server\6.0.5</PkgMicrosoft_Extensions_ApiDescription_Server>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||||
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||||
|
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.targets')" />
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// <autogenerated />
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
[assembly: System.Reflection.AssemblyCompanyAttribute("Idoklad")]
|
||||||
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||||
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+bbec747bb707894338c78c901bf8175f40773f12")]
|
||||||
|
[assembly: System.Reflection.AssemblyProductAttribute("Idoklad")]
|
||||||
|
[assembly: System.Reflection.AssemblyTitleAttribute("Idoklad")]
|
||||||
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
|
||||||
|
// Generated by the MSBuild WriteCodeFragment class.
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
9330b1b41c96efd56de1c2646a1495cef68227a0fe6aa8897950cb2005c1774e
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
is_global = true
|
||||||
|
build_property.TargetFramework = net8.0
|
||||||
|
build_property.TargetFrameworkIdentifier = .NETCoreApp
|
||||||
|
build_property.TargetFrameworkVersion = v8.0
|
||||||
|
build_property.TargetPlatformMinVersion =
|
||||||
|
build_property.UsingMicrosoftNETSdkWeb = true
|
||||||
|
build_property.ProjectTypeGuids =
|
||||||
|
build_property.InvariantGlobalization =
|
||||||
|
build_property.PlatformNeutralAssembly =
|
||||||
|
build_property.EnforceExtendedAnalyzerRules =
|
||||||
|
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||||
|
build_property.RootNamespace = Idoklad
|
||||||
|
build_property.RootNamespace = Idoklad
|
||||||
|
build_property.ProjectDir = D:\GitHubRepository\Hracicky\x\idoklad\
|
||||||
|
build_property.EnableComHosting =
|
||||||
|
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||||
|
build_property.RazorLangVersion = 8.0
|
||||||
|
build_property.SupportLocalizedComponentNames =
|
||||||
|
build_property.GenerateRazorMetadataSourceChecksumAttributes =
|
||||||
|
build_property.MSBuildProjectDirectory = D:\GitHubRepository\Hracicky\x\idoklad
|
||||||
|
build_property._RazorSourceGeneratorDebug =
|
||||||
|
build_property.EffectiveAnalysisLevelStyle = 8.0
|
||||||
|
build_property.EnableCodeStyleSeverity =
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
global using Microsoft.AspNetCore.Builder;
|
||||||
|
global using Microsoft.AspNetCore.Hosting;
|
||||||
|
global using Microsoft.AspNetCore.Http;
|
||||||
|
global using Microsoft.AspNetCore.Routing;
|
||||||
|
global using Microsoft.Extensions.Configuration;
|
||||||
|
global using Microsoft.Extensions.DependencyInjection;
|
||||||
|
global using Microsoft.Extensions.Hosting;
|
||||||
|
global using Microsoft.Extensions.Logging;
|
||||||
|
global using System;
|
||||||
|
global using System.Collections.Generic;
|
||||||
|
global using System.IO;
|
||||||
|
global using System.Linq;
|
||||||
|
global using System.Net.Http;
|
||||||
|
global using System.Net.Http.Json;
|
||||||
|
global using System.Threading;
|
||||||
|
global using System.Threading.Tasks;
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Swashbuckle.AspNetCore.SwaggerGen")]
|
||||||
|
|
||||||
|
// Generated by the MSBuild WriteCodeFragment class.
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
8c52ccc98fa666734950d1f217e2bf36db84e91ef7b161912359e9d71820c6b4
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\appsettings.json
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Idoklad.staticwebassets.endpoints.json
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Idoklad.exe
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Idoklad.deps.json
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Idoklad.runtimeconfig.json
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Idoklad.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Idoklad.pdb
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Idoklad.xml
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\IbanNet.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\IdokladSdk.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Microsoft.AspNetCore.JsonPatch.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Microsoft.AspNetCore.Mvc.NewtonsoftJson.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Microsoft.IdentityModel.Abstractions.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Microsoft.IdentityModel.JsonWebTokens.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Microsoft.IdentityModel.Logging.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Microsoft.IdentityModel.Tokens.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Microsoft.OpenApi.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Newtonsoft.Json.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Newtonsoft.Json.Bson.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Swashbuckle.AspNetCore.Swagger.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Swashbuckle.AspNetCore.SwaggerGen.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\Swashbuckle.AspNetCore.SwaggerUI.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\System.IdentityModel.Tokens.Jwt.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\ca\IbanNet.resources.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\de\IbanNet.resources.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\bin\Release\net8.0\nl\IbanNet.resources.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\Idoklad.csproj.AssemblyReference.cache
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\rpswa.dswa.cache.json
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\Idoklad.GeneratedMSBuildEditorConfig.editorconfig
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\Idoklad.AssemblyInfoInputs.cache
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\Idoklad.AssemblyInfo.cs
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\Idoklad.csproj.CoreCompileInputs.cache
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\Idoklad.MvcApplicationPartsAssemblyInfo.cs
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\Idoklad.MvcApplicationPartsAssemblyInfo.cache
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\rjimswa.dswa.cache.json
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\rjsmrazor.dswa.cache.json
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\rjsmcshtml.dswa.cache.json
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\scopedcss\bundle\Idoklad.styles.css
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\staticwebassets.build.json
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\staticwebassets.build.json.cache
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\staticwebassets.development.json
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\staticwebassets.build.endpoints.json
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\swae.build.ex.cache
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\Idoklad.csproj.Up2Date
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\Idoklad.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\refint\Idoklad.dll
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\Idoklad.xml
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\Idoklad.pdb
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\Idoklad.genruntimeconfig.cache
|
||||||
|
D:\GitHubRepository\Hracicky\x\idoklad\obj\Release\net8.0\ref\Idoklad.dll
|
||||||
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
6db239378e2f05937262b4a1b5c1dd79b00ebb1f6a28d48bb7c482305ff7786d
|
||||||
Binary file not shown.
@@ -0,0 +1,266 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>Idoklad</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:Idoklad.Client.ApiResultExtensions">
|
||||||
|
<summary>
|
||||||
|
Helpers that unwrap the SDK's <see cref="T:IdokladSdk.Response.ApiResult`1"/> envelope, returning the payload
|
||||||
|
on success and translating failures into <see cref="T:Idoklad.Client.IdokladApiException"/>.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Client.DokladApiFactory">
|
||||||
|
<summary>
|
||||||
|
Builds <see cref="T:IdokladSdk.DokladApi"/> instances from resolved per-request credentials, using the
|
||||||
|
official iDoklad .NET SDK (IdokladSdk) and an <see cref="T:System.Net.Http.IHttpClientFactory"/>-managed
|
||||||
|
<see cref="T:System.Net.Http.HttpClient"/>. This is the iDoklad analogue of microsoft-365-service's graph_client.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Client.IdokladApiAccessor">
|
||||||
|
<summary>
|
||||||
|
Scoped accessor that resolves the credentials for the current request and lazily builds a
|
||||||
|
single <see cref="T:IdokladSdk.DokladApi"/> shared by all services handling that request.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Client.IdokladApiException">
|
||||||
|
<summary>
|
||||||
|
Raised when an upstream iDoklad API call does not succeed. Carries the upstream HTTP status
|
||||||
|
code, message and iDoklad error code so the failure can be surfaced to the caller.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Configuration.IdokladSettings">
|
||||||
|
<summary>
|
||||||
|
Service configuration resolved from environment variables.
|
||||||
|
|
||||||
|
Mirrors the structure used by the sibling microsoft-365-service (config.py): non-secret
|
||||||
|
configuration and credential defaults live in environment variables. Per-request callers
|
||||||
|
can override the credential values through request headers (see
|
||||||
|
<see cref="T:Idoklad.Credentials.RequestCredentialsProvider"/>).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.ClientId">
|
||||||
|
<summary>Default iDoklad OAuth2 client id (client credentials flow).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.ClientSecret">
|
||||||
|
<summary>Default iDoklad OAuth2 client secret (client credentials flow).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.ApplicationId">
|
||||||
|
<summary>Default iDoklad application id from the developer portal (required by client credentials flow).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.ApiUrl">
|
||||||
|
<summary>Optional custom iDoklad API base url (defaults to the SDK production url when empty).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.IdentityServerUrl">
|
||||||
|
<summary>Optional custom Identity Server token url (defaults to the SDK production url when empty).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.Language">
|
||||||
|
<summary>Default response language for the iDoklad API (Cz, Sk, En). Defaults to Cz.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.HasCustomUrls">
|
||||||
|
<summary>True when both custom urls are configured (e.g. for a sandbox environment).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:Idoklad.Configuration.IdokladSettings.HasDefaultCredentials">
|
||||||
|
<summary>True when the default credential triplet is fully configured via environment variables.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Controllers.AccountController">
|
||||||
|
<summary>
|
||||||
|
Account agenda: the current agenda (company) and current user. Requires iDoklad credentials
|
||||||
|
(headers or environment defaults).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.AccountController.Agenda(System.Threading.CancellationToken)">
|
||||||
|
<summary>Get information about the current agenda (company).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.AccountController.CurrentUser(System.Threading.CancellationToken)">
|
||||||
|
<summary>Get information about the current user.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Controllers.ContactsController">
|
||||||
|
<summary>
|
||||||
|
Contacts (customers/suppliers) agenda.
|
||||||
|
|
||||||
|
All endpoints require iDoklad credentials. Provide them as request headers
|
||||||
|
(<c>X-ClientId</c>, <c>X-ClientSecret</c>, <c>X-ApplicationId</c>) or rely on the service
|
||||||
|
environment defaults. See the Swagger description for details.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ContactsController.List(System.Int32,System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>List contacts (paged).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ContactsController.Detail(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Get a contact detail by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ContactsController.Default(System.Threading.CancellationToken)">
|
||||||
|
<summary>Get a pre-filled default contact model for creating a new contact.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ContactsController.Create(IdokladSdk.Models.Contact.ContactPostModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Create a new contact.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ContactsController.Update(IdokladSdk.Models.Contact.ContactPatchModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Update an existing contact (the model id identifies the contact).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ContactsController.Delete(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Delete a contact by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Controllers.IssuedInvoicesController">
|
||||||
|
<summary>
|
||||||
|
Issued (outgoing) invoices agenda. Requires iDoklad credentials (headers or environment
|
||||||
|
defaults).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.IssuedInvoicesController.List(System.Int32,System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>List issued invoices (paged).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.IssuedInvoicesController.Detail(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Get an issued invoice detail by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.IssuedInvoicesController.Default(System.Threading.CancellationToken)">
|
||||||
|
<summary>Get a pre-filled default model for creating a new issued invoice.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.IssuedInvoicesController.Create(IdokladSdk.Models.IssuedInvoice.IssuedInvoicePostModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Create a new issued invoice.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.IssuedInvoicesController.Update(IdokladSdk.Models.IssuedInvoice.IssuedInvoicePatchModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Update an existing issued invoice (the model id identifies the invoice).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.IssuedInvoicesController.Copy(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Create a copy (draft) of an existing issued invoice.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.IssuedInvoicesController.Delete(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Delete an issued invoice by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Controllers.MetaController">
|
||||||
|
<summary>Service metadata endpoints. These do not require iDoklad credentials.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.MetaController.Health">
|
||||||
|
<summary>Liveness probe.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.MetaController.Version">
|
||||||
|
<summary>Service name, version and language.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.MetaController.Status">
|
||||||
|
<summary>
|
||||||
|
Reports whether the service has default iDoklad credentials configured through
|
||||||
|
environment variables. Per-request callers can always override them with headers.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Controllers.ReceivedInvoicesController">
|
||||||
|
<summary>
|
||||||
|
Received (incoming) invoices agenda. Requires iDoklad credentials (headers or environment
|
||||||
|
defaults).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ReceivedInvoicesController.List(System.Int32,System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>List received invoices (paged).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ReceivedInvoicesController.Detail(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Get a received invoice detail by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ReceivedInvoicesController.Default(System.Threading.CancellationToken)">
|
||||||
|
<summary>Get a pre-filled default model for creating a new received invoice.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ReceivedInvoicesController.Create(IdokladSdk.Models.ReceivedInvoice.ReceivedInvoicePostModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Create a new received invoice.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ReceivedInvoicesController.Update(IdokladSdk.Models.ReceivedInvoice.ReceivedInvoicePatchModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Update an existing received invoice (the model id identifies the invoice).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.ReceivedInvoicesController.Delete(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Delete a received invoice by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Controllers.RegistersController">
|
||||||
|
<summary>
|
||||||
|
Supporting registers: bank accounts, VAT rates and numeric sequences. Requires iDoklad
|
||||||
|
credentials (headers or environment defaults).
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.ListBankAccounts(System.Int32,System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>List bank accounts (paged).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.BankAccountDetail(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Get a bank account detail by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.CreateBankAccount(IdokladSdk.Models.BankAccount.BankAccountPostModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Create a new bank account.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.UpdateBankAccount(IdokladSdk.Models.BankAccount.BankAccountPatchModel,System.Threading.CancellationToken)">
|
||||||
|
<summary>Update an existing bank account (the model id identifies the account).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.DeleteBankAccount(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Delete a bank account by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.ListVatRates(System.Int32,System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>List VAT rates (paged).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.VatRateDetail(System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>Get a VAT rate detail by id.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:Idoklad.Controllers.RegistersController.ListNumericSequences(System.Int32,System.Int32,System.Threading.CancellationToken)">
|
||||||
|
<summary>List numeric (document) sequences (paged).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Credentials.CredentialConstants">
|
||||||
|
<summary>
|
||||||
|
Names of the HTTP headers that carry per-request iDoklad credentials.
|
||||||
|
|
||||||
|
Secrets are never accepted in the query string or request body: they are required in
|
||||||
|
request headers (and documented as such in Swagger). Each header carries the credential
|
||||||
|
value directly and must therefore only be sent over TLS.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:Idoklad.Credentials.CredentialConstants.LanguageHeader">
|
||||||
|
<summary>Header carrying the response language override (Cz, Sk, En).</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Credentials.IdokladCredentials">
|
||||||
|
<summary>
|
||||||
|
Fully resolved set of credentials and request options used to build a <c>DokladApi</c>
|
||||||
|
instance for a single request.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Credentials.MissingCredentialsException">
|
||||||
|
<summary>
|
||||||
|
Raised when the request does not provide a complete set of iDoklad credentials,
|
||||||
|
neither through request headers nor through the service environment defaults.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Credentials.RequestCredentialsProvider">
|
||||||
|
<summary>
|
||||||
|
Resolves the iDoklad credentials for the current request.
|
||||||
|
|
||||||
|
Mirrors <c>get_request_settings</c> from the sibling microsoft-365-service: each credential
|
||||||
|
value is taken from its request header when present and otherwise falls back to the
|
||||||
|
environment-configured default. Secrets are only ever read from headers (never query/body).
|
||||||
|
If, after applying the fallbacks, any required value is still missing, the request is rejected.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Infrastructure.CredentialHeadersOperationFilter">
|
||||||
|
<summary>
|
||||||
|
Documents the per-request credential headers in Swagger for every operation that talks to
|
||||||
|
iDoklad. The headers are marked optional because the service can fall back to environment
|
||||||
|
defaults, but the description makes the requirement and secret handling explicit.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Infrastructure.ExceptionHandlingMiddleware">
|
||||||
|
<summary>
|
||||||
|
Translates domain exceptions into JSON <see cref="T:Microsoft.AspNetCore.Mvc.ProblemDetails"/> responses:
|
||||||
|
missing credentials become 401, and upstream iDoklad failures surface the upstream status.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Services.AccountService">
|
||||||
|
<summary>Account agenda: information about the current agenda and the current user.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Services.ContactsService">
|
||||||
|
<summary>Contacts (customers/suppliers) agenda.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Services.IssuedInvoicesService">
|
||||||
|
<summary>Issued (outgoing) invoices agenda.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Services.ReceivedInvoicesService">
|
||||||
|
<summary>Received (incoming) invoices agenda.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:Idoklad.Services.RegistersService">
|
||||||
|
<summary>
|
||||||
|
Supporting registers: bank accounts, VAT rates and numeric (document) sequences.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
|||||||
|
{"GlobalPropertiesHash":"B9kWZPkqs9jh4om+wEa7vtkXe98jy4Uk00TDvCFOMAg=","FingerprintPatternsHash":"gq3WsqcKBUGTSNle7RKKyXRIwh7M8ccEqOqYvIzoM04=","PropertyOverridesHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","InputHashes":["Xoy6Z/ZliL2FaV/OPQYzcdsWaKV5xBoURVM2EiwsMe0=","UnIQ74hcK4OEyD1OXQb8l/Ai5e5GkT1C8ZVGznd7EHM=","vIllxnm6hE/qU5OIVUPxE4SuD2ijmi27OPg5VyWR6ZM=","QqmhCK1Ak7uSaGTG1n4MvYJ\u002BFpdANJykxNBeraLdr/c=","et\u002BonTqXghtchEvOcFNSnpptMGH2zS\u002Bmy59QN1yTclY="],"CachedAssets":{},"CachedCopyCandidates":{}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"GlobalPropertiesHash":"ITni+o74UkYnIxQUhjgt1e5B31FSFcyvxyxM3WTkkB8=","FingerprintPatternsHash":"gq3WsqcKBUGTSNle7RKKyXRIwh7M8ccEqOqYvIzoM04=","PropertyOverridesHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","InputHashes":["Xoy6Z/ZliL2FaV/OPQYzcdsWaKV5xBoURVM2EiwsMe0=","UnIQ74hcK4OEyD1OXQb8l/Ai5e5GkT1C8ZVGznd7EHM=","vIllxnm6hE/qU5OIVUPxE4SuD2ijmi27OPg5VyWR6ZM=","QqmhCK1Ak7uSaGTG1n4MvYJ\u002BFpdANJykxNBeraLdr/c=","et\u002BonTqXghtchEvOcFNSnpptMGH2zS\u002Bmy59QN1yTclY="],"CachedAssets":{},"CachedCopyCandidates":{}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"GlobalPropertiesHash":"mtHRwZSpqhpjTpXVP7OTHx/hA+8aHhOXtaICvBxSOxM=","FingerprintPatternsHash":"gq3WsqcKBUGTSNle7RKKyXRIwh7M8ccEqOqYvIzoM04=","PropertyOverridesHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","InputHashes":["Xoy6Z/ZliL2FaV/OPQYzcdsWaKV5xBoURVM2EiwsMe0="],"CachedAssets":{},"CachedCopyCandidates":{}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"Version":1,"ManifestType":"Build","Endpoints":[]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"Version":1,"Hash":"7DN8saVWijVbmDBZMNPML3QUSVed484vZhEJ3j2d9E8=","Source":"Idoklad","BasePath":"/","Mode":"Root","ManifestType":"Build","ReferencedProjectsConfiguration":[],"DiscoveryPatterns":[],"Assets":[],"Endpoints":[]}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
7DN8saVWijVbmDBZMNPML3QUSVed484vZhEJ3j2d9E8=
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"version": 2,
|
||||||
|
"dgSpecHash": "JrrcwEj1SyE=",
|
||||||
|
"success": true,
|
||||||
|
"projectFilePath": "D:\\GitHubRepository\\Hracicky\\x\\idoklad\\Idoklad.csproj",
|
||||||
|
"expectedPackageFiles": [
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\ibannet\\5.16.1\\ibannet.5.16.1.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\idokladsdk\\5.3.0\\idokladsdk.5.3.0.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\microsoft.aspnetcore.jsonpatch\\8.0.11\\microsoft.aspnetcore.jsonpatch.8.0.11.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\microsoft.aspnetcore.mvc.newtonsoftjson\\8.0.11\\microsoft.aspnetcore.mvc.newtonsoftjson.8.0.11.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\microsoft.extensions.apidescription.server\\6.0.5\\microsoft.extensions.apidescription.server.6.0.5.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\microsoft.identitymodel.abstractions\\7.6.0\\microsoft.identitymodel.abstractions.7.6.0.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\microsoft.identitymodel.jsonwebtokens\\7.6.0\\microsoft.identitymodel.jsonwebtokens.7.6.0.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\microsoft.identitymodel.logging\\7.6.0\\microsoft.identitymodel.logging.7.6.0.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\microsoft.identitymodel.tokens\\7.6.0\\microsoft.identitymodel.tokens.7.6.0.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\microsoft.openapi\\1.6.14\\microsoft.openapi.1.6.14.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\newtonsoft.json\\13.0.3\\newtonsoft.json.13.0.3.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\newtonsoft.json.bson\\1.0.2\\newtonsoft.json.bson.1.0.2.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\swashbuckle.aspnetcore\\6.9.0\\swashbuckle.aspnetcore.6.9.0.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\swashbuckle.aspnetcore.swagger\\6.9.0\\swashbuckle.aspnetcore.swagger.6.9.0.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\swashbuckle.aspnetcore.swaggergen\\6.9.0\\swashbuckle.aspnetcore.swaggergen.6.9.0.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\swashbuckle.aspnetcore.swaggerui\\6.9.0\\swashbuckle.aspnetcore.swaggerui.6.9.0.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\system.componentmodel.annotations\\5.0.0\\system.componentmodel.annotations.5.0.0.nupkg.sha512",
|
||||||
|
"C:\\Users\\GamingPC\\.nuget\\packages\\system.identitymodel.tokens.jwt\\7.6.0\\system.identitymodel.tokens.jwt.7.6.0.nupkg.sha512"
|
||||||
|
],
|
||||||
|
"logs": []
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user