Skip to main content

Module operation

Module operation 

Source
Expand description

What a workflow offers to do: operations, their arguments, and examples of each.

An OperationSpec is built once per view with a builder, so a field added later breaks nobody’s code. Its arguments come from a typed arguments struct, and each can be given labels, a source and a shape. Examples show a message and the arguments it carries, or the arguments it leaves out; OperationSpec::validate checks every example against the arguments type when the registry is built, so an example cannot go stale unnoticed.

Structs§

ArgumentLabel
A word people use for an argument, optionally only in one language.
ArgumentSpec
One argument of an operation.
DateError
Why a date expression names no date.
GlossaryTerm
A word a workflow’s users say, and what it means there.
Money
An amount of money in minor units: 1050 euro cents is 10.50 EUR.
MoneyError
Why a decimal string is not an amount of money.
OperationCatalog
The operations offered to a turn, by key. A duplicate key is refused, never shadowed.
OperationExample
A message and what it means for one operation, shown to the model as an example.
OperationSpec
One operation a workflow offers in a view.
OperationSpecError
Why an operation’s declaration cannot be used.

Enums§

ArgumentSource
Where an argument’s value comes from.
DateDirection
Which way a date without a year points.
DateExpr
A date as the user said it, for code to evaluate.
DatePeriod
A calendar period.
DateUnit
A unit of DateExpr::Relative.
DayOfWeek
A day of the week.
PeriodOccurrence
Which period.
ValueShape
The shape a model gives an argument’s value, derived from its JSON Schema.
WeekdayOccurrence
Which occurrence of a weekday.

Functions§

shape_of
Derives the shape of one property of an arguments schema.