Skip to main content

Module forms

Module forms 

Source
Expand description

Typed client-form operations. The natives and the web decode their input, call these and encode the result; they own the behaviour.

Structs§

FormOption
One selectable entity: id, unique display label and its bare name.
MergePreview
What merging the picked accounts does: splits splits move to into.
Merged
What a merge did: moved splits went from from to into.
QueryPage
A page of the listed transactions.
QueryRow
One listed transaction.
SplitDetail
One stored split with its account path, commodity symbol and all its tags, sorted by name then value.
StoredSplit
One stored split with all its tags, sorted by name then value.
Submitted
What a successful submit created or changed.
TemplateDraft
What a test of a template produced: its draft and why the create form cannot be pre-filled from it, if it cannot.
TestError
A template that did not get as far as a draft, and where it stopped.
TransactionDetail
A stored transaction as one complete read: header, prices, its own tags (the note tag excluded, it is note) and the splits with their tags.

Enums§

Entity
What a form operation addresses by id.
Failure
FormAction
FormOutcome
Handler
What the server does with a compiled-in form.
Outcome
ReportOutcome
The result of a report form: the three outcomes a chart can be drawn from.
Stage
Suggestion
What a text cell asks to be suggested.

Constants§

DEFAULT_LIMIT
The page size of a query with an empty limit.

Functions§

apply_report_defaults
Empty from is this month’s start, empty to and as-of are today. A balance report’s from stays open: its snapshot starts at the beginning.
convert
convert query: the amount in the target commodity.
count_result
Counts result as one request and hands it back.
detail
The user’s transaction as one snapshot, without any labels; Missing when it does not exist.
form_named
The compiled-in form named name.
labelled_splits
The splits of the transaction with account and commodity labels, for the web row fragment.
load
The values of the compiled-in form form for the entity id.
load_noticed
load and the notice a script stored without source carries.
merge_accounts
Merge from into into; a refusal names its reason.
merge_preview
What submitting values would merge.
merge_submit
account-merge submit: the merge with the count it moved.
options
The user’s accounts, commodities or templates as picker options. An account holding exactly one commodity carries it as commodity; a template is labelled by its name, listed in the web’s order.
parse_payload
Read the plist of a submit payload. Keys the form does not declare are ignored; a declared key holding a non-string is a field error.
query
The transactions matching the transaction-query values; an empty limit means DEFAULT_LIMIT.
record_form_request
run_report_in
typed_report_in as the general outcome.
set_config
config-set submit: stores the value under the key.
submit
Submit values of the compiled-in mutation form form.
submit_noticed
submit and the notice a created account, or an edited one whose name changed, carries when it shares its name with a sibling.
suggestions
The user’s strings for request.
template_draft
Compile and render source for user_id; the one path the template-test form and the web test endpoint share.
template_values
The create values a rendered template stands for.
test_template
The template-test query over values.
typed_report
Runs the report of the compiled-in query form form.
typed_report_in
typed_report_on for a caller that already holds the user’s zone.
typed_report_on
typed_report at the instant now: the user’s zone is read once, the empty dates default from the local day of now, and typed days are read in that zone.
user_zone
The zone of user_id’s reports; UTC when they set none.