Namespace BpNexT.Actions.Abstractions
Classes
- ActionAttribute
Marks a public module method as a named automation action.
- ActionControllerAttribute
Marks a class besides the module as an action host, so endpoints can live in one class per resource — typically subclasses of a shared generic base. The id prefixes every contained action id (
{id}-{actionId}) and Route prefixes every [HttpRoute] template, which lets the base class declare relative routes that specialize per subclass. Controllers are dependency-injected per run exactly like the module; the module's lifecycle hooks still run around their actions. [Main], [Service], and [OptionsProvider] remain module-only.
- ActionExecutedContext
Provides the input and output after successful action execution.
- ActionExecutionContext
Provides the current context and input before an action executes.
- ActionFailedContext
Provides the original action failure to the module lifecycle hook.
- ActionFileResult
Return type for actions whose HTTP response is a file instead of JSON (e.g. images). The content is buffered; outside an HTTP request the result serializes like any payload.
- AutomationContext
Describes one action run and is resolved from the run's dependency injection scope. It carries identity and trigger metadata, but deliberately exposes no runtime services.
- BarcodeAttribute
Marks a string property as barcode-scanner input. The generated form focuses the field and treats a scanner's terminating Enter as "advance/submit"; only valid on string properties.
- BpModule
Base class for an automation module and its action lifecycle hooks. Runtime services remain constructor-injected so this class stays small and testable.
- BpModuleMetadata
Holds the metadata property overrides declared on a module class.
- BpPage
One declarative UI page of a module. Pages are discovered from the module assembly like the module itself and activated per request from the module's service scope (constructor-inject what the module can inject). BuildAsync(PageRequest, CancellationToken) returns a tree of blocks — plain data, never markup — that the host (Studio or the apps portal) renders in its own design language. Navigation between pages is a Link carried by a block; input blocks (SearchBox, Pager) feed their values back through the PageRequest on the next build. A list→detail browser is simply two pages and a link. A page build runs with a live microtech ERP session and is recorded as a view run (visible in the run history, tagged apart from ordinary action runs) — treat it as a read-only query.
- Card
A card section: optional badges, plain text lines (addresses), key/value rows, and nested blocks (e.g. an inner Table). Empty parts are simply not rendered.
- ChangedSet<T>
Contains one durable batch of changed dataset entities supplied by the runtime. The payload type is shared by COM and GraphQL modules: any dataset entity fits here, and the runtime's polling side decides per connection kind how (and whether) changes for it can be read.
- ChangedTriggerContext
Identifies the durable dataset-change batch that triggered an action.
- CronAttribute
Declares a default five-field cron trigger for an action.
- EveryAttribute
Declares a default fixed interval trigger for an action.
- FieldAttribute
Overrides the display metadata of one action-input property. The control type itself is deduced from the property type; this attribute only refines how the field is presented.
- FieldOption
One selectable choice returned by an options provider.
- Grid
Lays its cells out in a responsive grid instead of stacking them — the shape a dashboard wants. Give a cell a title by wrapping its block in a Card.
- GridCell
One grid cell.
Columnsis how many columns the cell spans; the renderer treats it as a hint and clamps it to the width it actually has.
- Header
A page-level headline with optional subtitle and key/value chips.
- HttpProblem
Factory for ProblemHttpException — the ergonomic way to return an HTTP problem from module code (
throw HttpProblem.NotFound("…")). Named helpers cover the common statuses; Create(int, string, string?, string?, Exception?, IReadOnlyDictionary<string, string>?) handles the rest.
- HttpRouteAttribute
Publishes an action as an HTTP endpoint on the runtime host's public API bind (
Runtime:PublicApiUrl). HTTP is a trigger, not a new method kind: the decorated method must also be an [Action], and requests execute through the normal action pipeline — typed input, validation, run history, and logs all apply. Route values and query parameters bind onto the input type by property name (case-insensitive) and take precedence over the request body; the body (when present) binds the remaining members.
- HttpTriggerContext
Describes an action run requested through the runtime host's public HTTP API.
- KeyValueList
A standalone key/value list.
- KeyValueRow
One key/value row of a KeyValueList, Card or Header.
- Link
Builds typed links between a module's pages.
- MainAttribute
Marks the module's optional default action.
- ManualTriggerContext
Describes an action requested directly by a user or client.
- ModuleBuildContext
Supplies immutable runtime and installation metadata during module service registration.
- ModuleService
Base class for a long-running module service. Register it with
services.AddHostedService<T>(); the runtime starts it when the module loads, cancels its token when the module unloads, and restarts it after a failure.
- ModuleSettingsPageAttribute
Marks a plain settings class the module wants Studio to render as an editable page. The class uses the same field attributes as an action input type (FieldAttribute, MultilineAttribute, OptionsAttribute, OptionsFromAttribute, DataAnnotations). Studio persists the entered values; the module reads them back through IModuleConfig. Mark sensitive properties with SecretFieldAttribute.
- MultilineAttribute
Renders a string property as a multi-line text area instead of a single-line textbox.
- Note
A short informational text (empty states, hints).
- OnChangedAttribute
Marks an action as a subscriber to changes of its
ChangedSet<T>input type. The entity type is inferred from that single parameter, so it cannot be declared twice or mismatch.
- OptionsAttribute
Supplies a fixed choice list for a string (dropdown) or string-collection (multi-dropdown) property. For dynamic choices use OptionsFromAttribute instead.
- OptionsFromAttribute
Sources the choice list of a string or string-collection property from the module's OptionsProviderAttribute method with the same id, resolved when the form renders.
- OptionsProviderAttribute
Marks a public module method as an options provider for OptionsFromAttribute. The method takes at most a CancellationToken and returns a sequence of FieldOption (directly or wrapped in a task).
- Page
One built page: the ordered blocks to render.
- PageArgumentException
Thrown by Required(string); surfaces as a 400 to the caller.
- PageBadge
A small semantic tag on a card (e.g. „Rechnungsanschrift").
- PageBlock
The block vocabulary of a BpPage. Everything is plain strings — the hosts render the blocks in their own design language and no module markup ever reaches a page. Blocks nest through Blocks.
- PageLink
A navigation target: the page (by type name) and the arguments it opens with.
- PageRequest
The arguments of one page build: values of the page's input blocks plus whatever the opening Link carried. All values are strings; use the typed readers.
- Pager
Previous/next paging. The current page number arrives as the argument named
Name(1-based); set HasMore from the query (fetch one row more than the page size).
- PipelineTriggerContext
Links an action run to its parent pipeline run and step.
- ProblemHttpException
A deliberate HTTP problem response raised from a module action. Throwing this is a controlled outcome, not a failure: the runtime records the run as a normal (non-failed) run and does not raise a failure notification, while the public HTTP API returns an RFC 9457
application/problem+jsonresponse with this status, body, and headers. Use it for expected results like "not found" (404) or "bad request" (400) — a real bug should still throw an ordinary exception so it surfaces as a failure.
- RedactInputAttribute
Keeps the action's input out of the stored run history: the run records a redaction marker instead of the input payload. Binding, validation, and execution see the real input — only what is written to the database changes. For actions receiving sensitive ERP data.
- RedactOutputAttribute
Keeps the action's result out of the stored run history: the run records a redaction marker instead of the output. Callers still receive the real result — HTTP responses, pipeline steps, and form replies are unaffected; only what is written to the database changes. For actions whose output contains sensitive ERP data (prices, personal data, credentials).
- ScheduleTriggerContext
Describes an action dispatched by the scheduler.
- SearchBox
A search input. Its value arrives as the argument named
Nameon the next build (live as the user types); changing it resets every Pager on the page.
- SecretFieldAttribute
Marks a settings property as sensitive: it is rendered as a write-only password control and stored through the encrypted secret store instead of plain config. The current value is never echoed back to the page. The module reads it through ISecrets, not IModuleConfig.
- Series
A labelled series drawn as bars, scaled against the largest value.
- SeriesPoint
One labelled point of a Series.
- StatCards
A row of headline stat cards.
- Table
A data table; rows may open another page when clicked.
- TableColumn
One table column.
Monorenders values in a monospace font (ids, numbers).
- TriggerContext
Base record for the reason an action run was requested.
- WebhookEventAttribute
Names a webhook event the module can emit. Put it on an IWebhookEvent payload type (exactly one per type, the preferred form), or on the module class for events emitted via the string-based EmitAsync(string, object, CancellationToken) overload (one attribute per event).
- WebhookSendOptions
Options for a direct SendAsync(string, object, WebhookSendOptions?, CancellationToken).
Interfaces
- IBpQlSession
Datenzugriff auf microtech ERP über GraphQL für Actions, Seiten und Controller.
- IBpSession
Datenzugriff auf microtech ERP über COM für Actions, Seiten und Controller.
- IBpSessions
Lends short-lived, serialized access to the runtime's cached Bp sessions. Each call waits for the profile's session, runs the work, and releases the session again — concurrent calls on the same profile queue up, exactly like action runs do. Never keep the IBpSession beyond the delegate: it belongs to the runtime and is only leased for the call.
- IModuleConfig
Reads the plain configuration values an administrator (or an entitled end-user) entered on the module's declarative settings page in Studio. Values are read live — a change in Studio applies to the next call without a module reload, mirroring ISecrets. Sensitive values belong in ISecrets, not here: never store passwords or tokens through this store.
- INotifications
Sends notifications to the administrators' notification center (and whatever channels they routed the module category to — e-mail, Teams, …). Occurrences sharing a coalesce key increment one open notification instead of stacking new ones; resolving the key closes it, so the next occurrence starts fresh. Use a stable key for recurring conditions ("sync backlog") and no key for one-off messages ("export finished").
- ISecrets
Reads named secrets an administrator stored in Studio (encrypted at rest). A secret scoped to this module wins over a global secret of the same name, so an administrator can override a shared value for one module. Values are read live — an administrator's change applies to the next call without a module reload. Treat values like passwords: never log or persist them, never return them from an action.
- IWebhookEvent
Marks a type as a webhook event payload. Declare one class or record per event, decorated with WebhookEventAttribute naming it, and pass an instance to EmitAsync(IWebhookEvent, CancellationToken) — the type is the event's payload contract, so an emit cannot name an event that does not exist:
[WebhookEvent("invoice.created", Display = "Invoice created")] public sealed record InvoiceCreated(string Number, decimal Total) : IWebhookEvent; await webhooks.EmitAsync(new InvoiceCreated("RE-1001", 129.90m), cancellationToken);Administrators see the declared events in Studio and configure where each one is delivered; the module never handles URLs or secrets.
- IWebhooks
Sends webhooks the runtime delivers for the module: every send is queued durably, posted as JSON, retried with backoff for up to a day if the receiver is down, and recorded in the module's delivery log in Studio. Receivers see a stable
Idempotency-Keyheader across retries, so sending twice is safe on their side.
Enums
- BpNotificationSeverity
How urgent a module notification is; administrators route on severity.
- CatchUpMode
What a schedule does with occurrences it missed while the runtime was stopped. The module author is the one who knows whether occurrences are interchangeable: re-fetching today's exchange rates ten times is nine wasted runs, while "export the batch for hour N" loses data if an occurrence is dropped. Operators can override this per task.
- ModuleUiAudience
Chooses who a module's declarative page is rendered for: the Studio admin panel, or the end-user apps portal. The same schema renders in both; only the surface and the config scope (module-wide vs per-user) differ.
- Tone
Renderer color hints; the host maps them onto its own palette.