Skip to main content

Kandra.Api.Lib

Kandra.Api.Lib.Controllers.DocumentControllerBase<T0, T1>

Methods

MethodDescription
InternalPrintAsync(Guid, DocumentExportRequest, CancellationToken)undocumented

Kandra.Api.Lib.Controllers.HandlerControllerBase<T0, T1>

One generated derived controller per handler (route api/v{version}/handlers/{Key}, a single PATCH action) — see Kandra.Generators.Api.Controllers.HandlerControllerEmitter. The generated constructor resolves TIn/TOut's IHandlerBehavior via [FromKeyedServices(Key)], since the closed generic type alone isn't a safe DI discriminator across handlers (see IHandlerBehavior's own doc comment).

Constructors

ConstructorDescription
HandlerControllerBase(IHandlerBehavior<T0, T1>)One generated derived controller per handler (route api/v{version}/handlers/{Key}, a single PATCH action) — see Kandra.Generators.Api.Controllers.HandlerControllerEmitter. The generated constructor resolves TIn/TOut's IHandlerBehavior via [FromKeyedServices(Key)], since the closed generic type alone isn't a safe DI discriminator across handlers (see IHandlerBehavior's own doc comment).

Kandra.Api.Lib.Controllers.V1.AdminBlobsController

Constructors

ConstructorDescription
AdminBlobsController(IBlobService)undocumented

Kandra.Api.Lib.Controllers.V1.BlobsController

Individual-reference operations only (upload/download/metadata/tombstone/restore) - entity attachment is never done here (docs/blob-storage-architecture.md AD-13a: no standalone promote endpoint). A document/dictionary's own behavior calls IBlobService.SyncEntityReferencesAsync directly, in-process, as part of its own save/delete transaction.

Constructors

ConstructorDescription
BlobsController(IBlobService, IUnitOfWork, IAuthorizationChecker)Individual-reference operations only (upload/download/metadata/tombstone/restore) - entity attachment is never done here (docs/blob-storage-architecture.md AD-13a: no standalone promote endpoint). A document/dictionary's own behavior calls IBlobService.SyncEntityReferencesAsync directly, in-process, as part of its own save/delete transaction.

Methods

MethodDescription
DownloadAsync(Guid, CancellationToken)undocumented

Kandra.Api.Lib.Controllers.V1.ChangeEventsController

Constructors

ConstructorDescription
ChangeEventsController(IChangeEventQueryService)undocumented

Kandra.Api.Lib.Controllers.V1.ChartOfAccountsController

Read-only tree of the registered chart of accounts (Kandra.Domain.Accounting.IChartOfAccountsService. Chart) - static, code-defined reference data (see the consuming configuration's IChartOfAccountsBuilder), never edited via UI, so this is the only endpoint. Same hand-written, cross-entity, engine-level posture as LookupController/ChangeEventsController - reaches the host application via AddApplicationPart.

Constructors

ConstructorDescription
ChartOfAccountsController(IChartOfAccountsTreeService)Read-only tree of the registered chart of accounts (Kandra.Domain.Accounting.IChartOfAccountsService. Chart) - static, code-defined reference data (see the consuming configuration's IChartOfAccountsBuilder), never edited via UI, so this is the only endpoint. Same hand-written, cross-entity, engine-level posture as LookupController/ChangeEventsController - reaches the host application via AddApplicationPart.

Kandra.Api.Lib.Controllers.V1.ConstantsController

Admin read/write surface over declared constants (IConstantRegistry) - not per-type CRUD like the generated Dictionary/Document controllers, since every constant shares one physical Sys_Constants table; a handful of endpoints wrapping IConstantsManageService is all that's needed. Same hand-written, engine-level posture as ChartOfAccountsController/SettingsController. Authorization is enforced inside IConstantsManageService itself (ConstantsAuthorizationPoint/ApplicationArea.Constant) on every call - [Authorize] here only requires a logged-in user.

Constructors

ConstructorDescription
ConstantsController(IConstantsManageService, IConstantRegistry)Admin read/write surface over declared constants (IConstantRegistry) - not per-type CRUD like the generated Dictionary/Document controllers, since every constant shares one physical Sys_Constants table; a handful of endpoints wrapping IConstantsManageService is all that's needed. Same hand-written, engine-level posture as ChartOfAccountsController/SettingsController. Authorization is enforced inside IConstantsManageService itself (ConstantsAuthorizationPoint/ApplicationArea.Constant) on every call - [Authorize] here only requires a logged-in user.

Methods

MethodDescription
AddAsync(String, SetConstantValueDto, CancellationToken)Adds a new value, effective from Date (defaults to now). POST, not PUT - this always creates a row (upserted only as a same-instant collision safety net, not as an editing path); use UpdateValueAsync to edit an existing row.
UnwrapValue(String)Unwraps the {"Value": ...} storage envelope (see ConstantsManageService.SetAsync<T>/SetRawAsync) into the bare value's own JSON, for the API's client-facing shape.
UpdateValueAsync(Guid, UpdateConstantValueDto, CancellationToken)Edits one existing row's value in place, identified purely by id - never by re-deriving or matching its effective instant (see IConstantsManageService.UpdateValueAsync's doc comment for why).

Kandra.Api.Lib.Controllers.V1.InterfacesController

Read-only, server-driven navigation trees ("Interfaces" - see Kandra.Application.Abstractions. Navigation.InterfaceDefinition's own doc comment). All resolution/visibility-pruning logic lives in IInterfaceCatalogService - this controller only translates its result into HTTP. Same hand-written, cross-entity, engine-level posture as LookupController/SettingsController.

Constructors

ConstructorDescription
InterfacesController(IInterfaceCatalogService)Read-only, server-driven navigation trees ("Interfaces" - see Kandra.Application.Abstractions. Navigation.InterfaceDefinition's own doc comment). All resolution/visibility-pruning logic lives in IInterfaceCatalogService - this controller only translates its result into HTTP. Same hand-written, cross-entity, engine-level posture as LookupController/SettingsController.

Methods

MethodDescription
GetInterface(String)404/403 aren't branched here - GetInterface throws NotFoundException/UnauthorizedAccessException, and HttpGlobalExceptionFilter already maps both to the right status for every controller in the app.

Kandra.Api.Lib.Controllers.V1.SchedulerController

Admin surface for the job scheduler - hand-written, engine-level (same posture as ConstantsController/ChartOfAccountsController), not a generated per-entity CRUD controller since scheduled jobs aren't a Kandra*Form entity kind. Authorization is enforced inside ISchedulerAdminService itself - [Authorize] here only requires a logged-in user.

Constructors

ConstructorDescription
SchedulerController(ISchedulerAdminService)Admin surface for the job scheduler - hand-written, engine-level (same posture as ConstantsController/ChartOfAccountsController), not a generated per-entity CRUD controller since scheduled jobs aren't a Kandra*Form entity kind. Authorization is enforced inside ISchedulerAdminService itself - [Authorize] here only requires a logged-in user.

Kandra.Api.Lib.Services.ScopedCallerContext