{
  "redAleApi": "0.6.0",
  "methods": [
    {
      "name": "account.balance",
      "summary": "An account's balance, cleared and reconciled balances, optionally as of a date and with sub-accounts.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/BalanceParams"
      },
      "result": {
        "$ref": "#/$defs/BalanceResult"
      },
      "help": "method/account.balance"
    },
    {
      "name": "account.cascade",
      "summary": "Set colour, placeholder or hidden on an account and all its sub-accounts.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/CascadeParams"
      },
      "result": {
        "$ref": "#/$defs/CascadeResult"
      },
      "help": "method/account.cascade"
    },
    {
      "name": "account.checkBalanceLimit",
      "summary": "Compare an account's balance with its balance limits, as GnuCash's account tree does to warn.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/CheckParams"
      },
      "result": {
        "$ref": "#/$defs/CheckResult"
      },
      "help": "method/account.checkBalanceLimit"
    },
    {
      "name": "account.create",
      "summary": "Create an account under a parent (the root by default).",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/CreateParams"
      },
      "result": {
        "$ref": "#/$defs/AccountInfo"
      },
      "help": "method/account.create"
    },
    {
      "name": "account.delete",
      "summary": "Delete an account, moving or deleting its transactions and sub-account.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/DeleteParams"
      },
      "result": {
        "$ref": "#/$defs/DeleteResult"
      },
      "help": "method/account.delete"
    },
    {
      "name": "account.get",
      "summary": "Describe one account.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/AccountParams"
      },
      "result": {
        "$ref": "#/$defs/AccountInfo"
      },
      "help": "method/account.get"
    },
    {
      "name": "account.list",
      "summary": "List accounts depth first in the book's order, and names that contain the separator.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/ListParams"
      },
      "result": {
        "$ref": "#/$defs/ListResult"
      },
      "help": "method/account.list"
    },
    {
      "name": "account.move",
      "summary": "Move an account, with its sub-accounts, under another parent.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/MoveParams"
      },
      "result": {
        "$ref": "#/$defs/AccountInfo"
      },
      "help": "method/account.move"
    },
    {
      "name": "account.openingBalanceAccount",
      "summary": "Find the account GnuCash would put a currency's opening balances in: by its flag, then by name.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/OpeningBalanceParams"
      },
      "result": {
        "$ref": "#/$defs/OpeningBalanceResult"
      },
      "help": "method/account.openingBalanceAccount"
    },
    {
      "name": "account.renumber",
      "summary": "Renumber the codes of an account's immediate sub-accounts.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/RenumberParams"
      },
      "result": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/NewCode"
        }
      },
      "help": "method/account.renumber"
    },
    {
      "name": "account.tree",
      "summary": "The account tree as nested nodes, in the book's order or GnuCash's display order.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/TreeParams"
      },
      "result": {
        "$ref": "#/$defs/TreeNode"
      },
      "help": "method/account.tree"
    },
    {
      "name": "account.types",
      "summary": "List the account types with GnuCash's labels and rules.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/TypeInfo"
        }
      },
      "help": "method/account.types"
    },
    {
      "name": "account.update",
      "summary": "Change an account's name, type, commodity, smallest fraction, code, notes, flags, tax settings, colour, balance limits, opening balance flag or associated accounts.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/UpdateParams"
      },
      "result": {
        "$ref": "#/$defs/AccountInfo"
      },
      "help": "method/account.update"
    },
    {
      "name": "billTerm.create",
      "summary": "Create a billing term (days or proximo).",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/BillTermCreate"
      },
      "result": {
        "$ref": "#/$defs/BillTermInfo"
      },
      "help": "method/billTerm.create"
    },
    {
      "name": "billTerm.delete",
      "summary": "Delete a billing term nothing uses.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/BillTermKey"
      },
      "result": {
        "$ref": "#/$defs/Done"
      },
      "help": "method/billTerm.delete"
    },
    {
      "name": "billTerm.get",
      "summary": "A billing term, with its family links.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/BillTermKey"
      },
      "result": {
        "$ref": "#/$defs/BillTermInfo"
      },
      "help": "method/billTerm.get"
    },
    {
      "name": "billTerm.list",
      "summary": "Billing terms; frozen copies made by posting only on request.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/FamilyListParams"
      },
      "result": {
        "$ref": "#/$defs/BillTermList"
      },
      "help": "method/billTerm.list"
    },
    {
      "name": "billTerm.update",
      "summary": "Change a billing term.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/BillTermUpdate"
      },
      "result": {
        "$ref": "#/$defs/BillTermInfo"
      },
      "help": "method/billTerm.update"
    },
    {
      "name": "book.close",
      "summary": "Close the open book and release its lock.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/CloseParams"
      },
      "result": {
        "$ref": "#/$defs/CloseResult"
      },
      "help": "method/book.close"
    },
    {
      "name": "book.closeBooks",
      "summary": "Close the books: move income and expense balances into equity at a closing date, one closing transaction per currency. Not book.close.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/CloseBooksParams"
      },
      "result": {
        "$ref": "#/$defs/CloseResult2"
      },
      "help": "method/book.closeBooks"
    },
    {
      "name": "book.create",
      "summary": "Create a new, empty XML or SQLite book and open it.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/CreateParams2"
      },
      "result": {
        "$ref": "#/$defs/BookInfo"
      },
      "help": "method/book.create"
    },
    {
      "name": "book.info",
      "summary": "Describe the open book: path, read-only state, features and counts.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "$ref": "#/$defs/BookInfo"
      },
      "help": "method/book.info"
    },
    {
      "name": "book.open",
      "summary": "Open an XML or SQLite book. Some books open read-only (see readOnlyReasons).",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/OpenParams"
      },
      "result": {
        "$ref": "#/$defs/BookInfo"
      },
      "help": "method/book.open"
    },
    {
      "name": "book.options",
      "summary": "The book's num field source, auto read-only threshold (with today's threshold date), trading accounts option, default budget, business options and default invoice report.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "$ref": "#/$defs/BookOptions"
      },
      "help": "method/book.options"
    },
    {
      "name": "book.replayJournal",
      "summary": "Replay a GnuCash .log journal onto the open book: create, update or delete transactions by GUID.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/ReplayParams"
      },
      "result": {
        "$ref": "#/$defs/ReplayResult"
      },
      "help": "method/book.replayJournal"
    },
    {
      "name": "book.save",
      "summary": "Save the open book, backing up the previous file first (for an SQLite book, before the session's first save).",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/SaveParams"
      },
      "result": {
        "$ref": "#/$defs/SaveResult"
      },
      "help": "method/book.save"
    },
    {
      "name": "book.setOptions",
      "summary": "Set the num field source, the auto read-only threshold, trading accounts, the default budget, the business options or the default invoice report, as GnuCash's book options dialog does.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/SetParams"
      },
      "result": {
        "$ref": "#/$defs/BookOptions"
      },
      "help": "method/book.setOptions"
    },
    {
      "name": "budget.copy",
      "summary": "Copy a budget as GnuCash's Copy Budget does (notes are not copied).",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/BudgetKey"
      },
      "result": {
        "$ref": "#/$defs/BudgetInfo"
      },
      "help": "method/budget.copy"
    },
    {
      "name": "budget.create",
      "summary": "Create a budget; the first sets the Book feature for natural signs.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/CreateParams3"
      },
      "result": {
        "$ref": "#/$defs/BudgetInfo"
      },
      "help": "method/budget.create"
    },
    {
      "name": "budget.delete",
      "summary": "Delete a budget; the last unsets the Book feature for natural signs.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/BudgetKey"
      },
      "result": {
        "$ref": "#/$defs/DeleteResult2"
      },
      "help": "method/budget.delete"
    },
    {
      "name": "budget.estimate",
      "summary": "Overwrite accounts' budget amounts with figures from past transactions, as GnuCash's Estimate dialog does.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/EstimateParams"
      },
      "result": {
        "$ref": "#/$defs/EstimateResult"
      },
      "help": "method/budget.estimate"
    },
    {
      "name": "budget.get",
      "summary": "One budget with its periods, amounts and notes.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/GetParams"
      },
      "result": {
        "$ref": "#/$defs/BudgetInfo"
      },
      "help": "method/budget.get"
    },
    {
      "name": "budget.list",
      "summary": "Every budget in book order, and which is the default.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "$ref": "#/$defs/BudgetList"
      },
      "help": "method/budget.list"
    },
    {
      "name": "budget.scrubSigns",
      "summary": "Run GnuCash's natural-signs scrub: guess each budget's old sign convention and flip amounts to match.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "$ref": "#/$defs/ScrubResult"
      },
      "help": "method/budget.scrubSigns"
    },
    {
      "name": "budget.setAmounts",
      "summary": "Set or unset many budget amounts, atomically.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/SetAmountsParams"
      },
      "result": {
        "$ref": "#/$defs/SetAmountsResult"
      },
      "help": "method/budget.setAmounts"
    },
    {
      "name": "budget.setNotes",
      "summary": "Set or delete many budget notes, atomically.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/SetNotesParams"
      },
      "result": {
        "$ref": "#/$defs/SetNotesResult"
      },
      "help": "method/budget.setNotes"
    },
    {
      "name": "budget.update",
      "summary": "Change a budget's name, description, number of periods or recurrence.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/UpdateParams2"
      },
      "result": {
        "$ref": "#/$defs/BudgetInfo"
      },
      "help": "method/budget.update"
    },
    {
      "name": "commodity.create",
      "summary": "Create a security, with the security editor's checks.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/CreateParams4"
      },
      "result": {
        "$ref": "#/$defs/CommodityInfo"
      },
      "help": "method/commodity.create"
    },
    {
      "name": "commodity.delete",
      "summary": "Delete a security that nothing uses; its prices go too only with deletePrices.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/DeleteParams2"
      },
      "result": {
        "$ref": "#/$defs/DeleteResult3"
      },
      "help": "method/commodity.delete"
    },
    {
      "name": "commodity.get",
      "summary": "Describe one commodity, with how much of the book uses it.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/GetParams2"
      },
      "result": {
        "$ref": "#/$defs/CommodityInfo"
      },
      "help": "method/commodity.get"
    },
    {
      "name": "commodity.list",
      "summary": "List commodities: the book's own and the built-in ISO 4217 currencies.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/ListParams2"
      },
      "result": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/CommodityInfo"
        }
      },
      "help": "method/commodity.list"
    },
    {
      "name": "commodity.namespaces",
      "summary": "List the commodity namespaces with how many commodities each holds.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/NamespaceInfo"
        }
      },
      "help": "method/commodity.namespaces"
    },
    {
      "name": "commodity.update",
      "summary": "Edit a security (any field, including a rename) or a currency's quote flag, quote time zone and symbol.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/UpdateParams3"
      },
      "result": {
        "$ref": "#/$defs/CommodityInfo"
      },
      "help": "method/commodity.update"
    },
    {
      "name": "config.get",
      "summary": "The whole Configuration, or one setting by path, with defaults filled in; secrets shown only as set or unset.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/GetParams3"
      },
      "result": {
        "$ref": "#/$defs/GetResult"
      },
      "help": "method/config.get"
    },
    {
      "name": "config.schema",
      "summary": "The Configuration's JSON Schema: every setting, its type, default and description.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": true,
      "help": "method/config.schema"
    },
    {
      "name": "config.set",
      "summary": "Change one or more settings by path, validated against the schema, all or none; null restores a default.",
      "effect": "write",
      "target": "configuration",
      "params": {
        "$ref": "#/$defs/SetParams2"
      },
      "result": {
        "$ref": "#/$defs/SetResult"
      },
      "help": "method/config.set"
    },
    {
      "name": "counter.list",
      "summary": "Every counter: the last number issued, its format and the next ID it would give.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "$ref": "#/$defs/CounterList"
      },
      "help": "method/counter.list"
    },
    {
      "name": "counter.set",
      "summary": "Set a counter's last number issued or its format; a null or empty format means the default.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/SetParams3"
      },
      "result": {
        "$ref": "#/$defs/CounterInfo"
      },
      "help": "method/counter.set"
    },
    {
      "name": "currency.euroConvert",
      "summary": "Convert between the euro and a currency it replaced, at GnuCash's fixed rates.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/EuroConvertParams"
      },
      "result": {
        "$ref": "#/$defs/EuroConvertResult"
      },
      "help": "method/currency.euroConvert"
    },
    {
      "name": "currency.list",
      "summary": "List GnuCash 5.17's built-in ISO 4217 currencies.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/CurrencyInfo"
        }
      },
      "help": "method/currency.list"
    },
    {
      "name": "customer.create",
      "summary": "Create a customer; its ID comes from the book's counter unless given.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/CustomerFields"
      },
      "result": {
        "$ref": "#/$defs/CustomerInfo"
      },
      "help": "method/customer.create"
    },
    {
      "name": "customer.get",
      "summary": "A customer.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/CustomerKey"
      },
      "result": {
        "$ref": "#/$defs/CustomerInfo"
      },
      "help": "method/customer.get"
    },
    {
      "name": "customer.list",
      "summary": "Customers, optionally filtered by name, ID or active state.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/ListParams3"
      },
      "result": {
        "$ref": "#/$defs/CustomerList"
      },
      "help": "method/customer.list"
    },
    {
      "name": "customer.update",
      "summary": "Change a customer; `active: false` deactivates it.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/CustomerUpdate"
      },
      "result": {
        "$ref": "#/$defs/CustomerInfo"
      },
      "help": "method/customer.update"
    },
    {
      "name": "docLink.documents",
      "summary": "Invoices, bills and vouchers with a document link, with the URI each one opens.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "$ref": "#/$defs/Links"
      },
      "help": "method/docLink.documents"
    },
    {
      "name": "docLink.pathHead",
      "summary": "The configured folder relative document links start from.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "$ref": "#/$defs/PathHeadInfo"
      },
      "help": "method/docLink.pathHead"
    },
    {
      "name": "docLink.setPathHead",
      "summary": "Set or remove the folder relative document links start from, in red-ale's configuration.",
      "effect": "write",
      "target": "configuration",
      "params": {
        "$ref": "#/$defs/SetPathHeadParams"
      },
      "result": {
        "$ref": "#/$defs/PathHeadInfo"
      },
      "help": "method/docLink.setPathHead"
    },
    {
      "name": "docLink.transactions",
      "summary": "Transactions with a document link, with the URI each one opens.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "$ref": "#/$defs/Links2"
      },
      "help": "method/docLink.transactions"
    },
    {
      "name": "employee.create",
      "summary": "Create an employee; its ID comes from the book's counter unless given.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/EmployeeFields"
      },
      "result": {
        "$ref": "#/$defs/EmployeeInfo"
      },
      "help": "method/employee.create"
    },
    {
      "name": "employee.get",
      "summary": "An employee.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/EmployeeKey"
      },
      "result": {
        "$ref": "#/$defs/EmployeeInfo"
      },
      "help": "method/employee.get"
    },
    {
      "name": "employee.list",
      "summary": "Employees, optionally filtered by name, ID or active state.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/ListParams3"
      },
      "result": {
        "$ref": "#/$defs/EmployeeList"
      },
      "help": "method/employee.list"
    },
    {
      "name": "employee.update",
      "summary": "Change an employee; `active: false` deactivates it.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/EmployeeUpdate"
      },
      "result": {
        "$ref": "#/$defs/EmployeeInfo"
      },
      "help": "method/employee.update"
    },
    {
      "name": "export.accounts",
      "summary": "Write a new book file holding the open book's account tree and commodities, and no transactions. Never overwrites a file.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/AccountsParams"
      },
      "result": {
        "$ref": "#/$defs/AccountsResult"
      },
      "help": "method/export.accounts"
    },
    {
      "name": "export.csvTransactions",
      "summary": "Transactions of some accounts and dates as CSV text, in GnuCash's simple or complex layout. Writes no file.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/CsvTransactionsParams"
      },
      "result": {
        "$ref": "#/$defs/CsvTransactionsResult"
      },
      "help": "method/export.csvTransactions"
    },
    {
      "name": "export.csvTree",
      "summary": "The account tree as CSV text, as GnuCash's CSV export writes it. Writes no file.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/CsvTreeParams"
      },
      "result": {
        "$ref": "#/$defs/CsvTreeResult"
      },
      "help": "method/export.csvTree"
    },
    {
      "name": "help.get",
      "summary": "One Page of the Manual, by Page ID or method name, as Markdown or text, with its Examples for one door.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/HelpGetParams"
      },
      "result": {
        "$ref": "#/$defs/HelpPage"
      },
      "help": "method/help.get"
    },
    {
      "name": "help.search",
      "summary": "Pages of the Manual ranked for a question in your own words, best first, each with a snippet.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/HelpSearchParams"
      },
      "result": {
        "$ref": "#/$defs/HelpSearchResult"
      },
      "help": "method/help.search"
    },
    {
      "name": "help.topics",
      "summary": "Every Page of red-ale's Manual, or those of one kind: Page ID, kind, title and summary.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/HelpTopicsParams"
      },
      "result": {
        "$ref": "#/$defs/HelpTopics"
      },
      "help": "method/help.topics"
    },
    {
      "name": "import.apply",
      "summary": "Apply a held Import proposal with the caller's changes, as one Mutation.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/ApplyParams"
      },
      "result": {
        "$ref": "#/$defs/ApplyResult"
      },
      "help": "method/import.apply"
    },
    {
      "name": "import.discard",
      "summary": "Drop a held Import proposal.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/DiscardParams"
      },
      "result": {
        "$ref": "#/$defs/Discarded"
      },
      "help": "method/import.discard"
    },
    {
      "name": "import.preview",
      "summary": "Read a file and propose what importing it would do: the Import proposal, held by ID. Changes nothing.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/PreviewParam"
      },
      "result": {
        "$ref": "#/$defs/ProposalResult"
      },
      "help": "method/import.preview"
    },
    {
      "name": "importMap.delete",
      "summary": "Delete Import map or online entries, one by one, by kind, or every invalid one.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/DeleteParams3"
      },
      "result": {
        "$ref": "#/$defs/DeleteResult4"
      },
      "help": "method/importMap.delete"
    },
    {
      "name": "importMap.list",
      "summary": "List Import map entries (Bayesian, desc, memo, csv-account-map) and online entries.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/ListParams4"
      },
      "result": {
        "$ref": "#/$defs/ListResult2"
      },
      "help": "method/importMap.list"
    },
    {
      "name": "invoice.addEntry",
      "summary": "Add a line to an unposted document (and optionally to an order).",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/AddLineParams"
      },
      "result": {
        "$ref": "#/$defs/EntryInfo"
      },
      "help": "method/invoice.addEntry"
    },
    {
      "name": "invoice.create",
      "summary": "Create an invoice, bill or expense voucher; the owner decides which.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/InvoiceFields"
      },
      "result": {
        "$ref": "#/$defs/InvoiceDetail"
      },
      "help": "method/invoice.create"
    },
    {
      "name": "invoice.delete",
      "summary": "Delete an unposted document and its lines.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/InvoiceKey"
      },
      "result": {
        "$ref": "#/$defs/Done"
      },
      "help": "method/invoice.delete"
    },
    {
      "name": "invoice.due",
      "summary": "Posted, unpaid documents falling due within some days: GnuCash's bills-due and invoices-due reminders.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/DueParams"
      },
      "result": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/DueDocument"
        }
      },
      "help": "method/invoice.due"
    },
    {
      "name": "invoice.dueDate",
      "summary": "When a document posted on a date falls due under its (or a given) billing term.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/DueDateParams"
      },
      "result": {
        "$ref": "#/$defs/DueDateResult"
      },
      "help": "method/invoice.dueDate"
    },
    {
      "name": "invoice.duplicate",
      "summary": "Copy a document and its lines into a new unposted document with a new number and date, as GnuCash's Duplicate does.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/DuplicateParams"
      },
      "result": {
        "$ref": "#/$defs/InvoiceDetail"
      },
      "help": "method/invoice.duplicate"
    },
    {
      "name": "invoice.get",
      "summary": "A document with its lines.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/InvoiceKey"
      },
      "result": {
        "$ref": "#/$defs/InvoiceDetail"
      },
      "help": "method/invoice.get"
    },
    {
      "name": "invoice.list",
      "summary": "Invoices, bills and vouchers, optionally filtered.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/InvoiceListParams"
      },
      "result": {
        "$ref": "#/$defs/InvoiceList"
      },
      "help": "method/invoice.list"
    },
    {
      "name": "invoice.pay",
      "summary": "Record a payment of one posted document.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/PayParams"
      },
      "result": {
        "$ref": "#/$defs/PaymentResult"
      },
      "help": "method/invoice.pay"
    },
    {
      "name": "invoice.post",
      "summary": "Post a document to an A/R or A/P account: its transaction, lot, frozen tax tables and terms.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/PostParams"
      },
      "result": {
        "$ref": "#/$defs/PostResult"
      },
      "help": "method/invoice.post"
    },
    {
      "name": "invoice.removeEntry",
      "summary": "Delete a line from its documents and order.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/EntryKey"
      },
      "result": {
        "$ref": "#/$defs/Done"
      },
      "help": "method/invoice.removeEntry"
    },
    {
      "name": "invoice.totals",
      "summary": "A document's subtotal, tax and total, per tax account and per entry, as GnuCash computes them.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/InvoiceParams"
      },
      "result": {
        "$ref": "#/$defs/TotalsResult"
      },
      "help": "method/invoice.totals"
    },
    {
      "name": "invoice.unpost",
      "summary": "Unpost a document: delete its posted transaction and lot links; payments stay as pre-payments.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/UnpostParams"
      },
      "result": {
        "$ref": "#/$defs/Done"
      },
      "help": "method/invoice.unpost"
    },
    {
      "name": "invoice.update",
      "summary": "Change an unposted document, or (de)activate any document.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/InvoiceUpdate"
      },
      "result": {
        "$ref": "#/$defs/InvoiceDetail"
      },
      "help": "method/invoice.update"
    },
    {
      "name": "invoice.updateEntry",
      "summary": "Change a line of an unposted document or open order.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/UpdateLineParams"
      },
      "result": {
        "$ref": "#/$defs/EntryInfo"
      },
      "help": "method/invoice.updateEntry"
    },
    {
      "name": "job.create",
      "summary": "Create a job for a customer or vendor; its ID comes from the book's counter unless given.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/JobFields"
      },
      "result": {
        "$ref": "#/$defs/JobInfo"
      },
      "help": "method/job.create"
    },
    {
      "name": "job.get",
      "summary": "A job.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/JobKey"
      },
      "result": {
        "$ref": "#/$defs/JobInfo"
      },
      "help": "method/job.get"
    },
    {
      "name": "job.list",
      "summary": "Jobs, optionally filtered by owner, name, ID or active state.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/JobListParams"
      },
      "result": {
        "$ref": "#/$defs/JobList"
      },
      "help": "method/job.list"
    },
    {
      "name": "job.update",
      "summary": "Change a job; `active: false` deactivates it.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/JobUpdate"
      },
      "result": {
        "$ref": "#/$defs/JobInfo"
      },
      "help": "method/job.update"
    },
    {
      "name": "lot.assignSplit",
      "summary": "Put a split in a lot, cutting it if it would overfill the lot; without a lot, FIFO chooses.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/AssignParams"
      },
      "result": {
        "$ref": "#/$defs/AssignResult"
      },
      "help": "method/lot.assignSplit"
    },
    {
      "name": "lot.computeGains",
      "summary": "Recompute a lot's capital gains, recording them in gains transactions.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/ComputeGainsParams"
      },
      "result": {
        "$ref": "#/$defs/ScrubResult2"
      },
      "help": "method/lot.computeGains"
    },
    {
      "name": "lot.create",
      "summary": "Make an empty lot in an account, titled `Lot <n>` unless a title is given.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/CreateParams5"
      },
      "result": {
        "$ref": "#/$defs/LotInfo"
      },
      "help": "method/lot.create"
    },
    {
      "name": "lot.delete",
      "summary": "Delete a lot; its splits stay but leave the lot. A lot with splits needs releaseSplits.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/DeleteParams4"
      },
      "result": {
        "$ref": "#/$defs/DeleteResult5"
      },
      "help": "method/lot.delete"
    },
    {
      "name": "lot.freeSplits",
      "summary": "List an account's splits that are in no lot, with the gain each would realise against a lot.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/FreeSplitsParams"
      },
      "result": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/LotSplitInfo"
        }
      },
      "help": "method/lot.freeSplits"
    },
    {
      "name": "lot.get",
      "summary": "Describe one lot with its splits.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/LotParams"
      },
      "result": {
        "$ref": "#/$defs/LotDetail"
      },
      "help": "method/lot.get"
    },
    {
      "name": "lot.list",
      "summary": "List an account's lots as the lot viewer shows them, optionally only open or closed ones.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/ListParams5"
      },
      "result": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/LotInfo"
        }
      },
      "help": "method/lot.list"
    },
    {
      "name": "lot.removeSplit",
      "summary": "Take a split out of its lot; a lot left empty is deleted.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/RemoveParams"
      },
      "result": {
        "$ref": "#/$defs/RemoveResult"
      },
      "help": "method/lot.removeSplit"
    },
    {
      "name": "lot.scrub",
      "summary": "Repair one lot: merge cut pieces, refill it and recompute its capital gains.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/LotParams"
      },
      "result": {
        "$ref": "#/$defs/ScrubResult2"
      },
      "help": "method/lot.scrub"
    },
    {
      "name": "lot.scrubAccount",
      "summary": "Assign an account's splits to lots by FIFO and repair every lot, optionally for its sub-accounts too.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/ScrubAccountParams"
      },
      "result": {
        "$ref": "#/$defs/ScrubResult2"
      },
      "help": "method/lot.scrubAccount"
    },
    {
      "name": "lot.update",
      "summary": "Set a lot's title or notes; an empty string removes one.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/UpdateParams4"
      },
      "result": {
        "$ref": "#/$defs/LotInfo"
      },
      "help": "method/lot.update"
    },
    {
      "name": "order.addEntry",
      "summary": "Add a line to an open order.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/AddOrderLineParams"
      },
      "result": {
        "$ref": "#/$defs/EntryInfo"
      },
      "help": "method/order.addEntry"
    },
    {
      "name": "order.close",
      "summary": "Close an order that has lines.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/OrderCloseParams"
      },
      "result": {
        "$ref": "#/$defs/OrderDetail"
      },
      "help": "method/order.close"
    },
    {
      "name": "order.create",
      "summary": "Create an order for a customer, vendor or job.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/OrderFields"
      },
      "result": {
        "$ref": "#/$defs/OrderDetail"
      },
      "help": "method/order.create"
    },
    {
      "name": "order.get",
      "summary": "An order with its lines.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/OrderKey"
      },
      "result": {
        "$ref": "#/$defs/OrderDetail"
      },
      "help": "method/order.get"
    },
    {
      "name": "order.list",
      "summary": "Orders, optionally filtered.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/OrderListParams"
      },
      "result": {
        "$ref": "#/$defs/OrderList"
      },
      "help": "method/order.list"
    },
    {
      "name": "order.removeEntry",
      "summary": "Delete a line (same as invoice.removeEntry).",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/EntryKey"
      },
      "result": {
        "$ref": "#/$defs/Done"
      },
      "help": "method/order.removeEntry"
    },
    {
      "name": "order.update",
      "summary": "Change an order.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/OrderUpdate"
      },
      "result": {
        "$ref": "#/$defs/OrderDetail"
      },
      "help": "method/order.update"
    },
    {
      "name": "order.updateEntry",
      "summary": "Change a line of an open order (same as invoice.updateEntry).",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/UpdateLineParams"
      },
      "result": {
        "$ref": "#/$defs/EntryInfo"
      },
      "help": "method/order.updateEntry"
    },
    {
      "name": "payment.fromTransaction",
      "summary": "Turn an existing transaction into a payment and apply it, or re-match an existing payment; its other splits are deleted.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/FromTransactionParams"
      },
      "result": {
        "$ref": "#/$defs/PaymentResult"
      },
      "help": "method/payment.fromTransaction"
    },
    {
      "name": "payment.openItems",
      "summary": "An owner's open documents and pre-payments in an A/R or A/P account, in the order GnuCash's payment dialog applies them.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/OpenItemsParams"
      },
      "result": {
        "$ref": "#/$defs/OpenItems"
      },
      "help": "method/payment.openItems"
    },
    {
      "name": "payment.process",
      "summary": "Record an owner's payment and apply it to chosen documents, or to the oldest open ones.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/ProcessParams"
      },
      "result": {
        "$ref": "#/$defs/PaymentResult"
      },
      "help": "method/payment.process"
    },
    {
      "name": "period.dates",
      "summary": "The first and last days of the accounting period containing today or a given date.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/DatesParams"
      },
      "result": {
        "$ref": "#/$defs/DatesResult"
      },
      "help": "method/period.dates"
    },
    {
      "name": "period.get",
      "summary": "The configured accounting period and fiscal year end.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "$ref": "#/$defs/PeriodInfo2"
      },
      "help": "method/period.get"
    },
    {
      "name": "period.set",
      "summary": "Set the accounting period or the fiscal year end in red-ale's configuration.",
      "effect": "write",
      "target": "configuration",
      "params": {
        "$ref": "#/$defs/SetParams4"
      },
      "result": {
        "$ref": "#/$defs/PeriodInfo2"
      },
      "help": "method/period.set"
    },
    {
      "name": "price.add",
      "summary": "Add a price; a same-day price of the pair is replaced or wins by source precedence, as GnuCash does.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/AddParams"
      },
      "result": {
        "$ref": "#/$defs/AddOutcome"
      },
      "help": "method/price.add"
    },
    {
      "name": "price.delete",
      "summary": "Delete a price.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/PriceParams"
      },
      "result": {
        "$ref": "#/$defs/PriceInfo"
      },
      "help": "method/price.delete"
    },
    {
      "name": "price.fetchQuotes",
      "summary": "Start a Quote fetch of online prices; returns its ID at once.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/FetchParams"
      },
      "result": {
        "$ref": "#/$defs/FetchStarted"
      },
      "help": "method/price.fetchQuotes"
    },
    {
      "name": "price.fetchStatus",
      "summary": "A Quote fetch's state and, per commodity, the price stored or why there is none.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/StatusParams"
      },
      "result": {
        "$ref": "#/$defs/FetchStatus"
      },
      "help": "method/price.fetchStatus"
    },
    {
      "name": "price.get",
      "summary": "Describe one price.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/PriceParams"
      },
      "result": {
        "$ref": "#/$defs/PriceInfo"
      },
      "help": "method/price.get"
    },
    {
      "name": "price.latest",
      "summary": "The latest price of a commodity in a currency, either direction.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/PairParams"
      },
      "result": {
        "anyOf": [
          {
            "$ref": "#/$defs/FoundPrice"
          },
          {
            "type": "null"
          }
        ]
      },
      "help": "method/price.latest"
    },
    {
      "name": "price.list",
      "summary": "List prices, by commodity, currency and date range, in GnuCash's order.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/ListParams6"
      },
      "result": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/PriceInfo"
        }
      },
      "help": "method/price.list"
    },
    {
      "name": "price.nearest",
      "summary": "The price of a commodity in a currency nearest to a time, before it, or on its day.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NearestParams"
      },
      "result": {
        "anyOf": [
          {
            "$ref": "#/$defs/FoundPrice"
          },
          {
            "type": "null"
          }
        ]
      },
      "help": "method/price.nearest"
    },
    {
      "name": "price.removeOld",
      "summary": "Remove old prices, keeping the last of each week, month, quarter or fiscal year.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/RemoveOldParams"
      },
      "result": {
        "$ref": "#/$defs/RemoveOldResult"
      },
      "help": "method/price.removeOld"
    },
    {
      "name": "price.update",
      "summary": "Edit a price's value, time, source, type, commodity or currency, as the price editor does.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/UpdateParams5"
      },
      "result": {
        "$ref": "#/$defs/UpdateOutcome"
      },
      "help": "method/price.update"
    },
    {
      "name": "reconcile.autoClear",
      "summary": "Auto-clear an account: mark cleared the one set of uncleared splits that brings its cleared balance to a figure.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/AutoClearParams"
      },
      "result": {
        "$ref": "#/$defs/AutoClearResult"
      },
      "help": "method/reconcile.autoClear"
    },
    {
      "name": "reconcile.findAutoClear",
      "summary": "Find the one set of uncleared splits that brings an account's cleared balance to a figure, as GnuCash's Auto-clear does.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/AutoClearParams"
      },
      "result": {
        "$ref": "#/$defs/AutoClearResult"
      },
      "help": "method/reconcile.findAutoClear"
    },
    {
      "name": "reconcile.finish",
      "summary": "Finish a reconciliation: ticked splits become reconciled and the statement date becomes the last reconcile date.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/FinishParams"
      },
      "result": {
        "$ref": "#/$defs/FinishResult"
      },
      "help": "method/reconcile.finish"
    },
    {
      "name": "reconcile.info",
      "summary": "An account's reconcile information: last reconcile date and interval, postponed reconciliation.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/AccountParams2"
      },
      "result": {
        "$ref": "#/$defs/InfoResult"
      },
      "help": "method/reconcile.info"
    },
    {
      "name": "reconcile.postpone",
      "summary": "Postpone a reconciliation: ticked splits become cleared and the statement is kept for next time.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/FinishParams"
      },
      "result": {
        "$ref": "#/$defs/PostponeResult"
      },
      "help": "method/reconcile.postpone"
    },
    {
      "name": "reconcile.setInfo",
      "summary": "Set or remove an account's last reconcile date, interval, postponed reconciliation or sub-account flag.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/SetInfoParams"
      },
      "result": {
        "$ref": "#/$defs/InfoResult"
      },
      "help": "method/reconcile.setInfo"
    },
    {
      "name": "reconcile.setState",
      "summary": "Set a split's reconcile state (n, c, y or f); y stamps the reconcile date.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/SetStateParams"
      },
      "result": {
        "$ref": "#/$defs/SplitState"
      },
      "help": "method/reconcile.setState"
    },
    {
      "name": "reconcile.start",
      "summary": "Start reconciling an account against a statement: GnuCash's defaults, the splits to tick and the balances.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/StartParams"
      },
      "result": {
        "$ref": "#/$defs/ReconcileView"
      },
      "help": "method/reconcile.start"
    },
    {
      "name": "reconcile.status",
      "summary": "The splits, balances and difference of a reconciliation for a set of ticks, with marks and unmarks applied.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/StatusParams2"
      },
      "result": {
        "$ref": "#/$defs/ReconcileView"
      },
      "help": "method/reconcile.status"
    },
    {
      "name": "report.createStyleSheet",
      "summary": "Create a style sheet from a style sheet template in red-ale's configuration.",
      "effect": "write",
      "target": "configuration",
      "params": {
        "$ref": "#/$defs/CreateParams6"
      },
      "result": {
        "$ref": "#/$defs/StyleSheetInfo"
      },
      "help": "method/report.createStyleSheet"
    },
    {
      "name": "report.deleteConfiguration",
      "summary": "Delete a saved report configuration.",
      "effect": "destructive",
      "target": "configuration",
      "params": {
        "$ref": "#/$defs/DeleteParams5"
      },
      "result": {
        "$ref": "#/$defs/DeleteResult6"
      },
      "help": "method/report.deleteConfiguration"
    },
    {
      "name": "report.deleteStyleSheet",
      "summary": "Delete a user style sheet, or reset a predefined one to its template's defaults.",
      "effect": "destructive",
      "target": "configuration",
      "params": {
        "$ref": "#/$defs/DeleteParams6"
      },
      "result": {
        "$ref": "#/$defs/DeleteResult7"
      },
      "help": "method/report.deleteStyleSheet"
    },
    {
      "name": "report.export",
      "summary": "Run a report and render it through a style sheet as one self-contained HTML document.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/ExportParams"
      },
      "result": {
        "$ref": "#/$defs/ExportResult"
      },
      "help": "method/report.export"
    },
    {
      "name": "report.exportCsv",
      "summary": "Run a net or category chart and return its data as CSV, as GnuCash's CSV export of those charts writes it.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/ExportCsvParams"
      },
      "result": {
        "$ref": "#/$defs/ExportCsvResult"
      },
      "help": "method/report.exportCsv"
    },
    {
      "name": "report.importConfigurations",
      "summary": "Import GnuCash's saved report configurations from the text of its saved-reports-2.8 file, read as data, never run.",
      "effect": "write",
      "target": "configuration",
      "params": {
        "$ref": "#/$defs/ImportParams"
      },
      "result": {
        "$ref": "#/$defs/ImportConfigurationsResult"
      },
      "help": "method/report.importConfigurations"
    },
    {
      "name": "report.importStyleSheets",
      "summary": "Import GnuCash's style sheets from the text of its stylesheets-2.0 file, read as data, never run.",
      "effect": "write",
      "target": "configuration",
      "params": {
        "$ref": "#/$defs/ImportParams"
      },
      "result": {
        "$ref": "#/$defs/ImportStyleSheetsResult"
      },
      "help": "method/report.importStyleSheets"
    },
    {
      "name": "report.list",
      "summary": "Every report template and saved report configuration, and the user scripts that did not load.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "$ref": "#/$defs/ListResult3"
      },
      "help": "method/report.list"
    },
    {
      "name": "report.options",
      "summary": "A report's options with their defaults and values, and the JSON Schema of its options param.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/OptionsParams"
      },
      "result": {
        "$ref": "#/$defs/OptionsResult"
      },
      "help": "method/report.options"
    },
    {
      "name": "report.renameConfiguration",
      "summary": "Rename a saved report configuration.",
      "effect": "write",
      "target": "configuration",
      "params": {
        "$ref": "#/$defs/RenameParams"
      },
      "result": {
        "$ref": "#/$defs/ReportInfo"
      },
      "help": "method/report.renameConfiguration"
    },
    {
      "name": "report.run",
      "summary": "Run a report on the open book: the report result, with exact figures.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/RunParams"
      },
      "result": {
        "$ref": "#/$defs/ReportResult"
      },
      "help": "method/report.run"
    },
    {
      "name": "report.saveConfiguration",
      "summary": "Save a report's options under a new name in red-ale's configuration.",
      "effect": "write",
      "target": "configuration",
      "params": {
        "$ref": "#/$defs/SaveParams2"
      },
      "result": {
        "$ref": "#/$defs/ReportInfo"
      },
      "help": "method/report.saveConfiguration"
    },
    {
      "name": "report.styleSheets",
      "summary": "Style sheet templates and style sheets, with their options.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "$ref": "#/$defs/ListResult4"
      },
      "help": "method/report.styleSheets"
    },
    {
      "name": "report.updateConfiguration",
      "summary": "Change options of a saved report configuration.",
      "effect": "write",
      "target": "configuration",
      "params": {
        "$ref": "#/$defs/UpdateParams6"
      },
      "result": {
        "$ref": "#/$defs/ReportInfo"
      },
      "help": "method/report.updateConfiguration"
    },
    {
      "name": "report.updateStyleSheet",
      "summary": "Change a style sheet's options.",
      "effect": "write",
      "target": "configuration",
      "params": {
        "$ref": "#/$defs/UpdateParams7"
      },
      "result": {
        "$ref": "#/$defs/StyleSheetInfo"
      },
      "help": "method/report.updateStyleSheet"
    },
    {
      "name": "scheduledTransaction.apply",
      "summary": "Apply a held Since Last Run proposal with the caller's choices, as one Mutation.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/RunApplyParams"
      },
      "result": {
        "$ref": "#/$defs/RunApplied"
      },
      "help": "method/scheduledTransaction.apply"
    },
    {
      "name": "scheduledTransaction.create",
      "summary": "Create a scheduled transaction with its template transactions.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/CreateParams7"
      },
      "result": {
        "$ref": "#/$defs/ScheduledTransactionInfo"
      },
      "help": "method/scheduledTransaction.create"
    },
    {
      "name": "scheduledTransaction.delete",
      "summary": "Delete a scheduled transaction with its template account and template transactions.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/ScheduledKey"
      },
      "result": {
        "$ref": "#/$defs/Deleted"
      },
      "help": "method/scheduledTransaction.delete"
    },
    {
      "name": "scheduledTransaction.discard",
      "summary": "Drop a held Since Last Run proposal.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/RunDiscardParams"
      },
      "result": {
        "$ref": "#/$defs/RunDiscarded"
      },
      "help": "method/scheduledTransaction.discard"
    },
    {
      "name": "scheduledTransaction.fromTransaction",
      "summary": "Make a scheduled transaction from a transaction, as GnuCash's Schedule from transaction does.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/FromTransactionParams2"
      },
      "result": {
        "$ref": "#/$defs/ScheduledTransactionInfo"
      },
      "help": "method/scheduledTransaction.fromTransaction"
    },
    {
      "name": "scheduledTransaction.get",
      "summary": "One scheduled transaction with its template transactions.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/ScheduledKey"
      },
      "result": {
        "$ref": "#/$defs/ScheduledTransactionInfo"
      },
      "help": "method/scheduledTransaction.get"
    },
    {
      "name": "scheduledTransaction.list",
      "summary": "Scheduled transactions in book order.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/ListParams7"
      },
      "result": {
        "$ref": "#/$defs/ScheduledList"
      },
      "help": "method/scheduledTransaction.list"
    },
    {
      "name": "scheduledTransaction.loan",
      "summary": "Make a loan's repayment scheduled transaction, as GnuCash's mortgage and loan assistant does.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/LoanParams"
      },
      "result": {
        "$ref": "#/$defs/LoanResult"
      },
      "help": "method/scheduledTransaction.loan"
    },
    {
      "name": "scheduledTransaction.occurrences",
      "summary": "The next occurrence dates of a scheduled transaction, or of a Schedule not yet saved.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/OccurrencesParams"
      },
      "result": {
        "$ref": "#/$defs/OccurrenceList"
      },
      "help": "method/scheduledTransaction.occurrences"
    },
    {
      "name": "scheduledTransaction.sinceLastRun",
      "summary": "Propose the due instances of every enabled scheduled transaction: the Since Last Run proposal, held by ID. Changes nothing.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/NoParams"
      },
      "result": {
        "$ref": "#/$defs/RunProposal"
      },
      "help": "method/scheduledTransaction.sinceLastRun"
    },
    {
      "name": "scheduledTransaction.update",
      "summary": "Change a scheduled transaction's fields, Schedule, end or template transactions.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/UpdateParams8"
      },
      "result": {
        "$ref": "#/$defs/ScheduledTransactionInfo"
      },
      "help": "method/scheduledTransaction.update"
    },
    {
      "name": "scrub.checkAndRepair",
      "summary": "GnuCash's Check & Repair: orphans, then imbalances, then (if asked) lots.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/CheckParams2"
      },
      "result": {
        "$ref": "#/$defs/ScrubResult3"
      },
      "help": "method/scrub.checkAndRepair"
    },
    {
      "name": "scrub.currency",
      "summary": "Give transactions whose currency is not a currency the most common currency of their splits.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/ScrubParams"
      },
      "result": {
        "$ref": "#/$defs/ScrubResult3"
      },
      "help": "method/scrub.currency"
    },
    {
      "name": "scrub.imbalance",
      "summary": "Balance unbalanced transactions with an Imbalance-<CUR> split, after fixing orphans and split amounts.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/ScrubParams"
      },
      "result": {
        "$ref": "#/$defs/ScrubResult3"
      },
      "help": "method/scrub.imbalance"
    },
    {
      "name": "scrub.orphans",
      "summary": "Put splits with no account into an Orphan-<CUR> account, balancing each transaction changed.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/ScrubParams"
      },
      "result": {
        "$ref": "#/$defs/ScrubResult3"
      },
      "help": "method/scrub.orphans"
    },
    {
      "name": "stock.split",
      "summary": "Record a stock split, with an optional price and cash in lieu, as GnuCash's assistant does.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/StockSplitParams"
      },
      "result": {
        "$ref": "#/$defs/StockSplitResult"
      },
      "help": "method/stock.split"
    },
    {
      "name": "taxTable.create",
      "summary": "Create a tax table with one or more lines.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/TaxTableCreate"
      },
      "result": {
        "$ref": "#/$defs/TaxTableInfo"
      },
      "help": "method/taxTable.create"
    },
    {
      "name": "taxTable.delete",
      "summary": "Delete a tax table nothing uses.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/TaxTableKey"
      },
      "result": {
        "$ref": "#/$defs/Done"
      },
      "help": "method/taxTable.delete"
    },
    {
      "name": "taxTable.get",
      "summary": "A tax table, with its lines and family links.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/TaxTableKey"
      },
      "result": {
        "$ref": "#/$defs/TaxTableInfo"
      },
      "help": "method/taxTable.get"
    },
    {
      "name": "taxTable.list",
      "summary": "Tax tables; frozen copies made by posting only on request.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/FamilyListParams"
      },
      "result": {
        "$ref": "#/$defs/TaxTableList"
      },
      "help": "method/taxTable.list"
    },
    {
      "name": "taxTable.update",
      "summary": "Rename a tax table or replace its lines.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/TaxTableUpdate"
      },
      "result": {
        "$ref": "#/$defs/TaxTableInfo"
      },
      "help": "method/taxTable.update"
    },
    {
      "name": "transaction.delete",
      "summary": "Delete a transaction that is not read-only.",
      "effect": "destructive",
      "target": "book",
      "params": {
        "$ref": "#/$defs/GuidParams"
      },
      "result": {
        "$ref": "#/$defs/Done"
      },
      "help": "method/transaction.delete"
    },
    {
      "name": "transaction.find",
      "summary": "Find splits with the criteria of GnuCash's Find Transaction dialog.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/FindParams"
      },
      "result": {
        "$ref": "#/$defs/FindResult"
      },
      "help": "method/transaction.find"
    },
    {
      "name": "transaction.get",
      "summary": "A transaction with its splits.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/GuidParams"
      },
      "result": {
        "$ref": "#/$defs/TransactionInfo"
      },
      "help": "method/transaction.get"
    },
    {
      "name": "transaction.list",
      "summary": "Transactions, optionally in one account and a date range, in GnuCash's order.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/ListParams8"
      },
      "result": {
        "$ref": "#/$defs/ListResult5"
      },
      "help": "method/transaction.list"
    },
    {
      "name": "transaction.post",
      "summary": "Post a balanced transaction; refused if unbalanced.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/PostParams2"
      },
      "result": {
        "$ref": "#/$defs/TransactionInfo"
      },
      "help": "method/transaction.post"
    },
    {
      "name": "transaction.reverse",
      "summary": "Create the reversing transaction of a transaction.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/ReverseParams"
      },
      "result": {
        "$ref": "#/$defs/TransactionInfo"
      },
      "help": "method/transaction.reverse"
    },
    {
      "name": "transaction.transfer",
      "summary": "Transfer between two accounts, at a rate when their commodities differ, recording the price.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/TransferParams"
      },
      "result": {
        "$ref": "#/$defs/TransferResult"
      },
      "help": "method/transaction.transfer"
    },
    {
      "name": "transaction.unvoid",
      "summary": "Restore a voided transaction.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/GuidParams"
      },
      "result": {
        "$ref": "#/$defs/TransactionInfo"
      },
      "help": "method/transaction.unvoid"
    },
    {
      "name": "transaction.update",
      "summary": "Change a transaction's fields, currency and splits; the result must balance.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/UpdateParams9"
      },
      "result": {
        "$ref": "#/$defs/TransactionInfo"
      },
      "help": "method/transaction.update"
    },
    {
      "name": "transaction.void",
      "summary": "Void a transaction as GnuCash does: values kept in slots, splits zeroed and marked v.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/VoidParams"
      },
      "result": {
        "$ref": "#/$defs/TransactionInfo"
      },
      "help": "method/transaction.void"
    },
    {
      "name": "vendor.create",
      "summary": "Create a vendor; its ID comes from the book's counter unless given.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/VendorFields"
      },
      "result": {
        "$ref": "#/$defs/VendorInfo"
      },
      "help": "method/vendor.create"
    },
    {
      "name": "vendor.get",
      "summary": "A vendor.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/VendorKey"
      },
      "result": {
        "$ref": "#/$defs/VendorInfo"
      },
      "help": "method/vendor.get"
    },
    {
      "name": "vendor.list",
      "summary": "Vendors, optionally filtered by name, ID or active state.",
      "effect": "read",
      "target": null,
      "params": {
        "$ref": "#/$defs/ListParams3"
      },
      "result": {
        "$ref": "#/$defs/VendorList"
      },
      "help": "method/vendor.list"
    },
    {
      "name": "vendor.update",
      "summary": "Change a vendor; `active: false` deactivates it.",
      "effect": "write",
      "target": "book",
      "params": {
        "$ref": "#/$defs/VendorUpdate"
      },
      "result": {
        "$ref": "#/$defs/VendorInfo"
      },
      "help": "method/vendor.update"
    }
  ],
  "errors": [
    {
      "code": -32700,
      "name": "parse-error"
    },
    {
      "code": -32600,
      "name": "invalid-request"
    },
    {
      "code": -32601,
      "name": "method-not-found"
    },
    {
      "code": -32602,
      "name": "invalid-params"
    },
    {
      "code": -32603,
      "name": "internal-error"
    },
    {
      "code": 1000,
      "name": "no-book"
    },
    {
      "code": 1001,
      "name": "book-already-open"
    },
    {
      "code": 1002,
      "name": "book-locked"
    },
    {
      "code": 1003,
      "name": "cannot-lock"
    },
    {
      "code": 1004,
      "name": "sql-book"
    },
    {
      "code": 1005,
      "name": "unsupported-uri"
    },
    {
      "code": 1006,
      "name": "read-only"
    },
    {
      "code": 1007,
      "name": "file-exists"
    },
    {
      "code": 1008,
      "name": "io-error"
    },
    {
      "code": 1009,
      "name": "file-format"
    },
    {
      "code": 1010,
      "name": "save-verification"
    },
    {
      "code": 1011,
      "name": "backup-failed"
    },
    {
      "code": 1012,
      "name": "unsaved-changes"
    },
    {
      "code": 1013,
      "name": "book-changed"
    },
    {
      "code": 2000,
      "name": "not-found"
    },
    {
      "code": 2001,
      "name": "invalid"
    },
    {
      "code": 2002,
      "name": "unbalanced"
    },
    {
      "code": 2003,
      "name": "conflict"
    },
    {
      "code": 2004,
      "name": "arithmetic"
    },
    {
      "code": 3000,
      "name": "report-script"
    },
    {
      "code": 3001,
      "name": "report-limit"
    },
    {
      "code": 3002,
      "name": "report-option"
    },
    {
      "code": 3003,
      "name": "report-result"
    },
    {
      "code": 3004,
      "name": "report-load"
    },
    {
      "code": 4000,
      "name": "import-file"
    },
    {
      "code": 5000,
      "name": "network-disabled"
    },
    {
      "code": 6000,
      "name": "formula"
    }
  ],
  "$defs": {
    "BalanceParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account."
        },
        "asOf": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Balances at the end of this day (transactions posted before 23:59:59 local time); by default every transaction.",
          "default": null
        },
        "includeSubaccounts": {
          "type": "boolean",
          "description": "Add the sub-accounts' balances.",
          "default": false
        }
      },
      "required": [
        "account"
      ],
      "description": "Params of `account.balance`."
    },
    "AccountRef": {
      "type": "string",
      "description": "An account, by GUID or by full name with ':' between levels (Assets:Current Assets:Checking)."
    },
    "Date": {
      "type": "string",
      "format": "date",
      "description": "A calendar date, YYYY-MM-DD."
    },
    "BalanceResult": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The account."
        },
        "asOf": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The date, if one was given."
        },
        "includesSubaccounts": {
          "type": "boolean",
          "description": "Sub-accounts are included."
        },
        "balances": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityBalances"
            },
            {
              "type": "null"
            }
          ],
          "description": "The balances, in the account's commodity (amounts, not values)."
        },
        "unconverted": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CommodityBalances"
          },
          "description": "Sub-accounts in other commodities, summed by commodity and not converted (GnuCash converts them at the\nlatest price; red-ale v0.1 leaves that to the caller)."
        }
      },
      "required": [
        "account",
        "includesSubaccounts",
        "unconverted"
      ],
      "description": "The result of `account.balance`."
    },
    "Guid": {
      "type": "string",
      "pattern": "^[0-9a-fA-F]{32}$",
      "description": "A GUID: 32 hexadecimal digits."
    },
    "CommodityBalances": {
      "type": "object",
      "properties": {
        "commodity": {
          "$ref": "#/$defs/CommodityId",
          "description": "The commodity."
        },
        "balance": {
          "$ref": "#/$defs/Amount",
          "description": "Balance of every split."
        },
        "cleared": {
          "$ref": "#/$defs/Amount",
          "description": "Balance of splits cleared, reconciled, frozen or voided (state other than `n`)."
        },
        "reconciled": {
          "$ref": "#/$defs/Amount",
          "description": "Balance of reconciled and frozen splits."
        }
      },
      "required": [
        "commodity",
        "balance",
        "cleared",
        "reconciled"
      ],
      "description": "Balances in one commodity."
    },
    "CommodityId": {
      "type": "string",
      "description": "A commodity as NAMESPACE::MNEMONIC (CURRENCY::USD, NASDAQ::AAPL); a bare code such as USD names a currency."
    },
    "Amount": {
      "description": "An exact amount. Read from a decimal string (\"12.34\"), a rational string (\"1234/100\") or {num, denom} with string members; written as {num, denom}. Never a JSON number.",
      "oneOf": [
        {
          "type": "string",
          "pattern": "^\\s*[-+]?(\\d+(\\.\\d*)?|\\.\\d+)\\s*$|^\\s*-?\\d+\\s*/\\s*\\d+\\s*$"
        },
        {
          "type": "object",
          "properties": {
            "num": {
              "type": "string",
              "pattern": "^-?\\d+$"
            },
            "denom": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          "required": [
            "num",
            "denom"
          ],
          "additionalProperties": false
        }
      ]
    },
    "CascadeParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account; it must have sub-accounts."
        },
        "color": {
          "type": [
            "string",
            "null"
          ],
          "description": "Cascade this colour (`#rrggbb`, `#rgb` or `rgb(r,g,b)`); empty cascades no colour.",
          "default": null
        },
        "replaceColors": {
          "type": "boolean",
          "description": "Replace colours already set (GnuCash's \"Replace any existing account colors\"); without it only accounts\nwith no colour change.",
          "default": false
        },
        "placeholder": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Cascade the placeholder flag.",
          "default": null
        },
        "hidden": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Cascade the hidden flag.",
          "default": null
        }
      },
      "required": [
        "account"
      ],
      "description": "Params of `account.cascade`."
    },
    "CascadeResult": {
      "type": "object",
      "properties": {
        "changed": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "The accounts that changed: the account first, then its sub-accounts depth first."
        }
      },
      "required": [
        "changed"
      ],
      "description": "The result of `account.cascade`."
    },
    "CheckParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account."
        },
        "asOf": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The balance at the end of this day, local time; by default today, as GnuCash checks it.",
          "default": null
        }
      },
      "required": [
        "account"
      ],
      "description": "Params of `account.checkBalanceLimit`."
    },
    "CheckResult": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The account."
        },
        "asOf": {
          "$ref": "#/$defs/Date",
          "description": "The day the balance is taken at the end of."
        },
        "balance": {
          "$ref": "#/$defs/Amount",
          "description": "The balance compared, in raw sign, with sub-accounts when the account's flag is set: those in other commodities\nconverted at the latest price and rounded to the account commodity's fraction."
        },
        "higherLimit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "The higher limit, if set."
        },
        "lowerLimit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "The lower limit, if set."
        },
        "includesSubaccounts": {
          "type": "boolean",
          "description": "Sub-accounts are included."
        },
        "state": {
          "anyOf": [
            {
              "$ref": "#/$defs/LimitStateWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "The limit crossed: `above`, `below`, `shouldBeZero`; null when none is."
        },
        "unconverted": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Unconverted"
          },
          "description": "Sub-accounts in other commodities that no price converts, by commodity; they add nothing to `balance`."
        }
      },
      "required": [
        "account",
        "asOf",
        "balance",
        "includesSubaccounts",
        "unconverted"
      ],
      "description": "The result of `account.checkBalanceLimit`."
    },
    "LimitStateWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "above",
          "description": "Above the higher limit."
        },
        {
          "type": "string",
          "const": "below",
          "description": "Below the lower limit."
        },
        {
          "type": "string",
          "const": "shouldBeZero",
          "description": "Both limits are zero and the balance is not."
        }
      ],
      "description": "The limit a balance has crossed."
    },
    "Unconverted": {
      "type": "object",
      "properties": {
        "commodity": {
          "$ref": "#/$defs/CommodityId",
          "description": "The commodity."
        },
        "balance": {
          "$ref": "#/$defs/Amount",
          "description": "The sub-accounts' balances in it."
        }
      },
      "required": [
        "commodity",
        "balance"
      ],
      "description": "Sub-account balances in another commodity with no price to the account's, counted as zero as GnuCash counts them."
    },
    "CreateParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "description": "Name: not empty, without `:`, and unlike its siblings'."
        },
        "type": {
          "type": "string",
          "description": "Account type (see `account.types`); it must suit the parent's."
        },
        "parent": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Parent; the root by default.",
          "default": null
        },
        "commodity": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "Commodity: a currency for most types, a security for STOCK and MUTUAL. On create, defaults to the parent's\nwhen it suits the type. Cannot change once the account has splits.",
          "default": null
        },
        "scu": {
          "anyOf": [
            {
              "$ref": "#/$defs/ScuParam"
            },
            {
              "type": "null"
            }
          ],
          "description": "Smallest fraction."
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "Account code; empty clears it.",
          "default": null
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description; empty clears it.",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes; empty clears them.",
          "default": null
        },
        "placeholder": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Placeholder flag.",
          "default": null
        },
        "hidden": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Hidden flag.",
          "default": null
        },
        "taxRelated": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Tax-related flag.",
          "default": null
        },
        "taxUsCode": {
          "type": [
            "string",
            "null"
          ],
          "description": "US TXF code; empty clears it.",
          "default": null
        },
        "taxUsPayerNameSource": {
          "type": [
            "string",
            "null"
          ],
          "description": "US TXF payer name source (`current` or `parent`); empty clears it.",
          "default": null
        },
        "taxUsCopyNumber": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "US TXF copy number; 0 clears it.",
          "default": null
        },
        "color": {
          "type": [
            "string",
            "null"
          ],
          "description": "Account colour: `#rrggbb`, `#rgb` or `rgb(r,g,b)`, stored as `rgb(r,g,b)`; empty (or GnuCash's default\n`rgb(237,236,235)`) clears it.",
          "default": null
        },
        "higherBalanceLimit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Higher balance limit, in raw sign; null clears it.",
          "default": null
        },
        "lowerBalanceLimit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Lower balance limit, in raw sign; null clears it.",
          "default": null
        },
        "includeSubaccountBalances": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Apply the balance limits to the balance with sub-accounts. Cleared when no limit is left.",
          "default": null
        },
        "openingBalance": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Hold the opening balances of the account's commodity (EQUITY only; one per commodity; not once it has\nsplits). Setting it declares GnuCash's opening balance account Book feature.",
          "default": null
        },
        "associatedAccounts": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {
            "anyOf": [
              {
                "$ref": "#/$defs/AccountRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": "Associated accounts by tag; null removes a tag, tags not named are kept.",
          "default": null
        }
      },
      "required": [
        "name",
        "type"
      ],
      "description": "Params of `account.create`."
    },
    "ScuParam": {
      "anyOf": [
        {
          "$ref": "#/$defs/CommodityKeyword",
          "description": "`\"commodity\"`."
        },
        {
          "type": "integer",
          "format": "int64",
          "description": "A power of ten."
        }
      ],
      "description": "A smallest fraction: `\"commodity\"` for the commodity's own, or a power of ten from 1 to 1000000000."
    },
    "CommodityKeyword": {
      "oneOf": [
        {
          "type": "string",
          "const": "commodity",
          "description": "Use the commodity's fraction."
        }
      ],
      "description": "The keyword `commodity`."
    },
    "AccountInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "GUID."
        },
        "name": {
          "type": "string",
          "description": "Name."
        },
        "fullName": {
          "type": "string",
          "description": "Full name: ancestors' names joined by `:`, without the root."
        },
        "type": {
          "type": "string",
          "description": "Account type, as GnuCash writes it."
        },
        "parent": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Parent; none only for the root."
        },
        "commodity": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "Commodity held."
        },
        "scu": {
          "type": "integer",
          "format": "int64",
          "description": "Smallest fraction the account's amounts are kept in."
        },
        "nonStandardScu": {
          "type": "boolean",
          "description": "The smallest fraction was chosen instead of the commodity's."
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "Account code."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description."
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes."
        },
        "placeholder": {
          "type": "boolean",
          "description": "Groups other accounts; GnuCash's register refuses splits in it."
        },
        "hidden": {
          "type": "boolean",
          "description": "Hidden itself."
        },
        "hiddenInTree": {
          "type": "boolean",
          "description": "Hidden itself or through an ancestor, as GnuCash shows it."
        },
        "taxRelated": {
          "type": "boolean",
          "description": "Tax-related."
        },
        "taxUs": {
          "$ref": "#/$defs/TaxUs",
          "description": "US tax (TXF) settings."
        },
        "depth": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Levels below the root (top-level accounts are 1)."
        },
        "children": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Number of immediate sub-accounts."
        },
        "hasSplits": {
          "type": "boolean",
          "description": "The account has splits."
        },
        "color": {
          "type": [
            "string",
            "null"
          ],
          "description": "Account colour (`rgb(r,g,b)` as GnuCash's dialog writes it, or as stored); null when unset or `Not Set`."
        },
        "higherBalanceLimit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Higher balance limit, in raw sign (debits positive)."
        },
        "lowerBalanceLimit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Lower balance limit, in raw sign."
        },
        "includeSubaccountBalances": {
          "type": "boolean",
          "description": "The balance limits apply to the balance with sub-accounts."
        },
        "openingBalance": {
          "type": "boolean",
          "description": "The EQUITY account holding the opening balances of its commodity."
        },
        "associatedAccounts": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Associated accounts by tag (such as `stock-dividends`), each naming an existing account."
        }
      },
      "required": [
        "guid",
        "name",
        "fullName",
        "type",
        "scu",
        "nonStandardScu",
        "placeholder",
        "hidden",
        "hiddenInTree",
        "taxRelated",
        "taxUs",
        "depth",
        "children",
        "hasSplits",
        "includeSubaccountBalances",
        "openingBalance",
        "associatedAccounts"
      ],
      "description": "An account."
    },
    "TaxUs": {
      "type": "object",
      "properties": {
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "TXF code (`tax-US/code`), such as `N123`."
        },
        "payerNameSource": {
          "type": [
            "string",
            "null"
          ],
          "description": "Payer name source (`tax-US/payer-name-source`): `current` or `parent`."
        },
        "copyNumber": {
          "type": "integer",
          "format": "int64",
          "description": "Copy number (`tax-US/copy-number`); 1 when unset, as GnuCash reads it."
        }
      },
      "required": [
        "copyNumber"
      ],
      "description": "US tax (TXF) settings."
    },
    "DeleteParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account. It may have at most one sub-account."
        },
        "transactions": {
          "anyOf": [
            {
              "$ref": "#/$defs/DisposalParam"
            },
            {
              "type": "null"
            }
          ],
          "description": "Its transactions; required when it has splits."
        },
        "subaccount": {
          "anyOf": [
            {
              "$ref": "#/$defs/DisposalParam"
            },
            {
              "type": "null"
            }
          ],
          "description": "Its sub-account; required when it has one."
        },
        "subaccountTransactions": {
          "anyOf": [
            {
              "$ref": "#/$defs/DisposalParam"
            },
            {
              "type": "null"
            }
          ],
          "description": "The deleted sub-account's transactions (and its descendants'); required when they have splits."
        },
        "allowCommodityMismatch": {
          "type": "boolean",
          "description": "Move splits to an account in another commodity, keeping their amounts' numbers. GnuCash warns and asks.",
          "default": false
        }
      },
      "required": [
        "account"
      ],
      "description": "Params of `account.delete`."
    },
    "DisposalParam": {
      "oneOf": [
        {
          "type": "string",
          "const": "delete",
          "description": "Delete them (whole transactions, other accounts' splits included)."
        },
        {
          "type": "object",
          "properties": {
            "moveTo": {
              "$ref": "#/$defs/AccountRef"
            }
          },
          "required": [
            "moveTo"
          ],
          "additionalProperties": false,
          "description": "Move the splits to this account, or re-parent the sub-account under it. It must have the deleted account's\ntype; a split target must not be a placeholder or hidden."
        }
      ],
      "description": "What to do with transactions or a sub-account: `\"delete\"`, or `{\"moveTo\": <account>}`."
    },
    "DeleteResult": {
      "type": "object",
      "properties": {
        "deletedAccounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Accounts deleted, the account first."
        },
        "reparented": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The sub-account re-parented, if any."
        },
        "movedSplits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Splits moved."
        },
        "deletedTransactions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Transactions deleted."
        },
        "deletedLots": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Lots deleted."
        }
      },
      "required": [
        "deletedAccounts",
        "movedSplits",
        "deletedTransactions",
        "deletedLots"
      ],
      "description": "What `account.delete` did."
    },
    "AccountParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account."
        }
      },
      "required": [
        "account"
      ],
      "description": "Params naming one account."
    },
    "ListParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "under": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "List only the descendants of this account; by default every account but the root.",
          "default": null
        },
        "excludeHidden": {
          "type": "boolean",
          "description": "Leave out accounts hidden themselves or through an ancestor.",
          "default": false
        }
      },
      "description": "Params of `account.list`."
    },
    "ListResult": {
      "type": "object",
      "properties": {
        "accounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AccountInfo"
          },
          "description": "Accounts, depth first: each followed by its sub-accounts, siblings in the book's order."
        },
        "nameViolations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Accounts whose names contain the separator `:`, which makes full names ambiguous (GnuCash warns about them\nwhen it opens a book)."
        }
      },
      "required": [
        "accounts",
        "nameViolations"
      ],
      "description": "The result of `account.list`."
    },
    "MoveParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account to move, with its sub-accounts."
        },
        "parent": {
          "$ref": "#/$defs/AccountRef",
          "description": "The new parent; it becomes the last of the parent's children."
        }
      },
      "required": [
        "account",
        "parent"
      ],
      "description": "Params of `account.move`."
    },
    "OpeningBalanceParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "The currency."
        }
      },
      "required": [
        "currency"
      ],
      "description": "Params of `account.openingBalanceAccount`."
    },
    "OpeningBalanceResult": {
      "type": "object",
      "properties": {
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountInfo"
            },
            {
              "type": "null"
            }
          ],
          "description": "The account; null when GnuCash would create one."
        },
        "foundBy": {
          "anyOf": [
            {
              "$ref": "#/$defs/FoundByWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "How it was found."
        },
        "featureUsed": {
          "type": "boolean",
          "description": "The book declares GnuCash's opening balance account Book feature."
        }
      },
      "required": [
        "featureUsed"
      ],
      "description": "The result of `account.openingBalanceAccount`."
    },
    "FoundByWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "equityType",
          "description": "Its `equity-type` slot (only with the Book feature)."
        },
        {
          "type": "string",
          "const": "name",
          "description": "The name `Opening Balances`."
        },
        {
          "type": "string",
          "const": "nameWithCurrency",
          "description": "The name `Opening Balances - <MNEMONIC>`."
        }
      ],
      "description": "How the opening balance account was found."
    },
    "RenumberParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account whose immediate sub-accounts are renumbered."
        },
        "prefix": {
          "type": [
            "string",
            "null"
          ],
          "description": "Prefix, joined to the number by `-`; by default the account's own code. Empty means none.",
          "default": null
        },
        "interval": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "Step between codes, 1 to 10000; default 10.",
          "default": null
        },
        "digits": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "Minimum digits, 1 to 100; default 3. Never fewer than the largest number needs.",
          "default": null
        }
      },
      "required": [
        "account"
      ],
      "description": "Params of `account.renumber`."
    },
    "NewCode": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The sub-account."
        },
        "fullName": {
          "type": "string",
          "description": "Its full name."
        },
        "code": {
          "type": "string",
          "description": "Its new code."
        }
      },
      "required": [
        "account",
        "fullName",
        "code"
      ],
      "description": "A sub-account's new code."
    },
    "TreeParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "under": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "The top of the tree; the root by default.",
          "default": null
        },
        "sorted": {
          "type": "boolean",
          "description": "Order siblings as GnuCash displays them (code, type, name) instead of the book's order.",
          "default": false
        },
        "excludeHidden": {
          "type": "boolean",
          "description": "Leave out hidden accounts and everything below them.",
          "default": false
        }
      },
      "description": "Params of `account.tree`."
    },
    "TreeNode": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "GUID."
        },
        "name": {
          "type": "string",
          "description": "Name."
        },
        "fullName": {
          "type": "string",
          "description": "Full name."
        },
        "type": {
          "type": "string",
          "description": "Account type."
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "Account code."
        },
        "commodity": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "Commodity held."
        },
        "placeholder": {
          "type": "boolean",
          "description": "Placeholder."
        },
        "hidden": {
          "type": "boolean",
          "description": "Hidden itself."
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TreeNode"
          },
          "description": "Sub-accounts."
        }
      },
      "required": [
        "guid",
        "name",
        "fullName",
        "type",
        "placeholder",
        "hidden",
        "children"
      ],
      "description": "A node of the account tree."
    },
    "NoParams": {
      "type": "object",
      "additionalProperties": false,
      "description": "Params for methods that take none."
    },
    "TypeInfo": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name GnuCash writes (`BANK`)."
        },
        "label": {
          "type": "string",
          "description": "GnuCash's label (`Bank`)."
        },
        "fundamental": {
          "type": [
            "string",
            "null"
          ],
          "description": "`ASSET`, `LIABILITY`, `INCOME`, `EXPENSE` or `EQUITY`; none for ROOT and TRADING."
        },
        "choosable": {
          "type": "boolean",
          "description": "Can be chosen for an account (CURRENCY is deprecated; ROOT is the tree's top)."
        },
        "commodity": {
          "type": "string",
          "description": "What the account holds: `currency`, `security` or `any`."
        },
        "parentTypes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The types its parent may have."
        },
        "changesWithSplits": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The types an account of this type may change to once it has splits."
        }
      },
      "required": [
        "name",
        "label",
        "choosable",
        "commodity",
        "parentTypes",
        "changesWithSplits"
      ],
      "description": "An account type and GnuCash's rules for it."
    },
    "UpdateParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "New name.",
          "default": null
        },
        "type": {
          "type": [
            "string",
            "null"
          ],
          "description": "New type. With splits, only a compatible type (see `account.types`).",
          "default": null
        },
        "retypeChildren": {
          "type": "boolean",
          "description": "Confirm that sub-accounts whose type cannot sit under the new type take the new type too.",
          "default": false
        },
        "commodity": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "Commodity: a currency for most types, a security for STOCK and MUTUAL. On create, defaults to the parent's\nwhen it suits the type. Cannot change once the account has splits.",
          "default": null
        },
        "scu": {
          "anyOf": [
            {
              "$ref": "#/$defs/ScuParam"
            },
            {
              "type": "null"
            }
          ],
          "description": "Smallest fraction."
        },
        "code": {
          "type": [
            "string",
            "null"
          ],
          "description": "Account code; empty clears it.",
          "default": null
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description; empty clears it.",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes; empty clears them.",
          "default": null
        },
        "placeholder": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Placeholder flag.",
          "default": null
        },
        "hidden": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Hidden flag.",
          "default": null
        },
        "taxRelated": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Tax-related flag.",
          "default": null
        },
        "taxUsCode": {
          "type": [
            "string",
            "null"
          ],
          "description": "US TXF code; empty clears it.",
          "default": null
        },
        "taxUsPayerNameSource": {
          "type": [
            "string",
            "null"
          ],
          "description": "US TXF payer name source (`current` or `parent`); empty clears it.",
          "default": null
        },
        "taxUsCopyNumber": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "US TXF copy number; 0 clears it.",
          "default": null
        },
        "color": {
          "type": [
            "string",
            "null"
          ],
          "description": "Account colour: `#rrggbb`, `#rgb` or `rgb(r,g,b)`, stored as `rgb(r,g,b)`; empty (or GnuCash's default\n`rgb(237,236,235)`) clears it.",
          "default": null
        },
        "higherBalanceLimit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Higher balance limit, in raw sign; null clears it.",
          "default": null
        },
        "lowerBalanceLimit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Lower balance limit, in raw sign; null clears it.",
          "default": null
        },
        "includeSubaccountBalances": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Apply the balance limits to the balance with sub-accounts. Cleared when no limit is left.",
          "default": null
        },
        "openingBalance": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Hold the opening balances of the account's commodity (EQUITY only; one per commodity; not once it has\nsplits). Setting it declares GnuCash's opening balance account Book feature.",
          "default": null
        },
        "associatedAccounts": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {
            "anyOf": [
              {
                "$ref": "#/$defs/AccountRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": "Associated accounts by tag; null removes a tag, tags not named are kept.",
          "default": null
        }
      },
      "required": [
        "account"
      ],
      "description": "Params of `account.update`."
    },
    "BillTermCreate": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "description": "A name no other visible billing term has."
        },
        "description": {
          "type": "string",
          "description": "Description.",
          "default": ""
        },
        "type": {
          "$ref": "#/$defs/BillTermTypeWire",
          "description": "Days or proximo."
        },
        "dueDays": {
          "type": "integer",
          "format": "int64",
          "description": "Days: days until due. Proximo: the day of the month it is due (1-31).",
          "default": 0
        },
        "discountDays": {
          "type": "integer",
          "format": "int64",
          "description": "Days: days the early-payment discount lasts. Proximo: the day of the month it ends. Stored only.",
          "default": 0
        },
        "discount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Early-payment discount percentage. Stored only.",
          "default": null
        },
        "cutoff": {
          "type": "integer",
          "format": "int64",
          "description": "Proximo only: documents posted after this day of the month are due a month later; 0 or less counts back\nfrom the end of the month.",
          "default": 0
        }
      },
      "required": [
        "name",
        "type"
      ],
      "description": "Params of `billTerm.create`."
    },
    "BillTermTypeWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "days",
          "description": "Due a number of days after posting."
        },
        {
          "type": "string",
          "const": "proximo",
          "description": "Due on a day of a following month."
        }
      ],
      "description": "How a billing term sets the due date."
    },
    "BillTermInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "Its GUID."
        },
        "name": {
          "type": "string",
          "description": "Its name; frozen copies share their parent's."
        },
        "description": {
          "type": "string",
          "description": "Description."
        },
        "type": {
          "anyOf": [
            {
              "$ref": "#/$defs/BillTermTypeWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Days or proximo; absent for a term whose type was never set."
        },
        "dueDays": {
          "type": "integer",
          "format": "int64",
          "description": "Days until due, or the proximo due day."
        },
        "discountDays": {
          "type": "integer",
          "format": "int64",
          "description": "Discount days, or the proximo discount day."
        },
        "discount": {
          "$ref": "#/$defs/Amount",
          "description": "Discount percentage."
        },
        "cutoff": {
          "type": "integer",
          "format": "int64",
          "description": "Proximo cutoff day."
        },
        "refcount": {
          "type": "integer",
          "format": "int64",
          "description": "How many customers, vendors and documents use it (always 0 for a frozen copy)."
        },
        "invisible": {
          "type": "boolean",
          "description": "True for frozen copies."
        },
        "parent": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The term it is a frozen copy of."
        },
        "child": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Its current frozen copy."
        }
      },
      "required": [
        "guid",
        "name",
        "description",
        "dueDays",
        "discountDays",
        "discount",
        "cutoff",
        "refcount",
        "invisible"
      ],
      "description": "A billing term."
    },
    "BillTermKey": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "billTerm": {
          "$ref": "#/$defs/BillTermRef",
          "description": "The billing term."
        }
      },
      "required": [
        "billTerm"
      ],
      "description": "Names one billing term."
    },
    "BillTermRef": {
      "type": "string",
      "description": "A billing term, by GUID or by name."
    },
    "Done": {
      "type": "object",
      "description": "A result with nothing to report."
    },
    "FamilyListParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "includeFrozen": {
          "type": "boolean",
          "description": "Include the invisible frozen copies posting makes.",
          "default": false
        }
      },
      "description": "Params of the lists of tax tables and billing terms."
    },
    "BillTermList": {
      "type": "object",
      "properties": {
        "billTerms": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BillTermInfo"
          },
          "description": "Sorted by name, then description, then GUID, as GnuCash lists them."
        }
      },
      "required": [
        "billTerms"
      ],
      "description": "Billing terms."
    },
    "BillTermUpdate": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "billTerm": {
          "$ref": "#/$defs/BillTermRef",
          "description": "The billing term (visible ones only)."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "New name.",
          "default": null
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "New description.",
          "default": null
        },
        "type": {
          "anyOf": [
            {
              "$ref": "#/$defs/BillTermTypeWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Days or proximo.",
          "default": null
        },
        "dueDays": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "Days until due, or the proximo due day.",
          "default": null
        },
        "discountDays": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "Discount days, or the proximo discount day.",
          "default": null
        },
        "discount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Discount percentage.",
          "default": null
        },
        "cutoff": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "Proximo cutoff day.",
          "default": null
        }
      },
      "required": [
        "billTerm"
      ],
      "description": "Params of `billTerm.update`: the fields to change."
    },
    "CloseParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "save": {
          "type": "boolean",
          "description": "Save unsaved changes first.",
          "default": false
        },
        "discard": {
          "type": "boolean",
          "description": "Discard unsaved changes. Without `save` or `discard`, closing a book with unsaved changes is refused.",
          "default": false
        }
      },
      "description": "Params of `book.close`."
    },
    "CloseResult": {
      "type": "object",
      "properties": {
        "saved": {
          "type": "boolean",
          "description": "The book was saved before closing."
        },
        "discarded": {
          "type": "boolean",
          "description": "Unsaved changes were discarded."
        }
      },
      "required": [
        "saved",
        "discarded"
      ],
      "description": "What `book.close` did."
    },
    "CloseBooksParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "date": {
          "$ref": "#/$defs/Date",
          "description": "The closing date; balances at the end of this day, local time, are closed."
        },
        "incomeTotalAccount": {
          "$ref": "#/$defs/AccountRef",
          "description": "The equity account taking the period's income (GnuCash's \"Income Total\")."
        },
        "expenseTotalAccount": {
          "$ref": "#/$defs/AccountRef",
          "description": "The equity account taking the period's expense (GnuCash's \"Expense Total\"); may be the same account."
        },
        "description": {
          "type": "string",
          "description": "The closing transactions' description; empty by default, as in GnuCash's dialog.",
          "default": ""
        }
      },
      "required": [
        "date",
        "incomeTotalAccount",
        "expenseTotalAccount"
      ],
      "description": "Params of `book.closeBooks`."
    },
    "CloseResult2": {
      "type": "object",
      "properties": {
        "transactions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClosingInfo"
          },
          "description": "The closing transactions, income first."
        },
        "createdAccounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Equity accounts made for a currency."
        }
      },
      "required": [
        "transactions",
        "createdAccounts"
      ],
      "description": "The result of `book.closeBooks`."
    },
    "ClosingInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The transaction."
        },
        "kind": {
          "$ref": "#/$defs/ClosingKind",
          "description": "The type of the accounts it closes."
        },
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "Its currency."
        },
        "equityAccount": {
          "$ref": "#/$defs/Guid",
          "description": "The equity account its balancing split posts to."
        },
        "total": {
          "$ref": "#/$defs/Amount",
          "description": "The equity split's value: the sum of the closed balances."
        }
      },
      "required": [
        "guid",
        "kind",
        "currency",
        "equityAccount",
        "total"
      ],
      "description": "One closing transaction made."
    },
    "ClosingKind": {
      "oneOf": [
        {
          "type": "string",
          "const": "income",
          "description": "Income accounts."
        },
        {
          "type": "string",
          "const": "expense",
          "description": "Expense accounts."
        }
      ],
      "description": "Whether a closing transaction closes income or expense."
    },
    "CreateParams2": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "path": {
          "type": "string",
          "description": "A path, or an `xml://` or `sqlite3://` URI, that does not exist yet."
        },
        "compressed": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "XML only: write it gzip-compressed (GnuCash's default). Defaults to the server's setting.",
          "default": null
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/BookFormat"
            },
            {
              "type": "null"
            }
          ],
          "description": "`xml` or `sqlite`. Defaults to the one a `sqlite3://` or `xml://` URI names, else `xml`.",
          "default": null
        }
      },
      "required": [
        "path"
      ],
      "description": "Params of `book.create`."
    },
    "BookFormat": {
      "oneOf": [
        {
          "type": "string",
          "const": "xml",
          "description": "GnuCash's XML, gzipped or plain."
        },
        {
          "type": "string",
          "const": "sqlite",
          "description": "An SQLite database."
        }
      ],
      "description": "A book file's format."
    },
    "BookInfo": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "The book's file."
        },
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The book's GUID."
        },
        "rootAccount": {
          "$ref": "#/$defs/Guid",
          "description": "The root account's GUID."
        },
        "readOnly": {
          "type": "boolean",
          "description": "Nothing can be changed."
        },
        "readOnlyReasons": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReadOnlyInfo"
          },
          "description": "Why, when read-only."
        },
        "dirty": {
          "type": "boolean",
          "description": "There are unsaved changes."
        },
        "compressed": {
          "type": "boolean",
          "description": "The file is gzip-compressed; always false for an SQLite book."
        },
        "format": {
          "$ref": "#/$defs/BookFormat",
          "description": "The file's format: `xml` or `sqlite`."
        },
        "versions": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/VersionInfo"
          },
          "description": "SQLite books only: the `versions` table as read, in its order."
        },
        "journal": {
          "type": [
            "string",
            "null"
          ],
          "description": "The transaction journal being written, if any."
        },
        "features": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FeatureInfo"
          },
          "description": "Book features the book declares."
        },
        "counts": {
          "$ref": "#/$defs/Counts",
          "description": "Entity counts."
        }
      },
      "required": [
        "path",
        "guid",
        "rootAccount",
        "readOnly",
        "readOnlyReasons",
        "dirty",
        "compressed",
        "format",
        "features",
        "counts"
      ],
      "description": "The result of `book.open`, `book.create` and `book.info`."
    },
    "ReadOnlyInfo": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "`requested`, `unsupported-features`, `unrecognised-content` or `schema-version`."
        },
        "message": {
          "type": "string",
          "description": "Explanation."
        }
      },
      "required": [
        "code",
        "message"
      ],
      "description": "Why a book is read-only."
    },
    "VersionInfo": {
      "type": "object",
      "properties": {
        "table": {
          "type": "string",
          "description": "The table name."
        },
        "version": {
          "type": "integer",
          "format": "int64",
          "description": "Its version."
        }
      },
      "required": [
        "table",
        "version"
      ],
      "description": "A `versions` row of an SQLite book: a table, or `Gnucash` and `Gnucash-Resave`, with its version."
    },
    "FeatureInfo": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name GnuCash stores."
        },
        "description": {
          "type": "string",
          "description": "The description stored with it."
        },
        "known": {
          "type": "boolean",
          "description": "GnuCash 5.17 knows it."
        },
        "supported": {
          "type": "boolean",
          "description": "red-ale can edit a book that uses it."
        }
      },
      "required": [
        "name",
        "description",
        "known",
        "supported"
      ],
      "description": "A Book feature the book declares."
    },
    "Counts": {
      "type": "object",
      "properties": {
        "commodities": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "accounts": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "transactions": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "prices": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "lots": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "customers": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "vendors": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "employees": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "jobs": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "invoices": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "orders": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "taxTables": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "billTerms": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        }
      },
      "required": [
        "commodities",
        "accounts",
        "transactions",
        "prices",
        "lots",
        "customers",
        "vendors",
        "employees",
        "jobs",
        "invoices",
        "orders",
        "taxTables",
        "billTerms"
      ],
      "description": "How many of each entity the book holds."
    },
    "OpenParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "path": {
          "type": "string",
          "description": "A path, or an `xml://`, `sqlite3://` or `file://` URI."
        },
        "readOnly": {
          "type": "boolean",
          "description": "Open without taking the lock; nothing can be changed.",
          "default": false
        }
      },
      "required": [
        "path"
      ],
      "description": "Params of `book.open`."
    },
    "BookOptions": {
      "type": "object",
      "properties": {
        "splitActionForNum": {
          "type": "boolean",
          "description": "\"Use Split Action Field for Number\": a split's Number is its action, and the transaction's num is the T-Num."
        },
        "autoReadOnlyDays": {
          "type": "integer",
          "format": "int64",
          "description": "\"Day Threshold for Read-Only Transactions (red line)\": 0 when off."
        },
        "readOnlyThreshold": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Today minus the threshold's days: transactions posted before it are read-only. Absent when the threshold is off."
        },
        "useTradingAccounts": {
          "type": "boolean",
          "description": "\"Use Trading Accounts\": every commit keeps the trading splits of multi-commodity transactions."
        },
        "defaultBudget": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "\"Default Budget\": the GUID the option holds, or null when it is unset. A GUID naming no budget is returned as\nstored; `budget.list` gives the default in effect."
        },
        "companyName": {
          "type": "string",
          "description": "The Business tab's \"Company Name\"; `\"\"` when unset (v0.6)."
        },
        "companyAddress": {
          "type": "string",
          "description": "\"Company Address\": lines separated by newlines (v0.6)."
        },
        "companyContactPerson": {
          "type": "string",
          "description": "\"Company Contact Person\" (v0.6)."
        },
        "companyPhoneNumber": {
          "type": "string",
          "description": "\"Company Phone Number\" (v0.6)."
        },
        "companyFaxNumber": {
          "type": "string",
          "description": "\"Company Fax Number\" (v0.6)."
        },
        "companyEmailAddress": {
          "type": "string",
          "description": "\"Company Email Address\" (v0.6)."
        },
        "companyWebsiteUrl": {
          "type": "string",
          "description": "\"Company Website URL\" (v0.6)."
        },
        "companyId": {
          "type": "string",
          "description": "\"Company ID\", such as a tax ID (v0.6)."
        },
        "taxNumber": {
          "type": "string",
          "description": "The Tax tab's \"Tax Number\" (v0.6)."
        },
        "defaultInvoiceReport": {
          "anyOf": [
            {
              "$ref": "#/$defs/InvoiceReport"
            },
            {
              "type": "null"
            }
          ],
          "description": "\"Default Invoice Report\": the report GnuCash's Print Invoice runs, as GnuCash parses the slot; null when unset\nor unreadable. The GUID is returned as stored and may name no report red-ale has (v0.6)."
        }
      },
      "required": [
        "splitActionForNum",
        "autoReadOnlyDays",
        "useTradingAccounts",
        "companyName",
        "companyAddress",
        "companyContactPerson",
        "companyPhoneNumber",
        "companyFaxNumber",
        "companyEmailAddress",
        "companyWebsiteUrl",
        "companyId",
        "taxNumber"
      ],
      "description": "The book options, as `book.options` and `book.setOptions` return them."
    },
    "InvoiceReport": {
      "type": "object",
      "properties": {
        "guid": {
          "type": "string",
          "description": "The report's GUID: a template or a saved configuration, as stored."
        },
        "name": {
          "type": "string",
          "description": "The name stored beside it, `\"\"` when none."
        }
      },
      "required": [
        "guid",
        "name"
      ],
      "description": "The Default Invoice Report as `book.options` reads it."
    },
    "ReplayParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "path": {
          "type": "string",
          "description": "The journal: a `<book>.<timestamp>.log` file."
        },
        "skipInvalid": {
          "type": "boolean",
          "description": "Skip records that cannot be applied (for example an unbalanced transaction) instead of refusing the replay.",
          "default": false
        }
      },
      "required": [
        "path"
      ],
      "description": "Params of `book.replayJournal`."
    },
    "ReplayResult": {
      "type": "object",
      "properties": {
        "records": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Records read."
        },
        "created": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Transactions created."
        },
        "updated": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Transactions updated."
        },
        "deleted": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Transactions deleted."
        },
        "notFound": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Deletions of transactions the book does not have."
        },
        "skippedRecords": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Records skipped, with why."
        },
        "skippedLines": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Lines that could not be read, as `line N: reason`."
        }
      },
      "required": [
        "records",
        "created",
        "updated",
        "deleted",
        "notFound",
        "skippedRecords",
        "skippedLines"
      ],
      "description": "What `book.replayJournal` did."
    },
    "SaveParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "compressed": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "XML only: change the file's compression; by default it is kept.",
          "default": null
        }
      },
      "description": "Params of `book.save`."
    },
    "SaveResult": {
      "type": "object",
      "properties": {
        "backup": {
          "type": [
            "string",
            "null"
          ],
          "description": "The backup of the previous file."
        },
        "removed": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Old backups and journals removed by retention."
        },
        "compressed": {
          "type": "boolean",
          "description": "The file was written gzip-compressed; always false for an SQLite book."
        }
      },
      "required": [
        "removed",
        "compressed"
      ],
      "description": "What `book.save` did."
    },
    "SetParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "splitActionForNum": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Use the split action as the Number. Turning it on also sets the Book feature `Number Field Source`.",
          "default": null
        },
        "autoReadOnlyDays": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "Days after which transactions become read-only: 0 (off) to 3650.",
          "minimum": 0,
          "maximum": 3650,
          "default": null
        },
        "useTradingAccounts": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Balance multi-commodity transactions through trading accounts. No existing transaction changes.",
          "default": null
        },
        "defaultBudget": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The default budget: a budget of the book. It cannot be unset.",
          "default": null
        },
        "companyName": {
          "type": [
            "string",
            "null"
          ],
          "description": "\"Company Name\"; `\"\"` clears it (v0.6).",
          "default": null
        },
        "companyAddress": {
          "type": [
            "string",
            "null"
          ],
          "description": "\"Company Address\", lines separated by newlines (v0.6).",
          "default": null
        },
        "companyContactPerson": {
          "type": [
            "string",
            "null"
          ],
          "description": "\"Company Contact Person\" (v0.6).",
          "default": null
        },
        "companyPhoneNumber": {
          "type": [
            "string",
            "null"
          ],
          "description": "\"Company Phone Number\" (v0.6).",
          "default": null
        },
        "companyFaxNumber": {
          "type": [
            "string",
            "null"
          ],
          "description": "\"Company Fax Number\" (v0.6).",
          "default": null
        },
        "companyEmailAddress": {
          "type": [
            "string",
            "null"
          ],
          "description": "\"Company Email Address\" (v0.6).",
          "default": null
        },
        "companyWebsiteUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "\"Company Website URL\" (v0.6).",
          "default": null
        },
        "companyId": {
          "type": [
            "string",
            "null"
          ],
          "description": "\"Company ID\" (v0.6).",
          "default": null
        },
        "taxNumber": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Tax tab's \"Tax Number\" (v0.6).",
          "default": null
        },
        "defaultInvoiceReport": {
          "anyOf": [
            {
              "$ref": "#/$defs/InvoiceReportParam"
            },
            {
              "type": "null"
            }
          ],
          "description": "\"Default Invoice Report\": `{ guid, name }`, or null to clear it (v0.6)."
        }
      },
      "description": "Params of `book.setOptions`; an absent option is left as it is."
    },
    "InvoiceReportParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The report's GUID: a template or a saved configuration. It is not checked against the reports red-ale has,\nsince GnuCash may print the Book with reports red-ale lacks."
        },
        "name": {
          "type": "string",
          "description": "The name to store beside it, as GnuCash stores the chosen report's name."
        }
      },
      "required": [
        "guid",
        "name"
      ],
      "description": "The Default Invoice Report as `book.setOptions` writes it."
    },
    "BudgetKey": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "budget": {
          "$ref": "#/$defs/Guid",
          "description": "The budget."
        }
      },
      "required": [
        "budget"
      ],
      "description": "Names one budget."
    },
    "BudgetInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "Identity."
        },
        "name": {
          "type": "string",
          "description": "The name."
        },
        "description": {
          "type": "string",
          "description": "The description."
        },
        "numPeriods": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0,
          "description": "The number of periods."
        },
        "recurrence": {
          "$ref": "#/$defs/Recurrence",
          "description": "The recurrence that gives the periods' dates, as stored."
        },
        "isDefault": {
          "type": "boolean",
          "description": "True for the default budget."
        },
        "periods": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/PeriodInfo"
          },
          "description": "Each period below `numPeriods`; absent in `budget.list`."
        },
        "amounts": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/AmountInfo"
          },
          "description": "Every set amount of an account in the tree below `numPeriods`, by account full name then period; absent in\n`budget.list`."
        },
        "notes": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/NoteInfo"
          },
          "description": "Every note likewise; absent in `budget.list`."
        },
        "hidden": {
          "$ref": "#/$defs/SlotCounts",
          "description": "Amounts and notes kept at or beyond `numPeriods`."
        },
        "orphaned": {
          "$ref": "#/$defs/SlotCounts",
          "description": "Amounts and notes kept for GUIDs that name no account."
        }
      },
      "required": [
        "guid",
        "name",
        "description",
        "numPeriods",
        "recurrence",
        "isDefault",
        "hidden",
        "orphaned"
      ],
      "description": "A budget."
    },
    "Recurrence": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "mult": {
          "type": "integer",
          "format": "uint16",
          "minimum": 0,
          "maximum": 65535,
          "description": "How many steps apart occurrences are; at least 1 unless `once`."
        },
        "periodType": {
          "$ref": "#/$defs/PeriodTypeWire",
          "description": "The step."
        },
        "start": {
          "$ref": "#/$defs/Date",
          "description": "The first occurrence."
        },
        "weekendAdjust": {
          "$ref": "#/$defs/WeekendAdjustWire",
          "description": "Where occurrences on a weekend move to; `none` when absent.",
          "default": "none"
        }
      },
      "required": [
        "mult",
        "periodType",
        "start"
      ],
      "description": "A Recurrence: every `mult` steps of `periodType` from `start`, moved off weekends by `weekendAdjust`."
    },
    "PeriodTypeWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "once",
          "description": "Once, on the start date."
        },
        {
          "type": "string",
          "const": "day",
          "description": "Every *n* days."
        },
        {
          "type": "string",
          "const": "week",
          "description": "Every *n* weeks."
        },
        {
          "type": "string",
          "const": "month",
          "description": "Every *n* months on the start's day."
        },
        {
          "type": "string",
          "const": "endOfMonth",
          "description": "Every *n* months on the last day."
        },
        {
          "type": "string",
          "const": "nthWeekday",
          "description": "Every *n* months on the start's weekday in the same week of the month."
        },
        {
          "type": "string",
          "const": "lastWeekday",
          "description": "Every *n* months on the last of the start's weekday."
        },
        {
          "type": "string",
          "const": "year",
          "description": "Every *n* years."
        }
      ],
      "description": "A Recurrence's step, as the wire names it (`design/api.md`, \"Wire types\")."
    },
    "WeekendAdjustWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "none",
          "description": "It stays on the weekend."
        },
        {
          "type": "string",
          "const": "back",
          "description": "To the Friday before."
        },
        {
          "type": "string",
          "const": "forward",
          "description": "To the Monday after."
        }
      ],
      "description": "Where an occurrence on a weekend moves to."
    },
    "PeriodInfo": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0,
          "description": "0-based."
        },
        "startDate": {
          "$ref": "#/$defs/Date",
          "description": "The period's first local day."
        },
        "endDate": {
          "$ref": "#/$defs/Date",
          "description": "The period's last local day."
        }
      },
      "required": [
        "index",
        "startDate",
        "endDate"
      ],
      "description": "One Budget period."
    },
    "AmountInfo": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The account's GUID."
        },
        "accountName": {
          "type": "string",
          "description": "The account's full name."
        },
        "period": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0,
          "description": "0-based period."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "The amount as stored."
        }
      },
      "required": [
        "account",
        "accountName",
        "period",
        "amount"
      ],
      "description": "A set budget amount, in natural signs."
    },
    "NoteInfo": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The account's GUID."
        },
        "accountName": {
          "type": "string",
          "description": "The account's full name."
        },
        "period": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0,
          "description": "0-based period."
        },
        "note": {
          "type": "string",
          "description": "The note."
        }
      },
      "required": [
        "account",
        "accountName",
        "period",
        "note"
      ],
      "description": "A budget note."
    },
    "SlotCounts": {
      "type": "object",
      "properties": {
        "amounts": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Amounts."
        },
        "notes": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Notes."
        }
      },
      "required": [
        "amounts",
        "notes"
      ],
      "description": "How many amount and note Slots a budget keeps without listing them."
    },
    "CreateParams3": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name; `Unnamed Budget` when absent.",
          "default": null
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The description; empty when absent.",
          "default": null
        },
        "numPeriods": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 1,
          "description": "The number of periods, 1 to 60; 12 when absent.",
          "maximum": 60,
          "default": null
        },
        "recurrence": {
          "anyOf": [
            {
              "$ref": "#/$defs/Recurrence"
            },
            {
              "type": "null"
            }
          ],
          "description": "The periods' recurrence: never `once`, weekend adjustment `none`. Monthly from the first of the current month\nwhen absent.",
          "default": null
        }
      },
      "description": "Params of `budget.create`; absent fields take GnuCash's defaults."
    },
    "DeleteResult2": {
      "type": "object",
      "properties": {
        "deleted": {
          "type": "boolean",
          "description": "Always true."
        },
        "featureUnset": {
          "type": "boolean",
          "description": "The last budget went, so the feature `Use natural signs in budget amounts` was unset."
        }
      },
      "required": [
        "deleted",
        "featureUnset"
      ],
      "description": "The result of `budget.delete`."
    },
    "EstimateParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "budget": {
          "$ref": "#/$defs/Guid",
          "description": "The budget."
        },
        "accounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AccountRef"
          },
          "description": "The accounts to estimate, at least one; each from its own subtree."
        },
        "startDate": {
          "$ref": "#/$defs/Date",
          "description": "The start of history period 0; history periods follow the budget's recurrence from here."
        },
        "significantDigits": {
          "type": "integer",
          "format": "uint8",
          "minimum": 1,
          "maximum": 12,
          "description": "Significant digits to round to, 1 to 12.",
          "default": 1
        },
        "useAverage": {
          "type": "boolean",
          "description": "Store the average over every history period in every period.",
          "default": false
        }
      },
      "required": [
        "budget",
        "accounts",
        "startDate"
      ],
      "description": "Params of `budget.estimate`."
    },
    "EstimateResult": {
      "type": "object",
      "properties": {
        "budget": {
          "$ref": "#/$defs/Guid",
          "description": "The budget."
        },
        "amounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AmountInfo"
          },
          "description": "Every amount written."
        }
      },
      "required": [
        "budget",
        "amounts"
      ],
      "description": "The result of `budget.estimate`."
    },
    "GetParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "budget": {
          "$ref": "#/$defs/Guid",
          "description": "The budget."
        },
        "accounts": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/AccountRef"
          },
          "description": "List amounts and notes of these accounts only.",
          "default": null
        }
      },
      "required": [
        "budget"
      ],
      "description": "Params of `budget.get`."
    },
    "BudgetList": {
      "type": "object",
      "properties": {
        "budgets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BudgetInfo"
          },
          "description": "Every budget, in book order, without periods, amounts and notes."
        },
        "default": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The default budget's GUID, or null when the book has none."
        },
        "defaultFrom": {
          "anyOf": [
            {
              "$ref": "#/$defs/DefaultFromWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Where the default comes from, or null."
        },
        "naturalSigns": {
          "type": "boolean",
          "description": "Whether the book has the feature `Use natural signs in budget amounts`."
        },
        "needsSignScrub": {
          "type": "boolean",
          "description": "True when the book has budgets and lacks the feature: edits are refused until `budget.scrubSigns`."
        }
      },
      "required": [
        "budgets",
        "naturalSigns",
        "needsSignScrub"
      ],
      "description": "The result of `budget.list`."
    },
    "DefaultFromWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "option",
          "description": "The Book option names it."
        },
        {
          "type": "string",
          "const": "first",
          "description": "The option is unset or stale: the first budget in book order."
        }
      ],
      "description": "Where the default budget comes from."
    },
    "ScrubResult": {
      "type": "object",
      "properties": {
        "featureSet": {
          "type": "boolean",
          "description": "The feature was set."
        },
        "featureUnset": {
          "type": "boolean",
          "description": "The feature was unset, as the book has no budgets."
        },
        "budgets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/BudgetScrubInfo"
          },
          "description": "Each budget scrubbed, in book order."
        }
      },
      "required": [
        "featureSet",
        "featureUnset",
        "budgets"
      ],
      "description": "The result of `budget.scrubSigns`."
    },
    "BudgetScrubInfo": {
      "type": "object",
      "properties": {
        "budget": {
          "$ref": "#/$defs/Guid",
          "description": "The budget."
        },
        "policy": {
          "$ref": "#/$defs/PolicyWire",
          "description": "The convention guessed."
        },
        "flipped": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "How many set amounts were negated, zeros included."
        }
      },
      "required": [
        "budget",
        "policy",
        "flipped"
      ],
      "description": "What the scrub did to one budget."
    },
    "PolicyWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "incomeExpense",
          "description": "Income and expense amounts were flipped."
        },
        {
          "type": "string",
          "const": "none",
          "description": "Nothing was flipped."
        },
        {
          "type": "string",
          "const": "creditAccounts",
          "description": "Liability, equity and income amounts were flipped."
        }
      ],
      "description": "The sign convention the scrub guessed."
    },
    "SetAmountsParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "budget": {
          "$ref": "#/$defs/Guid",
          "description": "The budget."
        },
        "amounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AmountCell"
          },
          "description": "The cells; each at most once."
        }
      },
      "required": [
        "budget",
        "amounts"
      ],
      "description": "Params of `budget.setAmounts`."
    },
    "AmountCell": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account."
        },
        "period": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0,
          "description": "0-based period, below the budget's number of periods."
        },
        "amount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "The amount in natural signs (an expense budget positive, an income budget negative), stored as given; null\nunsets the cell, `\"0\"` sets a zero."
        }
      },
      "required": [
        "account",
        "period"
      ],
      "description": "One cell's amount for `budget.setAmounts`."
    },
    "SetAmountsResult": {
      "type": "object",
      "properties": {
        "budget": {
          "$ref": "#/$defs/Guid",
          "description": "The budget."
        },
        "set": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Cells set."
        },
        "unset": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Set cells unset."
        }
      },
      "required": [
        "budget",
        "set",
        "unset"
      ],
      "description": "The result of `budget.setAmounts`."
    },
    "SetNotesParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "budget": {
          "$ref": "#/$defs/Guid",
          "description": "The budget."
        },
        "notes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NoteCell"
          },
          "description": "The cells; each at most once."
        }
      },
      "required": [
        "budget",
        "notes"
      ],
      "description": "Params of `budget.setNotes`."
    },
    "NoteCell": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account."
        },
        "period": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0,
          "description": "0-based period, below the budget's number of periods."
        },
        "note": {
          "type": [
            "string",
            "null"
          ],
          "description": "The note; empty or null deletes it."
        }
      },
      "required": [
        "account",
        "period"
      ],
      "description": "One cell's note for `budget.setNotes`."
    },
    "SetNotesResult": {
      "type": "object",
      "properties": {
        "budget": {
          "$ref": "#/$defs/Guid",
          "description": "The budget."
        },
        "set": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Notes set."
        },
        "deleted": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Notes deleted."
        }
      },
      "required": [
        "budget",
        "set",
        "deleted"
      ],
      "description": "The result of `budget.setNotes`."
    },
    "UpdateParams2": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "budget": {
          "$ref": "#/$defs/Guid",
          "description": "The budget."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The new name.",
          "default": null
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The new description.",
          "default": null
        },
        "numPeriods": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 1,
          "description": "The new number of periods, 1 to 60. Lowering it hides amounts and notes beyond it but keeps them.",
          "maximum": 60,
          "default": null
        },
        "recurrence": {
          "anyOf": [
            {
              "$ref": "#/$defs/Recurrence"
            },
            {
              "type": "null"
            }
          ],
          "description": "The new recurrence: never `once`, weekend adjustment `none`. No amount moves.",
          "default": null
        }
      },
      "required": [
        "budget"
      ],
      "description": "Params of `budget.update`; absent fields are left alone."
    },
    "CreateParams4": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "namespace": {
          "type": "string",
          "description": "Namespace (exchange or type), such as `NASDAQ`; not `CURRENCY` or `template`."
        },
        "mnemonic": {
          "type": "string",
          "description": "Mnemonic (ticker), unique within the namespace."
        },
        "fullname": {
          "type": "string",
          "description": "Full name; required."
        },
        "cusip": {
          "type": [
            "string",
            "null"
          ],
          "description": "Exchange code such as a CUSIP or ISIN.",
          "default": null
        },
        "fraction": {
          "type": "integer",
          "format": "int64",
          "description": "Smallest fraction, 1 to 1000000000; default 10000.",
          "default": 10000
        },
        "quoteFlag": {
          "type": "boolean",
          "description": "Online quotes are wanted.",
          "default": false
        },
        "quoteSource": {
          "type": [
            "string",
            "null"
          ],
          "description": "Quote source internal name, such as `yahoo_json`; unknown names are kept.",
          "default": null
        },
        "quoteTz": {
          "type": [
            "string",
            "null"
          ],
          "description": "Quote time zone, such as `America/New_York`; absent means local time.",
          "default": null
        },
        "userSymbol": {
          "type": [
            "string",
            "null"
          ],
          "description": "Display symbol.",
          "default": null
        }
      },
      "required": [
        "namespace",
        "mnemonic",
        "fullname"
      ],
      "description": "Params of `commodity.create`."
    },
    "CommodityInfo": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/CommodityId",
          "description": "`NAMESPACE::MNEMONIC`."
        },
        "namespace": {
          "type": "string",
          "description": "Namespace."
        },
        "mnemonic": {
          "type": "string",
          "description": "Mnemonic (ticker or ISO code)."
        },
        "fullname": {
          "type": [
            "string",
            "null"
          ],
          "description": "Full name."
        },
        "cusip": {
          "type": [
            "string",
            "null"
          ],
          "description": "Exchange code (CUSIP, ISIN; the ISO numeric code for a currency)."
        },
        "fraction": {
          "type": "integer",
          "format": "int64",
          "description": "Smallest fraction (SCU)."
        },
        "isCurrency": {
          "type": "boolean",
          "description": "In the `CURRENCY` namespace."
        },
        "builtIn": {
          "type": "boolean",
          "description": "One of GnuCash's built-in ISO 4217 currencies."
        },
        "defined": {
          "type": "boolean",
          "description": "Stored in the book file (a security, or a currency with quotes on or slots)."
        },
        "quoteFlag": {
          "type": "boolean",
          "description": "Online quotes are wanted. For a currency an account uses this is on unless the user turned it off."
        },
        "quoteSource": {
          "type": [
            "string",
            "null"
          ],
          "description": "Quote source internal name; currencies report `currency`."
        },
        "quoteSourceType": {
          "type": [
            "string",
            "null"
          ],
          "description": "`single`, `multi`, `currency`, or `unknown` for a source GnuCash 5.17 does not know (kept as read)."
        },
        "quoteTz": {
          "type": [
            "string",
            "null"
          ],
          "description": "Quote time zone; null means local time."
        },
        "userSymbol": {
          "type": [
            "string",
            "null"
          ],
          "description": "The user's display symbol."
        },
        "defaultSymbol": {
          "type": [
            "string",
            "null"
          ],
          "description": "A currency's built-in symbol."
        },
        "displaySymbol": {
          "type": "string",
          "description": "The symbol GnuCash shows amounts with: the user symbol, else the default symbol, else the mnemonic."
        },
        "usage": {
          "$ref": "#/$defs/UsageInfo",
          "description": "How much of the book refers to it."
        }
      },
      "required": [
        "id",
        "namespace",
        "mnemonic",
        "fraction",
        "isCurrency",
        "builtIn",
        "defined",
        "quoteFlag",
        "displaySymbol",
        "usage"
      ],
      "description": "A commodity as GnuCash sees it once the book is loaded."
    },
    "UsageInfo": {
      "type": "object",
      "properties": {
        "accounts": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Accounts holding it (GnuCash's usage count)."
        },
        "transactions": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Transactions with it as their currency."
        },
        "prices": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Prices with it on either side."
        },
        "business": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Customers, vendors, employees and invoices with it as their currency."
        }
      },
      "required": [
        "accounts",
        "transactions",
        "prices",
        "business"
      ],
      "description": "How much of the book refers to a commodity."
    },
    "DeleteParams2": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "commodity": {
          "$ref": "#/$defs/CommodityId",
          "description": "The security to delete."
        },
        "deletePrices": {
          "type": "boolean",
          "description": "Also delete its prices (either side). Without this, a commodity with prices is not deleted.",
          "default": false
        }
      },
      "required": [
        "commodity"
      ],
      "description": "Params of `commodity.delete`."
    },
    "DeleteResult3": {
      "type": "object",
      "properties": {
        "deletedPrices": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "The prices deleted with it."
        }
      },
      "required": [
        "deletedPrices"
      ],
      "description": "What `commodity.delete` removed."
    },
    "GetParams2": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "commodity": {
          "$ref": "#/$defs/CommodityId",
          "description": "The commodity, `NAMESPACE::MNEMONIC` (a bare code is a currency)."
        }
      },
      "required": [
        "commodity"
      ],
      "description": "Params naming one commodity."
    },
    "ListParams2": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "namespace": {
          "type": [
            "string",
            "null"
          ],
          "description": "Only this namespace (`CURRENCY` for the currencies).",
          "default": null
        },
        "usedOnly": {
          "type": "boolean",
          "description": "Only commodities something in the book uses.",
          "default": false
        }
      },
      "description": "Params of `commodity.list`."
    },
    "NamespaceInfo": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Its name, such as `CURRENCY`, `NASDAQ` or `template`."
        },
        "commodities": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "How many commodities it holds."
        },
        "isCurrency": {
          "type": "boolean",
          "description": "It holds the ISO 4217 currencies."
        },
        "reserved": {
          "type": "boolean",
          "description": "New securities may not be created in it (`CURRENCY`, `template`)."
        }
      },
      "required": [
        "name",
        "commodities",
        "isCurrency",
        "reserved"
      ],
      "description": "A namespace of the commodity table."
    },
    "UpdateParams3": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "commodity": {
          "$ref": "#/$defs/CommodityId",
          "description": "The commodity to edit."
        },
        "namespace": {
          "type": [
            "string",
            "null"
          ],
          "description": "New namespace (securities only); renames it everywhere in the book.",
          "default": null
        },
        "mnemonic": {
          "type": [
            "string",
            "null"
          ],
          "description": "New mnemonic (securities only); renames it everywhere in the book.",
          "default": null
        },
        "fullname": {
          "type": [
            "string",
            "null"
          ],
          "description": "New full name (securities only).",
          "default": null
        },
        "cusip": {
          "type": [
            "string",
            "null"
          ],
          "description": "New exchange code (securities only); null or empty clears it.",
          "default": null
        },
        "fraction": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "New smallest fraction (securities only). Stored amounts keep their denominators.",
          "default": null
        },
        "quoteFlag": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Online quotes wanted. For a currency, a choice that differs from the automatic one is remembered.",
          "default": null
        },
        "quoteSource": {
          "type": [
            "string",
            "null"
          ],
          "description": "New quote source (securities only); null clears it.",
          "default": null
        },
        "quoteTz": {
          "type": [
            "string",
            "null"
          ],
          "description": "New quote time zone; null means local time.",
          "default": null
        },
        "userSymbol": {
          "type": [
            "string",
            "null"
          ],
          "description": "New display symbol; null or empty removes it.",
          "default": null
        }
      },
      "required": [
        "commodity"
      ],
      "description": "Params of `commodity.update`. Absent fields are kept; `null` clears an optional one."
    },
    "GetParams3": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "path": {
          "type": [
            "string",
            "null"
          ],
          "description": "A setting path, keys joined with `.` (`import.settings.matchThreshold`, `quotes.services.alphavantage`); absent for the\nwhole Configuration.",
          "default": null
        }
      },
      "description": "Params of `config.get`."
    },
    "GetResult": {
      "type": "object",
      "properties": {
        "path": {
          "type": [
            "string",
            "null"
          ],
          "description": "The path asked for; `null` for the whole Configuration."
        },
        "value": {
          "description": "The value, defaults filled in, each secret shown as `{\"set\": true|false}`. `null` for a map entry that does\nnot exist."
        },
        "unknown": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Keys in the file, at or below the path, that declare no setting. They are kept and do nothing."
        },
        "problems": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ProblemInfo"
          },
          "description": "Settings, at or below the path, whose values in the file do not match the schema."
        },
        "configFile": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Configuration file; `null` for a process started with `--no-config`, whose Configuration is in memory."
        }
      },
      "required": [
        "value",
        "unknown",
        "problems"
      ],
      "description": "The result of `config.get`."
    },
    "ProblemInfo": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "The setting, with `[i]` for a list item."
        },
        "message": {
          "type": "string",
          "description": "What is wrong."
        }
      },
      "required": [
        "path",
        "message"
      ],
      "description": "A setting whose value in the Configuration does not match the schema."
    },
    "SetParams2": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "changes": {
          "type": "object",
          "additionalProperties": true,
          "description": "Setting paths to their new values; `null` restores a setting's default. No path may lie inside another."
        }
      },
      "required": [
        "changes"
      ],
      "description": "Params of `config.set`."
    },
    "SetResult": {
      "type": "object",
      "properties": {
        "values": {
          "type": "object",
          "additionalProperties": true,
          "description": "Each path changed, with its value now, as `config.get` shows it."
        },
        "clearedKeys": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Keys cleared because their Quote service's URL moved to another host."
        },
        "configFile": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Configuration file; `null` for a process started with `--no-config`, whose Configuration is in memory."
        }
      },
      "required": [
        "values",
        "clearedKeys"
      ],
      "description": "The result of `config.set`."
    },
    "CounterList": {
      "type": "object",
      "properties": {
        "counters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CounterInfo"
          },
          "description": "The book options' eight counters in their order, then any others the book holds, by name."
        }
      },
      "required": [
        "counters"
      ],
      "description": "The result of `counter.list`."
    },
    "CounterInfo": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Its name in the book, such as `gncInvoice`."
        },
        "last": {
          "type": "integer",
          "format": "int64",
          "description": "The last number issued; 0 when none."
        },
        "format": {
          "type": [
            "string",
            "null"
          ],
          "description": "The format as stored, if any."
        },
        "formatValid": {
          "type": "boolean",
          "description": "GnuCash accepts the stored format; when false it numbers with the default."
        },
        "normalizedFormat": {
          "type": "string",
          "description": "The format GnuCash numbers with: the stored one normalised, else the default `%.6li`."
        },
        "next": {
          "type": "string",
          "description": "The ID the next object would get. Reading it does not take it."
        }
      },
      "required": [
        "name",
        "last",
        "formatValid",
        "normalizedFormat",
        "next"
      ],
      "description": "A counter."
    },
    "SetParams3": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "description": "One of `gncCustomer`, `gncEmployee`, `gncInvoice`, `gncBill`, `gncExpVoucher`, `gncJob`, `gncOrder`, `gncVendor`."
        },
        "last": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "The last number issued, from 0 to 999999999; the next ID uses one more.",
          "default": null
        },
        "format": {
          "type": [
            "string",
            "null"
          ],
          "description": "A printf format with one `%li`, `%lli` or `%I64i` conversion; null or empty removes it.",
          "default": null
        }
      },
      "required": [
        "name"
      ],
      "description": "Params of `counter.set`."
    },
    "EuroConvertParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "The amount, in `from`."
        },
        "from": {
          "$ref": "#/$defs/CommodityId",
          "description": "The currency of the amount: `EUR` or a currency the euro replaced."
        },
        "to": {
          "$ref": "#/$defs/CommodityId",
          "description": "The currency wanted: `EUR` or a currency the euro replaced; one side must be `EUR`."
        }
      },
      "required": [
        "amount",
        "from",
        "to"
      ],
      "description": "Params of `currency.euroConvert`."
    },
    "EuroConvertResult": {
      "type": "object",
      "properties": {
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "The converted amount, rounded half away from zero to cents (to EUR) or to the currency's fraction."
        },
        "rate": {
          "$ref": "#/$defs/Amount",
          "description": "The fixed rate used: units of the legacy currency per euro."
        }
      },
      "required": [
        "amount",
        "rate"
      ],
      "description": "The result of `currency.euroConvert`."
    },
    "CurrencyInfo": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/CommodityId",
          "description": "`CURRENCY::<code>`."
        },
        "code": {
          "type": "string",
          "description": "ISO code."
        },
        "fullname": {
          "type": "string",
          "description": "Full name (English)."
        },
        "exchangeCode": {
          "type": "string",
          "description": "ISO numeric code, GnuCash's exchange code for it."
        },
        "fraction": {
          "type": "integer",
          "format": "int64",
          "description": "Smallest fraction."
        },
        "symbol": {
          "type": [
            "string",
            "null"
          ],
          "description": "Local symbol, if any."
        },
        "euroRate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Units per euro, for the euro and the currencies it replaced."
        }
      },
      "required": [
        "id",
        "code",
        "fullname",
        "exchangeCode",
        "fraction"
      ],
      "description": "A built-in ISO 4217 currency."
    },
    "CustomerFields": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Company name.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Customer number. On create, absent or empty takes the next number from the book's `gncCustomer` counter.",
          "default": null
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "The currency of the customer's documents.",
          "default": null
        },
        "addr": {
          "anyOf": [
            {
              "$ref": "#/$defs/AddressParams"
            },
            {
              "type": "null"
            }
          ],
          "description": "Billing address."
        },
        "shipAddr": {
          "anyOf": [
            {
              "$ref": "#/$defs/AddressParams"
            },
            {
              "type": "null"
            }
          ],
          "description": "Shipping address."
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes.",
          "default": null
        },
        "terms": {
          "anyOf": [
            {
              "$ref": "#/$defs/BillTermRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Default billing term for new invoices, by GUID or name; `null` for none."
        },
        "taxTable": {
          "anyOf": [
            {
              "$ref": "#/$defs/TaxTableRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Tax table, by GUID or name; `null` for none."
        },
        "taxTableOverride": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "New invoice lines use `taxTable` rather than the book's default.",
          "default": null
        },
        "taxIncluded": {
          "anyOf": [
            {
              "$ref": "#/$defs/TaxIncludedWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Whether prices include tax by default.",
          "default": null
        },
        "discount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Default discount percentage for new invoice lines, 0 to 100.",
          "default": null
        },
        "credit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Credit limit.",
          "default": null
        },
        "active": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Active; `false` deactivates.",
          "default": null
        }
      },
      "description": "Params of `customer.create`. `name` and `currency` are required."
    },
    "AddressParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The addressee.",
          "default": null
        },
        "addr1": {
          "type": [
            "string",
            "null"
          ],
          "description": "First address line.",
          "default": null
        },
        "addr2": {
          "type": [
            "string",
            "null"
          ],
          "description": "Second address line.",
          "default": null
        },
        "addr3": {
          "type": [
            "string",
            "null"
          ],
          "description": "Third address line.",
          "default": null
        },
        "addr4": {
          "type": [
            "string",
            "null"
          ],
          "description": "Fourth address line.",
          "default": null
        },
        "phone": {
          "type": [
            "string",
            "null"
          ],
          "description": "Telephone.",
          "default": null
        },
        "fax": {
          "type": [
            "string",
            "null"
          ],
          "description": "Fax.",
          "default": null
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "description": "Email.",
          "default": null
        }
      },
      "description": "Address fields to set; absent fields keep their value."
    },
    "TaxTableRef": {
      "type": "string",
      "description": "A tax table, by GUID or by name."
    },
    "TaxIncludedWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "yes",
          "description": "`YES`."
        },
        {
          "type": "string",
          "const": "no",
          "description": "`NO`."
        },
        {
          "type": "string",
          "const": "useGlobal",
          "description": "`USEGLOBAL`: the user's preference."
        }
      ],
      "description": "Whether prices include tax by default for the contact's documents."
    },
    "CustomerInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "addr": {
          "$ref": "#/$defs/AddressInfo"
        },
        "shipAddr": {
          "$ref": "#/$defs/AddressInfo"
        },
        "notes": {
          "type": "string"
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ]
        },
        "terms": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "taxTable": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "taxTableOverride": {
          "type": "boolean"
        },
        "taxIncluded": {
          "$ref": "#/$defs/TaxIncludedWire"
        },
        "discount": {
          "$ref": "#/$defs/Amount"
        },
        "credit": {
          "$ref": "#/$defs/Amount"
        },
        "active": {
          "type": "boolean"
        }
      },
      "required": [
        "guid",
        "id",
        "name",
        "addr",
        "shipAddr",
        "notes",
        "taxTableOverride",
        "taxIncluded",
        "discount",
        "credit",
        "active"
      ],
      "description": "A customer."
    },
    "AddressInfo": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "addr1": {
          "type": "string"
        },
        "addr2": {
          "type": "string"
        },
        "addr3": {
          "type": "string"
        },
        "addr4": {
          "type": "string"
        },
        "phone": {
          "type": "string"
        },
        "fax": {
          "type": "string"
        },
        "email": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "addr1",
        "addr2",
        "addr3",
        "addr4",
        "phone",
        "fax",
        "email"
      ],
      "description": "An address. Empty strings are unset fields."
    },
    "CustomerKey": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customer": {
          "$ref": "#/$defs/Guid",
          "description": "The customer."
        }
      },
      "required": [
        "customer"
      ],
      "description": "Names one customer."
    },
    "ListParams3": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "activeOnly": {
          "type": "boolean",
          "description": "Only active contacts.",
          "default": false
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Case-insensitive part of the name.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The exact ID. IDs are not unique in GnuCash, so several may match.",
          "default": null
        }
      },
      "description": "Filters for the contact lists. All given filters must match."
    },
    "CustomerList": {
      "type": "object",
      "properties": {
        "customers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomerInfo"
          },
          "description": "In GUID order."
        }
      },
      "required": [
        "customers"
      ],
      "description": "Customers."
    },
    "CustomerUpdate": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customer": {
          "$ref": "#/$defs/Guid",
          "description": "The customer."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Company name.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Customer number. On create, absent or empty takes the next number from the book's `gncCustomer` counter.",
          "default": null
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "The currency of the customer's documents.",
          "default": null
        },
        "addr": {
          "anyOf": [
            {
              "$ref": "#/$defs/AddressParams"
            },
            {
              "type": "null"
            }
          ],
          "description": "Billing address."
        },
        "shipAddr": {
          "anyOf": [
            {
              "$ref": "#/$defs/AddressParams"
            },
            {
              "type": "null"
            }
          ],
          "description": "Shipping address."
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes.",
          "default": null
        },
        "terms": {
          "anyOf": [
            {
              "$ref": "#/$defs/BillTermRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Default billing term for new invoices, by GUID or name; `null` for none."
        },
        "taxTable": {
          "anyOf": [
            {
              "$ref": "#/$defs/TaxTableRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Tax table, by GUID or name; `null` for none."
        },
        "taxTableOverride": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "New invoice lines use `taxTable` rather than the book's default.",
          "default": null
        },
        "taxIncluded": {
          "anyOf": [
            {
              "$ref": "#/$defs/TaxIncludedWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Whether prices include tax by default.",
          "default": null
        },
        "discount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Default discount percentage for new invoice lines, 0 to 100.",
          "default": null
        },
        "credit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Credit limit.",
          "default": null
        },
        "active": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Active; `false` deactivates.",
          "default": null
        }
      },
      "required": [
        "customer"
      ],
      "description": "Params of `customer.update`: the fields to change."
    },
    "Links": {
      "type": "object",
      "properties": {
        "pathHead": {
          "type": [
            "string",
            "null"
          ],
          "description": "The configured path head, if any."
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DocumentLink"
          },
          "description": "The links."
        }
      },
      "required": [
        "links"
      ],
      "description": "The links of one kind, with the path head they were resolved against."
    },
    "DocumentLink": {
      "type": "object",
      "properties": {
        "invoice": {
          "$ref": "#/$defs/Guid",
          "description": "The document."
        },
        "id": {
          "type": "string",
          "description": "Its number."
        },
        "type": {
          "anyOf": [
            {
              "$ref": "#/$defs/DocumentKindWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Its kind."
        },
        "dateOpened": {
          "$ref": "#/$defs/Timestamp",
          "description": "When it was opened."
        },
        "docLink": {
          "type": "string",
          "description": "The link as stored."
        },
        "relative": {
          "type": "boolean",
          "description": "The link is a path relative to the path head."
        },
        "uri": {
          "type": [
            "string",
            "null"
          ],
          "description": "The URI to open; `null` for a relative link when no path head is configured."
        }
      },
      "required": [
        "invoice",
        "id",
        "dateOpened",
        "docLink",
        "relative"
      ],
      "description": "A business document's document link."
    },
    "DocumentKindWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "invoice",
          "description": "A customer invoice."
        },
        {
          "type": "string",
          "const": "bill",
          "description": "A vendor bill."
        },
        {
          "type": "string",
          "const": "expenseVoucher",
          "description": "An employee expense voucher."
        },
        {
          "type": "string",
          "const": "creditNote",
          "description": "A credit note of an invoice, bill or voucher; its owner says which."
        }
      ],
      "description": "The kind of a document."
    },
    "Timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "An instant, RFC 3339; written in UTC with a Z suffix."
    },
    "PathHeadInfo": {
      "type": "object",
      "properties": {
        "pathHead": {
          "type": [
            "string",
            "null"
          ],
          "description": "The path head, a `file://` URI ending in `/`, if configured."
        },
        "configFile": {
          "type": [
            "string",
            "null"
          ],
          "description": "The configuration file, if the setting is kept in one; otherwise it lasts as long as the server."
        }
      },
      "description": "The path head setting."
    },
    "SetPathHeadParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "pathHead": {
          "type": [
            "string",
            "null"
          ],
          "description": "An absolute path or a `file://` URI; a trailing `/` is added. Absent or `null` removes the setting.",
          "default": null
        }
      },
      "description": "Params of `docLink.setPathHead`."
    },
    "Links2": {
      "type": "object",
      "properties": {
        "pathHead": {
          "type": [
            "string",
            "null"
          ],
          "description": "The configured path head, if any."
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TransactionLink"
          },
          "description": "The links."
        }
      },
      "required": [
        "links"
      ],
      "description": "The links of one kind, with the path head they were resolved against."
    },
    "TransactionLink": {
      "type": "object",
      "properties": {
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "The transaction."
        },
        "datePosted": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Its posted date."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Its description."
        },
        "docLink": {
          "type": "string",
          "description": "The link as stored."
        },
        "relative": {
          "type": "boolean",
          "description": "The link is a path relative to the path head."
        },
        "uri": {
          "type": [
            "string",
            "null"
          ],
          "description": "The URI to open; `null` for a relative link when no path head is configured."
        }
      },
      "required": [
        "transaction",
        "docLink",
        "relative"
      ],
      "description": "A transaction's document link."
    },
    "EmployeeFields": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The employee's name, which GnuCash keeps as the address name; it overrides `addr.name`.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Employee number. On create, absent or empty takes the next number from the book's `gncEmployee` counter.",
          "default": null
        },
        "username": {
          "type": [
            "string",
            "null"
          ],
          "description": "User name.",
          "default": null
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "The currency of the employee's expense vouchers.",
          "default": null
        },
        "addr": {
          "anyOf": [
            {
              "$ref": "#/$defs/AddressParams"
            },
            {
              "type": "null"
            }
          ],
          "description": "Payment address."
        },
        "language": {
          "type": [
            "string",
            "null"
          ],
          "description": "Language.",
          "default": null
        },
        "acl": {
          "type": [
            "string",
            "null"
          ],
          "description": "Access control list (stored only).",
          "default": null
        },
        "workday": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Working hours per day.",
          "default": null
        },
        "rate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Hourly rate.",
          "default": null
        },
        "creditCardAccount": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "The company credit card account (type CREDIT) card-paid expenses are charged to; `null` for none.",
          "default": null
        },
        "active": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Active; `false` deactivates.",
          "default": null
        }
      },
      "description": "Params of `employee.create`. `name` and `currency` are required."
    },
    "EmployeeInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string",
          "description": "The address name."
        },
        "username": {
          "type": "string"
        },
        "addr": {
          "$ref": "#/$defs/AddressInfo"
        },
        "language": {
          "type": "string"
        },
        "acl": {
          "type": "string"
        },
        "workday": {
          "$ref": "#/$defs/Amount"
        },
        "rate": {
          "$ref": "#/$defs/Amount"
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ]
        },
        "creditCardAccount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "active": {
          "type": "boolean"
        }
      },
      "required": [
        "guid",
        "id",
        "name",
        "username",
        "addr",
        "language",
        "acl",
        "workday",
        "rate",
        "active"
      ],
      "description": "An employee."
    },
    "EmployeeKey": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "employee": {
          "$ref": "#/$defs/Guid",
          "description": "The employee."
        }
      },
      "required": [
        "employee"
      ],
      "description": "Names one employee."
    },
    "EmployeeList": {
      "type": "object",
      "properties": {
        "employees": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmployeeInfo"
          },
          "description": "In GUID order."
        }
      },
      "required": [
        "employees"
      ],
      "description": "Employees."
    },
    "EmployeeUpdate": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "employee": {
          "$ref": "#/$defs/Guid",
          "description": "The employee."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The employee's name, which GnuCash keeps as the address name; it overrides `addr.name`.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Employee number. On create, absent or empty takes the next number from the book's `gncEmployee` counter.",
          "default": null
        },
        "username": {
          "type": [
            "string",
            "null"
          ],
          "description": "User name.",
          "default": null
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "The currency of the employee's expense vouchers.",
          "default": null
        },
        "addr": {
          "anyOf": [
            {
              "$ref": "#/$defs/AddressParams"
            },
            {
              "type": "null"
            }
          ],
          "description": "Payment address."
        },
        "language": {
          "type": [
            "string",
            "null"
          ],
          "description": "Language.",
          "default": null
        },
        "acl": {
          "type": [
            "string",
            "null"
          ],
          "description": "Access control list (stored only).",
          "default": null
        },
        "workday": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Working hours per day.",
          "default": null
        },
        "rate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Hourly rate.",
          "default": null
        },
        "creditCardAccount": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "The company credit card account (type CREDIT) card-paid expenses are charged to; `null` for none.",
          "default": null
        },
        "active": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Active; `false` deactivates.",
          "default": null
        }
      },
      "required": [
        "employee"
      ],
      "description": "Params of `employee.update`: the fields to change."
    },
    "AccountsParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "path": {
          "type": "string",
          "description": "The new book file: a path or `xml://` URI that does not exist. `.gnucash` is added when missing."
        }
      },
      "required": [
        "path"
      ],
      "description": "Params of `export.accounts`."
    },
    "AccountsResult": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "description": "The file written, uncompressed."
        },
        "accounts": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Account elements written, the root account's included."
        },
        "commodities": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Commodity elements written."
        }
      },
      "required": [
        "path",
        "accounts",
        "commodities"
      ],
      "description": "The result of `export.accounts`."
    },
    "CsvTransactionsParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "accounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AccountRef"
          },
          "description": "The accounts, at least one, in the order to process them; a transaction goes under the first one it has a split\nin. Sub-accounts are not included unless listed."
        },
        "from": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Posted on or after local 00:00:00 of this date; by default the earliest.",
          "default": null
        },
        "to": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Posted on or before local 23:59:59 of this date; by default the latest.",
          "default": null
        },
        "layout": {
          "$ref": "#/$defs/LayoutParam",
          "description": "`simple` or `complex` (the default)."
        },
        "separator": {
          "type": "string",
          "description": "The field separator: any non-empty string.",
          "default": ","
        },
        "quotes": {
          "type": "boolean",
          "description": "Quote every field.",
          "default": false
        },
        "locale": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Locale to format numbers and dates in: a supported POSIX locale name (`fr_FR`, `C`) or `environment`; by\ndefault the Configuration's `locale` setting.",
          "default": null
        }
      },
      "required": [
        "accounts"
      ],
      "description": "Params of `export.csvTransactions`."
    },
    "LayoutParam": {
      "oneOf": [
        {
          "type": "string",
          "const": "simple",
          "description": "One line per transaction, for its split in the exported account."
        },
        {
          "type": "string",
          "const": "complex",
          "description": "One line per split, every split of the transaction."
        }
      ],
      "description": "The layout of `export.csvTransactions`."
    },
    "CsvTransactionsResult": {
      "type": "object",
      "properties": {
        "csv": {
          "type": "string",
          "description": "The CSV text: UTF-8, every line ending in CRLF, the header first."
        },
        "transactions": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Transactions written."
        },
        "lines": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Lines written, the header not counted."
        }
      },
      "required": [
        "csv",
        "transactions",
        "lines"
      ],
      "description": "The result of `export.csvTransactions`."
    },
    "CsvTreeParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "separator": {
          "type": "string",
          "description": "The field separator: any non-empty string.",
          "default": ","
        },
        "quotes": {
          "type": "boolean",
          "description": "Quote every field. Without it, a field is quoted only when it holds the separator, a quote or a line break.",
          "default": false
        }
      },
      "description": "Params of `export.csvTree`."
    },
    "CsvTreeResult": {
      "type": "object",
      "properties": {
        "csv": {
          "type": "string",
          "description": "The CSV text: UTF-8, every line ending in CRLF, the header first."
        },
        "rows": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Account lines, the header not counted."
        }
      },
      "required": [
        "csv",
        "rows"
      ],
      "description": "The result of `export.csvTree`."
    },
    "HelpGetParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "description": "The Page ID (`method/transaction.post`), or a method's, error code's or report template's name\n(`transaction.post`, `unbalanced`, `Balance Sheet`)."
        },
        "format": {
          "$ref": "#/$defs/PageFormat",
          "description": "`markdown` (the default) or `text`.",
          "default": "markdown"
        },
        "door": {
          "$ref": "#/$defs/PageDoor",
          "description": "Which door the Examples are shown for: `jsonrpc` (the default), `cli` or `mcp`.",
          "default": "jsonrpc"
        }
      },
      "required": [
        "id"
      ],
      "description": "Params of `help.get`."
    },
    "PageFormat": {
      "oneOf": [
        {
          "type": "string",
          "const": "markdown",
          "description": "Markdown."
        },
        {
          "type": "string",
          "const": "text",
          "description": "Plain text for a terminal."
        }
      ],
      "description": "How `help.get` renders a Page."
    },
    "PageDoor": {
      "oneOf": [
        {
          "type": "string",
          "const": "jsonrpc",
          "description": "JSON-RPC 2.0 requests and responses."
        },
        {
          "type": "string",
          "const": "cli",
          "description": "`red-ale exec` command lines and what they print."
        },
        {
          "type": "string",
          "const": "mcp",
          "description": "MCP tool calls and their results."
        }
      ],
      "description": "The door a Page's Examples are shown for."
    },
    "HelpPage": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The Page ID."
        },
        "kind": {
          "$ref": "#/$defs/PageKind",
          "description": "What the Page is about."
        },
        "title": {
          "type": "string",
          "description": "The title."
        },
        "summary": {
          "type": "string",
          "description": "One line on what it covers."
        },
        "related": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The Page IDs of related Pages."
        },
        "from": {
          "type": [
            "string",
            "null"
          ],
          "description": "The section of GnuCash's documentation the Page adapts, if any."
        },
        "format": {
          "$ref": "#/$defs/PageFormat",
          "description": "The format of `content`."
        },
        "door": {
          "$ref": "#/$defs/PageDoor",
          "description": "The door `content` shows Examples for."
        },
        "content": {
          "type": "string",
          "description": "The Page, ending with its licence notice."
        }
      },
      "required": [
        "id",
        "kind",
        "title",
        "summary",
        "related",
        "format",
        "door",
        "content"
      ],
      "description": "Result of `help.get`."
    },
    "PageKind": {
      "oneOf": [
        {
          "type": "string",
          "const": "method",
          "description": "A method's Reference page, `method/<name>`."
        },
        {
          "type": "string",
          "const": "error",
          "description": "An error code's Reference page, `error/<name>`."
        },
        {
          "type": "string",
          "const": "report",
          "description": "A report template's Reference page, `report/<name>`."
        },
        {
          "type": "string",
          "const": "concept",
          "description": "A Concept page, `concept/<name>`."
        },
        {
          "type": "string",
          "const": "guide",
          "description": "A Guide, `guide/<name>`."
        },
        {
          "type": "string",
          "const": "gnucash",
          "description": "A From GnuCash page, `gnucash/<name>`: GnuCash's menus and dialogs mapped to methods."
        },
        {
          "type": "string",
          "const": "start",
          "description": "The Start Page, `start`."
        },
        {
          "type": "string",
          "const": "legal",
          "description": "The licence and notices, `legal/<name>`."
        }
      ],
      "description": "What a Page is about."
    },
    "HelpSearchParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "query": {
          "type": "string",
          "description": "What to look for, in any words: a question, a GnuCash menu item (\"Stock Split…\"), a method name."
        },
        "kind": {
          "anyOf": [
            {
              "$ref": "#/$defs/PageKind"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only Pages of this kind.",
          "default": null
        },
        "limit": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 0,
          "description": "The most Pages to return, 1 to 100; 10 by default.",
          "default": null
        }
      },
      "required": [
        "query"
      ],
      "description": "Params of `help.search`."
    },
    "HelpSearchResult": {
      "type": "object",
      "properties": {
        "hits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HelpHit"
          },
          "description": "The Pages found, best first; ties in Page ID order."
        }
      },
      "required": [
        "hits"
      ],
      "description": "Result of `help.search`."
    },
    "HelpHit": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The Page ID."
        },
        "kind": {
          "$ref": "#/$defs/PageKind",
          "description": "What the Page is about."
        },
        "title": {
          "type": "string",
          "description": "The title."
        },
        "summary": {
          "type": "string",
          "description": "One line on what it covers."
        },
        "snippet": {
          "type": "string",
          "description": "A line of the Page with a word of the query, or its summary."
        }
      },
      "required": [
        "id",
        "kind",
        "title",
        "summary",
        "snippet"
      ],
      "description": "One Page `help.search` found."
    },
    "HelpTopicsParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "kind": {
          "anyOf": [
            {
              "$ref": "#/$defs/PageKind"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only Pages of this kind; every Page by default.",
          "default": null
        }
      },
      "description": "Params of `help.topics`."
    },
    "HelpTopics": {
      "type": "object",
      "properties": {
        "topics": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/HelpTopic"
          },
          "description": "The Pages, by Page ID."
        }
      },
      "required": [
        "topics"
      ],
      "description": "Result of `help.topics`."
    },
    "HelpTopic": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The Page ID: `method/transaction.post`, `concept/value-and-amount`, `start`."
        },
        "kind": {
          "$ref": "#/$defs/PageKind",
          "description": "What the Page is about."
        },
        "title": {
          "type": "string",
          "description": "The title."
        },
        "summary": {
          "type": "string",
          "description": "One line on what it covers."
        }
      },
      "required": [
        "id",
        "kind",
        "title",
        "summary"
      ],
      "description": "One Page, as lists give it."
    },
    "ApplyParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "proposal": {
          "type": "string",
          "description": "The proposal's ID."
        },
        "changes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ChangeParam"
          },
          "description": "The caller's changes, by index."
        },
        "skipErrors": {
          "type": "boolean",
          "description": "Apply although the proposal lists errors, leaving those rows out (GnuCash's \"Skip errors\").",
          "default": false
        },
        "appendText": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "For *update*: append the imported description and notes instead of replacing them. Default: the import\naccount's `import-append-text` slot, as GnuCash's checkbox defaults.",
          "default": null
        }
      },
      "required": [
        "proposal"
      ],
      "description": "The params of `import.apply`."
    },
    "ChangeParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "index": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "The record's `index` in the proposal."
        },
        "action": {
          "anyOf": [
            {
              "$ref": "#/$defs/ActionWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "The new Import action; `clear` and `update` need a match.",
          "default": null
        },
        "match": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The split GUID of one of the transaction's `matches`: GnuCash's match picker.",
          "default": null
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "The balancing split's account on *add*: GnuCash's \"select transfer account\". Learned into the Import map.",
          "default": null
        },
        "amount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "The balancing split's amount, when its account is not in the transaction currency.",
          "default": null
        }
      },
      "required": [
        "index"
      ],
      "description": "The caller's change to one record (`ImportChange`): a transaction, or an account or price row, which take only\n`action`."
    },
    "ActionWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "add",
          "description": "Add it as a new transaction."
        },
        {
          "type": "string",
          "const": "clear",
          "description": "Mark the matched split cleared."
        },
        {
          "type": "string",
          "const": "update",
          "description": "Update the matched transaction from it, then clear it."
        },
        {
          "type": "string",
          "const": "skip",
          "description": "Leave it out."
        }
      ],
      "description": "An Import action."
    },
    "ApplyResult": {
      "type": "object",
      "properties": {
        "added": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IndexedTransaction"
          },
          "description": "Transactions added."
        },
        "cleared": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IndexedTransaction"
          },
          "description": "Existing transactions cleared."
        },
        "updated": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IndexedTransaction"
          },
          "description": "Existing transactions updated and cleared."
        },
        "skipped": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "uint",
            "minimum": 0
          },
          "description": "Indexes skipped: transactions, or a CSV account or price import's rows."
        },
        "accounts": {
          "$ref": "#/$defs/AccountsChanged",
          "description": "Accounts created and changed."
        },
        "commodities": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Commodities created, as `NAMESPACE::MNEMONIC` (QIF securities); none for CSV."
        },
        "prices": {
          "$ref": "#/$defs/PricesChanged",
          "description": "Prices recorded."
        },
        "imbalanceSplits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ImbalanceSplitWire"
          },
          "description": "Every `Imbalance-<CUR>` split made."
        },
        "learned": {
          "$ref": "#/$defs/LearnedWire",
          "description": "Import map entries written."
        },
        "warnings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WarningWire"
          },
          "description": "Every Imbalance split again, every transaction applied read-only by date, and the matcher's own warnings."
        },
        "documents": {
          "anyOf": [
            {
              "$ref": "#/$defs/RecordsChanged"
            },
            {
              "type": "null"
            }
          ],
          "description": "`csvDocuments`: the documents created, updated (entries appended) and posted."
        },
        "owners": {
          "anyOf": [
            {
              "$ref": "#/$defs/RecordsChanged"
            },
            {
              "type": "null"
            }
          ],
          "description": "`csvOwners`: the customers or vendors created and updated."
        }
      },
      "required": [
        "added",
        "cleared",
        "updated",
        "skipped",
        "accounts",
        "commodities",
        "prices",
        "imbalanceSplits",
        "learned",
        "warnings"
      ],
      "description": "The result of `import.apply`."
    },
    "IndexedTransaction": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Its index in the proposal."
        },
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "The transaction added, or the existing one cleared or updated."
        }
      },
      "required": [
        "index",
        "transaction"
      ],
      "description": "A transaction applied, by its index in the proposal."
    },
    "AccountsChanged": {
      "type": "object",
      "properties": {
        "created": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Created: `Imbalance-<CUR>` accounts, or a CSV account import's accounts."
        },
        "updated": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Changed: Slots of a transaction import (Import maps learned, the append choice saved), or the fields a CSV\naccount import updated."
        }
      },
      "required": [
        "created",
        "updated"
      ],
      "description": "Accounts applying created or changed."
    },
    "PricesChanged": {
      "type": "object",
      "properties": {
        "added": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "New prices."
        },
        "replaced": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "New prices that replaced a same-day price (for transactions, the same-day price updated)."
        },
        "duplicate": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Same-day prices kept, which the new price duplicated."
        }
      },
      "required": [
        "added",
        "replaced",
        "duplicate"
      ],
      "description": "Prices recorded: from added transactions (source `user:split-import`), or a CSV price import's (`user:price`)."
    },
    "ImbalanceSplitWire": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "The imported transaction's index."
        },
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "The transaction."
        },
        "split": {
          "$ref": "#/$defs/Guid",
          "description": "The Imbalance split."
        },
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "Its account."
        },
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "Its value."
        }
      },
      "required": [
        "index",
        "transaction",
        "split",
        "account",
        "value"
      ],
      "description": "An `Imbalance-<CUR>` split applying made."
    },
    "LearnedWire": {
      "type": "object",
      "properties": {
        "bayes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LearnedBayes"
          },
          "description": "Bayesian entries."
        },
        "plain": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LearnedPlain"
          },
          "description": "Plain `desc` and `memo` entries."
        },
        "csvAccountMap": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LearnedName"
          },
          "description": "`csv-account-map` entries."
        }
      },
      "required": [
        "bayes",
        "plain",
        "csvAccountMap"
      ],
      "description": "The Import map entries written."
    },
    "LearnedBayes": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The account whose map learned (the imported split's)."
        },
        "target": {
          "$ref": "#/$defs/Guid",
          "description": "The destination learned."
        },
        "tokens": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The tokens, each counted once more."
        }
      },
      "required": [
        "account",
        "target",
        "tokens"
      ],
      "description": "A Bayesian Import map entry learned."
    },
    "LearnedPlain": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The account whose map learned."
        },
        "target": {
          "$ref": "#/$defs/Guid",
          "description": "The destination."
        },
        "category": {
          "type": "string",
          "description": "`desc` or `memo`."
        },
        "key": {
          "type": "string",
          "description": "The description or memo."
        }
      },
      "required": [
        "account",
        "target",
        "category",
        "key"
      ],
      "description": "A plain Import map entry learned."
    },
    "LearnedName": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name in the file."
        },
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The account it maps to, which holds the entry."
        }
      },
      "required": [
        "name",
        "account"
      ],
      "description": "A `csv-account-map` entry learned."
    },
    "WarningWire": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "`imbalance`, `read-only-by-date`, `missing-rate`, `other-split-not-updated`, `online-id`, `cannot-apply`, …"
        },
        "message": {
          "type": "string",
          "description": "What happened."
        },
        "index": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint",
          "minimum": 0,
          "description": "The transaction's index, when it is about one."
        }
      },
      "required": [
        "code",
        "message"
      ],
      "description": "A warning."
    },
    "RecordsChanged": {
      "type": "object",
      "properties": {
        "created": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IndexedRecord"
          },
          "description": "Created."
        },
        "updated": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IndexedRecord"
          },
          "description": "Existing ones updated."
        },
        "posted": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IndexedRecord"
          },
          "description": "Documents posted; always empty for Owners."
        },
        "skipped": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "uint",
            "minimum": 0
          },
          "description": "Indexes skipped."
        }
      },
      "required": [
        "created",
        "updated",
        "posted",
        "skipped"
      ],
      "description": "Documents or Owners applying created, updated and posted."
    },
    "IndexedRecord": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Its index in the proposal."
        },
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The document or Owner."
        }
      },
      "required": [
        "index",
        "guid"
      ],
      "description": "A record applied, by its index in the proposal."
    },
    "DiscardParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "proposal": {
          "type": "string",
          "description": "The proposal's ID."
        }
      },
      "required": [
        "proposal"
      ],
      "description": "The params of `import.discard`."
    },
    "Discarded": {
      "type": "object",
      "properties": {
        "discarded": {
          "type": "boolean",
          "description": "Always true."
        }
      },
      "required": [
        "discarded"
      ],
      "description": "The result of `import.discard`."
    },
    "PreviewParam": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "format": {
              "type": "string",
              "const": "csvTransactions"
            },
            "files": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ImportFileParam"
              },
              "description": "The file, exactly one."
            },
            "layout": {
              "$ref": "#/$defs/CsvImportLayoutChoice",
              "description": "The CSV import layout."
            },
            "baseAccount": {
              "anyOf": [
                {
                  "$ref": "#/$defs/AccountRef"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Overrides the layout's base account.",
              "default": null
            },
            "accountNames": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/$defs/AccountRef"
              },
              "description": "GnuCash's account match page: what each account name the file uses means. Stored in the `csv-account-map`\nImport map at apply.",
              "default": {}
            }
          },
          "required": [
            "format",
            "files",
            "layout"
          ],
          "description": "GnuCash's Import Transactions from CSV."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "format": {
              "type": "string",
              "const": "csvDocuments"
            },
            "files": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ImportFileParam"
              },
              "description": "The file, exactly one."
            },
            "documentKind": {
              "$ref": "#/$defs/DocumentKindWire2",
              "description": "`bill` (default) or `invoice`."
            },
            "separator": {
              "$ref": "#/$defs/BusinessSeparatorWire",
              "description": "How fields are separated; default `semicolon`."
            },
            "dateFormat": {
              "anyOf": [
                {
                  "$ref": "#/$defs/DateFormatWire"
                },
                {
                  "type": "null"
                }
              ],
              "description": "How dates are written; default the Configuration's `reports.dateFormat`."
            },
            "accountNames": {
              "$ref": "#/$defs/AccountNamesWire",
              "description": "`full` (default) or `leaf` account names."
            },
            "updateExisting": {
              "type": "boolean",
              "description": "Append the rows to existing unposted documents with their IDs: GnuCash's question, answered up front. Default\nfalse, which skips them.",
              "default": false
            },
            "autoPay": {
              "type": "boolean",
              "description": "Apply open payments to each document posted (GnuCash's auto-pay preference). Default false.",
              "default": false
            }
          },
          "required": [
            "format",
            "files"
          ],
          "description": "GnuCash's Import Bills & Invoices."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "format": {
              "type": "string",
              "const": "csvOwners"
            },
            "files": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ImportFileParam"
              },
              "description": "The file, exactly one."
            },
            "ownerKind": {
              "$ref": "#/$defs/OwnerImportKind",
              "description": "`customer` (default) or `vendor`."
            },
            "separator": {
              "$ref": "#/$defs/BusinessSeparatorWire",
              "description": "How fields are separated; default `semicolon`."
            }
          },
          "required": [
            "format",
            "files"
          ],
          "description": "GnuCash's Import Customers & Vendors."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "format": {
              "type": "string",
              "const": "csvAccounts"
            },
            "files": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ImportFileParam"
              },
              "description": "The file, exactly one: the twelve columns of GnuCash's account tree export (`export.csvTree`)."
            },
            "separator": {
              "$ref": "#/$defs/SeparatorWire",
              "description": "The separator between fields; default comma."
            },
            "headerRows": {
              "type": [
                "integer",
                "null"
              ],
              "format": "uint",
              "minimum": 0,
              "description": "Header rows to leave out. Default: one when the first row's Type is `Type`, as GnuCash detects it.",
              "default": null
            }
          },
          "required": [
            "format",
            "files"
          ],
          "description": "GnuCash's Import Accounts from CSV: its account tree export read back."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "format": {
              "type": "string",
              "const": "csvPrices"
            },
            "files": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ImportFileParam"
              },
              "description": "The file, exactly one."
            },
            "layout": {
              "$ref": "#/$defs/CsvPriceLayoutChoice",
              "description": "The CSV price import layout."
            },
            "overwrite": {
              "type": "boolean",
              "description": "GnuCash's \"Allow existing prices to be over written\": a same-day price of the pair, in either direction, is\nreplaced (`update`) rather than kept (`skip`). Default false, as GnuCash's check box starts each time.",
              "default": false
            }
          },
          "required": [
            "format",
            "files",
            "layout"
          ],
          "description": "GnuCash's Import Prices from CSV."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "format": {
              "type": "string",
              "const": "qif"
            },
            "files": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/QifFileParam"
              },
              "description": "The files, one or more, converted together as GnuCash's assistant converts the files it loaded."
            },
            "dateFormat": {
              "anyOf": [
                {
                  "$ref": "#/$defs/QifDateFormatWire"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The date format, when the dates are ambiguous: one of the proposal's `qif.dateFormats`."
            },
            "currency": {
              "anyOf": [
                {
                  "$ref": "#/$defs/CommodityId"
                },
                {
                  "type": "null"
                }
              ],
              "description": "The default currency; default the Configuration's `defaultCurrency`.",
              "default": null
            },
            "defaultReconcileState": {
              "$ref": "#/$defs/QifReconcileWire",
              "description": "The reconcile state of transactions with no `C` line; default `n`."
            },
            "accounts": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              },
              "description": "QIF account name → account full name, existing or to create, over the guess and the saved map.",
              "default": {}
            },
            "categories": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              },
              "description": "QIF category → account full name.",
              "default": {}
            },
            "payees": {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              },
              "description": "QIF payee or memo → account full name.",
              "default": {}
            },
            "securities": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/$defs/QifSecurityParam"
              },
              "description": "QIF security name → the commodity to create for it."
            }
          },
          "required": [
            "format",
            "files"
          ],
          "description": "GnuCash's QIF import."
        }
      ],
      "description": "The params of `import.preview`: the common ones and each format's own, chosen by `format`.",
      "type": "object"
    },
    "ImportFileParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The file's name, shown in messages.",
          "default": null
        },
        "text": {
          "type": [
            "string",
            "null"
          ],
          "description": "The content as text, already Unicode.",
          "default": null
        },
        "base64": {
          "type": [
            "string",
            "null"
          ],
          "description": "The content's bytes, base64-encoded (RFC 4648, with padding).",
          "default": null
        },
        "encoding": {
          "type": [
            "string",
            "null"
          ],
          "description": "The encoding of `base64`'s bytes, a WHATWG label (`utf-8`, `iso-8859-1`, `windows-1252`, `utf-16le`, …).\nDefault: the layout's, else UTF-8. Refused with `text`. A byte-order mark decides between UTF-8 and UTF-16.",
          "default": null
        }
      },
      "description": "One import file (`ImportFile`): exactly one of `text` and `base64`."
    },
    "CsvImportLayoutChoice": {
      "description": "A CSV import layout: the name of a built-in one (No Settings, GnuCash Export Format, GnuCash Export Format (4.x and older)) or of one in the Configuration's import.csvLayouts, or a whole layout.",
      "oneOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "object",
          "description": "A CSV transaction import layout (GnuCash's import preset). Fields left out take GnuCash's defaults.",
          "properties": {
            "format": {
              "type": "string",
              "enum": [
                "csv",
                "fixedWidth"
              ],
              "description": "Separated fields (csv, the default) or fixed widths."
            },
            "separators": {
              "type": "string",
              "description": "The separator characters, any of which ends a field; default \",\"."
            },
            "escape": {
              "type": "boolean",
              "description": "Backslash escapes in fields; default true."
            },
            "columnWidths": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295,
                "description": "A width in characters."
              },
              "description": "Fixed width only: each column's width."
            },
            "skipStartLines": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295,
              "description": "Lines to skip at the start, such as a header."
            },
            "skipEndLines": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295,
              "description": "Lines to skip at the end."
            },
            "skipAltLines": {
              "type": "boolean",
              "description": "Skip every second line after the start lines."
            },
            "dateFormat": {
              "type": "string",
              "enum": [
                "y-m-d",
                "d-m-y",
                "m-d-y",
                "d-m",
                "m-d",
                "Locale"
              ],
              "description": "How dates are written; default y-m-d. locale is ICU's default date format for the locale setting."
            },
            "currencyFormat": {
              "type": "string",
              "enum": [
                "locale",
                "period",
                "comma"
              ],
              "description": "How amounts are written: the Locale's, 123,456.78 (period) or 123.456,78 (comma)."
            },
            "encoding": {
              "type": "string",
              "format": "encoding",
              "description": "The file's encoding, a WHATWG label; default UTF-8."
            },
            "multiSplit": {
              "type": "boolean",
              "description": "Several lines make one transaction, one split per line."
            },
            "baseAccount": {
              "type": [
                "string",
                "object",
                "null"
              ],
              "description": "Single-line mode with no Account column: every line's account, by full name or as { guid, fullName }.",
              "properties": {
                "guid": {
                  "type": "string",
                  "format": "guid"
                },
                "fullName": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "columns": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "None",
                  "Transaction ID",
                  "Date",
                  "Number",
                  "Description",
                  "Notes",
                  "Transaction Commodity",
                  "Void Reason",
                  "Action",
                  "Account",
                  "Amount",
                  "Amount (Negated)",
                  "Value",
                  "Value (Negated)",
                  "Price",
                  "Memo",
                  "Reconciled",
                  "Reconcile Date",
                  "Transfer Action",
                  "Transfer Account",
                  "Transfer Amount",
                  "Transfer Amount (Negated)",
                  "Transfer Memo",
                  "Transfer Reconciled",
                  "Transfer Reconcile Date",
                  "Deposit",
                  "Withdrawal",
                  "Num"
                ]
              },
              "description": "Each column's type, by GnuCash's saved name."
            }
          }
        }
      ]
    },
    "DocumentKindWire2": {
      "oneOf": [
        {
          "type": "string",
          "const": "bill",
          "description": "Vendor bills (GnuCash's default)."
        },
        {
          "type": "string",
          "const": "invoice",
          "description": "Customer invoices."
        }
      ],
      "description": "Bills or invoices."
    },
    "BusinessSeparatorWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "semicolon",
          "description": "Semicolons, no quotes (the default)."
        },
        {
          "type": "string",
          "const": "comma",
          "description": "Commas, no quotes."
        },
        {
          "type": "string",
          "const": "semicolonQuoted",
          "description": "Semicolons, each field optionally in double quotes."
        },
        {
          "type": "string",
          "const": "commaQuoted",
          "description": "Commas, each field optionally in double quotes."
        }
      ],
      "description": "How fields are separated: GnuCash's four choices."
    },
    "DateFormatWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "us",
          "description": "`%m/%d/%Y`."
        },
        {
          "type": "string",
          "const": "uk",
          "description": "`%d/%m/%Y`."
        },
        {
          "type": "string",
          "const": "ce",
          "description": "`%d.%m.%Y`."
        },
        {
          "type": "string",
          "const": "iso",
          "description": "`%Y-%m-%d`."
        },
        {
          "type": "string",
          "const": "locale",
          "description": "The Locale's date format."
        }
      ],
      "description": "GnuCash's date format preference."
    },
    "AccountNamesWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "full",
          "description": "Full names, `Expenses:Office` (the default)."
        },
        {
          "type": "string",
          "const": "leaf",
          "description": "Leaf names, the first found breadth first."
        }
      ],
      "description": "How the file names accounts: GnuCash's \"show leaf account names\" preference."
    },
    "OwnerImportKind": {
      "oneOf": [
        {
          "type": "string",
          "const": "customer",
          "description": "Customers (GnuCash's default)."
        },
        {
          "type": "string",
          "const": "vendor",
          "description": "Vendors."
        }
      ],
      "description": "Customers or vendors."
    },
    "SeparatorWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "comma",
          "description": "`,`, the default."
        },
        {
          "type": "string",
          "const": "semicolon",
          "description": "`;`."
        },
        {
          "type": "string",
          "const": "colon",
          "description": "`:`."
        }
      ],
      "description": "The separator of an account file: GnuCash's radio buttons."
    },
    "CsvPriceLayoutChoice": {
      "description": "A CSV price import layout: the name of the built-in one (No Settings) or of one in the Configuration's import.csvPriceLayouts, or a whole layout.",
      "oneOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "object",
          "description": "A CSV price import layout (GnuCash's price import preset). Fields left out take GnuCash's defaults.",
          "properties": {
            "format": {
              "type": "string",
              "enum": [
                "csv",
                "fixedWidth"
              ],
              "description": "Separated fields (csv, the default) or fixed widths."
            },
            "separators": {
              "type": "string",
              "description": "The separator characters, any of which ends a field; default \",\"."
            },
            "escape": {
              "type": "boolean",
              "description": "Backslash escapes in fields; default true."
            },
            "columnWidths": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 0,
                "maximum": 4294967295,
                "description": "A width in characters."
              },
              "description": "Fixed width only: each column's width."
            },
            "skipStartLines": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295,
              "description": "Lines to skip at the start, such as a header."
            },
            "skipEndLines": {
              "type": "integer",
              "minimum": 0,
              "maximum": 4294967295,
              "description": "Lines to skip at the end."
            },
            "skipAltLines": {
              "type": "boolean",
              "description": "Skip every second line after the start lines."
            },
            "dateFormat": {
              "type": "string",
              "enum": [
                "y-m-d",
                "d-m-y",
                "m-d-y",
                "d-m",
                "m-d",
                "Locale"
              ],
              "description": "How dates are written; default y-m-d. locale is ICU's default date format for the locale setting."
            },
            "currencyFormat": {
              "type": "string",
              "enum": [
                "locale",
                "period",
                "comma"
              ],
              "description": "How amounts are written: the Locale's, 123,456.78 (period) or 123.456,78 (comma)."
            },
            "encoding": {
              "type": "string",
              "format": "encoding",
              "description": "The file's encoding, a WHATWG label; default UTF-8."
            },
            "fromCommodity": {
              "type": "string",
              "format": "commodity-id",
              "description": "GnuCash's Commodity From: the commodity of every price, NAMESPACE::MNEMONIC, in place of the From Symbol and From Namespace columns."
            },
            "toCurrency": {
              "type": "string",
              "format": "commodity-id",
              "description": "GnuCash's Currency To: the currency of every price, in place of the Currency To column."
            },
            "columns": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "None",
                  "Date",
                  "Amount",
                  "From Symbol",
                  "From Namespace",
                  "Currency To"
                ]
              },
              "description": "Each column's type, by GnuCash's saved name."
            }
          }
        }
      ]
    },
    "QifFileParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The file's name, shown in messages; it gives the default account.",
          "default": null
        },
        "text": {
          "type": [
            "string",
            "null"
          ],
          "description": "The content as text, already Unicode.",
          "default": null
        },
        "base64": {
          "type": [
            "string",
            "null"
          ],
          "description": "The content's bytes, base64-encoded (RFC 4648, with padding).",
          "default": null
        },
        "encoding": {
          "type": [
            "string",
            "null"
          ],
          "description": "The encoding of `base64`'s bytes, a WHATWG label; default UTF-8. Refused with `text`.",
          "default": null
        },
        "defaultAccount": {
          "type": [
            "string",
            "null"
          ],
          "description": "The account (full name) for the file's transactions read under no `!Account`: GnuCash's account page.\nDefault: from the file's name, as GnuCash's (`qif-file:path-to-accountname`), else \"QIF Import\".",
          "default": null
        }
      },
      "description": "One QIF file: an `ImportFile` with the account for its transactions read under no `!Account`."
    },
    "QifDateFormatWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "m-d-y",
          "description": "Month, day, year."
        },
        {
          "type": "string",
          "const": "d-m-y",
          "description": "Day, month, year."
        },
        {
          "type": "string",
          "const": "y-m-d",
          "description": "Year, month, day."
        },
        {
          "type": "string",
          "const": "y-d-m",
          "description": "Year, day, month."
        }
      ],
      "description": "A QIF date format: the order of day, month and year."
    },
    "QifReconcileWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "n",
          "description": "Not reconciled or cleared (GnuCash's default)."
        },
        {
          "type": "string",
          "const": "c",
          "description": "Cleared."
        },
        {
          "type": "string",
          "const": "y",
          "description": "Reconciled."
        }
      ],
      "description": "The reconcile state of a QIF transaction with no `C` line: GnuCash's `qif-import` preference."
    },
    "QifSecurityParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "namespace": {
          "type": "string",
          "description": "Namespace (exchange or type), such as NASDAQ or FUND."
        },
        "mnemonic": {
          "type": "string",
          "description": "Mnemonic (ticker)."
        },
        "fullname": {
          "type": "string",
          "description": "Full name."
        }
      },
      "required": [
        "namespace",
        "mnemonic",
        "fullname"
      ],
      "description": "A new security as the caller wants it created: GnuCash's commodity page."
    },
    "ProposalResult": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The proposal's ID, for `import.apply` and `import.discard`."
        },
        "format": {
          "type": "string",
          "description": "The format, as given."
        },
        "bookRevision": {
          "type": "integer",
          "format": "uint64",
          "minimum": 0,
          "description": "The Book revision it was made at: the number of Mutations the session had applied."
        },
        "thresholdDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The auto read-only threshold date at the time of the preview, or null with no threshold."
        },
        "summary": {
          "$ref": "#/$defs/Summary",
          "description": "Counts."
        },
        "ignoredLines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IgnoredLineWire"
          },
          "description": "Lines the reader skipped."
        },
        "errors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RowErrorWire"
          },
          "description": "Rows that can't be imported, with GnuCash's message. None of their records appear below."
        },
        "warnings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WarningWire"
          },
          "description": "Things the caller should know about the whole import; each transaction's own are in its `warnings`."
        },
        "newAccounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewAccountWire"
          },
          "description": "Accounts the import will create, by full name, parents first."
        },
        "newCommodities": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/NewCommodityWire"
          },
          "description": "Commodities the import will create (QIF securities); none for CSV."
        },
        "transactions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ImportedTransactionWire"
          },
          "description": "One per transaction the file holds, in the order the importer builds them."
        },
        "csv": {
          "anyOf": [
            {
              "$ref": "#/$defs/CsvWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "CSV's own state: each account name the file uses and where it resolved."
        },
        "documents": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/DocumentWire"
          },
          "description": "`csvDocuments`: the documents, by index."
        },
        "owners": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/OwnerWire"
          },
          "description": "`csvOwners`: the customers or vendors, by index."
        },
        "qif": {
          "anyOf": [
            {
              "$ref": "#/$defs/QifWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "QIF's own state: the date formats to choose between, the account, category and payee maps, and the\nsecurities."
        },
        "accounts": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/AccountRecordWire"
          },
          "description": "`csvAccounts`: one per account row, in file order."
        },
        "prices": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/PriceRecordWire"
          },
          "description": "`csvPrices`: one per price line, in file order."
        }
      },
      "required": [
        "id",
        "format",
        "bookRevision",
        "summary",
        "ignoredLines",
        "errors",
        "warnings",
        "newAccounts",
        "newCommodities",
        "transactions"
      ],
      "description": "The Import proposal."
    },
    "Summary": {
      "type": "object",
      "properties": {
        "add": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Records to add."
        },
        "clear": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Transactions that clear a match."
        },
        "update": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Transactions that update and clear a match; accounts, documents and Owners to update; prices replacing a\nsame-day price."
        },
        "skip": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Records skipped."
        },
        "errors": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Error rows."
        },
        "imbalanced": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Transactions that would get an Imbalance split."
        },
        "readOnlyByDate": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Transactions, and documents posted, read-only by date once applied."
        }
      },
      "required": [
        "add",
        "clear",
        "update",
        "skip",
        "errors",
        "imbalanced",
        "readOnlyByDate"
      ],
      "description": "Counts of a proposal: of its transactions, or of the records of the other formats."
    },
    "IgnoredLineWire": {
      "type": "object",
      "properties": {
        "file": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "The file's index in `files`."
        },
        "line": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "The line, from 1."
        },
        "reason": {
          "type": "string",
          "description": "Why: the layout setting that skips it (`skipStartLines`, `skipEndLines`, `skipAltLines`), or for an account\nfile `headerRows` or `empty`."
        }
      },
      "required": [
        "file",
        "line",
        "reason"
      ],
      "description": "A line the reader skipped."
    },
    "RowErrorWire": {
      "type": "object",
      "properties": {
        "file": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "The file's index in `files`."
        },
        "line": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "The line, from 1."
        },
        "column": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint",
          "minimum": 0,
          "description": "The column, from 1, when the error is a column's."
        },
        "message": {
          "type": "string",
          "description": "GnuCash's message."
        }
      },
      "required": [
        "file",
        "line",
        "message"
      ],
      "description": "A row that can't be imported."
    },
    "NewAccountWire": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Its full name."
        },
        "type": {
          "type": "string",
          "description": "Its type, as GnuCash names it (`BANK`)."
        },
        "commodity": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "Its commodity."
        }
      },
      "required": [
        "name",
        "type"
      ],
      "description": "An account the import will create."
    },
    "NewCommodityWire": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/$defs/CommodityId",
          "description": "Its ID."
        },
        "fullname": {
          "type": "string",
          "description": "Its full name."
        },
        "fraction": {
          "type": "integer",
          "format": "int64",
          "description": "Its fraction."
        }
      },
      "required": [
        "id",
        "fullname",
        "fraction"
      ],
      "description": "A commodity the import will create."
    },
    "ImportedTransactionWire": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Its position: the key `import.apply` changes it by."
        },
        "source": {
          "$ref": "#/$defs/SourceWire",
          "description": "Where it came from."
        },
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "The transaction currency."
        },
        "datePosted": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The posted date."
        },
        "num": {
          "type": [
            "string",
            "null"
          ],
          "description": "Number."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description."
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes."
        },
        "voidReason": {
          "type": [
            "string",
            "null"
          ],
          "description": "The void reason, when the file voids it."
        },
        "splits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ImportedSplitWire"
          },
          "description": "The splits; split 0 is the imported split, which the matcher matches on."
        },
        "other": {
          "anyOf": [
            {
              "$ref": "#/$defs/OtherWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "The balancing split *add* makes; null when the transaction already balances."
        },
        "action": {
          "$ref": "#/$defs/ActionWire",
          "description": "The Import action."
        },
        "matches": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MatchWire"
          },
          "description": "Candidate matches, best first."
        },
        "selectedMatch": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The split of the match `clear` or `update` would use."
        },
        "imbalance": {
          "anyOf": [
            {
              "$ref": "#/$defs/ImbalanceWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "The Imbalance split applying would make, with the current action and accounts."
        },
        "readOnlyByDate": {
          "type": "boolean",
          "description": "True when the transaction added, cleared or updated would be read-only by date."
        },
        "warnings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WarningWire"
          },
          "description": "Warnings for this transaction."
        }
      },
      "required": [
        "index",
        "source",
        "currency",
        "splits",
        "action",
        "matches",
        "readOnlyByDate",
        "warnings"
      ],
      "description": "One imported transaction."
    },
    "SourceWire": {
      "type": "object",
      "properties": {
        "file": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "The file's index in `files`."
        },
        "lines": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "uint",
            "minimum": 0
          },
          "minItems": 2,
          "maxItems": 2,
          "description": "The first and last line."
        }
      },
      "required": [
        "file",
        "lines"
      ],
      "description": "Where a transaction came from."
    },
    "ImportedSplitWire": {
      "type": "object",
      "properties": {
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Its account."
        },
        "accountName": {
          "type": [
            "string",
            "null"
          ],
          "description": "The account's full name."
        },
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "Value, in the transaction currency."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "Amount, in the account's commodity."
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Memo."
        },
        "action": {
          "type": [
            "string",
            "null"
          ],
          "description": "Action."
        },
        "reconcileState": {
          "type": "string",
          "description": "Reconcile state: n, c, y, f or v."
        },
        "reconcileDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "When it was reconciled."
        }
      },
      "required": [
        "value",
        "amount",
        "reconcileState"
      ],
      "description": "One split of an imported transaction."
    },
    "OtherWire": {
      "type": "object",
      "properties": {
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Its account, or null when none was found."
        },
        "accountName": {
          "type": [
            "string",
            "null"
          ],
          "description": "The account's full name."
        },
        "from": {
          "type": [
            "string",
            "null"
          ],
          "description": "Where the account came from: `file`, `bayes`, `map`, `caller`, or null."
        },
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "Its value: minus the transaction's imbalance."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "Its amount; zero when unknown (applying then takes the value, a rate of 1)."
        }
      },
      "required": [
        "value",
        "amount"
      ],
      "description": "The balancing split GnuCash would add on *add*."
    },
    "MatchWire": {
      "type": "object",
      "properties": {
        "split": {
          "$ref": "#/$defs/Guid",
          "description": "The existing split."
        },
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "Its transaction."
        },
        "score": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "The Match score."
        },
        "updateProposed": {
          "type": "boolean",
          "description": "True when *update* is proposed: the amount or date was not an exact match."
        },
        "datePosted": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The existing transaction's posted date."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Its description."
        },
        "num": {
          "type": [
            "string",
            "null"
          ],
          "description": "Its number."
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "The split's memo."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "The split's amount."
        },
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "The split's value."
        },
        "reconcileState": {
          "type": "string",
          "description": "The split's reconcile state."
        }
      },
      "required": [
        "split",
        "transaction",
        "updateProposed",
        "amount",
        "value",
        "reconcileState"
      ],
      "description": "A candidate match."
    },
    "ImbalanceWire": {
      "type": "object",
      "properties": {
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "Its value: what the transaction is out by, negated."
        },
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "The transaction currency."
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The `Imbalance-<CUR>` account, or null when it will be created (it is then in `newAccounts`)."
        },
        "accountName": {
          "type": "string",
          "description": "Its full name."
        }
      },
      "required": [
        "value",
        "currency",
        "accountName"
      ],
      "description": "The Imbalance split applying would make."
    },
    "CsvWire": {
      "type": "object",
      "properties": {
        "accountNames": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AccountNameWire"
          },
          "description": "Each account name the file uses."
        }
      },
      "required": [
        "accountNames"
      ],
      "description": "CSV's own state."
    },
    "AccountNameWire": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name as the file writes it."
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The account it resolved to, or null: its rows are then errors until `accountNames` names it."
        },
        "accountName": {
          "type": [
            "string",
            "null"
          ],
          "description": "The account's full name."
        },
        "from": {
          "type": [
            "string",
            "null"
          ],
          "description": "How: `param` (the caller's `accountNames`), `map` (the `csv-account-map` Import map) or `fullName`."
        }
      },
      "required": [
        "name"
      ],
      "description": "One account name a CSV file uses."
    },
    "DocumentWire": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Its position: the key `import.apply` changes it by."
        },
        "source": {
          "$ref": "#/$defs/SourceWire",
          "description": "Where it came from."
        },
        "lines": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "uint",
            "minimum": 0
          },
          "description": "The line of each of its rows."
        },
        "id": {
          "type": "string",
          "description": "Its ID."
        },
        "type": {
          "type": "string",
          "description": "`invoice` or `bill`."
        },
        "owner": {
          "$ref": "#/$defs/OwnerInfo",
          "description": "The customer or vendor."
        },
        "ownerId": {
          "type": "string",
          "description": "The owner's ID as the file gives it."
        },
        "existing": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The document in the Book it updates (or would, when skipped)."
        },
        "sameAs": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint",
          "minimum": 0,
          "description": "The earlier record of this proposal that creates the document it updates."
        },
        "action": {
          "$ref": "#/$defs/ActionWire",
          "description": "`add`, `update` (append entries) or `skip`."
        },
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "The document currency: the owner's."
        },
        "dateOpened": {
          "$ref": "#/$defs/Date",
          "description": "The opening date of a new document."
        },
        "billingId": {
          "type": "string",
          "description": "Billing ID of a new document."
        },
        "notes": {
          "type": "string",
          "description": "Notes of a new document."
        },
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EntryWire"
          },
          "description": "The entries its rows add."
        },
        "post": {
          "anyOf": [
            {
              "$ref": "#/$defs/PostWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Posting, when the file asks for it."
        },
        "totals": {
          "anyOf": [
            {
              "$ref": "#/$defs/TotalsWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Totals once applied; null when skipped."
        },
        "readOnlyByDate": {
          "type": "boolean",
          "description": "True when it is posted before the read-only threshold."
        },
        "warnings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WarningWire"
          },
          "description": "Warnings about it: `fixed`, `exists`, `posted`, `not-posted`, `duplicate-id`, `duplicate-entry`, `read-only-by-date`."
        }
      },
      "required": [
        "index",
        "source",
        "lines",
        "id",
        "type",
        "owner",
        "ownerId",
        "action",
        "currency",
        "dateOpened",
        "billingId",
        "notes",
        "entries",
        "readOnlyByDate",
        "warnings"
      ],
      "description": "One document of a `csvDocuments` proposal."
    },
    "OwnerInfo": {
      "type": "object",
      "properties": {
        "kind": {
          "$ref": "#/$defs/OwnerKindWire",
          "description": "Its kind."
        },
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "Its GUID."
        }
      },
      "required": [
        "kind",
        "guid"
      ],
      "description": "An owner: a customer, vendor, employee or job."
    },
    "OwnerKindWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "customer",
          "description": "A customer."
        },
        {
          "type": "string",
          "const": "vendor",
          "description": "A vendor."
        },
        {
          "type": "string",
          "const": "employee",
          "description": "An employee."
        },
        {
          "type": "string",
          "const": "job",
          "description": "A job (of a customer or vendor)."
        }
      ],
      "description": "What kind of owner a GUID names."
    },
    "EntryWire": {
      "type": "object",
      "properties": {
        "line": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "The row's line."
        },
        "date": {
          "$ref": "#/$defs/Date",
          "description": "The entry date."
        },
        "description": {
          "type": "string",
          "description": "Description."
        },
        "action": {
          "type": "string",
          "description": "Action."
        },
        "notes": {
          "type": "string",
          "description": "Notes (invoices)."
        },
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The income or expense account."
        },
        "accountName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Its full name."
        },
        "quantity": {
          "$ref": "#/$defs/Amount",
          "description": "Quantity."
        },
        "price": {
          "$ref": "#/$defs/Amount",
          "description": "Unit price."
        },
        "discount": {
          "$ref": "#/$defs/Amount",
          "description": "Discount (invoices)."
        },
        "discountType": {
          "$ref": "#/$defs/AmountTypeWire",
          "description": "Discount type (invoices)."
        },
        "discountHow": {
          "$ref": "#/$defs/DiscountHowWire",
          "description": "When the discount applies (invoices)."
        },
        "taxable": {
          "type": "boolean",
          "description": "Taxable."
        },
        "taxIncluded": {
          "type": "boolean",
          "description": "Tax included in the price."
        },
        "taxTable": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The tax table."
        }
      },
      "required": [
        "line",
        "date",
        "description",
        "action",
        "notes",
        "account",
        "quantity",
        "price",
        "discount",
        "discountType",
        "discountHow",
        "taxable",
        "taxIncluded"
      ],
      "description": "One entry a document's row adds."
    },
    "AmountTypeWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "percent",
          "description": "A percentage (`10` is 10 %)."
        },
        {
          "type": "string",
          "const": "value",
          "description": "A fixed amount in the document's currency."
        }
      ],
      "description": "Percentage or fixed amount."
    },
    "DiscountHowWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "preTax",
          "description": "Discount first, then tax on the discounted amount."
        },
        {
          "type": "string",
          "const": "sameTime",
          "description": "Tax and discount both on the undiscounted amount."
        },
        {
          "type": "string",
          "const": "postTax",
          "description": "Tax first, then the discount on the taxed amount."
        }
      ],
      "description": "When a discount applies relative to tax."
    },
    "PostWire": {
      "type": "object",
      "properties": {
        "willPost": {
          "type": "boolean",
          "description": "True when applying posts it."
        },
        "reason": {
          "type": [
            "string",
            "null"
          ],
          "description": "Why it won't be posted (also a `not-posted` warning)."
        },
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The A/R or A/P account."
        },
        "accountName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Its full name."
        },
        "date": {
          "$ref": "#/$defs/Date",
          "description": "The posting date."
        },
        "dueDate": {
          "$ref": "#/$defs/Date",
          "description": "The due date."
        },
        "memo": {
          "type": "string",
          "description": "The memo."
        },
        "accumulateSplits": {
          "type": "boolean",
          "description": "One split per account rather than per entry."
        },
        "autoPay": {
          "type": "boolean",
          "description": "Apply open payments afterwards."
        }
      },
      "required": [
        "willPost",
        "account",
        "date",
        "dueDate",
        "memo",
        "accumulateSplits",
        "autoPay"
      ],
      "description": "How a document will be posted, or why not."
    },
    "TotalsWire": {
      "type": "object",
      "properties": {
        "subtotal": {
          "$ref": "#/$defs/Amount",
          "description": "Σ entry values."
        },
        "tax": {
          "$ref": "#/$defs/Amount",
          "description": "Σ taxes."
        },
        "total": {
          "$ref": "#/$defs/Amount",
          "description": "Subtotal and tax."
        }
      },
      "required": [
        "subtotal",
        "tax",
        "total"
      ],
      "description": "A document's totals once applied, signed as printed."
    },
    "OwnerWire": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Its position: the key `import.apply` changes it by."
        },
        "line": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Its line."
        },
        "kind": {
          "$ref": "#/$defs/OwnerKindWire",
          "description": "`customer` or `vendor`."
        },
        "id": {
          "type": "string",
          "description": "The ID: the file's, or the next number of the Owner's Counter when the file gives none."
        },
        "idFromCounter": {
          "type": "boolean",
          "description": "True when the ID comes from the Counter, which applying advances."
        },
        "existing": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The Owner in the Book it updates (or would, when skipped)."
        },
        "sameAs": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint",
          "minimum": 0,
          "description": "The earlier record of this proposal that creates the Owner it updates."
        },
        "action": {
          "$ref": "#/$defs/ActionWire",
          "description": "`add`, `update` or `skip`."
        },
        "alternative": {
          "anyOf": [
            {
              "$ref": "#/$defs/ActionWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "For a header row proposed as `skip`: the action GnuCash would take, which `import.apply` accepts."
        },
        "fields": {
          "$ref": "#/$defs/OwnerFieldsWire",
          "description": "The fields the row sets, every one of them."
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "The currency of a new Owner: `defaultCurrency`."
        },
        "changes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The fields an update changes (`company`, `notes`, `address.addr1`, `shipping.email`, `active`, …)."
        },
        "reactivate": {
          "type": "boolean",
          "description": "True when an inactive Owner becomes active."
        },
        "warnings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WarningWire"
          },
          "description": "Warnings about it: `fixed`, `header-row`, `unchanged`, `ignored-columns`, `id-in-use`."
        }
      },
      "required": [
        "index",
        "line",
        "kind",
        "id",
        "idFromCounter",
        "action",
        "fields",
        "changes",
        "reactivate",
        "warnings"
      ],
      "description": "One Owner of a `csvOwners` proposal."
    },
    "OwnerFieldsWire": {
      "type": "object",
      "properties": {
        "company": {
          "type": "string",
          "description": "The Owner's name (the company column, or the name column when that is empty)."
        },
        "address": {
          "$ref": "#/$defs/AddressWire",
          "description": "The address."
        },
        "notes": {
          "type": "string",
          "description": "Notes."
        },
        "shipping": {
          "anyOf": [
            {
              "$ref": "#/$defs/AddressWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "The shipping address; customers only."
        }
      },
      "required": [
        "company",
        "address",
        "notes"
      ],
      "description": "What a row sets on its Owner."
    },
    "AddressWire": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name."
        },
        "addr1": {
          "type": "string",
          "description": "Line 1."
        },
        "addr2": {
          "type": "string",
          "description": "Line 2."
        },
        "addr3": {
          "type": "string",
          "description": "Line 3."
        },
        "addr4": {
          "type": "string",
          "description": "Line 4."
        },
        "phone": {
          "type": "string",
          "description": "Phone."
        },
        "fax": {
          "type": "string",
          "description": "Fax."
        },
        "email": {
          "type": "string",
          "description": "Email."
        }
      },
      "required": [
        "name",
        "addr1",
        "addr2",
        "addr3",
        "addr4",
        "phone",
        "fax",
        "email"
      ],
      "description": "An address as a row sets it."
    },
    "QifWire": {
      "type": "object",
      "properties": {
        "dateFormats": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The date formats that fit the dates, when more than one does and no `dateFormat` was given: the proposal then\nholds no transactions, and a new preview with one of them is needed."
        },
        "accounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/QifMapRowWire"
          },
          "description": "The QIF accounts the files use and their accounts."
        },
        "categories": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/QifMapRowWire"
          },
          "description": "The QIF categories and their accounts."
        },
        "payees": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/QifMapRowWire"
          },
          "description": "The QIF payees and memos that pick an account, and their accounts."
        },
        "securities": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/QifSecurityWire"
          },
          "description": "The securities the files use."
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "The default currency the transactions are in."
        }
      },
      "required": [
        "dateFormats",
        "accounts",
        "categories",
        "payees",
        "securities"
      ],
      "description": "QIF's own state."
    },
    "QifMapRowWire": {
      "type": "object",
      "properties": {
        "qifName": {
          "type": "string",
          "description": "The QIF name."
        },
        "account": {
          "type": "string",
          "description": "The account's full name."
        },
        "id": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The account, when it exists."
        },
        "type": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The account types it may have, as GnuCash names them; a new account gets the first that suits it."
        },
        "new": {
          "type": "boolean",
          "description": "True when the account is to be created."
        },
        "guessed": {
          "type": "boolean",
          "description": "True when neither the saved QIF account map nor the params named it."
        }
      },
      "required": [
        "qifName",
        "account",
        "type",
        "new",
        "guessed"
      ],
      "description": "One row of a QIF map."
    },
    "QifSecurityWire": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The QIF security name."
        },
        "id": {
          "$ref": "#/$defs/CommodityId",
          "description": "Its commodity."
        },
        "fullname": {
          "type": [
            "string",
            "null"
          ],
          "description": "The full name of a commodity to be created."
        },
        "new": {
          "type": "boolean",
          "description": "True when applying creates the commodity."
        }
      },
      "required": [
        "name",
        "id",
        "new"
      ],
      "description": "One security a QIF import uses."
    },
    "AccountRecordWire": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Its position: the key `import.apply` changes it by."
        },
        "line": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Its line in the file, from 1."
        },
        "fullName": {
          "type": "string",
          "description": "The account's full name."
        },
        "action": {
          "$ref": "#/$defs/ActionWire",
          "description": "`add` (create it), `update` (change the fields in `changes`), or `skip` (it exists and the row changes nothing).\nThe caller may turn an `add` or `update` into `skip`."
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The existing account an update changes; null for an add, or for an account an earlier row adds."
        },
        "fields": {
          "$ref": "#/$defs/AccountFieldsWire",
          "description": "The row's cells, as read."
        },
        "changes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FieldChangeWire"
          },
          "description": "What an update changes: only code, description, notes and colour, from non-empty cells, as GnuCash does."
        },
        "warnings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WarningWire"
          },
          "description": "Warnings for this row: `color` (a colour not recognised, left as it was), `not-updated` (cells that differ\nfrom the account but that GnuCash's import never changes)."
        }
      },
      "required": [
        "index",
        "line",
        "fullName",
        "action",
        "fields",
        "changes",
        "warnings"
      ],
      "description": "One row of a CSV account import."
    },
    "AccountFieldsWire": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type, as GnuCash names it (`BANK`)."
        },
        "name": {
          "type": "string",
          "description": "The account's name."
        },
        "code": {
          "type": "string",
          "description": "Account code."
        },
        "description": {
          "type": "string",
          "description": "Description."
        },
        "color": {
          "type": "string",
          "description": "Colour."
        },
        "notes": {
          "type": "string",
          "description": "Notes."
        },
        "symbol": {
          "type": "string",
          "description": "The commodity's mnemonic."
        },
        "namespace": {
          "type": "string",
          "description": "The commodity's namespace."
        },
        "hidden": {
          "type": "string",
          "description": "`T` when hidden."
        },
        "taxInfo": {
          "type": "string",
          "description": "`T` when tax-related; GnuCash's import never uses it."
        },
        "placeholder": {
          "type": "string",
          "description": "`T` when a placeholder."
        }
      },
      "required": [
        "type",
        "name",
        "code",
        "description",
        "color",
        "notes",
        "symbol",
        "namespace",
        "hidden",
        "taxInfo",
        "placeholder"
      ],
      "description": "The twelve cells of GnuCash's account tree export, as read."
    },
    "FieldChangeWire": {
      "type": "object",
      "properties": {
        "field": {
          "type": "string",
          "description": "`code`, `description`, `notes` or `color`."
        },
        "from": {
          "type": [
            "string",
            "null"
          ],
          "description": "What the account holds, or null."
        },
        "to": {
          "type": "string",
          "description": "What the row gives."
        }
      },
      "required": [
        "field",
        "to"
      ],
      "description": "A field an update changes."
    },
    "PriceRecordWire": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Its position: the key `import.apply` changes it by."
        },
        "line": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Its line in the file, from 1."
        },
        "commodity": {
          "$ref": "#/$defs/CommodityId",
          "description": "The commodity priced."
        },
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "The currency it is priced in."
        },
        "date": {
          "$ref": "#/$defs/Date",
          "description": "The date."
        },
        "time": {
          "$ref": "#/$defs/Timestamp",
          "description": "The price's time: the date's day-neutral time."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "The amount as the file writes it."
        },
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "The value stored: the amount at the currency's fraction × 10000, rounded half up, as GnuCash stores it."
        },
        "action": {
          "$ref": "#/$defs/ActionWire",
          "description": "`add`; `update`, replacing the same-day price in `existing`; or `skip`, a duplicate of it. The caller may\nchoose any of the three."
        },
        "existing": {
          "anyOf": [
            {
              "$ref": "#/$defs/ExistingWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "The same-day price of the pair, in either direction, that the price meets: in the Book, or added by an earlier\nprice of this proposal."
        }
      },
      "required": [
        "index",
        "line",
        "commodity",
        "currency",
        "date",
        "time",
        "amount",
        "value",
        "action"
      ],
      "description": "One price of a CSV price import."
    },
    "ExistingWire": {
      "type": "object",
      "properties": {
        "price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "A price in the Book."
        },
        "index": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint",
          "minimum": 0,
          "description": "The index of the proposal's price that adds it."
        }
      },
      "description": "A same-day price: `{ \"price\": GUID }` in the Book, or `{ \"index\": n }` for the price of an earlier record."
    },
    "DeleteParams3": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "entries": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/EntryParam"
          },
          "description": "The entries to delete."
        },
        "invalid": {
          "type": "boolean",
          "description": "Instead of `entries`: every invalid entry in the book, as the editor's \"Delete invalid mappings\".",
          "default": false
        }
      },
      "description": "Params of `importMap.delete`: `entries` or `invalid`, not both."
    },
    "EntryParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account holding the entries."
        },
        "kind": {
          "$ref": "#/$defs/KindWire",
          "description": "Their kind."
        },
        "key": {
          "type": [
            "string",
            "null"
          ],
          "description": "The key; absent for every entry of the kind on the account (the editor's parent row).",
          "default": null
        },
        "target": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "For `bayes`: only the token's entry for this target (a GUID, which need not name an account any more);\nabsent for every target's.",
          "default": null
        }
      },
      "required": [
        "account",
        "kind"
      ],
      "description": "One deletion."
    },
    "KindWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "bayes",
          "description": "A Bayesian entry: a token's count for a target."
        },
        {
          "type": "string",
          "const": "desc",
          "description": "A plain `desc` entry."
        },
        {
          "type": "string",
          "const": "memo",
          "description": "A plain `memo` entry."
        },
        {
          "type": "string",
          "const": "csvAccountMap",
          "description": "A `csv-account-map` entry, held by its target."
        },
        {
          "type": "string",
          "const": "onlineId",
          "description": "The account's `online_id`."
        },
        {
          "type": "string",
          "const": "hbci",
          "description": "The account's `hbci` bank code and account ID."
        },
        {
          "type": "string",
          "const": "ofxIncomeAccount",
          "description": "The account's `ofx/associated-income-account`."
        }
      ],
      "description": "The kind of an entry."
    },
    "DeleteResult4": {
      "type": "object",
      "properties": {
        "deleted": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ImportMapEntry"
          },
          "description": "Each as it was listed."
        }
      },
      "required": [
        "deleted"
      ],
      "description": "The entries deleted."
    },
    "ImportMapEntry": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountLabel",
          "description": "The account holding it."
        },
        "kind": {
          "$ref": "#/$defs/KindWire",
          "description": "Its kind."
        },
        "key": {
          "type": "string",
          "description": "The token (`bayes`), the text (`desc`, `memo`, `csvAccountMap`), or the online ID (`bank-code,account-id`\nfor `hbci`)."
        },
        "target": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountLabel"
            },
            {
              "type": "null"
            }
          ],
          "description": "The account it points at, or null when its GUID names no account. Null for `onlineId` and `hbci`."
        },
        "count": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "For `bayes`: the count."
        },
        "valid": {
          "type": "boolean",
          "description": "False when the editor counts it invalid: its target doesn't resolve, or its online ID is empty."
        }
      },
      "required": [
        "account",
        "kind",
        "key",
        "valid"
      ],
      "description": "One entry."
    },
    "AccountLabel": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "Its GUID."
        },
        "fullName": {
          "type": "string",
          "description": "Its full name."
        }
      },
      "required": [
        "guid",
        "fullName"
      ],
      "description": "An account, by GUID and full name."
    },
    "ListParams4": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only the entries this account holds (for `csvAccountMap`, the target, which holds it).",
          "default": null
        },
        "kind": {
          "anyOf": [
            {
              "$ref": "#/$defs/KindWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only this kind.",
          "default": null
        },
        "invalidOnly": {
          "type": "boolean",
          "description": "Only the entries the editor's \"Delete invalid mappings\" would remove.",
          "default": false
        }
      },
      "description": "Params of `importMap.list`."
    },
    "ListResult2": {
      "type": "object",
      "properties": {
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ImportMapEntry"
          },
          "description": "By holding account's full name, then kind, then key, bytewise."
        }
      },
      "required": [
        "entries"
      ],
      "description": "The entries."
    },
    "AddLineParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "invoice": {
          "$ref": "#/$defs/Guid",
          "description": "The unposted document."
        },
        "order": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Also put the line on this open order. Customer invoices only: order lines use the invoice side, as GnuCash's\norder ledger does.",
          "default": null
        },
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The line's date; stored as noon local time, as GnuCash's register does. Defaults to today.",
          "default": null
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description.",
          "default": null
        },
        "action": {
          "type": [
            "string",
            "null"
          ],
          "description": "Action: a free unit label such as \"Hours\".",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes.",
          "default": null
        },
        "quantity": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Quantity, as printed on the document; stored negated on a credit note.",
          "default": null
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "The income account (invoices) or expense account (bills, vouchers); `null` for none.",
          "default": null
        },
        "price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Unit price. A new line on a job's document defaults to the job's rate.",
          "default": null
        },
        "discount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Invoices only: the discount, a percentage or an amount. Defaults to the customer's discount.",
          "default": null
        },
        "discountType": {
          "anyOf": [
            {
              "$ref": "#/$defs/AmountTypeWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Invoices only: whether the discount is a percentage or an amount.",
          "default": null
        },
        "discountHow": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiscountHowWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Invoices only: when the discount applies relative to tax.",
          "default": null
        },
        "taxable": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Invoices and bills: the line is taxed. Defaults to true when a tax table applies.",
          "default": null
        },
        "taxIncluded": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Invoices and bills: the price includes tax. Defaults from the customer's or vendor's setting.",
          "default": null
        },
        "taxTable": {
          "anyOf": [
            {
              "$ref": "#/$defs/TaxTableRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Invoices and bills: the tax table, by GUID or name; `null` for none. Defaults to the owner's table when\nit overrides, else the book's default."
        },
        "billable": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Bills and vouchers: the cost is to be invoiced on to `billTo`.",
          "default": null
        },
        "billTo": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Bills and vouchers: the customer or job to invoice the cost to; `null` for none.",
          "default": null
        },
        "payment": {
          "anyOf": [
            {
              "$ref": "#/$defs/PaymentWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Vouchers only: cash (the employee paid) or card (the company card paid).",
          "default": null
        }
      },
      "required": [
        "invoice"
      ],
      "description": "Params of `invoice.addEntry`."
    },
    "PaymentWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "cash",
          "description": "The employee paid and is owed."
        },
        {
          "type": "string",
          "const": "card",
          "description": "The company credit card paid."
        }
      ],
      "description": "How an employee paid an expense."
    },
    "EntryInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid"
        },
        "date": {
          "$ref": "#/$defs/Timestamp"
        },
        "dateEntered": {
          "$ref": "#/$defs/Timestamp"
        },
        "description": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "quantity": {
          "$ref": "#/$defs/Amount",
          "description": "As stored: negated on a credit note."
        },
        "documentQuantity": {
          "$ref": "#/$defs/Amount",
          "description": "As printed on the document."
        },
        "invoice": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The customer invoice it is on."
        },
        "bill": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The bill or voucher it is on."
        },
        "order": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The order it is on."
        },
        "invoiceAccount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "invoicePrice": {
          "$ref": "#/$defs/Amount"
        },
        "discount": {
          "$ref": "#/$defs/Amount"
        },
        "discountType": {
          "$ref": "#/$defs/AmountTypeWire"
        },
        "discountHow": {
          "$ref": "#/$defs/DiscountHowWire"
        },
        "invoiceTaxable": {
          "type": "boolean"
        },
        "invoiceTaxIncluded": {
          "type": "boolean"
        },
        "invoiceTaxTable": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "billAccount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "billPrice": {
          "$ref": "#/$defs/Amount"
        },
        "billTaxable": {
          "type": "boolean"
        },
        "billTaxIncluded": {
          "type": "boolean"
        },
        "billTaxTable": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "billable": {
          "type": "boolean"
        },
        "billTo": {
          "anyOf": [
            {
              "$ref": "#/$defs/OwnerInfo"
            },
            {
              "type": "null"
            }
          ]
        },
        "payment": {
          "$ref": "#/$defs/PaymentWire"
        }
      },
      "required": [
        "guid",
        "date",
        "dateEntered",
        "description",
        "action",
        "notes",
        "quantity",
        "documentQuantity",
        "invoicePrice",
        "discount",
        "discountType",
        "discountHow",
        "invoiceTaxable",
        "invoiceTaxIncluded",
        "billPrice",
        "billTaxable",
        "billTaxIncluded",
        "billable",
        "payment"
      ],
      "description": "A line. Both sides are shown; the one its document uses is `invoice*` for customer invoices and `bill*` for\nbills and vouchers."
    },
    "InvoiceFields": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "owner": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "A customer (invoice), vendor (bill), employee (expense voucher) or job (its owner's type). On update it can\nchange only to an owner of the same type; the currency follows the owner.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Document number. On create, absent or empty takes the next number from the counter of the type\n(`gncInvoice`, `gncBill` or `gncExpVoucher`).",
          "default": null
        },
        "dateOpened": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Date opened; stored as noon local time. Defaults to today.",
          "default": null
        },
        "terms": {
          "anyOf": [
            {
              "$ref": "#/$defs/BillTermRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Billing term, by GUID or name; `null` for none. On create, absent takes the owner's term."
        },
        "billingId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The customer's reference (purchase order number) or the vendor's invoice number.",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes.",
          "default": null
        },
        "docLink": {
          "type": [
            "string",
            "null"
          ],
          "description": "A document link: a URL, a `file://` URI, or a path relative to the path head. Empty removes it. Posted\ndocuments accept it too.",
          "default": null
        },
        "billTo": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Bills and vouchers: the customer or job the costs are for; `null` for none.",
          "default": null
        },
        "chargeAmount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Vouchers: an extra amount to charge to the employee's credit card when posted.",
          "default": null
        },
        "active": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Active; `false` deactivates.",
          "default": null
        },
        "creditNote": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "A credit note (default false). Fixed once the document exists: an update may only repeat it.",
          "default": null
        }
      },
      "description": "Params of `invoice.create`. `owner` is required."
    },
    "InvoiceDetail": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid"
        },
        "id": {
          "type": "string"
        },
        "type": {
          "anyOf": [
            {
              "$ref": "#/$defs/DocumentKindWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "From the owner (through a job to its owner) and the credit-note flag."
        },
        "owner": {
          "$ref": "#/$defs/OwnerInfo"
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ]
        },
        "dateOpened": {
          "$ref": "#/$defs/Timestamp"
        },
        "posted": {
          "type": "boolean"
        },
        "datePosted": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ]
        },
        "terms": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "billingId": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "docLink": {
          "type": [
            "string",
            "null"
          ],
          "description": "The document link (`assoc_uri` slot), as stored."
        },
        "active": {
          "type": "boolean"
        },
        "billTo": {
          "anyOf": [
            {
              "$ref": "#/$defs/OwnerInfo"
            },
            {
              "type": "null"
            }
          ]
        },
        "chargeAmount": {
          "$ref": "#/$defs/Amount"
        },
        "postedAccount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "postedTransaction": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "postedLot": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "entryCount": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EntryInfo"
          },
          "description": "Its lines."
        }
      },
      "required": [
        "guid",
        "id",
        "owner",
        "dateOpened",
        "posted",
        "billingId",
        "notes",
        "active",
        "chargeAmount",
        "entryCount",
        "entries"
      ],
      "description": "A document with its lines, in GnuCash's order (date, date entered, description, action, GUID)."
    },
    "InvoiceKey": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "invoice": {
          "$ref": "#/$defs/Guid",
          "description": "The document."
        }
      },
      "required": [
        "invoice"
      ],
      "description": "Names one document."
    },
    "DueParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "kind": {
          "$ref": "#/$defs/DueKind",
          "description": "Which documents."
        },
        "daysInAdvance": {
          "type": "integer",
          "format": "int64",
          "description": "How many days ahead to look (GnuCash's `days-in-advance` preference, default 7). Negative counts as 0.",
          "default": 7
        },
        "now": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "The moment to look from. Default: now.",
          "default": null
        }
      },
      "required": [
        "kind"
      ],
      "description": "Params of `invoice.due`."
    },
    "DueKind": {
      "oneOf": [
        {
          "type": "string",
          "const": "invoices",
          "description": "Customer invoices and credit notes (\"invoices due\")."
        },
        {
          "type": "string",
          "const": "bills",
          "description": "Bills, expense vouchers and their credit notes (\"bills due\")."
        }
      ],
      "description": "Which reminder."
    },
    "DueDocument": {
      "type": "object",
      "properties": {
        "invoice": {
          "$ref": "#/$defs/Guid",
          "description": "The document."
        },
        "id": {
          "type": "string",
          "description": "Its number."
        },
        "type": {
          "type": "string",
          "description": "`Invoice`, `Bill`, `Expense` or `Credit Note`."
        },
        "company": {
          "type": "string",
          "description": "The customer, vendor or employee (a job's owner for a job's document)."
        },
        "due": {
          "$ref": "#/$defs/Timestamp",
          "description": "When it falls due."
        },
        "dueDate": {
          "$ref": "#/$defs/Date",
          "description": "The due date."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "What is still open: the balance of its lot, signed as on the A/R or A/P account."
        }
      },
      "required": [
        "invoice",
        "id",
        "type",
        "company",
        "due",
        "dueDate",
        "amount"
      ],
      "description": "A document in a reminder."
    },
    "DueDateParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "invoice": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "A document whose billing term to use. Give this or `term`.",
          "default": null
        },
        "term": {
          "anyOf": [
            {
              "$ref": "#/$defs/BillTermRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "A billing term to use, by GUID or by name. Give this or `invoice`."
        },
        "postDate": {
          "$ref": "#/$defs/Date",
          "description": "The posting date."
        }
      },
      "required": [
        "postDate"
      ],
      "description": "Params of `invoice.dueDate`."
    },
    "DueDateResult": {
      "type": "object",
      "properties": {
        "dueDate": {
          "$ref": "#/$defs/Date",
          "description": "The due date."
        },
        "due": {
          "$ref": "#/$defs/Timestamp",
          "description": "The instant GnuCash stores: the day-neutral time of the due date."
        }
      },
      "required": [
        "dueDate",
        "due"
      ],
      "description": "Result of `invoice.dueDate`."
    },
    "DuplicateParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "invoice": {
          "$ref": "#/$defs/Guid",
          "description": "The document to copy, posted or not."
        },
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The date of the copy and of each of its lines, stored at its day-neutral time. Defaults to today.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The copy's number. Absent or empty takes the next number from the counter of its kind.",
          "default": null
        }
      },
      "required": [
        "invoice"
      ],
      "description": "Params of `invoice.duplicate`."
    },
    "InvoiceListParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "anyOf": [
            {
              "$ref": "#/$defs/DocumentKindWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only this type.",
          "default": null
        },
        "owner": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only this owner's documents; a customer or vendor also matches its jobs' documents.",
          "default": null
        },
        "posted": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Only posted (`true`) or unposted (`false`) documents.",
          "default": null
        },
        "activeOnly": {
          "type": "boolean",
          "description": "Only active documents.",
          "default": false
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The exact document number.",
          "default": null
        }
      },
      "description": "Filters for `invoice.list`. All given filters must match."
    },
    "InvoiceList": {
      "type": "object",
      "properties": {
        "invoices": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InvoiceInfo"
          },
          "description": "In GUID order."
        }
      },
      "required": [
        "invoices"
      ],
      "description": "Documents."
    },
    "InvoiceInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid"
        },
        "id": {
          "type": "string"
        },
        "type": {
          "anyOf": [
            {
              "$ref": "#/$defs/DocumentKindWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "From the owner (through a job to its owner) and the credit-note flag."
        },
        "owner": {
          "$ref": "#/$defs/OwnerInfo"
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ]
        },
        "dateOpened": {
          "$ref": "#/$defs/Timestamp"
        },
        "posted": {
          "type": "boolean"
        },
        "datePosted": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ]
        },
        "terms": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "billingId": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "docLink": {
          "type": [
            "string",
            "null"
          ],
          "description": "The document link (`assoc_uri` slot), as stored."
        },
        "active": {
          "type": "boolean"
        },
        "billTo": {
          "anyOf": [
            {
              "$ref": "#/$defs/OwnerInfo"
            },
            {
              "type": "null"
            }
          ]
        },
        "chargeAmount": {
          "$ref": "#/$defs/Amount"
        },
        "postedAccount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "postedTransaction": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "postedLot": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "entryCount": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        }
      },
      "required": [
        "guid",
        "id",
        "owner",
        "dateOpened",
        "posted",
        "billingId",
        "notes",
        "active",
        "chargeAmount",
        "entryCount"
      ],
      "description": "A document, without its lines."
    },
    "PayParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "invoice": {
          "$ref": "#/$defs/Guid",
          "description": "The posted document."
        },
        "transferAccount": {
          "$ref": "#/$defs/AccountRef",
          "description": "Where the money goes or comes from."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "The payment, signed as in `payment.process`."
        },
        "exchangeRate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Units of the transfer account's commodity per unit of the A/R or A/P account's commodity, when they differ.",
          "default": null
        },
        "date": {
          "$ref": "#/$defs/Date",
          "description": "The payment date."
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Memo of both splits.",
          "default": null
        },
        "num": {
          "type": [
            "string",
            "null"
          ],
          "description": "Transaction number.",
          "default": null
        }
      },
      "required": [
        "invoice",
        "transferAccount",
        "amount",
        "date"
      ],
      "description": "Params of `invoice.pay`."
    },
    "PaymentResult": {
      "type": "object",
      "properties": {
        "transaction": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The payment transaction (none when the amount is zero)."
        },
        "paymentLot": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The lot holding what was not applied: a pre-payment."
        }
      },
      "description": "Result of a payment."
    },
    "PostParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "invoice": {
          "$ref": "#/$defs/Guid",
          "description": "The document."
        },
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The A/Receivable (customer documents) or A/Payable (bills, vouchers) account, in the document currency."
        },
        "postDate": {
          "$ref": "#/$defs/Date",
          "description": "The posting date."
        },
        "dueDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The due date. Default: from the document's billing term, else the posting date.",
          "default": null
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Memo for the A/R or A/P split and accumulated splits.",
          "default": null
        },
        "accumulateSplits": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "One split per account rather than per entry (GnuCash's default: true).",
          "default": null
        },
        "autoPay": {
          "type": "boolean",
          "description": "Then apply the owner's open pre-payments and opposite documents (GnuCash's default: false).",
          "default": false
        },
        "prices": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PriceParam"
          },
          "description": "Prices for entries posting to accounts in another commodity."
        }
      },
      "required": [
        "invoice",
        "account",
        "postDate"
      ],
      "description": "Params of `invoice.post`."
    },
    "PriceParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "commodity": {
          "$ref": "#/$defs/CommodityId",
          "description": "The commodity of an account an entry posts to."
        },
        "price": {
          "$ref": "#/$defs/Amount",
          "description": "Document-currency units per unit of `commodity`: GnuCash's invoice price, the inverse of the rate its\ndialog asks for."
        }
      },
      "required": [
        "commodity",
        "price"
      ],
      "description": "The price of one unit of a commodity in the document currency."
    },
    "PostResult": {
      "type": "object",
      "properties": {
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "The posted transaction."
        },
        "lot": {
          "$ref": "#/$defs/Guid",
          "description": "The document's lot."
        },
        "due": {
          "$ref": "#/$defs/Timestamp",
          "description": "The due instant stored on the transaction."
        }
      },
      "required": [
        "transaction",
        "lot",
        "due"
      ],
      "description": "Result of `invoice.post`."
    },
    "EntryKey": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "entry": {
          "$ref": "#/$defs/Guid",
          "description": "The line."
        }
      },
      "required": [
        "entry"
      ],
      "description": "Names one line."
    },
    "InvoiceParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "invoice": {
          "$ref": "#/$defs/Guid",
          "description": "The invoice, bill or expense voucher."
        }
      },
      "required": [
        "invoice"
      ],
      "description": "Params naming one document."
    },
    "TotalsResult": {
      "type": "object",
      "properties": {
        "subtotal": {
          "$ref": "#/$defs/Amount",
          "description": "Σ of the entries' rounded values."
        },
        "tax": {
          "$ref": "#/$defs/Amount",
          "description": "Σ of `taxes`."
        },
        "total": {
          "$ref": "#/$defs/Amount",
          "description": "Subtotal plus tax: what the document is for."
        },
        "taxes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AccountAmount"
          },
          "description": "Tax per tax account: each account's unrounded taxes summed over the entries, then rounded once."
        },
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EntryTotals"
          },
          "description": "Each entry, in document order."
        }
      },
      "required": [
        "subtotal",
        "tax",
        "total",
        "taxes",
        "entries"
      ],
      "description": "Result of `invoice.totals`. Amounts are signed as printed on the document: positive for invoices and bills,\nand for credit notes too."
    },
    "AccountAmount": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The account."
        },
        "accountName": {
          "type": "string",
          "description": "Its full name."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "The amount."
        }
      },
      "required": [
        "account",
        "accountName",
        "amount"
      ],
      "description": "An amount for one account."
    },
    "EntryTotals": {
      "type": "object",
      "properties": {
        "entry": {
          "$ref": "#/$defs/Guid",
          "description": "The entry."
        },
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "Its value (net of discount and tax), rounded to the document currency."
        },
        "discount": {
          "$ref": "#/$defs/Amount",
          "description": "Its discount, rounded."
        },
        "tax": {
          "$ref": "#/$defs/Amount",
          "description": "Its tax, rounded."
        }
      },
      "required": [
        "entry",
        "value",
        "discount",
        "tax"
      ],
      "description": "One entry's values."
    },
    "UnpostParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "invoice": {
          "$ref": "#/$defs/Guid",
          "description": "The posted document."
        },
        "resetTaxTables": {
          "type": "boolean",
          "description": "Point the entries back at the tax tables their frozen copies came from (GnuCash's dialog default: false).",
          "default": false
        }
      },
      "required": [
        "invoice"
      ],
      "description": "Params of `invoice.unpost`."
    },
    "InvoiceUpdate": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "invoice": {
          "$ref": "#/$defs/Guid",
          "description": "The document."
        },
        "owner": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "A customer (invoice), vendor (bill), employee (expense voucher) or job (its owner's type). On update it can\nchange only to an owner of the same type; the currency follows the owner.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Document number. On create, absent or empty takes the next number from the counter of the type\n(`gncInvoice`, `gncBill` or `gncExpVoucher`).",
          "default": null
        },
        "dateOpened": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Date opened; stored as noon local time. Defaults to today.",
          "default": null
        },
        "terms": {
          "anyOf": [
            {
              "$ref": "#/$defs/BillTermRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Billing term, by GUID or name; `null` for none. On create, absent takes the owner's term."
        },
        "billingId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The customer's reference (purchase order number) or the vendor's invoice number.",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes.",
          "default": null
        },
        "docLink": {
          "type": [
            "string",
            "null"
          ],
          "description": "A document link: a URL, a `file://` URI, or a path relative to the path head. Empty removes it. Posted\ndocuments accept it too.",
          "default": null
        },
        "billTo": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Bills and vouchers: the customer or job the costs are for; `null` for none.",
          "default": null
        },
        "chargeAmount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Vouchers: an extra amount to charge to the employee's credit card when posted.",
          "default": null
        },
        "active": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Active; `false` deactivates.",
          "default": null
        },
        "creditNote": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "A credit note (default false). Fixed once the document exists: an update may only repeat it.",
          "default": null
        }
      },
      "required": [
        "invoice"
      ],
      "description": "Params of `invoice.update`: the fields to change. Posted documents accept only `active`."
    },
    "UpdateLineParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "entry": {
          "$ref": "#/$defs/Guid",
          "description": "The line."
        },
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The line's date; stored as noon local time, as GnuCash's register does. Defaults to today.",
          "default": null
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description.",
          "default": null
        },
        "action": {
          "type": [
            "string",
            "null"
          ],
          "description": "Action: a free unit label such as \"Hours\".",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes.",
          "default": null
        },
        "quantity": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Quantity, as printed on the document; stored negated on a credit note.",
          "default": null
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "The income account (invoices) or expense account (bills, vouchers); `null` for none.",
          "default": null
        },
        "price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Unit price. A new line on a job's document defaults to the job's rate.",
          "default": null
        },
        "discount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Invoices only: the discount, a percentage or an amount. Defaults to the customer's discount.",
          "default": null
        },
        "discountType": {
          "anyOf": [
            {
              "$ref": "#/$defs/AmountTypeWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Invoices only: whether the discount is a percentage or an amount.",
          "default": null
        },
        "discountHow": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiscountHowWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Invoices only: when the discount applies relative to tax.",
          "default": null
        },
        "taxable": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Invoices and bills: the line is taxed. Defaults to true when a tax table applies.",
          "default": null
        },
        "taxIncluded": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Invoices and bills: the price includes tax. Defaults from the customer's or vendor's setting.",
          "default": null
        },
        "taxTable": {
          "anyOf": [
            {
              "$ref": "#/$defs/TaxTableRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Invoices and bills: the tax table, by GUID or name; `null` for none. Defaults to the owner's table when\nit overrides, else the book's default."
        },
        "billable": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Bills and vouchers: the cost is to be invoiced on to `billTo`.",
          "default": null
        },
        "billTo": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Bills and vouchers: the customer or job to invoice the cost to; `null` for none.",
          "default": null
        },
        "payment": {
          "anyOf": [
            {
              "$ref": "#/$defs/PaymentWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Vouchers only: cash (the employee paid) or card (the company card paid).",
          "default": null
        }
      },
      "required": [
        "entry"
      ],
      "description": "Params of `invoice.updateEntry` and `order.updateEntry`: the fields to change."
    },
    "JobFields": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Job name.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Job number. On create, absent or empty takes the next number from the book's `gncJob` counter.",
          "default": null
        },
        "owner": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The customer or vendor the job is for. It cannot change once the job has documents.",
          "default": null
        },
        "reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "Reference (GnuCash's job description).",
          "default": null
        },
        "rate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Rate: the default price of new lines on the job's documents. Zero removes it.",
          "default": null
        },
        "active": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Active; `false` deactivates.",
          "default": null
        }
      },
      "description": "Params of `job.create`. `name` and `owner` are required."
    },
    "JobInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "owner": {
          "$ref": "#/$defs/OwnerInfo"
        },
        "reference": {
          "type": "string"
        },
        "rate": {
          "$ref": "#/$defs/Amount"
        },
        "active": {
          "type": "boolean"
        }
      },
      "required": [
        "guid",
        "id",
        "name",
        "owner",
        "reference",
        "rate",
        "active"
      ],
      "description": "A job."
    },
    "JobKey": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "job": {
          "$ref": "#/$defs/Guid",
          "description": "The job."
        }
      },
      "required": [
        "job"
      ],
      "description": "Names one job."
    },
    "JobListParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "owner": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only this customer's or vendor's jobs.",
          "default": null
        },
        "activeOnly": {
          "type": "boolean",
          "description": "Only active jobs.",
          "default": false
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Case-insensitive part of the name.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The exact ID.",
          "default": null
        }
      },
      "description": "Filters for `job.list`. All given filters must match."
    },
    "JobList": {
      "type": "object",
      "properties": {
        "jobs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/JobInfo"
          },
          "description": "In GUID order."
        }
      },
      "required": [
        "jobs"
      ],
      "description": "Jobs."
    },
    "JobUpdate": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "job": {
          "$ref": "#/$defs/Guid",
          "description": "The job."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Job name.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Job number. On create, absent or empty takes the next number from the book's `gncJob` counter.",
          "default": null
        },
        "owner": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The customer or vendor the job is for. It cannot change once the job has documents.",
          "default": null
        },
        "reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "Reference (GnuCash's job description).",
          "default": null
        },
        "rate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Rate: the default price of new lines on the job's documents. Zero removes it.",
          "default": null
        },
        "active": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Active; `false` deactivates.",
          "default": null
        }
      },
      "required": [
        "job"
      ],
      "description": "Params of `job.update`: the fields to change."
    },
    "AssignParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "split": {
          "$ref": "#/$defs/Guid",
          "description": "The split."
        },
        "lot": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The lot; without it, FIFO chooses and opens lots as needed.",
          "default": null
        }
      },
      "required": [
        "split"
      ],
      "description": "Params of `lot.assignSplit`."
    },
    "AssignResult": {
      "type": "object",
      "properties": {
        "pieces": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Piece"
          },
          "description": "Each piece and its lot."
        },
        "rest": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "When the split was cut to close the chosen lot: the new split holding the rest, in no lot."
        },
        "newLots": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Lots FIFO opened."
        }
      },
      "required": [
        "pieces",
        "newLots"
      ],
      "description": "The result of `lot.assignSplit`."
    },
    "Piece": {
      "type": "object",
      "properties": {
        "split": {
          "$ref": "#/$defs/Guid",
          "description": "The split (the original, or a piece cut from it)."
        },
        "lot": {
          "$ref": "#/$defs/Guid",
          "description": "The lot."
        }
      },
      "required": [
        "split",
        "lot"
      ],
      "description": "A split and the lot it joined."
    },
    "ComputeGainsParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "lot": {
          "$ref": "#/$defs/Guid",
          "description": "The lot."
        },
        "gainsAccount": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "The account new gains transactions credit, used when its commodity is the transaction currency; by default\nthe lot account's gains account (`Orphaned Gains-<CUR>` unless one is set).",
          "default": null
        }
      },
      "required": [
        "lot"
      ],
      "description": "Params of `lot.computeGains`."
    },
    "ScrubResult2": {
      "type": "object",
      "properties": {
        "lotsCreated": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Lots made."
        },
        "lotsDeleted": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Lots deleted."
        },
        "transactionsCreated": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Transactions made: gains transactions."
        },
        "transactionsChanged": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Transactions changed: cut or merged splits, updated gains."
        },
        "transactionsDeleted": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Transactions deleted: gains transactions of merged splits."
        },
        "accountsCreated": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Accounts made: `Orphaned Gains-<CUR>`."
        }
      },
      "required": [
        "lotsCreated",
        "lotsDeleted",
        "transactionsCreated",
        "transactionsChanged",
        "transactionsDeleted",
        "accountsCreated"
      ],
      "description": "What a scrub or gains computation changed."
    },
    "CreateParams5": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account to hold the lot."
        },
        "title": {
          "type": [
            "string",
            "null"
          ],
          "description": "Title; by default `Lot <n>`.",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes.",
          "default": null
        }
      },
      "required": [
        "account"
      ],
      "description": "Params of `lot.create`."
    },
    "LotInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The lot."
        },
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "Its account."
        },
        "title": {
          "type": [
            "string",
            "null"
          ],
          "description": "Title."
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes."
        },
        "invoice": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The invoice the lot belongs to (the viewer's type `I`)."
        },
        "closed": {
          "type": "boolean",
          "description": "The lot has splits and its balance is zero."
        },
        "openDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Posted date of its earliest split."
        },
        "closeDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Posted date of its latest split, when closed."
        },
        "balance": {
          "$ref": "#/$defs/Amount",
          "description": "Sum of its splits' amounts, restated after stock splits."
        },
        "gainsCurrency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "Currency of its realised gains."
        },
        "realizedGains": {
          "$ref": "#/$defs/Amount",
          "description": "Realised gains: the values of its gains splits in that currency."
        },
        "splitCount": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "How many splits it holds."
        }
      },
      "required": [
        "guid",
        "account",
        "closed",
        "balance",
        "realizedGains",
        "splitCount"
      ],
      "description": "A lot, as the lot viewer lists it."
    },
    "DeleteParams4": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "lot": {
          "$ref": "#/$defs/Guid",
          "description": "The lot."
        },
        "releaseSplits": {
          "type": "boolean",
          "description": "Take the lot's splits out of it first; without this, a lot with splits is refused.",
          "default": false
        }
      },
      "required": [
        "lot"
      ],
      "description": "Params of `lot.delete`."
    },
    "DeleteResult5": {
      "type": "object",
      "properties": {
        "releasedSplits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Splits taken out of the lot."
        }
      },
      "required": [
        "releasedSplits"
      ],
      "description": "The result of `lot.delete`."
    },
    "FreeSplitsParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account."
        },
        "lot": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "A lot of the account to compute each split's gain against.",
          "default": null
        }
      },
      "required": [
        "account"
      ],
      "description": "Params of `lot.freeSplits`."
    },
    "LotSplitInfo": {
      "type": "object",
      "properties": {
        "split": {
          "$ref": "#/$defs/Guid",
          "description": "The split."
        },
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "Its transaction."
        },
        "datePosted": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The local date of the transaction's posted time, as the lot viewer shows it."
        },
        "num": {
          "type": [
            "string",
            "null"
          ],
          "description": "The transaction's number."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The transaction's description."
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Memo."
        },
        "action": {
          "type": [
            "string",
            "null"
          ],
          "description": "Action."
        },
        "number": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Number the lot viewer shows: the action when the book's num field source is on, else the transaction's\nnumber."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "Amount (shares)."
        },
        "adjustedAmount": {
          "$ref": "#/$defs/Amount",
          "description": "Amount restated in units after later stock splits."
        },
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "Value, in the transaction currency."
        },
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "The transaction currency."
        },
        "gain": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Gain recorded for the split (in a lot), or the gain it would realise against the chosen lot (free splits)."
        },
        "kind": {
          "type": "string",
          "description": "`normal`, `gains` (a gains transaction's split; the viewer hides these) or `stockSplit` (hidden too)."
        }
      },
      "required": [
        "split",
        "transaction",
        "amount",
        "adjustedAmount",
        "value",
        "currency",
        "kind"
      ],
      "description": "A split, as the lot viewer lists it."
    },
    "LotParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "lot": {
          "$ref": "#/$defs/Guid",
          "description": "The lot."
        }
      },
      "required": [
        "lot"
      ],
      "description": "Params naming a lot."
    },
    "LotDetail": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The lot."
        },
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "Its account."
        },
        "title": {
          "type": [
            "string",
            "null"
          ],
          "description": "Title."
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes."
        },
        "invoice": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The invoice the lot belongs to (the viewer's type `I`)."
        },
        "closed": {
          "type": "boolean",
          "description": "The lot has splits and its balance is zero."
        },
        "openDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Posted date of its earliest split."
        },
        "closeDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Posted date of its latest split, when closed."
        },
        "balance": {
          "$ref": "#/$defs/Amount",
          "description": "Sum of its splits' amounts, restated after stock splits."
        },
        "gainsCurrency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "Currency of its realised gains."
        },
        "realizedGains": {
          "$ref": "#/$defs/Amount",
          "description": "Realised gains: the values of its gains splits in that currency."
        },
        "splitCount": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "How many splits it holds."
        },
        "splits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LotSplitInfo"
          },
          "description": "Its splits, earliest first."
        }
      },
      "required": [
        "guid",
        "account",
        "closed",
        "balance",
        "realizedGains",
        "splitCount",
        "splits"
      ],
      "description": "The result of `lot.get`."
    },
    "ListParams5": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account."
        },
        "state": {
          "$ref": "#/$defs/LotState",
          "description": "`all` (default), `open` or `closed`."
        }
      },
      "required": [
        "account"
      ],
      "description": "Params of `lot.list`."
    },
    "LotState": {
      "oneOf": [
        {
          "type": "string",
          "const": "all",
          "description": "Every lot."
        },
        {
          "type": "string",
          "const": "open",
          "description": "Lots that are not closed."
        },
        {
          "type": "string",
          "const": "closed",
          "description": "Lots whose balance is zero."
        }
      ],
      "description": "Which lots to list."
    },
    "RemoveParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "split": {
          "$ref": "#/$defs/Guid",
          "description": "The split."
        }
      },
      "required": [
        "split"
      ],
      "description": "Params of `lot.removeSplit`."
    },
    "RemoveResult": {
      "type": "object",
      "properties": {
        "lotDeleted": {
          "type": "boolean",
          "description": "The lot was left empty and deleted."
        }
      },
      "required": [
        "lotDeleted"
      ],
      "description": "The result of `lot.removeSplit`."
    },
    "ScrubAccountParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account."
        },
        "subaccounts": {
          "type": "boolean",
          "description": "Scrub every sub-account first, as GnuCash's tree scrub does.",
          "default": false
        }
      },
      "required": [
        "account"
      ],
      "description": "Params of `lot.scrubAccount`."
    },
    "UpdateParams4": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "lot": {
          "$ref": "#/$defs/Guid",
          "description": "The lot."
        },
        "title": {
          "type": [
            "string",
            "null"
          ],
          "description": "New title; an empty string removes it.",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "New notes; an empty string removes them.",
          "default": null
        }
      },
      "required": [
        "lot"
      ],
      "description": "Params of `lot.update`."
    },
    "AddOrderLineParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "order": {
          "$ref": "#/$defs/Guid",
          "description": "The open order."
        },
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The line's date; stored as noon local time, as GnuCash's register does. Defaults to today.",
          "default": null
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description.",
          "default": null
        },
        "action": {
          "type": [
            "string",
            "null"
          ],
          "description": "Action: a free unit label such as \"Hours\".",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes.",
          "default": null
        },
        "quantity": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Quantity, as printed on the document; stored negated on a credit note.",
          "default": null
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "The income account (invoices) or expense account (bills, vouchers); `null` for none.",
          "default": null
        },
        "price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Unit price. A new line on a job's document defaults to the job's rate.",
          "default": null
        },
        "discount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Invoices only: the discount, a percentage or an amount. Defaults to the customer's discount.",
          "default": null
        },
        "discountType": {
          "anyOf": [
            {
              "$ref": "#/$defs/AmountTypeWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Invoices only: whether the discount is a percentage or an amount.",
          "default": null
        },
        "discountHow": {
          "anyOf": [
            {
              "$ref": "#/$defs/DiscountHowWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Invoices only: when the discount applies relative to tax.",
          "default": null
        },
        "taxable": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Invoices and bills: the line is taxed. Defaults to true when a tax table applies.",
          "default": null
        },
        "taxIncluded": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Invoices and bills: the price includes tax. Defaults from the customer's or vendor's setting.",
          "default": null
        },
        "taxTable": {
          "anyOf": [
            {
              "$ref": "#/$defs/TaxTableRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Invoices and bills: the tax table, by GUID or name; `null` for none. Defaults to the owner's table when\nit overrides, else the book's default."
        },
        "billable": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Bills and vouchers: the cost is to be invoiced on to `billTo`.",
          "default": null
        },
        "billTo": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Bills and vouchers: the customer or job to invoice the cost to; `null` for none.",
          "default": null
        },
        "payment": {
          "anyOf": [
            {
              "$ref": "#/$defs/PaymentWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Vouchers only: cash (the employee paid) or card (the company card paid).",
          "default": null
        }
      },
      "required": [
        "order"
      ],
      "description": "Params of `order.addEntry`."
    },
    "OrderCloseParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "order": {
          "$ref": "#/$defs/Guid",
          "description": "The open order."
        },
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "When it closed; defaults to now, as GnuCash's order dialog does.",
          "default": null
        }
      },
      "required": [
        "order"
      ],
      "description": "Params of `order.close`."
    },
    "OrderDetail": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid"
        },
        "id": {
          "type": "string"
        },
        "owner": {
          "$ref": "#/$defs/OwnerInfo"
        },
        "dateOpened": {
          "$ref": "#/$defs/Timestamp"
        },
        "closed": {
          "type": "boolean"
        },
        "dateClosed": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ]
        },
        "notes": {
          "type": "string"
        },
        "reference": {
          "type": "string"
        },
        "active": {
          "type": "boolean"
        },
        "entryCount": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        },
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EntryInfo"
          },
          "description": "Its lines."
        }
      },
      "required": [
        "guid",
        "id",
        "owner",
        "dateOpened",
        "closed",
        "notes",
        "reference",
        "active",
        "entryCount",
        "entries"
      ],
      "description": "An order with its lines, in GnuCash's order."
    },
    "OrderFields": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "owner": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "A customer, vendor or job. It can change only while the order has no lines.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Order number. On create, absent or empty takes the next number from the book's `gncOrder` counter.",
          "default": null
        },
        "dateOpened": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Date opened; stored as noon local time. Defaults to today.",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes.",
          "default": null
        },
        "reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "Reference.",
          "default": null
        },
        "active": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Active; `false` deactivates.",
          "default": null
        }
      },
      "description": "Params of `order.create`. `owner` is required."
    },
    "OrderKey": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "order": {
          "$ref": "#/$defs/Guid",
          "description": "The order."
        }
      },
      "required": [
        "order"
      ],
      "description": "Names one order."
    },
    "OrderListParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "owner": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only this owner's orders; a customer or vendor also matches its jobs' orders.",
          "default": null
        },
        "closed": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Only open (`false`) or closed (`true`) orders.",
          "default": null
        },
        "activeOnly": {
          "type": "boolean",
          "description": "Only active orders.",
          "default": false
        }
      },
      "description": "Filters for `order.list`."
    },
    "OrderList": {
      "type": "object",
      "properties": {
        "orders": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OrderInfo"
          },
          "description": "In GUID order."
        }
      },
      "required": [
        "orders"
      ],
      "description": "Orders."
    },
    "OrderInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid"
        },
        "id": {
          "type": "string"
        },
        "owner": {
          "$ref": "#/$defs/OwnerInfo"
        },
        "dateOpened": {
          "$ref": "#/$defs/Timestamp"
        },
        "closed": {
          "type": "boolean"
        },
        "dateClosed": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ]
        },
        "notes": {
          "type": "string"
        },
        "reference": {
          "type": "string"
        },
        "active": {
          "type": "boolean"
        },
        "entryCount": {
          "type": "integer",
          "format": "uint",
          "minimum": 0
        }
      },
      "required": [
        "guid",
        "id",
        "owner",
        "dateOpened",
        "closed",
        "notes",
        "reference",
        "active",
        "entryCount"
      ],
      "description": "An order, without its lines."
    },
    "OrderUpdate": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "order": {
          "$ref": "#/$defs/Guid",
          "description": "The order."
        },
        "owner": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "A customer, vendor or job. It can change only while the order has no lines.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Order number. On create, absent or empty takes the next number from the book's `gncOrder` counter.",
          "default": null
        },
        "dateOpened": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Date opened; stored as noon local time. Defaults to today.",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes.",
          "default": null
        },
        "reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "Reference.",
          "default": null
        },
        "active": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Active; `false` deactivates.",
          "default": null
        }
      },
      "required": [
        "order"
      ],
      "description": "Params of `order.update`: the fields to change."
    },
    "FromTransactionParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "The transaction."
        },
        "owner": {
          "anyOf": [
            {
              "$ref": "#/$defs/OwnerParam"
            },
            {
              "type": "null"
            }
          ],
          "description": "Who pays or is paid. Default: the owner of the document or pre-payment its A/R or A/P split is in."
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "The A/Receivable or A/Payable account. Default: that of the transaction's A/R or A/P splits.",
          "default": null
        },
        "transferSplit": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The split to keep as the payment's transfer split. Default: the only split in a bank, cash, asset, liability\nor equity account.",
          "default": null
        },
        "amount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "The payment, signed as in `payment.process`. Default: the transfer split's amount; needed when the transfer\nand A/R or A/P commodities differ.",
          "default": null
        },
        "exchangeRate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Units of the transfer account's commodity per unit of the A/R or A/P account's commodity, when they differ.",
          "default": null
        },
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The payment date. Default: the transaction's posted date.",
          "default": null
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Memo of the A/R or A/P split. Default: the transaction's description.",
          "default": null
        },
        "num": {
          "type": [
            "string",
            "null"
          ],
          "description": "Transaction number. Default: the transaction's.",
          "default": null
        },
        "applyTo": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Documents (invoice GUIDs) and pre-payment lots to apply it to. Default: the documents and pre-payments the\ntransaction is already applied to that would stay open without it.",
          "default": null
        },
        "autoPay": {
          "type": "boolean",
          "description": "With nothing to apply to: apply to all the owner's open documents and pre-payments.",
          "default": false
        }
      },
      "required": [
        "transaction"
      ],
      "description": "Params of `payment.fromTransaction`. Absent params take the payment dialog's defaults."
    },
    "OwnerParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "$ref": "#/$defs/OwnerType",
          "description": "Which kind."
        },
        "id": {
          "$ref": "#/$defs/Guid",
          "description": "Its GUID."
        }
      },
      "required": [
        "type",
        "id"
      ],
      "description": "An owner: a customer, vendor, employee or job."
    },
    "OwnerType": {
      "oneOf": [
        {
          "type": "string",
          "const": "customer",
          "description": "A customer."
        },
        {
          "type": "string",
          "const": "vendor",
          "description": "A vendor."
        },
        {
          "type": "string",
          "const": "employee",
          "description": "An employee."
        },
        {
          "type": "string",
          "const": "job",
          "description": "A job (of a customer or vendor)."
        }
      ],
      "description": "A kind of owner."
    },
    "OpenItemsParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "owner": {
          "$ref": "#/$defs/OwnerParam",
          "description": "A customer, vendor or employee."
        },
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The A/Receivable or A/Payable account."
        }
      },
      "required": [
        "owner",
        "account"
      ],
      "description": "Params of `payment.openItems`."
    },
    "OpenItems": {
      "type": "object",
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OpenItem"
          },
          "description": "In the order GnuCash's payment dialog hands chosen items to the engine."
        }
      },
      "required": [
        "items"
      ],
      "description": "Result of `payment.openItems`."
    },
    "OpenItem": {
      "type": "object",
      "properties": {
        "lot": {
          "$ref": "#/$defs/Guid",
          "description": "The lot: what `applyTo` takes."
        },
        "invoice": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The document; null for a pre-payment."
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The document's number; null for a pre-payment."
        },
        "type": {
          "type": "string",
          "description": "`Invoice`, `Bill`, `Expense`, `Credit Note` or `Pre-Payment`."
        },
        "date": {
          "$ref": "#/$defs/Timestamp",
          "description": "The document's posted date, or the date of the pre-payment's latest split."
        },
        "sortDate": {
          "$ref": "#/$defs/Timestamp",
          "description": "What the payment dialog orders by: the document's due date, or the date of the pre-payment's earliest split."
        },
        "balance": {
          "$ref": "#/$defs/Amount",
          "description": "The lot's balance, signed as on the account: positive is a debit."
        }
      },
      "required": [
        "lot",
        "type",
        "date",
        "sortDate",
        "balance"
      ],
      "description": "An open document or pre-payment."
    },
    "ProcessParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "owner": {
          "$ref": "#/$defs/OwnerParam",
          "description": "Who pays or is paid."
        },
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The A/Receivable or A/Payable account the documents are posted to."
        },
        "transferAccount": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Where the money goes (customer payments) or comes from (vendor and employee payments). Needed unless the\namount is zero.",
          "default": null
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "The payment, in the A/R or A/P account's commodity: positive when a customer pays or when a vendor or employee\nis paid; negative for a refund. Zero links the chosen documents with each other only."
        },
        "exchangeRate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Units of the transfer account's commodity per unit of the A/R or A/P account's commodity, when they differ.",
          "default": null
        },
        "date": {
          "$ref": "#/$defs/Date",
          "description": "The payment date."
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Memo of both splits.",
          "default": null
        },
        "num": {
          "type": [
            "string",
            "null"
          ],
          "description": "Transaction number (a check number).",
          "default": null
        },
        "applyTo": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Documents (invoice GUIDs) and pre-payment lots (lot GUIDs) to apply the payment to, in order.",
          "default": []
        },
        "autoPay": {
          "type": "boolean",
          "description": "With no `applyTo`: apply to all the owner's open documents and pre-payments (GnuCash's preference, default false).",
          "default": false
        }
      },
      "required": [
        "owner",
        "account",
        "amount",
        "date"
      ],
      "description": "Params of `payment.process`."
    },
    "DatesParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The day the period must contain; by default today in the local time zone.",
          "default": null
        },
        "start": {
          "type": [
            "string",
            "null"
          ],
          "description": "Start, instead of the configured one.",
          "default": null
        },
        "end": {
          "type": [
            "string",
            "null"
          ],
          "description": "End, instead of the configured one.",
          "default": null
        },
        "fiscalYearEnd": {
          "type": [
            "string",
            "null"
          ],
          "description": "Fiscal year end, `MM-DD`, instead of the configured one.",
          "default": null
        }
      },
      "description": "Params of `period.dates`. The optional fields override the configured setting for this call only."
    },
    "DatesResult": {
      "type": "object",
      "properties": {
        "today": {
          "$ref": "#/$defs/Date",
          "description": "The day used as today."
        },
        "start": {
          "$ref": "#/$defs/Date",
          "description": "First day of the period (GnuCash starts it at 00:00:00 local time)."
        },
        "end": {
          "$ref": "#/$defs/Date",
          "description": "Last day of the period (GnuCash ends it at 23:59:59 local time)."
        },
        "startTime": {
          "$ref": "#/$defs/Timestamp",
          "description": "The period's first instant: local 00:00:00 on `start`."
        },
        "endTime": {
          "$ref": "#/$defs/Timestamp",
          "description": "The period's last instant: local 23:59:59 on `end`."
        }
      },
      "required": [
        "today",
        "start",
        "end",
        "startTime",
        "endTime"
      ],
      "description": "The result of `period.dates`."
    },
    "PeriodInfo2": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "description": "Start: a relative choice (`today`, `month`, `previous-month`, `quarter`, `previous-quarter`, `year`,\n`previous-year`, `fiscal-year`, `previous-fiscal-year`) or a `YYYY-MM-DD` date."
        },
        "end": {
          "type": "string",
          "description": "End, in the same form; a relative choice means the period's last day."
        },
        "fiscalYearEnd": {
          "type": [
            "string",
            "null"
          ],
          "description": "The fiscal year end in use (`MM-DD`), if any."
        },
        "fiscalYearEndSource": {
          "type": [
            "string",
            "null"
          ],
          "description": "Where it comes from: `config`, or `book` (the open book's `fy_end` slot)."
        },
        "configFile": {
          "type": [
            "string",
            "null"
          ],
          "description": "The configuration file, if the setting is kept in one; otherwise it lasts as long as the server."
        },
        "choices": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Every relative choice, in GnuCash's order."
        }
      },
      "required": [
        "start",
        "end",
        "choices"
      ],
      "description": "The accounting period setting."
    },
    "SetParams4": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "start": {
          "type": [
            "string",
            "null"
          ],
          "description": "Start: a relative choice or a `YYYY-MM-DD` date.",
          "default": null
        },
        "end": {
          "type": [
            "string",
            "null"
          ],
          "description": "End: a relative choice or a `YYYY-MM-DD` date.",
          "default": null
        },
        "fiscalYearEnd": {
          "type": [
            "string",
            "null"
          ],
          "description": "Fiscal year end, `MM-DD`, for the fiscal-year choices.",
          "default": null
        },
        "clearFiscalYearEnd": {
          "type": "boolean",
          "description": "Remove the configured fiscal year end (the open book's `fy_end` slot, if any, then applies).",
          "default": false
        }
      },
      "description": "Params of `period.set`. Absent fields keep their setting."
    },
    "AddParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "commodity": {
          "$ref": "#/$defs/CommodityId",
          "description": "The commodity priced."
        },
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "The currency (or commodity) the value is in."
        },
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "Units of `currency` per unit of `commodity`; stored exactly as given."
        },
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The day it applies, stored at its day-neutral time as the price editor does. Give this or `time`.",
          "default": null
        },
        "time": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "The exact time it applies. Give this or `date`.",
          "default": null
        },
        "source": {
          "type": [
            "string",
            "null"
          ],
          "description": "One of GnuCash's price sources; default `user:price-editor`.",
          "default": null
        },
        "type": {
          "type": [
            "string",
            "null"
          ],
          "description": "Its type, such as `last`, `bid`, `ask`, `nav` or `unknown`.",
          "default": null
        }
      },
      "required": [
        "commodity",
        "currency",
        "value"
      ],
      "description": "Params of `price.add`."
    },
    "AddOutcome": {
      "type": "object",
      "properties": {
        "outcome": {
          "type": "string",
          "description": "`added`, `replaced` (added, removing a same-day price), `rejected` (a same-day price with a better source is\nkept) or `duplicate` (another identical same-day price is still there once `replaced` is removed; nothing added)."
        },
        "price": {
          "anyOf": [
            {
              "$ref": "#/$defs/PriceInfo"
            },
            {
              "type": "null"
            }
          ],
          "description": "The price added."
        },
        "replaced": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The same-day price removed."
        },
        "existing": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The price that made this one rejected or a duplicate."
        }
      },
      "required": [
        "outcome"
      ],
      "description": "What `price.add` did."
    },
    "PriceInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "Identity."
        },
        "commodity": {
          "$ref": "#/$defs/CommodityId",
          "description": "The commodity priced."
        },
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "The currency (or commodity) the value is in."
        },
        "time": {
          "$ref": "#/$defs/Timestamp",
          "description": "When the price applies."
        },
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The local day of `time`, which the same-day rules use."
        },
        "source": {
          "type": [
            "string",
            "null"
          ],
          "description": "Where it came from, such as `user:price-editor` or `Finance::Quote`; kept as read even when GnuCash does not\nknow it."
        },
        "type": {
          "type": [
            "string",
            "null"
          ],
          "description": "Its type, such as `last`, `bid`, `ask`, `nav`, `transaction` or `unknown`."
        },
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "Units of `currency` per unit of `commodity`, exactly as stored."
        }
      },
      "required": [
        "guid",
        "commodity",
        "currency",
        "time",
        "value"
      ],
      "description": "A price."
    },
    "PriceParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "price": {
          "$ref": "#/$defs/Guid",
          "description": "The price's GUID."
        }
      },
      "required": [
        "price"
      ],
      "description": "Params naming one price."
    },
    "FetchParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "commodities": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/CommodityId"
          },
          "description": "Fetch these, whatever their quote flag; each needs a quote source (a currency has `currency`). Default: every\ncommodity with quotes on and a quote source.",
          "default": null
        },
        "namespace": {
          "type": [
            "string",
            "null"
          ],
          "description": "Only commodities in namespaces matching this pattern, case-insensitive and unanchored, as\n`gnucash-cli --namespace`. Not with `commodities`.",
          "default": null
        }
      },
      "description": "Params of `price.fetchQuotes`."
    },
    "FetchStarted": {
      "type": "object",
      "properties": {
        "fetch": {
          "type": "string",
          "description": "The Quote fetch's ID, for `price.fetchStatus`."
        },
        "commodities": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CommodityId"
          },
          "description": "The commodities it covers, in the order fetched."
        }
      },
      "required": [
        "fetch",
        "commodities"
      ],
      "description": "What `price.fetchQuotes` started."
    },
    "StatusParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "fetch": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Quote fetch; default the latest.",
          "default": null
        }
      },
      "description": "Params of `price.fetchStatus`."
    },
    "FetchStatus": {
      "type": "object",
      "properties": {
        "fetch": {
          "type": "string",
          "description": "Its ID."
        },
        "state": {
          "$ref": "#/$defs/FetchState",
          "description": "`running` or `finished`."
        },
        "started": {
          "$ref": "#/$defs/Timestamp",
          "description": "When it started."
        },
        "finished": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "When its prices were stored; null while running."
        },
        "commodities": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CommodityFetch"
          },
          "description": "One entry per commodity, in the order fetched."
        },
        "stored": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint",
          "minimum": 0,
          "description": "Commodities whose price went through `price.add`'s rules, once finished."
        },
        "failed": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint",
          "minimum": 0,
          "description": "Commodities with no price, once finished."
        }
      },
      "required": [
        "fetch",
        "state",
        "started",
        "commodities"
      ],
      "description": "A Quote fetch."
    },
    "FetchState": {
      "oneOf": [
        {
          "type": "string",
          "const": "running",
          "description": "Its requests are running, or its prices are not yet stored."
        },
        {
          "type": "string",
          "const": "finished",
          "description": "Its prices are stored."
        }
      ],
      "description": "Where a Quote fetch is."
    },
    "CommodityFetch": {
      "type": "object",
      "properties": {
        "commodity": {
          "$ref": "#/$defs/CommodityId",
          "description": "The commodity."
        },
        "source": {
          "type": "string",
          "description": "Its quote source (`currency` for a currency)."
        },
        "state": {
          "$ref": "#/$defs/ItemState",
          "description": "`pending`, `fetched`, `stored` or `failed`."
        },
        "service": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Quote service that answered, or the last one tried."
        },
        "outcome": {
          "type": [
            "string",
            "null"
          ],
          "description": "Once stored, `price.add`'s outcome: `added`, `replaced`, `duplicate` or `rejected`."
        },
        "price": {
          "anyOf": [
            {
              "$ref": "#/$defs/PriceInfo"
            },
            {
              "type": "null"
            }
          ],
          "description": "The price added."
        },
        "existing": {
          "anyOf": [
            {
              "$ref": "#/$defs/PriceInfo"
            },
            {
              "type": "null"
            }
          ],
          "description": "The same-day price that kept its place, or was replaced."
        },
        "reason": {
          "type": [
            "string",
            "null"
          ],
          "description": "Once failed: `no-result`, `quote-failed`, `no-currency`, `unknown-currency`, `no-price`,\n`price-parse-failure` (GnuCash's), or `unsupported-source`, `service-error`, `timeout`, `not-found`."
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "The detail, such as the service's own message; never holds a key."
        }
      },
      "required": [
        "commodity",
        "source",
        "state"
      ],
      "description": "One commodity of a Quote fetch."
    },
    "ItemState": {
      "oneOf": [
        {
          "type": "string",
          "const": "pending",
          "description": "Its requests are running."
        },
        {
          "type": "string",
          "const": "fetched",
          "description": "A service answered; the price waits for the Mutation."
        },
        {
          "type": "string",
          "const": "stored",
          "description": "`price.add`'s rules ran on its price: see `outcome`."
        },
        {
          "type": "string",
          "const": "failed",
          "description": "No price: see `reason`."
        }
      ],
      "description": "Where one commodity of a Quote fetch is."
    },
    "PairParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "commodity": {
          "$ref": "#/$defs/CommodityId",
          "description": "The commodity priced."
        },
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "The currency wanted."
        }
      },
      "required": [
        "commodity",
        "currency"
      ],
      "description": "Params of `price.latest`."
    },
    "FoundPrice": {
      "type": "object",
      "properties": {
        "price": {
          "$ref": "#/$defs/PriceInfo",
          "description": "The price as stored."
        },
        "reversed": {
          "type": "boolean",
          "description": "The price is of `currency` in `commodity`, the other way round from the request."
        },
        "rate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Units of the requested currency per unit of the requested commodity: the value, or its exact inverse when\nreversed (null if that value is zero)."
        }
      },
      "required": [
        "price",
        "reversed"
      ],
      "description": "A price found by a lookup, which looks in both directions."
    },
    "ListParams6": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "commodity": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only prices of this commodity.",
          "default": null
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only prices in this currency (needs `commodity`).",
          "default": null
        },
        "bothDirections": {
          "type": "boolean",
          "description": "Also prices of `currency` in `commodity` (needs both).",
          "default": false
        },
        "from": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only prices from local 00:00:00 on this day.",
          "default": null
        },
        "to": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only prices up to local 23:59:59 on this day.",
          "default": null
        }
      },
      "description": "Params of `price.list`."
    },
    "NearestParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "commodity": {
          "$ref": "#/$defs/CommodityId",
          "description": "The commodity priced."
        },
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "The currency wanted."
        },
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "A day, meaning its neutral time (10:59 UTC from UTC−10 to UTC+13). Give this or `time`.",
          "default": null
        },
        "time": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "An exact time. Give this or `date`.",
          "default": null
        },
        "mode": {
          "$ref": "#/$defs/NearestMode",
          "description": "`nearest` (default), `before` or `sameDay`."
        }
      },
      "required": [
        "commodity",
        "currency"
      ],
      "description": "Params of `price.nearest`."
    },
    "NearestMode": {
      "oneOf": [
        {
          "type": "string",
          "const": "nearest",
          "description": "The closer of the prices either side of the time; a tie goes to the older."
        },
        {
          "type": "string",
          "const": "before",
          "description": "The newest price at or before the time."
        },
        {
          "type": "string",
          "const": "sameDay",
          "description": "The nearest price on the same local day, if any."
        }
      ],
      "description": "How `price.nearest` chooses."
    },
    "RemoveOldParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "commodities": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CommodityId"
          },
          "description": "The commodities whose prices (in any currency) are considered; at least one."
        },
        "before": {
          "$ref": "#/$defs/Date",
          "description": "Only prices before this day's neutral time are considered."
        },
        "sources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RemoveSource"
          },
          "description": "Which sources may be removed; default `[\"fetched\"]`."
        },
        "keep": {
          "$ref": "#/$defs/KeepOption",
          "description": "What to keep; default `lastOfWeek`."
        },
        "fiscalYearEnd": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The last day of a fiscal year, for quarters and periods; default 31 December of the current year.",
          "default": null
        }
      },
      "required": [
        "commodities",
        "before"
      ],
      "description": "Params of `price.removeOld`."
    },
    "RemoveSource": {
      "oneOf": [
        {
          "type": "string",
          "const": "fetched",
          "description": "Prices fetched online (`Finance::Quote`)."
        },
        {
          "type": "string",
          "const": "user",
          "description": "Prices entered as `user:price`."
        },
        {
          "type": "string",
          "const": "app",
          "description": "Every other source, including the price editor's."
        }
      ],
      "description": "Which price sources `price.removeOld` may remove."
    },
    "KeepOption": {
      "oneOf": [
        {
          "type": "string",
          "const": "none",
          "description": "None: every candidate is removed."
        },
        {
          "type": "string",
          "const": "lastOfWeek",
          "description": "The last of each ISO week number (GnuCash's default)."
        },
        {
          "type": "string",
          "const": "lastOfMonth",
          "description": "The last of each month number."
        },
        {
          "type": "string",
          "const": "lastOfQuarter",
          "description": "The last of each fiscal quarter number."
        },
        {
          "type": "string",
          "const": "lastOfPeriod",
          "description": "The last of each fiscal year."
        },
        {
          "type": "string",
          "const": "scaled",
          "description": "Everything in the six months before the cutoff, then weekly for six months, then monthly."
        }
      ],
      "description": "Which old prices are kept."
    },
    "RemoveOldResult": {
      "type": "object",
      "properties": {
        "removed": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "The prices removed."
        }
      },
      "required": [
        "removed"
      ],
      "description": "What `price.removeOld` removed."
    },
    "UpdateParams5": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "price": {
          "$ref": "#/$defs/Guid",
          "description": "The price to edit."
        },
        "commodity": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "New commodity.",
          "default": null
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "New currency.",
          "default": null
        },
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "New day (its neutral time).",
          "default": null
        },
        "time": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "New exact time.",
          "default": null
        },
        "source": {
          "type": [
            "string",
            "null"
          ],
          "description": "New source: one of GnuCash's price sources.",
          "default": null
        },
        "type": {
          "type": [
            "string",
            "null"
          ],
          "description": "New type; null clears it.",
          "default": null
        },
        "value": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "New value, stored exactly.",
          "default": null
        }
      },
      "required": [
        "price"
      ],
      "description": "Params of `price.update`. Absent fields are kept."
    },
    "UpdateOutcome": {
      "type": "object",
      "properties": {
        "price": {
          "$ref": "#/$defs/PriceInfo",
          "description": "The price as it now is."
        },
        "replaced": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "A same-day price it replaced after moving."
        }
      },
      "required": [
        "price"
      ],
      "description": "What `price.update` did."
    },
    "AutoClearParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account; its sub-accounts are not included."
        },
        "clearedBalance": {
          "$ref": "#/$defs/Amount",
          "description": "The cleared balance wanted, raw sign (debits positive). Rounded to the account's SCU with banker's rounding."
        }
      },
      "required": [
        "account",
        "clearedBalance"
      ],
      "description": "Params of `reconcile.findAutoClear` and `reconcile.autoClear`."
    },
    "AutoClearResult": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The account."
        },
        "currentClearedBalance": {
          "$ref": "#/$defs/Amount",
          "description": "The account's cleared balance before auto-clear: every split not `n`, raw sign."
        },
        "clearedBalance": {
          "$ref": "#/$defs/Amount",
          "description": "The cleared balance asked for, rounded to the account's SCU."
        },
        "outcome": {
          "$ref": "#/$defs/OutcomeWire",
          "description": "What the search found."
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "GnuCash's message for an outcome other than `found`."
        },
        "splits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ClearedSplit"
          },
          "description": "The splits found, in account order; empty unless `found`."
        }
      },
      "required": [
        "account",
        "currentClearedBalance",
        "clearedBalance",
        "outcome",
        "splits"
      ],
      "description": "The result of an auto-clear search."
    },
    "OutcomeWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "found",
          "description": "Exactly one set of splits."
        },
        {
          "type": "string",
          "const": "alreadyCleared",
          "description": "The cleared balance is already the figure."
        },
        {
          "type": "string",
          "const": "ambiguous",
          "description": "More than one set of splits gives the figure."
        },
        {
          "type": "string",
          "const": "unreachable",
          "description": "No set of splits gives the figure."
        },
        {
          "type": "string",
          "const": "limit",
          "description": "The search stopped at its step limit."
        }
      ],
      "description": "What the search found."
    },
    "ClearedSplit": {
      "type": "object",
      "properties": {
        "split": {
          "$ref": "#/$defs/Guid",
          "description": "The split."
        },
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "Its transaction."
        },
        "datePosted": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The transaction's posted date."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The transaction's description."
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "The split's memo."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "The split's amount, in the account's commodity."
        }
      },
      "required": [
        "split",
        "transaction",
        "amount"
      ],
      "description": "A split auto-clear picked."
    },
    "FinishParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account reconciled."
        },
        "statementDate": {
          "$ref": "#/$defs/Date",
          "description": "The statement date."
        },
        "endingBalance": {
          "$ref": "#/$defs/Amount",
          "description": "The statement's ending balance, raw sign."
        },
        "includeSubaccounts": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Reconcile the sub-accounts too. Defaults to the account's stored choice.",
          "default": null
        },
        "utcOffsetMinutes": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "A fixed offset from UTC in minutes to use instead of the server's local time zone.",
          "default": null
        },
        "ticked": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "The ticked splits."
        },
        "force": {
          "type": "boolean",
          "description": "`reconcile.finish` only: finish even though the difference is not zero (GnuCash's \"finish anyway\").",
          "default": false
        }
      },
      "required": [
        "account",
        "statementDate",
        "endingBalance",
        "ticked"
      ],
      "description": "Params of `reconcile.finish` and `reconcile.postpone`."
    },
    "FinishResult": {
      "type": "object",
      "properties": {
        "reconciled": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StateChangeWire"
          },
          "description": "The splits now reconciled."
        },
        "statementTime": {
          "$ref": "#/$defs/Timestamp",
          "description": "The statement date, now the last reconcile date and the splits' reconcile date."
        },
        "lastInterval": {
          "anyOf": [
            {
              "$ref": "#/$defs/IntervalWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "The interval recorded for proposing the next statement date."
        },
        "difference": {
          "$ref": "#/$defs/Amount",
          "description": "The difference at Finish (zero unless forced)."
        }
      },
      "required": [
        "reconciled",
        "statementTime",
        "difference"
      ],
      "description": "What `reconcile.finish` did."
    },
    "StateChangeWire": {
      "type": "object",
      "properties": {
        "split": {
          "$ref": "#/$defs/Guid",
          "description": "The split."
        },
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "Its transaction."
        },
        "from": {
          "$ref": "#/$defs/State",
          "description": "The state before."
        },
        "to": {
          "$ref": "#/$defs/State",
          "description": "The state after."
        }
      },
      "required": [
        "split",
        "transaction",
        "from",
        "to"
      ],
      "description": "A split whose reconcile state changed."
    },
    "State": {
      "oneOf": [
        {
          "type": "string",
          "const": "n",
          "description": "Not reconciled or cleared."
        },
        {
          "type": "string",
          "const": "c",
          "description": "Cleared."
        },
        {
          "type": "string",
          "const": "y",
          "description": "Reconciled."
        },
        {
          "type": "string",
          "const": "f",
          "description": "Frozen."
        },
        {
          "type": "string",
          "const": "v",
          "description": "Voided (set only by voiding the transaction)."
        }
      ],
      "description": "A reconcile state as GnuCash writes it."
    },
    "IntervalWire": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "months": {
          "type": "integer",
          "format": "int64",
          "description": "Whole months."
        },
        "days": {
          "type": "integer",
          "format": "int64",
          "description": "Days, used when `months` is 0."
        }
      },
      "required": [
        "months",
        "days"
      ],
      "description": "The interval between reconciliations."
    },
    "AccountParams2": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account."
        }
      },
      "required": [
        "account"
      ],
      "description": "Params naming an account."
    },
    "InfoResult": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The account."
        },
        "lastDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "When it was last reconciled."
        },
        "lastInterval": {
          "anyOf": [
            {
              "$ref": "#/$defs/IntervalWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "The interval between its last two reconciliations."
        },
        "postponeDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "A postponed reconciliation's statement date."
        },
        "postponeBalance": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "A postponed reconciliation's ending balance, raw sign."
        },
        "includeSubaccounts": {
          "type": "boolean",
          "description": "Reconciliations include sub-accounts."
        }
      },
      "required": [
        "account",
        "includeSubaccounts"
      ],
      "description": "An account's reconcile information."
    },
    "PostponeResult": {
      "type": "object",
      "properties": {
        "changed": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StateChangeWire"
          },
          "description": "Splits whose state changed: ticked ones to `c`, unticked ones posted by the statement date to `n`."
        },
        "statementTime": {
          "$ref": "#/$defs/Timestamp",
          "description": "The statement date kept for next time."
        },
        "lastInterval": {
          "anyOf": [
            {
              "$ref": "#/$defs/IntervalWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "The interval recorded for proposing the next statement date."
        }
      },
      "required": [
        "changed",
        "statementTime"
      ],
      "description": "What `reconcile.postpone` did."
    },
    "SetInfoParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account."
        },
        "lastDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "The last reconcile date.",
          "default": null
        },
        "lastInterval": {
          "anyOf": [
            {
              "$ref": "#/$defs/IntervalWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "The interval between reconciliations.",
          "default": null
        },
        "postpone": {
          "anyOf": [
            {
              "$ref": "#/$defs/PostponeWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "A postponed reconciliation; `null` clears it."
        },
        "includeSubaccounts": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether reconciliations include sub-accounts.",
          "default": null
        }
      },
      "required": [
        "account"
      ],
      "description": "Params of `reconcile.setInfo`. An absent field is left alone; `null` removes it."
    },
    "PostponeWire": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "date": {
          "$ref": "#/$defs/Timestamp",
          "description": "The statement date."
        },
        "balance": {
          "$ref": "#/$defs/Amount",
          "description": "The ending balance, raw sign (debits positive)."
        }
      },
      "required": [
        "date",
        "balance"
      ],
      "description": "A postponed reconciliation."
    },
    "SetStateParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "split": {
          "$ref": "#/$defs/Guid",
          "description": "The split."
        },
        "state": {
          "$ref": "#/$defs/State",
          "description": "The new state: `n`, `c`, `y` or `f`. `v` comes only from voiding the transaction."
        },
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReconcileDate"
            },
            {
              "type": "null"
            }
          ],
          "description": "With `y` only: the reconcile date, `YYYY-MM-DD` for the end of that local day (as the reconcile window stamps\nits statement date), or an RFC 3339 timestamp for an exact time. Defaults to now."
        }
      },
      "required": [
        "split",
        "state"
      ],
      "description": "Params of `reconcile.setState`."
    },
    "ReconcileDate": {
      "anyOf": [
        {
          "$ref": "#/$defs/Date",
          "description": "The end of this local day, 23:59:59."
        },
        {
          "$ref": "#/$defs/Timestamp",
          "description": "This instant."
        }
      ],
      "description": "A reconcile date: a day, or an exact time. v0.5 took only a timestamp; a day was added later."
    },
    "SplitState": {
      "type": "object",
      "properties": {
        "split": {
          "$ref": "#/$defs/Guid",
          "description": "The split."
        },
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "Its transaction."
        },
        "state": {
          "$ref": "#/$defs/State",
          "description": "Its reconcile state."
        },
        "reconcileDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "When it was reconciled, if a date is stored."
        }
      },
      "required": [
        "split",
        "transaction",
        "state"
      ],
      "description": "A split's reconcile state."
    },
    "StartParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account to reconcile."
        },
        "statementDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The statement date. Defaults to the last reconcile date plus the last interval, no later than today, or the\npostponed statement's date.",
          "default": null
        },
        "endingBalance": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "The statement's ending balance, raw sign (debits positive). Defaults to the postponed balance, else the\naccount's balance at the end of the statement date.",
          "default": null
        },
        "includeSubaccounts": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Reconcile the sub-accounts too. Defaults to the account's stored choice; refused when a sub-account holds\nanother commodity.",
          "default": null
        },
        "utcOffsetMinutes": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "A fixed offset from UTC in minutes to use instead of the server's local time zone, for GnuCash's local-time\nrules (the statement date ends at 23:59:59 local time).",
          "default": null
        }
      },
      "required": [
        "account"
      ],
      "description": "Params of `reconcile.start`. Anything absent gets GnuCash's default."
    },
    "ReconcileView": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The account reconciled."
        },
        "statementDate": {
          "$ref": "#/$defs/Date",
          "description": "The statement date, local to the caller's offset."
        },
        "statementTime": {
          "$ref": "#/$defs/Timestamp",
          "description": "The statement date as an instant: the last second of the day, as GnuCash stores it."
        },
        "endingBalance": {
          "$ref": "#/$defs/Amount",
          "description": "The ending balance, raw sign."
        },
        "includeSubaccounts": {
          "type": "boolean",
          "description": "The sub-accounts are reconciled too."
        },
        "resumedPostponed": {
          "type": "boolean",
          "description": "The defaults came from a postponed reconciliation."
        },
        "lastReconcileDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "When the account was last reconciled."
        },
        "startingBalance": {
          "$ref": "#/$defs/Amount",
          "description": "The reconciled balance before this statement."
        },
        "clearedBalance": {
          "$ref": "#/$defs/Amount",
          "description": "The cleared balance (every split not `n`)."
        },
        "tickedBalance": {
          "$ref": "#/$defs/Amount",
          "description": "The sum of the ticked splits."
        },
        "reconciledBalance": {
          "$ref": "#/$defs/Amount",
          "description": "The starting balance plus the ticked splits."
        },
        "difference": {
          "$ref": "#/$defs/Amount",
          "description": "The ending balance minus the reconciled balance; `reconcile.finish` needs it to be zero."
        },
        "ticked": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "The ticked splits."
        },
        "splits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CandidateWire"
          },
          "description": "Every split that can be ticked."
        }
      },
      "required": [
        "account",
        "statementDate",
        "statementTime",
        "endingBalance",
        "includeSubaccounts",
        "resumedPostponed",
        "startingBalance",
        "clearedBalance",
        "tickedBalance",
        "reconciledBalance",
        "difference",
        "ticked",
        "splits"
      ],
      "description": "A reconciliation in progress: the statement, the splits to tick and the window's figures. Pass the statement\nfields and `ticked` back to the next call."
    },
    "CandidateWire": {
      "type": "object",
      "properties": {
        "split": {
          "$ref": "#/$defs/Guid",
          "description": "The split."
        },
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "Its transaction."
        },
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "Its account."
        },
        "datePosted": {
          "$ref": "#/$defs/Timestamp",
          "description": "When its transaction was posted."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The transaction's description."
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "The split's memo."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "The amount, raw sign (debits positive)."
        },
        "state": {
          "$ref": "#/$defs/State",
          "description": "`n` or `c`."
        },
        "ticked": {
          "type": "boolean",
          "description": "Ticked in this reconciliation."
        }
      },
      "required": [
        "split",
        "transaction",
        "account",
        "datePosted",
        "amount",
        "state",
        "ticked"
      ],
      "description": "A split the reconciliation lists."
    },
    "StatusParams2": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account reconciled."
        },
        "statementDate": {
          "$ref": "#/$defs/Date",
          "description": "The statement date."
        },
        "endingBalance": {
          "$ref": "#/$defs/Amount",
          "description": "The statement's ending balance, raw sign."
        },
        "includeSubaccounts": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Reconcile the sub-accounts too. Defaults to the account's stored choice.",
          "default": null
        },
        "utcOffsetMinutes": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "A fixed offset from UTC in minutes to use instead of the server's local time zone.",
          "default": null
        },
        "ticked": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "The ticked splits. Defaults to the ticks the window starts with: cleared splits posted by the statement date.",
          "default": null
        },
        "mark": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Splits to tick.",
          "default": []
        },
        "unmark": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Splits to untick.",
          "default": []
        }
      },
      "required": [
        "account",
        "statementDate",
        "endingBalance"
      ],
      "description": "Params of `reconcile.status`."
    },
    "CreateParams6": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "description": "The new style sheet's name."
        },
        "template": {
          "type": "string",
          "description": "The style sheet template: `CSS`, `Easy`, `Fancy`, `Footer`, `Head or Tail` or `Plain`."
        },
        "options": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReportOptions"
            },
            {
              "type": "null"
            }
          ],
          "description": "Option values over the template's defaults.",
          "default": null
        }
      },
      "required": [
        "name",
        "template"
      ],
      "description": "Params of `report.createStyleSheet`."
    },
    "ReportOptions": {
      "type": "object",
      "description": "Report options to change, by section and name: {\"General\": {\"Start Date\": {\"absolute\": \"2024-01-01\"}}}. Only the options given change; null returns one to its default where a method allows it. report.options gives each report's own schema (paramsSchema).",
      "additionalProperties": {
        "type": "object"
      }
    },
    "StyleSheetInfo": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The style sheet's name."
        },
        "template": {
          "type": "string",
          "description": "Its template's name."
        },
        "predefined": {
          "type": "boolean",
          "description": "Whether it is one of GnuCash's six predefined style sheets, which can be changed and reset but not deleted."
        },
        "options": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OptionInfo"
          },
          "description": "Its options, with their defaults and values."
        }
      },
      "required": [
        "name",
        "template",
        "predefined",
        "options"
      ],
      "description": "A style sheet with its options."
    },
    "OptionInfo": {
      "type": "object",
      "properties": {
        "section": {
          "type": "string",
          "description": "The section."
        },
        "name": {
          "type": "string",
          "description": "The name."
        },
        "key": {
          "type": "string",
          "description": "The sort tag."
        },
        "type": {
          "type": "string",
          "description": "The type: `boolean`, `string`, `text`, `font`, `color`, `multichoice`, `list`, `numberRange`, `plotSize`,\n`date`, `accountList`, `accountSel`, `currency`, `commodity`, `budget`, `internal`, `reportPlacement`, and from\nv0.6 `invoice` or `image`."
        },
        "help": {
          "type": "string",
          "description": "Help text."
        },
        "default": {
          "description": "The default, in wire form."
        },
        "value": {
          "description": "The configured value, in wire form."
        },
        "choices": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Choice"
          },
          "description": "For multichoice and list options: the choices."
        },
        "min": {
          "anyOf": [
            {
              "$ref": "#/$defs/Rational"
            },
            {
              "type": "null"
            }
          ],
          "description": "For number ranges: the smallest value."
        },
        "max": {
          "anyOf": [
            {
              "$ref": "#/$defs/Rational"
            },
            {
              "type": "null"
            }
          ],
          "description": "For number ranges: the largest value."
        },
        "step": {
          "anyOf": [
            {
              "$ref": "#/$defs/Rational"
            },
            {
              "type": "null"
            }
          ],
          "description": "For number ranges: the step a UI moves by."
        },
        "ui": {
          "anyOf": [
            {
              "$ref": "#/$defs/DateUi"
            },
            {
              "type": "null"
            }
          ],
          "description": "For dates: which values are offered."
        },
        "relative": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "For dates: the relative dates offered; absent when any is."
        },
        "accountTypes": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "For account options: the account types allowed; absent when any is."
        },
        "multiple": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "For account lists: whether more than one account may be chosen."
        }
      },
      "required": [
        "section",
        "name",
        "key",
        "type",
        "help",
        "default",
        "value"
      ],
      "description": "One option as `report.options` lists it."
    },
    "Choice": {
      "type": "object",
      "properties": {
        "key": {
          "$ref": "#/$defs/ChoiceKey",
          "description": "The key a value names."
        },
        "label": {
          "type": "string",
          "description": "What the choice is called."
        },
        "help": {
          "type": "string",
          "description": "Help text; empty for none.",
          "default": ""
        }
      },
      "required": [
        "key",
        "label"
      ],
      "description": "One choice of a multichoice or list option."
    },
    "ChoiceKey": {
      "anyOf": [
        {
          "type": "string",
          "description": "A symbol or string key."
        },
        {
          "type": "integer",
          "format": "int64",
          "description": "A number key."
        }
      ],
      "description": "The key of a multichoice or list choice: a symbol or string, or a number such as an account level\n(`GncOptionMultichoiceKeyType`, `5.17:bindings/guile/gnc-optiondb.i:623-655`). On the wire, a string or an integer."
    },
    "Rational": {
      "description": "An exact rational of any size, reduced, with a positive denominator. Never a JSON number.",
      "type": "object",
      "properties": {
        "num": {
          "type": "string",
          "pattern": "^-?\\d+$"
        },
        "denom": {
          "type": "string",
          "pattern": "^[1-9]\\d*$"
        }
      },
      "required": [
        "num",
        "denom"
      ],
      "additionalProperties": false
    },
    "DateUi": {
      "oneOf": [
        {
          "type": "string",
          "const": "absolute",
          "description": "Only an absolute date."
        },
        {
          "type": "string",
          "const": "relative",
          "description": "Only a relative date."
        },
        {
          "type": "string",
          "const": "both",
          "description": "Either."
        }
      ],
      "description": "Which values a date option offers (`RelativeDateUI`, `5.17:libgnucash/engine/gnc-optiondb.hpp:825-830`)."
    },
    "DeleteParams5": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "configuration": {
          "$ref": "#/$defs/ReportRef",
          "description": "The saved configuration, by GUID or name."
        }
      },
      "required": [
        "configuration"
      ],
      "description": "Params of `report.deleteConfiguration`."
    },
    "ReportRef": {
      "type": "string",
      "description": "A report: the GUID of a report template or saved report configuration, or a name. A name that several reports have is refused with conflict."
    },
    "DeleteResult6": {
      "type": "object",
      "properties": {
        "deleted": {
          "$ref": "#/$defs/ReportInfo",
          "description": "The configuration deleted."
        }
      },
      "required": [
        "deleted"
      ],
      "description": "The result of `report.deleteConfiguration`."
    },
    "ReportInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The template's GUID (GnuCash's, for a built-in report), or the saved configuration's."
        },
        "name": {
          "type": "string",
          "description": "The template's name, or the saved configuration's."
        },
        "kind": {
          "$ref": "#/$defs/ReportKind",
          "description": "`builtin`, `user` or `saved`."
        },
        "template": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "For a saved configuration: the GUID of the template it configures."
        },
        "script": {
          "type": [
            "string",
            "null"
          ],
          "description": "The script defining the template: `standard/balance-sheet.rhai`, or `./` and a user script's path in the\nreport directory. `null` for a saved configuration whose template is not loaded."
        },
        "menuPath": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "GnuCash's menu path. Empty for a saved configuration, which GnuCash lists in its own dialog."
        },
        "menuName": {
          "type": [
            "string",
            "null"
          ],
          "description": "The menu entry when it differs from the name."
        },
        "menuTip": {
          "type": [
            "string",
            "null"
          ],
          "description": "The menu tip."
        },
        "inMenu": {
          "type": "boolean",
          "description": "Whether the template shows in menus; `false` for a saved configuration."
        },
        "exportTypes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The exports offered besides HTML: `[\"csv\"]` for the net and category charts (`report.exportCsv`), and for a\nsaved configuration of one."
        },
        "readOnly": {
          "type": "boolean",
          "description": "`true` for a built-in saved configuration (v0.6), which cannot be changed, renamed or deleted, only copied\nwith `report.saveConfiguration`; absent otherwise."
        }
      },
      "required": [
        "guid",
        "name",
        "kind",
        "menuPath",
        "inMenu",
        "exportTypes"
      ],
      "description": "A report template or saved report configuration, as `report.list` lists it."
    },
    "ReportKind": {
      "oneOf": [
        {
          "type": "string",
          "const": "builtin",
          "description": "A built-in template, compiled into red-ale."
        },
        {
          "type": "string",
          "const": "user",
          "description": "A template from a user script in the report directory."
        },
        {
          "type": "string",
          "const": "saved",
          "description": "A saved report configuration."
        }
      ],
      "description": "Where a report is defined."
    },
    "DeleteParams6": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "description": "The style sheet."
        }
      },
      "required": [
        "name"
      ],
      "description": "Params of `report.deleteStyleSheet`."
    },
    "DeleteResult7": {
      "type": "object",
      "properties": {
        "deleted": {
          "$ref": "#/$defs/StyleSheetInfo",
          "description": "The style sheet as it was."
        },
        "reset": {
          "type": "boolean",
          "description": "True when it is predefined and so went back to its template's defaults rather than going away."
        }
      },
      "required": [
        "deleted",
        "reset"
      ],
      "description": "The result of `report.deleteStyleSheet`."
    },
    "ExportParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "report": {
          "$ref": "#/$defs/ReportRef",
          "description": "The report."
        },
        "options": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReportOptions"
            },
            {
              "type": "null"
            }
          ],
          "description": "Changes over the template's defaults, or over the saved configuration's values.",
          "default": null
        },
        "now": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "The time to run the report for; by default the session's clock.",
          "default": null
        },
        "styleSheet": {
          "type": [
            "string",
            "null"
          ],
          "description": "The style sheet to render through, instead of the one the report's General/\"Stylesheet\" option names.",
          "default": null
        },
        "locale": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Locale to format numbers and dates in for this run, as in `report.run`.",
          "default": null
        }
      },
      "required": [
        "report"
      ],
      "description": "Params of `report.export`."
    },
    "ExportResult": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "description": "The report's title."
        },
        "html": {
          "type": "string",
          "description": "One self-contained HTML document: no script and no external resource."
        }
      },
      "required": [
        "title",
        "html"
      ],
      "description": "The result of `report.export`. Nothing is written to disk."
    },
    "ExportCsvParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "report": {
          "$ref": "#/$defs/ReportRef",
          "description": "The report: a net or category chart, or a saved configuration of one."
        },
        "options": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReportOptions"
            },
            {
              "type": "null"
            }
          ],
          "description": "Changes over the template's defaults, or over the saved configuration's values.",
          "default": null
        },
        "now": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "The time to run the report for; by default the session's clock.",
          "default": null
        }
      },
      "required": [
        "report"
      ],
      "description": "Params of `report.exportCsv`."
    },
    "ExportCsvResult": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "description": "The report's title: empty for the charts, which GnuCash leaves untitled."
        },
        "csv": {
          "type": "string",
          "description": "The CSV text, as GnuCash's `gnc:lists->csv` writes it: rows joined by `\\n`, no newline after the last."
        }
      },
      "required": [
        "title",
        "csv"
      ],
      "description": "The result of `report.exportCsv`. Nothing is written to disk."
    },
    "ImportParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "text": {
          "type": "string",
          "description": "The file's text: GnuCash's `saved-reports-2.8` (else `saved-reports-2.4`), or `stylesheets-2.0`, from its user\ndata directory. It is read as data and never run."
        },
        "dryRun": {
          "type": "boolean",
          "description": "Report what would be imported without writing the Configuration.",
          "default": false
        }
      },
      "required": [
        "text"
      ],
      "description": "Params of `report.importConfigurations` and `report.importStyleSheets`."
    },
    "ImportConfigurationsResult": {
      "type": "object",
      "properties": {
        "dryRun": {
          "type": "boolean",
          "description": "True when nothing was written."
        },
        "imported": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ImportedConfiguration"
          },
          "description": "The configurations imported (or that would be), in file order."
        },
        "skipped": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SkippedEntry"
          },
          "description": "The entries skipped, in file order."
        }
      },
      "required": [
        "dryRun",
        "imported",
        "skipped"
      ],
      "description": "The result of `report.importConfigurations`."
    },
    "ImportedConfiguration": {
      "type": "object",
      "properties": {
        "line": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0,
          "description": "The line its entry starts on."
        },
        "configuration": {
          "$ref": "#/$defs/ReportInfo",
          "description": "The configuration, with GnuCash's GUID and name."
        },
        "options": {
          "$ref": "#/$defs/ReportOptions",
          "description": "What is stored: the options that differ from the template's defaults, in wire form."
        },
        "ignored": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IgnoredOption"
          },
          "description": "Options the entry sets that were left out."
        }
      },
      "required": [
        "line",
        "configuration",
        "options",
        "ignored"
      ],
      "description": "A saved report configuration imported."
    },
    "IgnoredOption": {
      "type": "object",
      "properties": {
        "child": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint",
          "minimum": 0,
          "description": "For an option of a Multicolumn View's embedded report, that report's position in the view's report-list, from\n0 (v0.5)."
        },
        "section": {
          "type": "string",
          "description": "The option's section."
        },
        "name": {
          "type": "string",
          "description": "The option's name."
        },
        "reason": {
          "type": "string",
          "description": "`unknown-option`: the template has no such option, and GnuCash ignores it too. `not-rendered`: kept in the\nConfiguration, with no effect in red-ale (a style sheet's images). `unsaved-children` (v0.5): the report-list\nof a Multicolumn View embedded in another, whose own children GnuCash does not save."
        }
      },
      "required": [
        "section",
        "name",
        "reason"
      ],
      "description": "An option an imported entry sets that red-ale did not apply."
    },
    "SkippedEntry": {
      "type": "object",
      "properties": {
        "line": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0,
          "description": "The line it starts on, from 1."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Its name, when it could be read."
        },
        "guid": {
          "type": [
            "string",
            "null"
          ],
          "description": "A saved configuration's GUID, when it could be read."
        },
        "template": {
          "type": [
            "string",
            "null"
          ],
          "description": "Its template: a report template's GUID, or a style sheet template's name, when it could be read."
        },
        "reason": {
          "$ref": "#/$defs/SkipReason",
          "description": "Why it was skipped."
        },
        "message": {
          "type": "string",
          "description": "What is wrong, for people."
        }
      },
      "required": [
        "line",
        "reason",
        "message"
      ],
      "description": "An entry that was not imported."
    },
    "SkipReason": {
      "oneOf": [
        {
          "type": "string",
          "const": "malformed",
          "description": "Not a form GnuCash writes, or not one red-ale reads: it was not evaluated."
        },
        {
          "type": "string",
          "const": "untranslated",
          "description": "Its template (a report's GUID, a style sheet template's name) is not one red-ale has translated."
        },
        {
          "type": "string",
          "const": "exists",
          "description": "A saved configuration with its GUID, or a style sheet entry with its name, is already in the Configuration or\nearlier in the file, or is built in."
        },
        {
          "type": "string",
          "const": "conflict",
          "description": "Another saved configuration of the Configuration already has its name. A built-in one's name is not\nreserved, so a GnuCash user's own \"Dashboard\" imports."
        },
        {
          "type": "string",
          "const": "invalid-option",
          "description": "An option value red-ale refuses (`report-option`)."
        },
        {
          "type": "string",
          "const": "unchanged",
          "description": "A predefined style sheet at its template's defaults: nothing to keep."
        }
      ],
      "description": "Why an entry was not imported."
    },
    "ImportStyleSheetsResult": {
      "type": "object",
      "properties": {
        "dryRun": {
          "type": "boolean",
          "description": "True when nothing was written."
        },
        "imported": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ImportedStyleSheet"
          },
          "description": "The style sheets imported (or that would be), in file order."
        },
        "skipped": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SkippedEntry"
          },
          "description": "The entries skipped, in file order."
        }
      },
      "required": [
        "dryRun",
        "imported",
        "skipped"
      ],
      "description": "The result of `report.importStyleSheets`."
    },
    "ImportedStyleSheet": {
      "type": "object",
      "properties": {
        "line": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0,
          "description": "The line its entry starts on."
        },
        "styleSheet": {
          "$ref": "#/$defs/StyleSheetInfo",
          "description": "The style sheet, with its options."
        },
        "ignored": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IgnoredOption"
          },
          "description": "Options the entry sets that red-ale does not render or does not have."
        }
      },
      "required": [
        "line",
        "styleSheet",
        "ignored"
      ],
      "description": "A style sheet imported."
    },
    "ListResult3": {
      "type": "object",
      "properties": {
        "reports": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReportInfo"
          },
          "description": "Every template and saved configuration, sorted by name (bytewise), then GUID."
        },
        "problems": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LoadProblem"
          },
          "description": "User scripts that did not load, so one bad file does not hide the others."
        }
      },
      "required": [
        "reports",
        "problems"
      ],
      "description": "The result of `report.list`."
    },
    "LoadProblem": {
      "type": "object",
      "properties": {
        "source": {
          "type": "string",
          "description": "The script: `./` and its path in the report directory, `.` for the directory itself; `reports.saved` for a\nsaved configuration of the Configuration."
        },
        "code": {
          "type": "string",
          "description": "`report-load`, or `report-limit` for a script past a limit when it compiles."
        },
        "message": {
          "type": "string",
          "description": "What went wrong."
        },
        "line": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 0,
          "description": "The line, from 1, when known."
        }
      },
      "required": [
        "source",
        "code",
        "message"
      ],
      "description": "A user script that did not load, a file the loader left out of the report directory, or a saved configuration\nleft out of the Configuration."
    },
    "OptionsParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "report": {
          "$ref": "#/$defs/ReportRef",
          "description": "The report."
        }
      },
      "required": [
        "report"
      ],
      "description": "Params of `report.options`."
    },
    "OptionsResult": {
      "type": "object",
      "properties": {
        "report": {
          "$ref": "#/$defs/ReportInfo",
          "description": "The report."
        },
        "options": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OptionInfo"
          },
          "description": "Every option in GnuCash's order (sections by name, options by key), with its default and configured value."
        },
        "paramsSchema": {
          "description": "The JSON Schema (2020-12) of this report's `options` param."
        }
      },
      "required": [
        "report",
        "options",
        "paramsSchema"
      ],
      "description": "The result of `report.options`."
    },
    "RenameParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "configuration": {
          "$ref": "#/$defs/ReportRef",
          "description": "The saved configuration, by GUID or name."
        },
        "name": {
          "type": "string",
          "description": "Its new name."
        }
      },
      "required": [
        "configuration",
        "name"
      ],
      "description": "Params of `report.renameConfiguration`."
    },
    "RunParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "report": {
          "$ref": "#/$defs/ReportRef",
          "description": "The report."
        },
        "options": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReportOptions"
            },
            {
              "type": "null"
            }
          ],
          "description": "Changes over the template's defaults, or over the saved configuration's values.",
          "default": null
        },
        "now": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "The time to run the report for; by default the session's clock. Relative dates and \"today\" follow it.",
          "default": null
        },
        "locale": {
          "type": [
            "string",
            "null"
          ],
          "description": "The Locale to format numbers and dates in for this run: a supported POSIX locale name (`fr_FR`, `C`) or\n`environment`; by default the Configuration's `locale` setting.",
          "default": null
        }
      },
      "required": [
        "report"
      ],
      "description": "Params of `report.run`."
    },
    "ReportResult": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "version": {
          "type": "string",
          "description": "The result's version: [`RESULT_VERSION`]."
        },
        "report": {
          "$ref": "#/$defs/ReportIdentity",
          "description": "The template and saved configuration that produced it."
        },
        "title": {
          "type": "string",
          "description": "The document title (`gnc:html-document-set-title!`): the HTML `<title>` and, without a headline, the heading."
        },
        "headline": {
          "type": [
            "string",
            "null"
          ],
          "description": "A heading when it differs from the title (`gnc:html-document-set-headline!`)."
        },
        "now": {
          "type": "string",
          "format": "date-time",
          "description": "The time the report was run for."
        },
        "options": {
          "type": "object",
          "additionalProperties": true,
          "description": "Every option's value, in wire form, so the result says exactly what produced it."
        },
        "sections": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Section"
          },
          "description": "The sections, in order."
        },
        "log": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LogEntry"
          },
          "description": "The report log: what the script printed."
        },
        "export": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/$defs/ExportCell"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "description": "The rows of the report's export, when the run was for an export the template offers (`report.exportCsv`):\nGnuCash's export string before it is joined (`gnc:html-document-set-export-string`). Absent otherwise."
        },
        "exportError": {
          "type": [
            "string",
            "null"
          ],
          "description": "Why the run for an export has nothing to export, as the script gave it (`gnc:html-document-set-export-error`,\n`5.17:gnucash/report/trep-engine.scm:2524`): \"No splits found\". Absent otherwise."
        },
        "css": {
          "type": [
            "string",
            "null"
          ],
          "description": "The report's own CSS, which a page appends after the style sheet's (`gnc:html-document-set-style-text!`,\n`5.17:gnucash/report/reports/standard/invoice.scm:795`) (v0.6). Never text the CSS template refuses\n(`design/reports.md` §8): the host leaves that out and says so in the log. Absent when the report sets none."
        }
      },
      "required": [
        "version",
        "report",
        "title",
        "now",
        "options",
        "sections",
        "log"
      ],
      "description": "A finished report result, as `report.run` returns it."
    },
    "ReportIdentity": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "guid": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{32}$",
          "description": "The template's GUID."
        },
        "name": {
          "type": "string",
          "description": "The template's name."
        },
        "configuration": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[0-9a-fA-F]{32}$",
          "description": "The saved report configuration's GUID, when one was run."
        }
      },
      "required": [
        "guid",
        "name"
      ],
      "description": "The report a result came from."
    },
    "Section": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "title": {
          "type": [
            "string",
            "null"
          ],
          "description": "The section's title.",
          "default": null
        },
        "blocks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Block"
          },
          "description": "The blocks, in order."
        }
      },
      "required": [
        "blocks"
      ],
      "description": "A section: an optional title and ordered blocks."
    },
    "Block": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "type": "string",
              "const": "text"
            },
            "text": {
              "type": "string",
              "description": "The text."
            },
            "role": {
              "$ref": "#/$defs/TextRole",
              "description": "What the text is.",
              "default": "paragraph"
            },
            "link": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Link"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Something the text leads to, such as the Multicolumn statements' \"Barchart\" report\n(`5.17:gnucash/report/reports/standard/balsheet-pnl.scm:1079-1083`)."
            },
            "class": {
              "type": [
                "string",
                "null"
              ],
              "description": "Class names for the report's CSS (`css`), separated by single spaces (v0.6)."
            }
          },
          "required": [
            "kind",
            "text"
          ],
          "description": "Text: `gnc:make-html-text`, `gnc:html-markup-h3`, `gnc:html-markup-p`."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "type": "string",
              "const": "warning"
            },
            "title": {
              "type": "string",
              "description": "The warning's title, such as \"No accounts selected\"."
            },
            "text": {
              "type": "string",
              "description": "What it says."
            },
            "class": {
              "type": [
                "string",
                "null"
              ],
              "description": "Class names for the report's CSS (`css`), separated by single spaces (v0.6)."
            }
          },
          "required": [
            "kind",
            "title",
            "text"
          ],
          "description": "A warning (`gnc:html-make-generic-warning` and those built on it, `5.17:gnucash/report/html-utilities.scm:350-381`)."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "type": "string",
              "const": "table"
            },
            "title": {
              "type": [
                "string",
                "null"
              ],
              "description": "The table's title.",
              "default": null
            },
            "columns": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Column"
              },
              "description": "The columns."
            },
            "rows": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Row"
              },
              "description": "The rows; each has one cell per column, counting spans."
            },
            "footnotes": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Notes that cells mark with a `footnote` number, numbered from 1 and listed after the table: GnuCash's footnote\ncollector (`5.17:gnucash/report/reports/standard/budget.scm:240-259`)."
            },
            "class": {
              "type": [
                "string",
                "null"
              ],
              "description": "Class names for the report's CSS (`css`), separated by single spaces (v0.6)."
            }
          },
          "required": [
            "kind",
            "columns",
            "rows"
          ],
          "description": "A table."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "type": "string",
              "const": "chart"
            },
            "type": {
              "$ref": "#/$defs/ChartType",
              "description": "The kind of chart (`set-type!`)."
            },
            "title": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Lines of the title (`set-title!`).",
              "default": []
            },
            "width": {
              "$ref": "#/$defs/PlotSize",
              "description": "Width; default 100 % (`5.17:gnucash/report/html-chart.scm:190-193`).",
              "default": {
                "percent": 100
              }
            },
            "height": {
              "$ref": "#/$defs/PlotSize",
              "description": "Height; default 100 %.",
              "default": {
                "percent": 100
              }
            },
            "stacked": {
              "type": "boolean",
              "description": "Bars stack, or lines accumulate (`set-stacking?!`).",
              "default": false
            },
            "grid": {
              "type": "boolean",
              "description": "Grid lines (`set-grid?!`); on by default, as in GnuCash's chart (`:236-239`).",
              "default": true
            },
            "legend": {
              "type": "boolean",
              "description": "Show the series (or slice) labels.",
              "default": true
            },
            "xAxis": {
              "$ref": "#/$defs/Axis",
              "description": "The x axis.",
              "default": {
                "label": ""
              }
            },
            "yAxis": {
              "$ref": "#/$defs/Axis",
              "description": "The y axis.",
              "default": {
                "label": ""
              }
            },
            "labels": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Category labels (bar, line) or slice labels (pie).",
              "default": []
            },
            "series": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Series"
              },
              "description": "The data series (`add-data-series!`)."
            },
            "tooltip": {
              "$ref": "#/$defs/Tooltip",
              "description": "Hover label behaviour.",
              "default": {
                "grouped": true,
                "nonZeroOnly": false
              }
            },
            "class": {
              "type": [
                "string",
                "null"
              ],
              "description": "Class names for the report's CSS (`css`), separated by single spaces (v0.6)."
            }
          },
          "required": [
            "kind",
            "type",
            "series"
          ],
          "description": "A chart."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "type": "string",
              "const": "group"
            },
            "blocks": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Block"
              },
              "description": "The blocks, left to right."
            },
            "class": {
              "type": [
                "string",
                "null"
              ],
              "description": "Class names for the report's CSS (`css`), separated by single spaces (v0.6)."
            }
          },
          "required": [
            "kind",
            "blocks"
          ],
          "description": "Blocks laid out side by side: the one-row layout tables of the two-column Balance Sheet and Income Statement."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "type": "string",
              "const": "list"
            },
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ListItem"
              },
              "description": "The items, in order."
            },
            "class": {
              "type": [
                "string",
                "null"
              ],
              "description": "Class names for the report's CSS (`css`), separated by single spaces (v0.6)."
            }
          },
          "required": [
            "kind",
            "items"
          ],
          "description": "A bulleted list (`gnc:html-markup-ul`, `5.17:gnucash/report/html-text.scm:210-215`)."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "type": "string",
              "const": "grid"
            },
            "width": {
              "$ref": "#/$defs/Rational",
              "description": "The view's \"Number of columns\", GnuCash's `table-width`: the width at which a row is closed."
            },
            "rows": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/GridRow"
              },
              "description": "The rows, top to bottom. A cell spanning rows takes room in the rows below without being listed in them."
            },
            "class": {
              "type": [
                "string",
                "null"
              ],
              "description": "Class names for the report's CSS (`css`), separated by single spaces (v0.6)."
            }
          },
          "required": [
            "kind",
            "width",
            "rows"
          ],
          "description": "A Multicolumn View's children in rows of cells (`5.17:gnucash/report/reports/standard/view-column.scm:51-159`)."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "type": "string",
              "const": "image"
            },
            "src": {
              "type": "string",
              "description": "The picture's address: `file:///` and the file name, as `make-file-url` writes it. Always starts `file:///`,\nso a page never fetches anything from the network."
            },
            "class": {
              "type": [
                "string",
                "null"
              ],
              "description": "Class names for the report's CSS (`css`), separated by single spaces (v0.6)."
            }
          },
          "required": [
            "kind",
            "src"
          ],
          "description": "A picture, the invoice's `picture` layout choice (`5.17:gnucash/report/reports/standard/invoice.scm:300-308`)\n(v0.6)."
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "type": "string",
              "const": "optionsSummary"
            },
            "rows": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/OptionsSummaryRow"
              },
              "description": "One row per changed option, in option order."
            }
          },
          "required": [
            "kind",
            "rows"
          ],
          "description": "Set by the host only: the options that differ from their defaults (`gnc:html-render-options-changed`)."
        }
      ],
      "description": "A block of a section, told apart by `kind`."
    },
    "TextRole": {
      "oneOf": [
        {
          "type": "string",
          "const": "paragraph",
          "description": "A paragraph."
        },
        {
          "type": "string",
          "const": "heading",
          "description": "A heading."
        },
        {
          "type": "string",
          "const": "note",
          "description": "A note."
        }
      ],
      "description": "The role of a text block."
    },
    "Link": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "account": {
              "description": "A GUID: 32 hexadecimal digits.",
              "type": "string",
              "pattern": "^[0-9a-fA-F]{32}$"
            }
          },
          "required": [
            "account"
          ],
          "additionalProperties": false,
          "description": "`{ \"account\": \"<guid>\" }`: the account's register (`gnc:account-anchor-text`, `:85-88`)."
        },
        {
          "type": "object",
          "properties": {
            "report": {
              "$ref": "#/$defs/ReportLink"
            }
          },
          "required": [
            "report"
          ],
          "additionalProperties": false,
          "description": "`{ \"report\": { \"template\": \"<guid>\", \"options\": { … } } }`."
        },
        {
          "type": "object",
          "properties": {
            "split": {
              "description": "A GUID: 32 hexadecimal digits.",
              "type": "string",
              "pattern": "^[0-9a-fA-F]{32}$"
            }
          },
          "required": [
            "split"
          ],
          "additionalProperties": false,
          "description": "`{ \"split\": \"<guid>\" }`: the split in its account's register (`gnc:split-anchor-text`, `:90-91`)."
        },
        {
          "type": "object",
          "properties": {
            "transaction": {
              "description": "A GUID: 32 hexadecimal digits.",
              "type": "string",
              "pattern": "^[0-9a-fA-F]{32}$"
            }
          },
          "required": [
            "transaction"
          ],
          "additionalProperties": false,
          "description": "`{ \"transaction\": \"<guid>\" }`: the transaction in a register (`gnc:transaction-anchor-text`, `:93-94`)."
        },
        {
          "type": "object",
          "properties": {
            "invoice": {
              "description": "A GUID: 32 hexadecimal digits.",
              "type": "string",
              "pattern": "^[0-9a-fA-F]{32}$"
            }
          },
          "required": [
            "invoice"
          ],
          "additionalProperties": false,
          "description": "`{ \"invoice\": \"<guid>\" }`: an invoice, bill or voucher (`gnc:invoice-anchor-text`, `:127-128`)."
        },
        {
          "type": "object",
          "properties": {
            "price": {
              "description": "A GUID: 32 hexadecimal digits.",
              "type": "string",
              "pattern": "^[0-9a-fA-F]{32}$"
            }
          },
          "required": [
            "price"
          ],
          "additionalProperties": false,
          "description": "`{ \"price\": \"<guid>\" }`: a price in the price database (`gnc:price-anchor-text`, `:107-110`)."
        },
        {
          "type": "object",
          "properties": {
            "docLink": {
              "type": "string"
            }
          },
          "required": [
            "docLink"
          ],
          "additionalProperties": false,
          "description": "`{ \"docLink\": \"<uri>\" }`: a transaction's or invoice's linked document (`gnc:transaction-doclink-anchor-text`,\n`:96-100`). Described only: a page shows its text unlinked, so an exported page points at no file."
        }
      ],
      "description": "Something a client can open, as GnuCash's anchors (`5.17:gnucash/report/html-utilities.scm:82-128`): an account,\nsplit or transaction in a register, an invoice, a price, a linked document, or another report, GnuCash's\ndrill-down (`5.17:gnucash/report/reports/standard/category-barchart.scm:589-609`). GnuCash makes a report instance\nfor a report link at render time; red-ale only describes it, and a client runs it."
    },
    "ReportLink": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "template": {
          "type": "string",
          "pattern": "^[0-9a-fA-F]{32}$",
          "description": "The template to run."
        },
        "configuration": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[0-9a-fA-F]{32}$",
          "description": "A saved configuration of the template to run (v0.5); `options` are then changes over its values."
        },
        "options": {
          "type": "object",
          "additionalProperties": true,
          "description": "The options to change, in the form `report.run` takes.",
          "default": {}
        }
      },
      "required": [
        "template"
      ],
      "description": "A link to a report run."
    },
    "Column": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "label": {
          "type": "string",
          "description": "The heading; empty for none.",
          "default": ""
        },
        "role": {
          "$ref": "#/$defs/ColumnRole",
          "description": "What the column holds."
        },
        "align": {
          "anyOf": [
            {
              "$ref": "#/$defs/Align"
            },
            {
              "type": "null"
            }
          ],
          "description": "Alignment; amounts default to the right."
        },
        "levels": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 0,
          "description": "For an `amount` column of an account table: the staircase positions, a deeper account's amount further left\nand totals furthest right (`5.17:gnucash/report/html-acct-table.scm:870-923`)."
        },
        "labelLines": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "The heading as stacked lines, top first, when it takes several header rows: GnuCash's multi-row column headers\n(`gnc:html-table-set-multirow-col-headers!`, `5.17:gnucash/report/reports/standard/txn-columns.scm:170-174`).\n`label` still names the column for a client that reads one line."
        }
      },
      "required": [
        "role"
      ],
      "description": "A column."
    },
    "ColumnRole": {
      "oneOf": [
        {
          "type": "string",
          "const": "label",
          "description": "Account names and row labels."
        },
        {
          "type": "string",
          "const": "text",
          "description": "Other text."
        },
        {
          "type": "string",
          "const": "amount",
          "description": "Figures."
        },
        {
          "type": "string",
          "const": "date",
          "description": "Dates."
        }
      ],
      "description": "What a column holds."
    },
    "Align": {
      "type": "string",
      "enum": [
        "left",
        "right",
        "center"
      ],
      "description": "Horizontal alignment."
    },
    "Row": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "role": {
          "$ref": "#/$defs/RowRole",
          "description": "What the row is.",
          "default": "data"
        },
        "account": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[0-9a-fA-F]{32}$",
          "description": "The account the row is about."
        },
        "depth": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 0,
          "description": "Indentation of the label, in levels (`indented-depth`, `5.17:gnucash/report/html-acct-table.scm:749-763`)."
        },
        "level": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 0,
          "description": "The amount's staircase position, 0 being the rightmost."
        },
        "alternate": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "For a `data` or `account` row: whether it is shaded as GnuCash's `alternate-row` (`true`) or `normal-row`\n(`false`). Absent, rows alternate by position. The Transaction Report shades by split and keeps a\ntransaction's lines alike (`5.17:gnucash/report/trep-engine.scm:1967-1977`)."
        },
        "cells": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/Cell"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": "The cells, `null` for an empty one."
        }
      },
      "required": [
        "cells"
      ],
      "description": "A row."
    },
    "RowRole": {
      "oneOf": [
        {
          "type": "string",
          "const": "data",
          "description": "Plain data."
        },
        {
          "type": "string",
          "const": "heading",
          "description": "A section label such as \"Assets\"."
        },
        {
          "type": "string",
          "const": "account",
          "description": "An account's row."
        },
        {
          "type": "string",
          "const": "subtotal",
          "description": "A subtotal: \"Total Bank1\"."
        },
        {
          "type": "string",
          "const": "total",
          "description": "A section total: \"Total Assets\"."
        },
        {
          "type": "string",
          "const": "grandTotal",
          "description": "A grand total: \"Total Liabilities & Equity\", \"Net income\"."
        },
        {
          "type": "string",
          "const": "rule",
          "description": "A horizontal rule across the table (`gnc:html-table-append-ruler!`)."
        },
        {
          "type": "string",
          "const": "spacer",
          "description": "An empty spacer row."
        },
        {
          "type": "string",
          "const": "warning",
          "description": "A warning inside a table, shown bold and in the negative colour: Investment Lots' warning rows\n(`total-label-cell neg`, `5.17:gnucash/report/reports/standard/investment-lots.scm:1077-1096`)."
        }
      ],
      "description": "What a row is. The roles stand for GnuCash's row and cell markup (`primary-subheading`, `total-label-cell`,\n`total-number-cell`), which style sheets colour."
    },
    "Cell": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "text": {
          "type": [
            "string",
            "null"
          ],
          "description": "Text."
        },
        "monetary": {
          "anyOf": [
            {
              "$ref": "#/$defs/Monetary"
            },
            {
              "type": "null"
            }
          ],
          "description": "An amount of a commodity."
        },
        "commodities": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/CommodityLine"
          },
          "description": "GnuCash's nested commodity table: one line per commodity an account holds, with its value in the report\ncurrency (`5.17:gnucash/report/html-acct-table.scm:925-948`)."
        },
        "number": {
          "anyOf": [
            {
              "$ref": "#/$defs/Rational"
            },
            {
              "type": "null"
            }
          ],
          "description": "A plain number, such as a percentage."
        },
        "price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Rational"
            },
            {
              "type": "null"
            }
          ],
          "description": "A price or exchange rate in `currency`."
        },
        "date": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "An instant."
        },
        "anchors": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Anchor"
          },
          "description": "Pieces of text, each linked, shown one per line: the Transaction Report's invoice cell\n(`5.17:gnucash/report/trep-engine.scm:1036-1049`)."
        },
        "until": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "For a `date`: the end of the period it starts, shown `<date> to <until>`."
        },
        "places": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 0,
          "description": "For a `number`: decimals shown, default 2."
        },
        "suffix": {
          "type": [
            "string",
            "null"
          ],
          "description": "For a `number`: text after the figure, such as `\" %\"`."
        },
        "rounding": {
          "anyOf": [
            {
              "$ref": "#/$defs/NumberRounding"
            },
            {
              "type": "null"
            }
          ],
          "description": "For a `number`: how it is rounded to `places`; banker's when absent."
        },
        "numberFormat": {
          "anyOf": [
            {
              "$ref": "#/$defs/NumberFormat"
            },
            {
              "type": "null"
            }
          ],
          "description": "For a `number`: how it is printed; GnuCash's number renderer when absent."
        },
        "currency": {
          "type": [
            "string",
            "null"
          ],
          "description": "For a `price`: the currency it is in."
        },
        "rounded": {
          "anyOf": [
            {
              "$ref": "#/$defs/Rational"
            },
            {
              "type": "null"
            }
          ],
          "description": "Host: for a `monetary`, the amount at the commodity's SCU, banker's rounding."
        },
        "localDate": {
          "type": [
            "string",
            "null"
          ],
          "description": "Host: for a `date`, its local date `YYYY-MM-DD` in the run's time zone."
        },
        "localUntil": {
          "type": [
            "string",
            "null"
          ],
          "description": "Host: for a `date` with `until`, the local date of `until`."
        },
        "display": {
          "type": [
            "string",
            "null"
          ],
          "description": "Host: the figure as text, for `monetary`, `number`, `price` and `date` cells; `<date> to <until>` for a period."
        },
        "account": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[0-9a-fA-F]{32}$",
          "description": "The account the cell names or links to."
        },
        "link": {
          "anyOf": [
            {
              "$ref": "#/$defs/Link"
            },
            {
              "type": "null"
            }
          ],
          "description": "Something a client can open."
        },
        "rule": {
          "type": "boolean",
          "description": "An accounting rule above the figure (\"Show accounting-style rules\",\n`5.17:gnucash/report/html-acct-table.scm:901-906`)."
        },
        "span": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 0,
          "description": "Columns the cell covers, default 1."
        },
        "footnote": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 0,
          "description": "The number of the table's footnote this cell refers to, shown as a superscript after the content."
        },
        "class": {
          "type": [
            "string",
            "null"
          ],
          "description": "Class names added to the cell's own, for the report's CSS (`css`), separated by single spaces (v0.6)."
        }
      },
      "description": "A cell. It holds exactly one of `text`, `monetary`, `commodities`, `number`, `price`, `date` and `anchors`; the\ndisplay fields are filled in by the host.",
      "oneOf": [
        {
          "required": [
            "text"
          ]
        },
        {
          "required": [
            "monetary"
          ]
        },
        {
          "required": [
            "commodities"
          ]
        },
        {
          "required": [
            "number"
          ]
        },
        {
          "required": [
            "price"
          ]
        },
        {
          "required": [
            "date"
          ]
        },
        {
          "required": [
            "anchors"
          ]
        }
      ]
    },
    "Monetary": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "amount": {
          "$ref": "#/$defs/Rational",
          "description": "The amount."
        },
        "commodity": {
          "type": "string",
          "description": "The commodity."
        }
      },
      "required": [
        "amount",
        "commodity"
      ],
      "description": "An exact amount of one commodity. On the wire: `{ \"amount\": Rational, \"commodity\": \"CURRENCY::USD\" }`."
    },
    "CommodityLine": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "monetary": {
          "$ref": "#/$defs/Monetary",
          "description": "The native amount."
        },
        "converted": {
          "anyOf": [
            {
              "$ref": "#/$defs/Monetary"
            },
            {
              "type": "null"
            }
          ],
          "description": "Its value in the report currency, when converted."
        },
        "display": {
          "type": [
            "string",
            "null"
          ],
          "description": "Host: the native amount as text."
        },
        "convertedDisplay": {
          "type": [
            "string",
            "null"
          ],
          "description": "Host: the converted value as text."
        }
      },
      "required": [
        "monetary"
      ],
      "description": "One commodity of a `commodities` cell."
    },
    "Anchor": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "text": {
          "type": "string",
          "description": "The text shown."
        },
        "link": {
          "$ref": "#/$defs/Link",
          "description": "Where it leads."
        }
      },
      "required": [
        "text",
        "link"
      ],
      "description": "One linked piece of text in an `anchors` cell."
    },
    "NumberRounding": {
      "oneOf": [
        {
          "type": "string",
          "const": "bankers",
          "description": "Ties to even, as GnuCash's number renderer rounds (`5.17:gnucash/report/html-style-info.scm:233-236`)."
        },
        {
          "type": "string",
          "const": "halfUp",
          "description": "Ties away from zero, as Guile's `~,nf` rounds the rates GnuCash prints from doubles\n(`5.17:gnucash/report/reports/standard/advanced-portfolio.scm:914-922`)."
        }
      ],
      "description": "How a `number` cell is rounded to its `places`."
    },
    "NumberFormat": {
      "oneOf": [
        {
          "type": "string",
          "const": "share",
          "description": "GnuCash's share print info (`gnc_share_print_info_places`, `5.17:libgnucash/app-utils/gnc-ui-util.cpp:1013-1023`):\nexactly `places` decimals, rounded half away from zero (`:1105-1145`), grouped with the locale's numeric\nseparators, the decimal point always printed: the portfolios' share counts, `100.` with no places."
        },
        {
          "type": "string",
          "const": "exact",
          "description": "`xaccPrintAmount` with `gnc_default_print_info(FALSE)` (`5.17:libgnucash/app-utils/gnc-ui-util.cpp:833-860`):\nat least the Locale's `frac_digits` decimals, no maximum and no rounding, grouped, a remainder that is not a\ndecimal as `w + n/d`. The invoice's quantities and percentage discounts\n(`5.17:gnucash/report/html-style-info.scm:217-218`) (v0.6). Takes no `places` and no `rounding`."
        }
      ],
      "description": "How a `number` cell is printed."
    },
    "ChartType": {
      "type": "string",
      "enum": [
        "bar",
        "line",
        "pie",
        "scatter"
      ],
      "description": "The kind of a chart."
    },
    "PlotSize": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "percent": {
              "type": "integer",
              "format": "uint32",
              "minimum": 0
            }
          },
          "required": [
            "percent"
          ],
          "additionalProperties": false,
          "description": "A percentage of the space available."
        },
        {
          "type": "object",
          "properties": {
            "pixels": {
              "type": "integer",
              "format": "uint32",
              "minimum": 0
            }
          },
          "required": [
            "pixels"
          ],
          "additionalProperties": false,
          "description": "Pixels."
        }
      ],
      "description": "A plot size: GnuCash's `(percent . n)` or `(pixels . n)` (`5.17:bindings/guile/gnc-optiondb.i:1094-1108`)."
    },
    "Axis": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "label": {
          "type": "string",
          "description": "The axis label; empty for none.",
          "default": ""
        },
        "scale": {
          "anyOf": [
            {
              "$ref": "#/$defs/Scale"
            },
            {
              "type": "null"
            }
          ],
          "description": "How positions are laid out; `category` for bar and line, `linear` for scatter, by default."
        },
        "format": {
          "anyOf": [
            {
              "$ref": "#/$defs/AxisFormat"
            },
            {
              "type": "null"
            }
          ],
          "description": "How values show; `number` by default."
        },
        "commodity": {
          "type": [
            "string",
            "null"
          ],
          "description": "The currency of a `currency` axis."
        }
      },
      "description": "An axis."
    },
    "Scale": {
      "oneOf": [
        {
          "type": "string",
          "const": "category",
          "description": "One slot per label."
        },
        {
          "type": "string",
          "const": "linear",
          "description": "Numeric x, for scatter."
        }
      ],
      "description": "How axis positions are laid out."
    },
    "AxisFormat": {
      "oneOf": [
        {
          "type": "string",
          "const": "currency",
          "description": "Amounts in the axis's `commodity`."
        },
        {
          "type": "string",
          "const": "percent",
          "description": "Percentages: two decimals and `%`."
        },
        {
          "type": "string",
          "const": "number",
          "description": "Plain numbers, exact."
        }
      ],
      "description": "How values on an axis show."
    },
    "Series": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "label": {
          "type": "string",
          "description": "The series label."
        },
        "color": {
          "type": "string",
          "pattern": "^#[0-9a-fA-F]{6}$",
          "description": "Its colour."
        },
        "values": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/Rational"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": "One value per label, `null` for none; every chart but `scatter`."
        },
        "points": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Point"
          },
          "description": "The points of a `scatter` series."
        },
        "colors": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "description": "A colour, #rrggbb.",
            "type": "string",
            "pattern": "^#[0-9a-fA-F]{6}$"
          },
          "description": "One colour per value: a pie's slices."
        },
        "fill": {
          "type": "boolean",
          "description": "Fill the area under a line, or fill a bar."
        },
        "lineWidth": {
          "anyOf": [
            {
              "$ref": "#/$defs/Rational"
            },
            {
              "type": "null"
            }
          ],
          "description": "Line width."
        },
        "stack": {
          "type": [
            "string",
            "null"
          ],
          "description": "Series with the same stack name stack together."
        },
        "kind": {
          "anyOf": [
            {
              "$ref": "#/$defs/SeriesKind"
            },
            {
              "type": "null"
            }
          ],
          "description": "Draw this series as bars or a line, to mix them."
        },
        "link": {
          "anyOf": [
            {
              "$ref": "#/$defs/Link"
            },
            {
              "type": "null"
            }
          ],
          "description": "A link for the whole series."
        },
        "links": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/Link"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": "One link per value."
        },
        "line": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^#[0-9a-fA-F]{6}$",
          "description": "For `scatter`: join the points with a line of this colour (`5.17:gnucash/report/reports/standard/price-scatter.scm:269-274`)."
        },
        "marker": {
          "anyOf": [
            {
              "$ref": "#/$defs/Marker"
            },
            {
              "type": "null"
            }
          ],
          "description": "The point marker."
        },
        "pointRadius": {
          "anyOf": [
            {
              "$ref": "#/$defs/Rational"
            },
            {
              "type": "null"
            }
          ],
          "description": "The points' radius, GnuCash's `pointRadius` (`5.17:gnucash/report/reports/standard/balance-forecast.scm:153-154`):\n0 hides a line's markers, which keep their hover labels; any other radius draws them as usual."
        },
        "displays": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": "Host: each value as its hover label shows it, under the y axis's format."
        }
      },
      "required": [
        "label",
        "color"
      ],
      "description": "A data series."
    },
    "Point": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "x": {
          "$ref": "#/$defs/Rational",
          "description": "x."
        },
        "y": {
          "$ref": "#/$defs/Rational",
          "description": "y."
        },
        "label": {
          "type": [
            "string",
            "null"
          ],
          "description": "The hover label's title."
        },
        "display": {
          "type": [
            "string",
            "null"
          ],
          "description": "Host: y as its hover label shows it."
        }
      },
      "required": [
        "x",
        "y"
      ],
      "description": "A point of a scatter series."
    },
    "SeriesKind": {
      "type": "string",
      "enum": [
        "bar",
        "line"
      ],
      "description": "How a series is drawn when a chart mixes them."
    },
    "Marker": {
      "type": "string",
      "enum": [
        "circle",
        "square",
        "diamond",
        "cross",
        "plus"
      ],
      "description": "A point marker."
    },
    "Tooltip": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "grouped": {
          "type": "boolean",
          "description": "One label for all series at a category; GnuCash's default `index` mode (`:220-221`).",
          "default": true
        },
        "nonZeroOnly": {
          "type": "boolean",
          "description": "Leave zero values out of the label.",
          "default": false
        }
      },
      "description": "How hover labels work (`set-tooltip-mode!`, `set-tooltip-non-zero-only!`, `5.17:gnucash/report/html-chart.scm:309-328`)."
    },
    "ListItem": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "text": {
          "type": "string",
          "description": "The text."
        },
        "account": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[0-9a-fA-F]{32}$",
          "description": "The account the item names, which links to its register (`gnc:html-account-anchor`)."
        }
      },
      "required": [
        "text"
      ],
      "description": "One item of a list."
    },
    "GridRow": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "cells": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GridCell"
          },
          "description": "The cells, left to right."
        }
      },
      "required": [
        "cells"
      ],
      "description": "One row of a grid."
    },
    "GridCell": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "rowspan": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0,
          "description": "The rows the cell spans, 0 to 100, GnuCash's `high`."
        },
        "colspan": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0,
          "description": "The columns the cell spans, 0 to 100, GnuCash's `wide`; a page shows 0 as 1."
        },
        "child": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0,
          "description": "The child's position in the view's report-list, from 0."
        },
        "link": {
          "anyOf": [
            {
              "$ref": "#/$defs/Link"
            },
            {
              "type": "null"
            }
          ],
          "description": "*Host*: a report link that runs the child alone, GnuCash's \"Single Report\"; absent when the child names no\nreport that is loaded."
        },
        "result": {
          "anyOf": [
            {
              "$ref": "#/$defs/EmbeddedResult"
            },
            {
              "type": "null"
            }
          ],
          "description": "*Host*: the child's result."
        },
        "warning": {
          "anyOf": [
            {
              "$ref": "#/$defs/WarningBlock"
            },
            {
              "type": "null"
            }
          ],
          "description": "*Host*: why the child did not run, in place of `result`: GnuCash's \"Report error\"."
        }
      },
      "required": [
        "rowspan",
        "colspan",
        "child"
      ],
      "description": "One child in its cell."
    },
    "EmbeddedResult": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "report": {
          "$ref": "#/$defs/ReportIdentity",
          "description": "The template and saved configuration run."
        },
        "title": {
          "type": "string",
          "description": "The child's title, which a page shows as the cell's heading."
        },
        "headline": {
          "type": [
            "string",
            "null"
          ],
          "description": "A heading when it differs from the title."
        },
        "options": {
          "type": "object",
          "additionalProperties": true,
          "description": "Every option's value, in wire form."
        },
        "sections": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Section"
          },
          "description": "The sections, in order."
        },
        "log": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LogEntry"
          },
          "description": "The child's report log."
        }
      },
      "required": [
        "report",
        "title",
        "options",
        "sections",
        "log"
      ],
      "description": "A child's report result: what `report.run` returns, without the view's `version` and `now`, and without its `css`,\nwhich GnuCash leaves out of a report rendered inside another (`5.17:gnucash/report/html-document.scm:154-185`,\n`5.17:gnucash/report/reports/standard/view-column.scm:91`)."
    },
    "LogEntry": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "level": {
          "$ref": "#/$defs/LogLevel",
          "description": "Which call wrote it."
        },
        "text": {
          "type": "string",
          "description": "The text."
        },
        "source": {
          "type": [
            "string",
            "null"
          ],
          "description": "The script it came from, when known."
        },
        "line": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 0,
          "description": "The line, from 1, when known."
        }
      },
      "required": [
        "level",
        "text"
      ],
      "description": "An entry of the report log."
    },
    "LogLevel": {
      "oneOf": [
        {
          "type": "string",
          "const": "print",
          "description": "Rhai's `print`."
        },
        {
          "type": "string",
          "const": "debug",
          "description": "Rhai's `debug`."
        }
      ],
      "description": "The call that wrote a log entry."
    },
    "WarningBlock": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "title": {
          "type": "string",
          "description": "The warning's title, such as \"No accounts selected\"."
        },
        "text": {
          "type": "string",
          "description": "What it says."
        },
        "class": {
          "type": [
            "string",
            "null"
          ],
          "description": "Class names for the report's CSS (`css`), separated by single spaces (v0.6)."
        }
      },
      "required": [
        "title",
        "text"
      ],
      "description": "A warning block."
    },
    "OptionsSummaryRow": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "section": {
          "type": "string",
          "description": "The option's section; empty for a view's `Embedded Report` rows (v0.5), which name no option."
        },
        "name": {
          "type": "string",
          "description": "The option's name, or `Embedded Report`."
        },
        "value": {
          "type": "string",
          "description": "Its value as text; for an `Embedded Report` row, the child's \"Report name\"."
        }
      },
      "required": [
        "section",
        "name",
        "value"
      ],
      "description": "One changed option in the options summary."
    },
    "ExportCell": {
      "anyOf": [
        {
          "type": "string",
          "description": "Text, written quoted."
        },
        {
          "$ref": "#/$defs/Rational",
          "description": "An exact number, written as Guile prints it once inexact."
        }
      ],
      "description": "One cell of an export row; `null` for an empty one."
    },
    "SaveParams2": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "description": "The new configuration's name, unique among saved configurations."
        },
        "report": {
          "$ref": "#/$defs/ReportRef",
          "description": "The report whose options to save: a template, or a saved configuration, whose template the new one then\nconfigures."
        },
        "options": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReportOptions"
            },
            {
              "type": "null"
            }
          ],
          "description": "Changes over the report's options before saving.",
          "default": null
        }
      },
      "required": [
        "name",
        "report"
      ],
      "description": "Params of `report.saveConfiguration`."
    },
    "ListResult4": {
      "type": "object",
      "properties": {
        "templates": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TemplateInfo"
          },
          "description": "The style sheet templates, sorted by name."
        },
        "styleSheets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/StyleSheetInfo"
          },
          "description": "Every style sheet, sorted by name bytewise."
        }
      },
      "required": [
        "templates",
        "styleSheets"
      ],
      "description": "The result of `report.styleSheets`."
    },
    "TemplateInfo": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "`CSS`, `Easy`, `Fancy`, `Footer`, `Head or Tail` or `Plain`."
        },
        "options": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OptionInfo"
          },
          "description": "Its options."
        }
      },
      "required": [
        "name",
        "options"
      ],
      "description": "A style sheet template and the options its style sheets have, at their defaults."
    },
    "UpdateParams6": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "configuration": {
          "$ref": "#/$defs/ReportRef",
          "description": "The saved configuration, by GUID or name."
        },
        "options": {
          "$ref": "#/$defs/ReportOptions",
          "description": "The options to set; `null` returns one to the template's default."
        }
      },
      "required": [
        "configuration",
        "options"
      ],
      "description": "Params of `report.updateConfiguration`."
    },
    "UpdateParams7": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "description": "The style sheet."
        },
        "options": {
          "$ref": "#/$defs/ReportOptions",
          "description": "The options to set; `null` returns one to its default."
        }
      },
      "required": [
        "name",
        "options"
      ],
      "description": "Params of `report.updateStyleSheet`."
    },
    "RunApplyParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "proposal": {
          "type": "string",
          "description": "The proposal's ID."
        },
        "choices": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ChoiceParam"
          },
          "description": "The caller's changes, by instance index. Instances not named keep the proposed state and bindings."
        },
        "autoCreateOnly": {
          "type": "boolean",
          "description": "Apply only the instances of auto-create scheduled transactions, as GnuCash does before it shows its dialog.",
          "default": false
        }
      },
      "required": [
        "proposal"
      ],
      "description": "The params of `scheduledTransaction.apply`."
    },
    "ChoiceParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "index": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "The instance's `index` in the proposal."
        },
        "state": {
          "anyOf": [
            {
              "$ref": "#/$defs/InstanceState"
            },
            {
              "type": "null"
            }
          ],
          "description": "Its new state; default the proposed one.",
          "default": null
        },
        "variables": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/Amount"
          },
          "description": "Values for its variables, by name. `i` can't be set.",
          "default": {}
        }
      },
      "required": [
        "index"
      ],
      "description": "The caller's change to one instance of a proposal."
    },
    "InstanceState": {
      "oneOf": [
        {
          "type": "string",
          "const": "toCreate",
          "description": "Create its transactions, then advance the schedule."
        },
        {
          "type": "string",
          "const": "reminder",
          "description": "Nothing: reminders are not recorded, so it is proposed again next time."
        },
        {
          "type": "string",
          "const": "postponed",
          "description": "Save it as a Deferred instance, then advance the schedule."
        },
        {
          "type": "string",
          "const": "ignored",
          "description": "Advance the schedule without creating anything."
        },
        {
          "type": "string",
          "const": "created",
          "description": "Created: only in results; choosing it is `invalid`."
        }
      ],
      "description": "An instance's state (`GncSxInstanceState`, `5.17:libgnucash/app-utils/gnc-sx-instance-model.h:52-60`)."
    },
    "RunApplied": {
      "type": "object",
      "properties": {
        "created": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CreatedWire"
          },
          "description": "Instances created."
        },
        "postponed": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "uint",
            "minimum": 0
          },
          "description": "Instances postponed, newly or still."
        },
        "ignored": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "uint",
            "minimum": 0
          },
          "description": "Instances ignored."
        },
        "reminders": {
          "type": "array",
          "items": {
            "type": "integer",
            "format": "uint",
            "minimum": 0
          },
          "description": "Instances left as reminders."
        },
        "schedules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScheduleState"
          },
          "description": "The scheduled transactions whose state changed, after the apply, in book order."
        },
        "imbalanceSplits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RunImbalanceSplit"
          },
          "description": "Every `Imbalance-<CUR>` split made."
        },
        "warnings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RunWarning"
          },
          "description": "Every Imbalance split again, and every transaction created read-only by date."
        }
      },
      "required": [
        "created",
        "postponed",
        "ignored",
        "reminders",
        "schedules",
        "imbalanceSplits",
        "warnings"
      ],
      "description": "The result of `scheduledTransaction.apply`."
    },
    "CreatedWire": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Its index in the proposal."
        },
        "scheduledTransaction": {
          "$ref": "#/$defs/Guid",
          "description": "The scheduled transaction."
        },
        "date": {
          "$ref": "#/$defs/Date",
          "description": "The occurrence date."
        },
        "transactions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "The transactions created."
        }
      },
      "required": [
        "index",
        "scheduledTransaction",
        "date",
        "transactions"
      ],
      "description": "An instance whose transactions were created."
    },
    "ScheduleState": {
      "type": "object",
      "properties": {
        "scheduledTransaction": {
          "$ref": "#/$defs/Guid",
          "description": "The scheduled transaction."
        },
        "lastOccurrence": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The last occurrence acted on, or null if never run."
        },
        "instanceCount": {
          "type": "integer",
          "format": "int32",
          "description": "The Instance count: the `i` of the next instance."
        },
        "end": {
          "$ref": "#/$defs/End",
          "description": "Its end."
        },
        "deferredInstances": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DeferredInstance"
          },
          "description": "The Deferred instances, in file order."
        }
      },
      "required": [
        "scheduledTransaction",
        "instanceCount",
        "end",
        "deferredInstances"
      ],
      "description": "A scheduled transaction's temporal state."
    },
    "End": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "never": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "True when there is no end."
        },
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "No occurrence after this date."
        },
        "occurrences": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "At most this many occurrences in all."
        },
        "remaining": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "This many still to come."
        }
      },
      "description": "A scheduled transaction's end (`design/api/scheduled-transactions.md`, \"The model on the wire\"): `{ never: true }`,\n`{ date }`, `{ occurrences, remaining }`, or, when a file holds both, `{ date, occurrences, remaining }`. As a\nparam, one of the first three; `remaining` defaults to `occurrences`."
    },
    "DeferredInstance": {
      "type": "object",
      "properties": {
        "lastOccurrence": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The last occurrence before the postponed one, or null."
        },
        "remainingOccurrences": {
          "type": "integer",
          "format": "int32",
          "description": "Occurrences remaining then."
        },
        "instanceCount": {
          "type": "integer",
          "format": "int32",
          "description": "The Instance count then."
        }
      },
      "required": [
        "remainingOccurrences",
        "instanceCount"
      ],
      "description": "A Deferred instance: the temporal state saved before a postponed instance."
    },
    "RunImbalanceSplit": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "The instance's index."
        },
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "The transaction."
        },
        "split": {
          "$ref": "#/$defs/Guid",
          "description": "The Imbalance split."
        },
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "Its account."
        },
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "Its value."
        }
      },
      "required": [
        "index",
        "transaction",
        "split",
        "account",
        "value"
      ],
      "description": "An `Imbalance-<CUR>` split an apply made."
    },
    "RunWarning": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "`imbalance` or `read-only-by-date`."
        },
        "message": {
          "type": "string",
          "description": "What happened."
        },
        "index": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "The instance's index."
        }
      },
      "required": [
        "code",
        "message",
        "index"
      ],
      "description": "Something the caller should know about an apply."
    },
    "CreateParams7": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "description": "The name, not empty."
        },
        "schedule": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RecurrenceParam"
          },
          "description": "The Schedule: at least one Recurrence, each starting on `startDate` unless it says otherwise."
        },
        "templateTransactions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TemplateTransactionParam"
          },
          "description": "The template transactions; default none."
        },
        "enabled": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Since Last Run leaves out a disabled one; default true.",
          "default": null
        },
        "startDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The first possible occurrence; default today.",
          "default": null
        },
        "end": {
          "anyOf": [
            {
              "$ref": "#/$defs/End"
            },
            {
              "type": "null"
            }
          ],
          "description": "The end; default never. Setting one kind of end clears the other.",
          "default": null
        },
        "autoCreate": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Create due instances without asking; default false. Refused with variables other than `i`, with more than\none commodity, or with no template split.",
          "default": null
        },
        "notify": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "And say so; default true with `autoCreate`, refused without it.",
          "default": null
        },
        "advanceCreateDays": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "Days ahead to create; default 0.",
          "minimum": 0,
          "default": null
        },
        "advanceRemindDays": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "Days ahead to remind, after that; default 0.",
          "minimum": 0,
          "default": null
        }
      },
      "required": [
        "name",
        "schedule"
      ],
      "description": "Params of `scheduledTransaction.create`; absent fields take the editor's defaults."
    },
    "RecurrenceParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "mult": {
          "type": "integer",
          "format": "uint16",
          "minimum": 0,
          "maximum": 65535,
          "description": "How many steps apart occurrences are."
        },
        "periodType": {
          "$ref": "#/$defs/PeriodTypeWire",
          "description": "The step."
        },
        "start": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The first occurrence; the scheduled transaction's start date when absent.",
          "default": null
        },
        "weekendAdjust": {
          "$ref": "#/$defs/WeekendAdjustWire",
          "description": "Where occurrences on a weekend move to; `none` when absent.",
          "default": "none"
        }
      },
      "required": [
        "mult",
        "periodType"
      ],
      "description": "A Recurrence of a scheduled transaction's Schedule as a caller gives it: as [`RecurrenceWire`], but the start may\nbe left out to start on the scheduled transaction's start date, and a `mult` of 0 is stored as 1 (except for\n`once`), as `recurrenceSet` stores it."
    },
    "TemplateTransactionParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "guid": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "An existing template transaction of this scheduled transaction to keep (`update` only).",
          "default": null
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The description.",
          "default": null
        },
        "num": {
          "type": [
            "string",
            "null"
          ],
          "description": "The num.",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "The notes.",
          "default": null
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "The currency; the first split's account commodity when that is a currency.",
          "default": null
        },
        "splits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TemplateSplitParam"
          },
          "description": "The template splits, in order."
        }
      },
      "required": [
        "splits"
      ],
      "description": "A template transaction as the caller gives it."
    },
    "TemplateSplitParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "guid": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "An existing template split of this scheduled transaction to keep (`update` only).",
          "default": null
        },
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The real account the created split goes to: not the root, a placeholder or a template account."
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "The memo.",
          "default": null
        },
        "action": {
          "type": [
            "string",
            "null"
          ],
          "description": "The action.",
          "default": null
        },
        "debitFormula": {
          "type": [
            "string",
            "null"
          ],
          "description": "The debit Formula; empty or absent means no debit.",
          "default": null
        },
        "creditFormula": {
          "type": [
            "string",
            "null"
          ],
          "description": "The credit Formula; empty or absent means no credit.",
          "default": null
        }
      },
      "required": [
        "account"
      ],
      "description": "A template split as the caller gives it."
    },
    "ScheduledTransactionInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "Identity."
        },
        "name": {
          "type": "string",
          "description": "The name; names need not be unique."
        },
        "enabled": {
          "type": "boolean",
          "description": "Disabled ones are left out of Since Last Run and the forecasts."
        },
        "startDate": {
          "$ref": "#/$defs/Date",
          "description": "The first possible occurrence."
        },
        "end": {
          "$ref": "#/$defs/End",
          "description": "The end, as stored."
        },
        "lastOccurrence": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The last occurrence acted on (created, ignored or postponed), or null if never run."
        },
        "instanceCount": {
          "type": "integer",
          "format": "int32",
          "description": "The Instance count: the value of `i` for the next instance."
        },
        "autoCreate": {
          "type": "boolean",
          "description": "Create due instances without asking."
        },
        "notify": {
          "type": "boolean",
          "description": "And say so."
        },
        "advanceCreateDays": {
          "type": "integer",
          "format": "int32",
          "description": "Days ahead to create."
        },
        "advanceRemindDays": {
          "type": "integer",
          "format": "int32",
          "description": "Days ahead to remind, after that."
        },
        "schedule": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Recurrence"
          },
          "description": "The Schedule, as stored."
        },
        "nextOccurrence": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The next occurrence after the last (or the first), or null when it has ended or never occurs."
        },
        "deferredInstances": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DeferredInstance"
          },
          "description": "The state saved before each postponed instance, in file order."
        },
        "templateAccount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The template account's GUID, or null when there is none."
        },
        "templateTransactions": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/TemplateTransaction"
          },
          "description": "The template transactions, in the template account's split order; absent in `scheduledTransaction.list`."
        },
        "variables": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Every variable the formulas name, `i` and the exchange-rate variables, sorted bytewise."
        },
        "warnings": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/WarningInfo"
          },
          "description": "What GnuCash's editor would have asked to confirm; only from methods that write."
        }
      },
      "required": [
        "guid",
        "name",
        "enabled",
        "startDate",
        "end",
        "instanceCount",
        "autoCreate",
        "notify",
        "advanceCreateDays",
        "advanceRemindDays",
        "schedule",
        "deferredInstances",
        "variables"
      ],
      "description": "A scheduled transaction, with every field GnuCash's file holds."
    },
    "TemplateTransaction": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "Identity."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The description."
        },
        "num": {
          "type": [
            "string",
            "null"
          ],
          "description": "The num."
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "The notes."
        },
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "The currency it is written in."
        },
        "splits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TemplateSplit"
          },
          "description": "The template splits, in order."
        }
      },
      "required": [
        "guid",
        "currency",
        "splits"
      ],
      "description": "A template transaction."
    },
    "TemplateSplit": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "Identity."
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The real account the created split goes to, or null when the split names none."
        },
        "accountName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Its full name, or null when it is not in the Book."
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "The memo."
        },
        "action": {
          "type": [
            "string",
            "null"
          ],
          "description": "The action."
        },
        "debitFormula": {
          "type": [
            "string",
            "null"
          ],
          "description": "The debit Formula; empty or null means no debit."
        },
        "creditFormula": {
          "type": [
            "string",
            "null"
          ],
          "description": "The credit Formula; empty or null means no credit."
        },
        "debitNumeric": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "The debit Formula's value when it names no variable, as stored (read only)."
        },
        "creditNumeric": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "The credit Formula's value likewise."
        }
      },
      "required": [
        "guid"
      ],
      "description": "A template split."
    },
    "WarningInfo": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "description": "`duplicate-name` or `never-runs`."
        },
        "message": {
          "type": "string",
          "description": "What the editor would have asked."
        }
      },
      "required": [
        "code",
        "message"
      ],
      "description": "One of the editor's confirmations, reported instead of asked."
    },
    "ScheduledKey": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "scheduledTransaction": {
          "$ref": "#/$defs/Guid",
          "description": "The scheduled transaction."
        }
      },
      "required": [
        "scheduledTransaction"
      ],
      "description": "Names one scheduled transaction."
    },
    "Deleted": {
      "type": "object",
      "properties": {
        "deleted": {
          "type": "boolean",
          "description": "Always true."
        }
      },
      "required": [
        "deleted"
      ],
      "description": "The result of `scheduledTransaction.delete`."
    },
    "RunDiscardParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "proposal": {
          "type": "string",
          "description": "The proposal's ID."
        }
      },
      "required": [
        "proposal"
      ],
      "description": "The params of `scheduledTransaction.discard`."
    },
    "RunDiscarded": {
      "type": "object",
      "properties": {
        "discarded": {
          "type": "boolean",
          "description": "Always true."
        }
      },
      "required": [
        "discarded"
      ],
      "description": "The result of `scheduledTransaction.discard`."
    },
    "FromTransactionParams2": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "The transaction to copy; it is not changed."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name; the transaction's description by default.",
          "default": null
        },
        "frequency": {
          "$ref": "#/$defs/FrequencyWire",
          "description": "How often; daily by default."
        },
        "startDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The first occurrence; the frequency's first after the transaction's date by default.",
          "default": null
        },
        "end": {
          "anyOf": [
            {
              "$ref": "#/$defs/End"
            },
            {
              "type": "null"
            }
          ],
          "description": "The end; never by default.",
          "default": null
        },
        "autoCreate": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Create due instances without asking; false by default.",
          "default": null
        },
        "notify": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "And say so; true with `autoCreate` by default.",
          "default": null
        },
        "advanceCreateDays": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "Days ahead to create; 0 by default.",
          "minimum": 0,
          "default": null
        },
        "advanceRemindDays": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "Days ahead to remind; 0 by default.",
          "minimum": 0,
          "default": null
        }
      },
      "required": [
        "transaction"
      ],
      "description": "Params of `scheduledTransaction.fromTransaction`."
    },
    "FrequencyWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "daily",
          "description": "Every day."
        },
        {
          "type": "string",
          "const": "weekly",
          "description": "Every week."
        },
        {
          "type": "string",
          "const": "biWeekly",
          "description": "Every two weeks."
        },
        {
          "type": "string",
          "const": "monthly",
          "description": "Every month."
        },
        {
          "type": "string",
          "const": "quarterly",
          "description": "Every three months."
        },
        {
          "type": "string",
          "const": "yearly",
          "description": "Every twelve months (month ×12, as GnuCash makes it)."
        }
      ],
      "description": "The dialog's frequencies (`5.17:gnucash/gnome/dialog-sx-from-trans.cpp:70-77`)."
    },
    "ListParams7": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Only those enabled, or only those disabled.",
          "default": null
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only those whose template splits name this account.",
          "default": null
        }
      },
      "description": "Params of `scheduledTransaction.list`."
    },
    "ScheduledList": {
      "type": "object",
      "properties": {
        "scheduledTransactions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScheduledTransactionInfo"
          },
          "description": "In book order, without their template transactions."
        }
      },
      "required": [
        "scheduledTransactions"
      ],
      "description": "The result of `scheduledTransaction.list`."
    },
    "LoanParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The repayment's name; `Loan` by default.",
          "default": null
        },
        "loanAccount": {
          "$ref": "#/$defs/AccountRef",
          "description": "The loan, a LIABILITY account."
        },
        "principal": {
          "$ref": "#/$defs/Amount",
          "description": "The principal, more than 0, in the loan account's commodity."
        },
        "rate": {
          "$ref": "#/$defs/Amount",
          "description": "The annual rate in percent, 0.001 to 100 with at most 3 decimals."
        },
        "rateType": {
          "$ref": "#/$defs/RateTypeWire",
          "description": "The rate's kind; `simple` (\"Interest Rate\") by default."
        },
        "startDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The loan's start; today by default.",
          "default": null
        },
        "length": {
          "$ref": "#/$defs/LengthParam",
          "description": "The loan's length."
        },
        "monthsRemaining": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 0,
          "description": "Months still to pay; by default the length less the months from the start to today.",
          "default": null
        },
        "repayment": {
          "$ref": "#/$defs/RepaymentParam",
          "description": "The repayment."
        },
        "escrow": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "An escrow account the repayment goes through.",
          "default": null
        },
        "otherPayments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OtherPaymentParam"
          },
          "description": "Other payments made as part of each repayment."
        }
      },
      "required": [
        "loanAccount",
        "principal",
        "rate",
        "length",
        "repayment"
      ],
      "description": "Params of `scheduledTransaction.loan`."
    },
    "RateTypeWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "simple",
          "description": "\"Interest Rate\"."
        },
        {
          "type": "string",
          "const": "aprDaily",
          "description": "APR compounded daily."
        },
        {
          "type": "string",
          "const": "aprWeekly",
          "description": "APR compounded weekly."
        },
        {
          "type": "string",
          "const": "aprMonthly",
          "description": "APR compounded monthly."
        },
        {
          "type": "string",
          "const": "aprQuarterly",
          "description": "APR compounded quarterly."
        },
        {
          "type": "string",
          "const": "aprSemiAnnually",
          "description": "APR compounded twice a year."
        },
        {
          "type": "string",
          "const": "aprAnnually",
          "description": "APR compounded once a year."
        }
      ],
      "description": "The interest rate's kind (`IRateType`, `5.17:gnucash/gnome/assistant-loan.cpp:166-175`)."
    },
    "LengthParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "months": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 0,
          "description": "In months.",
          "default": null
        },
        "years": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint32",
          "minimum": 0,
          "description": "Or in years.",
          "default": null
        }
      },
      "description": "A length in months or in years, 1 to 9999."
    },
    "RepaymentParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "from": {
          "$ref": "#/$defs/AccountRef",
          "description": "Paid from: BANK, CASH, CREDIT, ASSET or LIABILITY."
        },
        "principalTo": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "The principal goes to; the loan account by default.",
          "default": null
        },
        "interestTo": {
          "$ref": "#/$defs/AccountRef",
          "description": "The interest goes to: those types or EXPENSE."
        },
        "start": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The first repayment; the loan's start by default.",
          "default": null
        },
        "frequency": {
          "anyOf": [
            {
              "$ref": "#/$defs/FrequencyParam"
            },
            {
              "type": "null"
            }
          ],
          "description": "How often; monthly by default."
        }
      },
      "required": [
        "from",
        "interestTo"
      ],
      "description": "The repayment page."
    },
    "FrequencyParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "mult": {
          "type": "integer",
          "format": "uint16",
          "minimum": 0,
          "maximum": 65535,
          "description": "How many steps apart."
        },
        "periodType": {
          "$ref": "#/$defs/PeriodTypeWire",
          "description": "The step; not `once`."
        },
        "weekendAdjust": {
          "$ref": "#/$defs/WeekendAdjustWire",
          "description": "Where repayments on a weekend move to; `none` by default.",
          "default": "none"
        }
      },
      "required": [
        "mult",
        "periodType"
      ],
      "description": "One Recurrence's step without a start: the repayment frequency."
    },
    "OtherPaymentParam": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "kind": {
          "$ref": "#/$defs/PaymentKindWire",
          "description": "Which."
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "The memo; the kind's by default.",
          "default": null
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "The amount, written exactly."
        },
        "from": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Paid from; the repayment's account by default.",
          "default": null
        },
        "to": {
          "$ref": "#/$defs/AccountRef",
          "description": "Paid to."
        },
        "viaEscrow": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Through the escrow account; by default yes for all but `other` when there is one. Refused without one.",
          "default": null
        }
      },
      "required": [
        "kind",
        "amount",
        "to"
      ],
      "description": "An other payment made with each repayment."
    },
    "PaymentKindWire": {
      "oneOf": [
        {
          "type": "string",
          "const": "taxes",
          "description": "Taxes (`Tax Payment`)."
        },
        {
          "type": "string",
          "const": "insurance",
          "description": "Insurance (`Insurance Payment`)."
        },
        {
          "type": "string",
          "const": "pmi",
          "description": "PMI (`PMI Payment`)."
        },
        {
          "type": "string",
          "const": "other",
          "description": "Another expense (`Miscellaneous Payment`)."
        }
      ],
      "description": "GnuCash's four other payments."
    },
    "LoanResult": {
      "type": "object",
      "properties": {
        "scheduledTransaction": {
          "$ref": "#/$defs/ScheduledTransactionInfo",
          "description": "The repayment scheduled transaction."
        },
        "payment": {
          "$ref": "#/$defs/Amount",
          "description": "The `pmt` formula's value, to 12 significant figures."
        }
      },
      "required": [
        "scheduledTransaction",
        "payment"
      ],
      "description": "The result of `scheduledTransaction.loan`."
    },
    "OccurrencesParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "scheduledTransaction": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Its occurrences from its current state.",
          "default": null
        },
        "schedule": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/RecurrenceParam"
          },
          "description": "Or a Schedule not yet saved, as never run."
        },
        "startDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The unsaved Schedule's start date; default today.",
          "default": null
        },
        "end": {
          "anyOf": [
            {
              "$ref": "#/$defs/End"
            },
            {
              "type": "null"
            }
          ],
          "description": "The unsaved Schedule's end; default never.",
          "default": null
        },
        "count": {
          "type": "integer",
          "format": "uint",
          "minimum": 1,
          "description": "How many, 1 to 1000.",
          "maximum": 1000,
          "default": 10
        },
        "after": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only occurrences after this date.",
          "default": null
        }
      },
      "description": "Params of `scheduledTransaction.occurrences`: a scheduled transaction, or a Schedule not yet saved."
    },
    "OccurrenceList": {
      "type": "object",
      "properties": {
        "occurrences": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OccurrenceInfo"
          },
          "description": "Ascending."
        }
      },
      "required": [
        "occurrences"
      ],
      "description": "The result of `scheduledTransaction.occurrences`."
    },
    "OccurrenceInfo": {
      "type": "object",
      "properties": {
        "date": {
          "$ref": "#/$defs/Date",
          "description": "The date."
        },
        "instanceCount": {
          "type": "integer",
          "format": "int32",
          "description": "Its `i`."
        }
      },
      "required": [
        "date",
        "instanceCount"
      ],
      "description": "One occurrence."
    },
    "RunProposal": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The proposal's ID, for `scheduledTransaction.apply` and `scheduledTransaction.discard`."
        },
        "bookRevision": {
          "type": "integer",
          "format": "uint64",
          "minimum": 0,
          "description": "The Book revision it was made at."
        },
        "today": {
          "$ref": "#/$defs/Date",
          "description": "The day it was made for: the local day of the session's clock."
        },
        "thresholdDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The auto read-only threshold date, or null with no threshold."
        },
        "summary": {
          "$ref": "#/$defs/RunSummary",
          "description": "Counts of its instances."
        },
        "schedules": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RunSchedule"
          },
          "description": "One entry per enabled scheduled transaction with at least one instance, in book order."
        }
      },
      "required": [
        "id",
        "bookRevision",
        "today",
        "summary",
        "schedules"
      ],
      "description": "A Since Last Run proposal (the result of `scheduledTransaction.sinceLastRun`)."
    },
    "RunSummary": {
      "type": "object",
      "properties": {
        "toCreate": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Proposed to create."
        },
        "reminders": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Proposed as reminders."
        },
        "postponed": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Postponed before."
        },
        "autoCreate": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Of auto-create scheduled transactions."
        },
        "needVariables": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "To create, with a variable still unbound."
        },
        "readOnlyByDate": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Dated before the read-only threshold."
        },
        "errors": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "With errors."
        }
      },
      "required": [
        "toCreate",
        "reminders",
        "postponed",
        "autoCreate",
        "needVariables",
        "readOnlyByDate",
        "errors"
      ],
      "description": "Counts of a proposal's instances."
    },
    "RunSchedule": {
      "type": "object",
      "properties": {
        "scheduledTransaction": {
          "$ref": "#/$defs/Guid",
          "description": "The scheduled transaction."
        },
        "name": {
          "type": "string",
          "description": "Its name."
        },
        "autoCreate": {
          "type": "boolean",
          "description": "It creates its instances without asking."
        },
        "notify": {
          "type": "boolean",
          "description": "And says so."
        },
        "instances": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Instance"
          },
          "description": "Its instances: postponed first, then to create, then reminders, each group in date order."
        }
      },
      "required": [
        "scheduledTransaction",
        "name",
        "autoCreate",
        "notify",
        "instances"
      ],
      "description": "The instances of one scheduled transaction."
    },
    "Instance": {
      "type": "object",
      "properties": {
        "index": {
          "type": "integer",
          "format": "uint",
          "minimum": 0,
          "description": "Its position across the whole proposal: the key `scheduledTransaction.apply` changes it by."
        },
        "date": {
          "$ref": "#/$defs/Date",
          "description": "The occurrence date."
        },
        "state": {
          "$ref": "#/$defs/InstanceState",
          "description": "The proposed state: `postponed`, `toCreate` or `reminder`."
        },
        "instanceCount": {
          "type": "integer",
          "format": "int32",
          "description": "Its `i`."
        },
        "variables": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VariableWire"
          },
          "description": "Every variable, sorted by name; `i` has its value and is not editable."
        },
        "readOnlyByDate": {
          "type": "boolean",
          "description": "Dated before the threshold date: creating it needs the caller's explicit choice."
        },
        "errors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InstanceError"
          },
          "description": "What creating it as it stands would fail on, each as the error `scheduledTransaction.apply` would return."
        },
        "transactions": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/TransactionPreview"
          },
          "description": "When every variable has a value and nothing fails: the transactions creating it would make. Otherwise null."
        }
      },
      "required": [
        "index",
        "date",
        "state",
        "instanceCount",
        "variables",
        "readOnlyByDate",
        "errors"
      ],
      "description": "One instance of a scheduled transaction, as Since Last Run proposes it."
    },
    "VariableWire": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Its name."
        },
        "value": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Its value; null while unbound."
        },
        "editable": {
          "type": "boolean",
          "description": "False for `i`, the Instance count."
        }
      },
      "required": [
        "name",
        "editable"
      ],
      "description": "A variable of an instance."
    },
    "InstanceError": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32",
          "description": "The error code: `formula` (6000) or `invalid` (2001)."
        },
        "message": {
          "type": "string",
          "description": "What is wrong."
        },
        "data": {
          "description": "Where, with `reason`."
        }
      },
      "required": [
        "code",
        "message",
        "data"
      ],
      "description": "A problem found in a proposal: `code`, `message` and `data` as the error object of the apply it would refuse."
    },
    "TransactionPreview": {
      "type": "object",
      "properties": {
        "templateTransaction": {
          "$ref": "#/$defs/Guid",
          "description": "The template transaction it comes from."
        },
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "Its currency."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The template's description."
        },
        "num": {
          "type": [
            "string",
            "null"
          ],
          "description": "The template's num."
        },
        "splits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SplitPreview"
          },
          "description": "One split per template split, in template order."
        },
        "imbalance": {
          "anyOf": [
            {
              "$ref": "#/$defs/ImbalancePreview"
            },
            {
              "type": "null"
            }
          ],
          "description": "The `Imbalance-<CUR>` split the commit would add when rounding leaves the values unbalanced, or null."
        }
      },
      "required": [
        "templateTransaction",
        "currency",
        "splits"
      ],
      "description": "A transaction creating an instance would make."
    },
    "SplitPreview": {
      "type": "object",
      "properties": {
        "account": {
          "$ref": "#/$defs/Guid",
          "description": "The account."
        },
        "accountName": {
          "type": "string",
          "description": "Its full name."
        },
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "Value in the transaction currency."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "Amount in the account's commodity."
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "The template split's memo."
        },
        "action": {
          "type": [
            "string",
            "null"
          ],
          "description": "The template split's action."
        }
      },
      "required": [
        "account",
        "accountName",
        "value",
        "amount"
      ],
      "description": "A split creating an instance would make."
    },
    "ImbalancePreview": {
      "type": "object",
      "properties": {
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "Its value."
        },
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "The transaction currency."
        },
        "account": {
          "type": "string",
          "description": "The full name of the account it would go to, made if the Book has none."
        }
      },
      "required": [
        "value",
        "currency",
        "account"
      ],
      "description": "The Imbalance split creating an instance would add."
    },
    "UpdateParams8": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "scheduledTransaction": {
          "$ref": "#/$defs/Guid",
          "description": "The scheduled transaction."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The new name.",
          "default": null
        },
        "schedule": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/RecurrenceParam"
          },
          "description": "A new Schedule."
        },
        "templateTransactions": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/TemplateTransactionParam"
          },
          "description": "New template transactions, replacing every one; those carrying a GUID keep it."
        },
        "enabled": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Since Last Run leaves out a disabled one; default true.",
          "default": null
        },
        "startDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The first possible occurrence; default today.",
          "default": null
        },
        "end": {
          "anyOf": [
            {
              "$ref": "#/$defs/End"
            },
            {
              "type": "null"
            }
          ],
          "description": "The end; default never. Setting one kind of end clears the other.",
          "default": null
        },
        "autoCreate": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Create due instances without asking; default false. Refused with variables other than `i`, with more than\none commodity, or with no template split.",
          "default": null
        },
        "notify": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "And say so; default true with `autoCreate`, refused without it.",
          "default": null
        },
        "advanceCreateDays": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "Days ahead to create; default 0.",
          "minimum": 0,
          "default": null
        },
        "advanceRemindDays": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "Days ahead to remind, after that; default 0.",
          "minimum": 0,
          "default": null
        }
      },
      "required": [
        "scheduledTransaction"
      ],
      "description": "Params of `scheduledTransaction.update`; absent fields are left alone."
    },
    "CheckParams2": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "transaction": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Check this transaction only (the register's Check & Repair).",
          "default": null
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Check the transactions with a split in this account.",
          "default": null
        },
        "subaccounts": {
          "type": "boolean",
          "description": "With `account`: its sub-accounts too.",
          "default": false
        },
        "lots": {
          "type": "boolean",
          "description": "Also run the lot scrub on each account checked, sub-accounts first. Off by default, as in GnuCash 5.17, which\nruns it only when the `GNC_AUTO_SCRUB_LOTS` environment variable is set.",
          "default": false
        }
      },
      "description": "Params of `scrub.checkAndRepair`."
    },
    "ScrubResult3": {
      "type": "object",
      "properties": {
        "repairs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/RepairWire"
          },
          "description": "Every change, in the order made. Empty when there was nothing to repair."
        }
      },
      "required": [
        "repairs"
      ],
      "description": "What a scrub did."
    },
    "RepairWire": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "accountCreated"
            },
            "account": {
              "$ref": "#/$defs/Guid"
            },
            "name": {
              "type": "string"
            },
            "commodity": {
              "$ref": "#/$defs/CommodityId"
            }
          },
          "required": [
            "kind",
            "account",
            "name",
            "commodity"
          ],
          "description": "A balancing or orphan account was created under the root."
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "orphanAssigned"
            },
            "transaction": {
              "$ref": "#/$defs/Guid"
            },
            "split": {
              "$ref": "#/$defs/Guid"
            },
            "account": {
              "$ref": "#/$defs/Guid"
            }
          },
          "required": [
            "kind",
            "transaction",
            "split",
            "account"
          ],
          "description": "A split with no account was put in an Orphan-<CUR> account."
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "invalidNumberZeroed"
            },
            "transaction": {
              "$ref": "#/$defs/Guid"
            },
            "split": {
              "$ref": "#/$defs/Guid"
            },
            "field": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "transaction",
            "split",
            "field"
          ],
          "description": "An invalid value or amount was set to zero."
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "amountSetToValue"
            },
            "transaction": {
              "$ref": "#/$defs/Guid"
            },
            "split": {
              "$ref": "#/$defs/Guid"
            },
            "from": {
              "$ref": "#/$defs/Amount"
            },
            "to": {
              "$ref": "#/$defs/Amount"
            }
          },
          "required": [
            "kind",
            "transaction",
            "split",
            "from",
            "to"
          ],
          "description": "A split's amount was set to its value, its account holding the transaction currency."
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "currencySet"
            },
            "transaction": {
              "$ref": "#/$defs/Guid"
            },
            "from": {
              "$ref": "#/$defs/CommodityId"
            },
            "to": {
              "$ref": "#/$defs/CommodityId"
            }
          },
          "required": [
            "kind",
            "transaction",
            "from",
            "to"
          ],
          "description": "A transaction whose currency was not a currency got one."
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "valueChanged"
            },
            "transaction": {
              "$ref": "#/$defs/Guid"
            },
            "split": {
              "$ref": "#/$defs/Guid"
            },
            "from": {
              "$ref": "#/$defs/Amount"
            },
            "to": {
              "$ref": "#/$defs/Amount"
            }
          },
          "required": [
            "kind",
            "transaction",
            "split",
            "from",
            "to"
          ],
          "description": "A split's value was re-expressed in the transaction's new currency."
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "balanceSplitAdded"
            },
            "transaction": {
              "$ref": "#/$defs/Guid"
            },
            "split": {
              "$ref": "#/$defs/Guid"
            },
            "account": {
              "$ref": "#/$defs/Guid"
            },
            "value": {
              "$ref": "#/$defs/Amount"
            }
          },
          "required": [
            "kind",
            "transaction",
            "split",
            "account",
            "value"
          ],
          "description": "A balancing split was added."
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "balanceSplitChanged"
            },
            "transaction": {
              "$ref": "#/$defs/Guid"
            },
            "split": {
              "$ref": "#/$defs/Guid"
            },
            "account": {
              "$ref": "#/$defs/Guid"
            },
            "from": {
              "$ref": "#/$defs/Amount"
            },
            "to": {
              "$ref": "#/$defs/Amount"
            }
          },
          "required": [
            "kind",
            "transaction",
            "split",
            "account",
            "from",
            "to"
          ],
          "description": "A balancing split's value was changed."
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "balanceSplitRemoved"
            },
            "transaction": {
              "$ref": "#/$defs/Guid"
            },
            "split": {
              "$ref": "#/$defs/Guid"
            },
            "account": {
              "$ref": "#/$defs/Guid"
            },
            "value": {
              "$ref": "#/$defs/Amount"
            }
          },
          "required": [
            "kind",
            "transaction",
            "split",
            "account",
            "value"
          ],
          "description": "A balancing split that came to zero, with no memo or action, was deleted."
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "lotsRepaired"
            },
            "account": {
              "$ref": "#/$defs/Guid"
            }
          },
          "required": [
            "kind",
            "account"
          ],
          "description": "The lot scrub changed an account's lots or splits."
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "tradingSplitRemoved"
            },
            "transaction": {
              "$ref": "#/$defs/Guid"
            },
            "split": {
              "$ref": "#/$defs/Guid"
            },
            "account": {
              "$ref": "#/$defs/Guid"
            },
            "value": {
              "$ref": "#/$defs/Amount"
            },
            "amount": {
              "$ref": "#/$defs/Amount"
            }
          },
          "required": [
            "kind",
            "transaction",
            "split",
            "account",
            "value",
            "amount"
          ],
          "description": "A trading split was removed before the transaction's trading splits were rebuilt."
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "tradingSplitAdded"
            },
            "transaction": {
              "$ref": "#/$defs/Guid"
            },
            "split": {
              "$ref": "#/$defs/Guid"
            },
            "account": {
              "$ref": "#/$defs/Guid"
            },
            "value": {
              "$ref": "#/$defs/Amount"
            },
            "amount": {
              "$ref": "#/$defs/Amount"
            }
          },
          "required": [
            "kind",
            "transaction",
            "split",
            "account",
            "value",
            "amount"
          ],
          "description": "A trading split was added."
        }
      ],
      "description": "One change a scrub made."
    },
    "ScrubParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "transaction": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Scrub this transaction only.",
          "default": null
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Scrub the transactions with a split in this account.",
          "default": null
        },
        "subaccounts": {
          "type": "boolean",
          "description": "With `account`: its sub-accounts too.",
          "default": false
        }
      },
      "description": "Params of the scrubs. Give a transaction, or an account (with or without its sub-accounts); give neither for the\nwhole book."
    },
    "StockSplitParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The STOCK, MUTUAL or CURRENCY account; it must hold shares and not be a placeholder."
        },
        "date": {
          "$ref": "#/$defs/Date",
          "description": "The date of the split."
        },
        "shares": {
          "$ref": "#/$defs/Amount",
          "description": "Shares added by the split (negative for a reverse split), rounded to the account's SCU."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description; default `Stock Split`.",
          "default": null
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "The transaction currency; default the currency of the nearest ancestor account held in a currency.",
          "default": null
        },
        "price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Price per share after the split; recorded in the price database when positive.",
          "default": null
        },
        "priceCurrency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "The price's currency; default the other side of the security's latest price, else the transaction currency.",
          "default": null
        },
        "cash": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Cash paid in lieu of fractional shares; recorded when positive.",
          "default": null
        },
        "incomeAccount": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "The INCOME account the cash comes from (required with cash).",
          "default": null
        },
        "assetAccount": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "The BANK, CASH or ASSET account the cash goes to (required with cash).",
          "default": null
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Memo of the cash splits; default `Cash in lieu`.",
          "default": null
        }
      },
      "required": [
        "account",
        "date",
        "shares"
      ],
      "description": "Params of `stock.split`."
    },
    "StockSplitResult": {
      "type": "object",
      "properties": {
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "The transaction recorded."
        },
        "priceStatus": {
          "type": "string",
          "description": "`none` (no positive price given), `added`, `duplicate` (an equal price that day exists) or `rejected` (a\nsame-day price from a source of higher precedence blocks it; the transaction is still recorded)."
        },
        "price": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The price added."
        },
        "blockingPrice": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The price that blocked it."
        }
      },
      "required": [
        "transaction",
        "priceStatus"
      ],
      "description": "The result of `stock.split`."
    },
    "TaxTableCreate": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "description": "A name no other visible tax table has."
        },
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TaxLineParams"
          },
          "description": "At least one line."
        }
      },
      "required": [
        "name",
        "entries"
      ],
      "description": "Params of `taxTable.create`."
    },
    "TaxLineParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account the tax is posted to."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "The percentage (-100 to 100) or the fixed amount per line."
        },
        "type": {
          "$ref": "#/$defs/AmountTypeWire",
          "description": "Percentage or fixed amount."
        }
      },
      "required": [
        "account",
        "amount",
        "type"
      ],
      "description": "One line of a tax table."
    },
    "TaxTableInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "Its GUID."
        },
        "name": {
          "type": "string",
          "description": "Its name; frozen copies share their parent's."
        },
        "refcount": {
          "type": "integer",
          "format": "int64",
          "description": "How many customers, vendors and lines use it (always 0 for a frozen copy)."
        },
        "invisible": {
          "type": "boolean",
          "description": "True for frozen copies."
        },
        "parent": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The table it is a frozen copy of."
        },
        "child": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "Its current frozen copy, reused by the next posting."
        },
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TaxLineInfo"
          },
          "description": "Lines, sorted by account full name then amount, as GnuCash keeps them."
        }
      },
      "required": [
        "guid",
        "name",
        "refcount",
        "invisible",
        "entries"
      ],
      "description": "A tax table."
    },
    "TaxLineInfo": {
      "type": "object",
      "properties": {
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The tax account."
        },
        "accountName": {
          "type": [
            "string",
            "null"
          ],
          "description": "Its full name."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "Percentage or fixed amount."
        },
        "type": {
          "$ref": "#/$defs/AmountTypeWire",
          "description": "Percentage or fixed amount."
        }
      },
      "required": [
        "amount",
        "type"
      ],
      "description": "One line of a tax table."
    },
    "TaxTableKey": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "taxTable": {
          "$ref": "#/$defs/TaxTableRef",
          "description": "The tax table."
        }
      },
      "required": [
        "taxTable"
      ],
      "description": "Names one tax table."
    },
    "TaxTableList": {
      "type": "object",
      "properties": {
        "taxTables": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TaxTableInfo"
          },
          "description": "Sorted by name, then GUID."
        }
      },
      "required": [
        "taxTables"
      ],
      "description": "Tax tables."
    },
    "TaxTableUpdate": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "taxTable": {
          "$ref": "#/$defs/TaxTableRef",
          "description": "The tax table (visible ones only)."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "New name.",
          "default": null
        },
        "entries": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/TaxLineParams"
          },
          "description": "New lines, replacing all the old ones. Posted documents keep their frozen copy of the old lines."
        }
      },
      "required": [
        "taxTable"
      ],
      "description": "Params of `taxTable.update`."
    },
    "GuidParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The transaction's GUID."
        }
      },
      "required": [
        "guid"
      ],
      "description": "Params naming one transaction."
    },
    "FindParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "query": {
          "$ref": "#/$defs/FindQuery",
          "description": "The query."
        },
        "limit": {
          "type": [
            "integer",
            "null"
          ],
          "format": "uint",
          "minimum": 0,
          "description": "Keep only the last this many matches, as GnuCash keeps them when a limit applies.",
          "default": null
        }
      },
      "required": [
        "query"
      ],
      "description": "Params of `transaction.find`."
    },
    "FindQuery": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "all": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/FindQuery"
              }
            }
          },
          "required": [
            "all"
          ],
          "additionalProperties": false,
          "description": "Every query holds (the dialog's \"all criteria are met\"); an empty list matches every split."
        },
        {
          "type": "object",
          "properties": {
            "any": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/FindQuery"
              }
            }
          },
          "required": [
            "any"
          ],
          "additionalProperties": false,
          "description": "Some query holds (\"any criteria are met\")."
        },
        {
          "type": "object",
          "properties": {
            "not": {
              "$ref": "#/$defs/FindQuery"
            }
          },
          "required": [
            "not"
          ],
          "additionalProperties": false,
          "description": "The query does not hold."
        },
        {
          "type": "object",
          "properties": {
            "description": {
              "$ref": "#/$defs/TextCriterion"
            }
          },
          "required": [
            "description"
          ],
          "additionalProperties": false,
          "description": "Transaction description."
        },
        {
          "type": "object",
          "properties": {
            "notes": {
              "$ref": "#/$defs/TextCriterion"
            }
          },
          "required": [
            "notes"
          ],
          "additionalProperties": false,
          "description": "Transaction notes."
        },
        {
          "type": "object",
          "properties": {
            "memo": {
              "$ref": "#/$defs/TextCriterion"
            }
          },
          "required": [
            "memo"
          ],
          "additionalProperties": false,
          "description": "Split memo."
        },
        {
          "type": "object",
          "properties": {
            "descriptionNotesOrMemo": {
              "$ref": "#/$defs/TextCriterion"
            }
          },
          "required": [
            "descriptionNotesOrMemo"
          ],
          "additionalProperties": false,
          "description": "Description, notes or memo: true when any of the three matches, also for negated operators, as in GnuCash."
        },
        {
          "type": "object",
          "properties": {
            "num": {
              "$ref": "#/$defs/TextCriterion"
            }
          },
          "required": [
            "num"
          ],
          "additionalProperties": false,
          "description": "Transaction number."
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "$ref": "#/$defs/TextCriterion"
            }
          },
          "required": [
            "action"
          ],
          "additionalProperties": false,
          "description": "Split action."
        },
        {
          "type": "object",
          "properties": {
            "datePosted": {
              "$ref": "#/$defs/DateCriterion"
            }
          },
          "required": [
            "datePosted"
          ],
          "additionalProperties": false,
          "description": "Date posted."
        },
        {
          "type": "object",
          "properties": {
            "dateEntered": {
              "$ref": "#/$defs/DateCriterion"
            }
          },
          "required": [
            "dateEntered"
          ],
          "additionalProperties": false,
          "description": "Date entered."
        },
        {
          "type": "object",
          "properties": {
            "dateReconciled": {
              "$ref": "#/$defs/DateCriterion"
            }
          },
          "required": [
            "dateReconciled"
          ],
          "additionalProperties": false,
          "description": "Date reconciled."
        },
        {
          "type": "object",
          "properties": {
            "value": {
              "$ref": "#/$defs/NumberCriterion"
            }
          },
          "required": [
            "value"
          ],
          "additionalProperties": false,
          "description": "Split value."
        },
        {
          "type": "object",
          "properties": {
            "amount": {
              "$ref": "#/$defs/NumberCriterion"
            }
          },
          "required": [
            "amount"
          ],
          "additionalProperties": false,
          "description": "Split amount (the dialog's \"Shares\")."
        },
        {
          "type": "object",
          "properties": {
            "sharePrice": {
              "$ref": "#/$defs/NumberCriterion"
            }
          },
          "required": [
            "sharePrice"
          ],
          "additionalProperties": false,
          "description": "Share price: value / amount."
        },
        {
          "type": "object",
          "properties": {
            "reconcile": {
              "$ref": "#/$defs/ReconcileCriterion"
            }
          },
          "required": [
            "reconcile"
          ],
          "additionalProperties": false,
          "description": "Reconcile state."
        },
        {
          "type": "object",
          "properties": {
            "closing": {
              "type": "boolean"
            }
          },
          "required": [
            "closing"
          ],
          "additionalProperties": false,
          "description": "Book-closing entries (true) or not (false)."
        },
        {
          "type": "object",
          "properties": {
            "balanced": {
              "type": "boolean"
            }
          },
          "required": [
            "balanced"
          ],
          "additionalProperties": false,
          "description": "Balanced transactions (true) or not (false)."
        },
        {
          "type": "object",
          "properties": {
            "void": {
              "type": "boolean"
            }
          },
          "required": [
            "void"
          ],
          "additionalProperties": false,
          "description": "Voided transactions (true) or not (false)."
        },
        {
          "type": "object",
          "properties": {
            "accounts": {
              "$ref": "#/$defs/AccountCriterion"
            }
          },
          "required": [
            "accounts"
          ],
          "additionalProperties": false,
          "description": "Accounts."
        }
      ],
      "description": "A find query over splits: one criterion, or `all`, `any` or `not` of others. Written as an object with exactly\none key, such as `{\"memo\": {\"text\": \"rent\"}}` or `{\"all\": [{...}, {...}]}`."
    },
    "TextCriterion": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "op": {
          "$ref": "#/$defs/TextOp",
          "description": "The comparison; `contains` by default."
        },
        "text": {
          "type": "string",
          "description": "The text or regular expression; not empty."
        },
        "matchCase": {
          "type": "boolean",
          "description": "Compare case-sensitively.",
          "default": false
        }
      },
      "required": [
        "text"
      ],
      "description": "A text criterion."
    },
    "TextOp": {
      "oneOf": [
        {
          "type": "string",
          "const": "contains",
          "description": "Contains the text (the default)."
        },
        {
          "type": "string",
          "const": "notContains",
          "description": "Does not contain the text."
        },
        {
          "type": "string",
          "const": "equals",
          "description": "Equals the text."
        },
        {
          "type": "string",
          "const": "notEquals",
          "description": "Does not equal the text."
        },
        {
          "type": "string",
          "const": "matchesRegex",
          "description": "Matches a regular expression anywhere (Rust `regex` syntax, close to POSIX extended)."
        },
        {
          "type": "string",
          "const": "notMatchesRegex",
          "description": "Does not match a regular expression."
        }
      ],
      "description": "How text is compared. Matching ignores case unless `matchCase` is set."
    },
    "DateCriterion": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "op": {
          "$ref": "#/$defs/DateOp",
          "description": "The comparison; `before` by default."
        },
        "date": {
          "$ref": "#/$defs/Date",
          "description": "The date."
        }
      },
      "required": [
        "date"
      ],
      "description": "A date criterion."
    },
    "DateOp": {
      "oneOf": [
        {
          "type": "string",
          "const": "before",
          "description": "Before the date (the default)."
        },
        {
          "type": "string",
          "const": "onOrBefore",
          "description": "Before or on the date."
        },
        {
          "type": "string",
          "const": "on",
          "description": "On the date."
        },
        {
          "type": "string",
          "const": "notOn",
          "description": "Not on the date."
        },
        {
          "type": "string",
          "const": "after",
          "description": "After the date."
        },
        {
          "type": "string",
          "const": "onOrAfter",
          "description": "On or after the date."
        }
      ],
      "description": "How a date is compared, as the dialog offers it."
    },
    "NumberCriterion": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "op": {
          "$ref": "#/$defs/NumberOp",
          "description": "The comparison; `eq` by default."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "The amount compared with."
        },
        "sign": {
          "$ref": "#/$defs/SignFilter",
          "description": "Which signs pass; `any` by default."
        }
      },
      "required": [
        "amount"
      ],
      "description": "A numeric criterion. GnuCash compares the magnitude of the split's number with the amount."
    },
    "NumberOp": {
      "oneOf": [
        {
          "type": "string",
          "const": "lt",
          "description": "Less than."
        },
        {
          "type": "string",
          "const": "le",
          "description": "Less than or equal."
        },
        {
          "type": "string",
          "const": "eq",
          "description": "Equal within 1/10000 (the default)."
        },
        {
          "type": "string",
          "const": "ne",
          "description": "Not equal within 1/10000."
        },
        {
          "type": "string",
          "const": "gt",
          "description": "Greater than."
        },
        {
          "type": "string",
          "const": "ge",
          "description": "Greater than or equal."
        }
      ],
      "description": "A numeric comparison."
    },
    "SignFilter": {
      "oneOf": [
        {
          "type": "string",
          "const": "any",
          "description": "Any (the default)."
        },
        {
          "type": "string",
          "const": "debit",
          "description": "Debits: zero or more."
        },
        {
          "type": "string",
          "const": "credit",
          "description": "Credits: zero or less."
        }
      ],
      "description": "Which signs a numeric criterion accepts."
    },
    "ReconcileCriterion": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "states": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReconcileFlag"
          },
          "description": "The states."
        },
        "not": {
          "type": "boolean",
          "description": "Match splits whose state is not one of them.",
          "default": false
        }
      },
      "required": [
        "states"
      ],
      "description": "A reconcile-state criterion."
    },
    "ReconcileFlag": {
      "oneOf": [
        {
          "type": "string",
          "const": "n",
          "description": "Not reconciled or cleared."
        },
        {
          "type": "string",
          "const": "c",
          "description": "Cleared."
        },
        {
          "type": "string",
          "const": "y",
          "description": "Reconciled."
        },
        {
          "type": "string",
          "const": "f",
          "description": "Frozen."
        },
        {
          "type": "string",
          "const": "v",
          "description": "Voided."
        }
      ],
      "description": "A split's reconcile state, as GnuCash writes it."
    },
    "AccountCriterion": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "accounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AccountRef"
          },
          "description": "The accounts; at least one."
        },
        "matching": {
          "$ref": "#/$defs/AccountsHow",
          "description": "How they match; `any` by default."
        }
      },
      "required": [
        "accounts"
      ],
      "description": "An account criterion."
    },
    "AccountsHow": {
      "oneOf": [
        {
          "type": "string",
          "const": "any",
          "description": "The split's account is one of them (the default)."
        },
        {
          "type": "string",
          "const": "none",
          "description": "The split's account is none of them."
        },
        {
          "type": "string",
          "const": "all",
          "description": "The split's transaction has a split in every one of them (the dialog's \"All Accounts\")."
        }
      ],
      "description": "How accounts match."
    },
    "FindResult": {
      "type": "object",
      "properties": {
        "matches": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Match"
          },
          "description": "The splits found, in GnuCash's split order (`xaccSplitOrder`): by transaction (posted date, num, date entered,\ndescription), then memo, action, reconcile state, amount, value."
        }
      },
      "required": [
        "matches"
      ],
      "description": "The result of `transaction.find`."
    },
    "Match": {
      "type": "object",
      "properties": {
        "transaction": {
          "$ref": "#/$defs/Guid",
          "description": "The transaction."
        },
        "split": {
          "$ref": "#/$defs/Guid",
          "description": "The split."
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The split's account."
        }
      },
      "required": [
        "transaction",
        "split"
      ],
      "description": "A split found."
    },
    "TransactionInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The transaction's GUID."
        },
        "currency": {
          "$ref": "#/$defs/CommodityId",
          "description": "The transaction currency, which values are in."
        },
        "num": {
          "type": [
            "string",
            "null"
          ],
          "description": "Check or reference number."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description."
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes."
        },
        "datePosted": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The posted date."
        },
        "datePostedTime": {
          "$ref": "#/$defs/Timestamp",
          "description": "The posted instant as stored (the posted date's day-neutral time for transactions GnuCash or red-ale enters)."
        },
        "dateEntered": {
          "$ref": "#/$defs/Timestamp",
          "description": "When it was entered."
        },
        "void": {
          "type": "boolean",
          "description": "Void, by GnuCash 5.17's rule: the void timestamp is set."
        },
        "voidReason": {
          "type": [
            "string",
            "null"
          ],
          "description": "Why it was voided."
        },
        "voidTime": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "When it was voided."
        },
        "readOnly": {
          "type": [
            "string",
            "null"
          ],
          "description": "Why it may not be changed, when read-only (voided, or generated by a business document)."
        },
        "reversedBy": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The transaction that reverses this one."
        },
        "closing": {
          "type": "boolean",
          "description": "A book-closing transaction."
        },
        "balanced": {
          "type": "boolean",
          "description": "The split values sum to zero; with trading accounts on, trading values and each commodity's amounts too."
        },
        "docLink": {
          "type": [
            "string",
            "null"
          ],
          "description": "The document link (`assoc_uri` slot), as stored: a URL, a `file://` URI, or a path relative to the path head."
        },
        "splits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SplitInfo"
          },
          "description": "Its splits, in stored order (debits first)."
        }
      },
      "required": [
        "guid",
        "currency",
        "datePostedTime",
        "dateEntered",
        "void",
        "closing",
        "balanced",
        "splits"
      ],
      "description": "A transaction, as returned by every transaction method."
    },
    "SplitInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The split's GUID."
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The account's GUID; absent for an orphan split."
        },
        "accountName": {
          "type": [
            "string",
            "null"
          ],
          "description": "The account's full name."
        },
        "commodity": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "The account's commodity, which the amount is in."
        },
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "Value, in the transaction currency."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "Amount (GnuCash's quantity), in the account's commodity."
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Memo."
        },
        "action": {
          "type": [
            "string",
            "null"
          ],
          "description": "Action."
        },
        "reconcileState": {
          "$ref": "#/$defs/ReconcileFlag",
          "description": "Reconcile state."
        },
        "reconcileDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "When it was reconciled."
        },
        "lot": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "The lot it belongs to."
        },
        "number": {
          "type": [
            "string",
            "null"
          ],
          "description": "The split's Number, as GnuCash's register shows it: the action when the book's num field source is on, else\nthe transaction's num."
        }
      },
      "required": [
        "guid",
        "value",
        "amount",
        "reconcileState"
      ],
      "description": "A split of a transaction, as returned."
    },
    "ListParams8": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only transactions with a split in this account.",
          "default": null
        },
        "from": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only transactions posted on or after this date.",
          "default": null
        },
        "to": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "Only transactions posted on or before this date.",
          "default": null
        }
      },
      "description": "Params of `transaction.list`."
    },
    "ListResult5": {
      "type": "object",
      "properties": {
        "transactions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TransactionInfo"
          },
          "description": "The transactions, by posted date, then num, date entered, description and GUID (`xaccTransOrder`)."
        }
      },
      "required": [
        "transactions"
      ],
      "description": "The result of `transaction.list`."
    },
    "PostParams2": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "The transaction currency. Defaults to the first split's account commodity, when that is a currency.",
          "default": null
        },
        "datePosted": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The posted date; today by default. Stored at its day-neutral time with a `date-posted` slot, as GnuCash does.",
          "default": null
        },
        "dateEntered": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "When it was entered; now by default.",
          "default": null
        },
        "num": {
          "type": [
            "string",
            "null"
          ],
          "description": "Check or reference number.",
          "default": null
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description.",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes; empty means none.",
          "default": null
        },
        "docLink": {
          "type": [
            "string",
            "null"
          ],
          "description": "A document link: a URL, a `file://` URI, or a path relative to the path head. Empty means none.",
          "default": null
        },
        "splits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SplitParams"
          },
          "description": "The splits. Their values must sum to zero."
        },
        "recordPrice": {
          "type": "boolean",
          "description": "Record each priced split's value/amount in the price database, as GnuCash's register does\n(`xaccTransRecordPrice` with source `user:split-register`).",
          "default": false
        }
      },
      "required": [
        "splits"
      ],
      "description": "Params of `transaction.post`."
    },
    "SplitParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "account": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account."
        },
        "value": {
          "$ref": "#/$defs/Amount",
          "description": "Value, in the transaction currency. Rounded half up to the currency's fraction; a non-zero value that would\nround to zero is refused."
        },
        "amount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "Amount, in the account's commodity, rounded half up to the account's SCU. Required when the account's\ncommodity is not the transaction currency; otherwise it defaults to the value.",
          "default": null
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Memo.",
          "default": null
        },
        "action": {
          "type": [
            "string",
            "null"
          ],
          "description": "Action.",
          "default": null
        },
        "reconcileState": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReconcileFlag"
            },
            {
              "type": "null"
            }
          ],
          "description": "Reconcile state; `n` by default. `v` is refused: use `transaction.void`.",
          "default": null
        },
        "reconcileDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "When it was reconciled.",
          "default": null
        },
        "lot": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ],
          "description": "A lot of the same account to put the split in.",
          "default": null
        }
      },
      "required": [
        "account",
        "value"
      ],
      "description": "A split to create."
    },
    "ReverseParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The transaction to reverse."
        },
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The reversing transaction's posted date; today by default, as in GnuCash's dialog.",
          "default": null
        }
      },
      "required": [
        "guid"
      ],
      "description": "Params of `transaction.reverse`."
    },
    "TransferParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "from": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account the amount leaves; it must hold a currency."
        },
        "to": {
          "$ref": "#/$defs/AccountRef",
          "description": "The account it reaches."
        },
        "amount": {
          "$ref": "#/$defs/Amount",
          "description": "The amount, in the from account's currency; not zero."
        },
        "date": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "The posted date; today by default.",
          "default": null
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Description.",
          "default": null
        },
        "num": {
          "type": [
            "string",
            "null"
          ],
          "description": "Num.",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes.",
          "default": null
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Memo, on both splits.",
          "default": null
        },
        "rate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "When the commodities differ: units of the to commodity per unit of the from currency. The amount received is\namount × rate rounded half up to the to account's SCU.",
          "default": null
        },
        "toAmount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "When the commodities differ: the amount received, in the to commodity; the rate is computed from it. Give\n`rate` or `toAmount`, or neither to use the rate the price database gives on the date (or the nearest one).",
          "default": null
        },
        "recordPrice": {
          "type": "boolean",
          "description": "Record the rate in the price database, as the dialog does. True by default.",
          "default": true
        },
        "defaultCurrency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "The user's default currency (a GnuCash preference): a new price between it and another currency is stored as\nthe other currency priced in it.",
          "default": null
        }
      },
      "required": [
        "from",
        "to",
        "amount"
      ],
      "description": "Params of `transaction.transfer`."
    },
    "TransferResult": {
      "type": "object",
      "properties": {
        "transaction": {
          "$ref": "#/$defs/TransactionInfo",
          "description": "The transaction created."
        },
        "toAmount": {
          "$ref": "#/$defs/Amount",
          "description": "The amount received, in the to commodity."
        },
        "rate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "The rate used, when the commodities differ."
        },
        "price": {
          "anyOf": [
            {
              "$ref": "#/$defs/PriceChangeInfo"
            },
            {
              "type": "null"
            }
          ],
          "description": "The price recorded, when the commodities differ."
        }
      },
      "required": [
        "transaction",
        "toAmount"
      ],
      "description": "The result of `transaction.transfer`."
    },
    "PriceChangeInfo": {
      "type": "object",
      "properties": {
        "action": {
          "type": "string",
          "description": "`created`, `updated`, or `kept` (a same-day price was preferred or already equal)."
        },
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The price's GUID."
        }
      },
      "required": [
        "action",
        "guid"
      ],
      "description": "What happened to the price database."
    },
    "UpdateParams9": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The transaction's GUID."
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "A new currency. Existing values are re-valued as `xaccTransSetCurrency` does, before the split changes.",
          "default": null
        },
        "datePosted": {
          "anyOf": [
            {
              "$ref": "#/$defs/Date"
            },
            {
              "type": "null"
            }
          ],
          "description": "A new posted date.",
          "default": null
        },
        "dateEntered": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "A new entered date.",
          "default": null
        },
        "num": {
          "type": [
            "string",
            "null"
          ],
          "description": "A new num; empty clears it.",
          "default": null
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "A new description.",
          "default": null
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "New notes; empty deletes them.",
          "default": null
        },
        "docLink": {
          "type": [
            "string",
            "null"
          ],
          "description": "A new document link; empty deletes it. Refused on a read-only transaction.",
          "default": null
        },
        "removeSplits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Guid"
          },
          "description": "Splits to remove, by GUID.",
          "default": []
        },
        "changeSplits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SplitChange"
          },
          "description": "Splits to change."
        },
        "addSplits": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SplitParams"
          },
          "description": "Splits to add."
        },
        "recordPrice": {
          "type": "boolean",
          "description": "Record prices from priced splits afterwards, as for `transaction.post`.",
          "default": false
        }
      },
      "required": [
        "guid"
      ],
      "description": "Params of `transaction.update`."
    },
    "SplitChange": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The split's GUID."
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "A new account. Moving to an account in another commodity needs a new amount.",
          "default": null
        },
        "value": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "A new value. When the account holds the transaction currency, the amount follows it.",
          "default": null
        },
        "amount": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ],
          "description": "A new amount.",
          "default": null
        },
        "memo": {
          "type": [
            "string",
            "null"
          ],
          "description": "A new memo; empty clears it.",
          "default": null
        },
        "action": {
          "type": [
            "string",
            "null"
          ],
          "description": "A new action; empty clears it.",
          "default": null
        },
        "reconcileState": {
          "anyOf": [
            {
              "$ref": "#/$defs/ReconcileFlag"
            },
            {
              "type": "null"
            }
          ],
          "description": "A new reconcile state; `v` is refused.",
          "default": null
        },
        "reconcileDate": {
          "anyOf": [
            {
              "$ref": "#/$defs/Timestamp"
            },
            {
              "type": "null"
            }
          ],
          "description": "A new reconcile date.",
          "default": null
        }
      },
      "required": [
        "guid"
      ],
      "description": "A change to an existing split; absent fields are kept."
    },
    "VoidParams": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid",
          "description": "The transaction's GUID."
        },
        "reason": {
          "type": "string",
          "description": "Why; empty writes no `void-reason` slot, as GnuCash does, and the transaction is still void.",
          "default": ""
        }
      },
      "required": [
        "guid"
      ],
      "description": "Params of `transaction.void`."
    },
    "VendorFields": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Company name.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Vendor number. On create, absent or empty takes the next number from the book's `gncVendor` counter.",
          "default": null
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "The currency of the vendor's documents.",
          "default": null
        },
        "addr": {
          "anyOf": [
            {
              "$ref": "#/$defs/AddressParams"
            },
            {
              "type": "null"
            }
          ],
          "description": "Payment address."
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes.",
          "default": null
        },
        "terms": {
          "anyOf": [
            {
              "$ref": "#/$defs/BillTermRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Default billing term for new bills, by GUID or name; `null` for none."
        },
        "taxTable": {
          "anyOf": [
            {
              "$ref": "#/$defs/TaxTableRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Tax table, by GUID or name; `null` for none."
        },
        "taxTableOverride": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "New bill lines use `taxTable` rather than the book's default.",
          "default": null
        },
        "taxIncluded": {
          "anyOf": [
            {
              "$ref": "#/$defs/TaxIncludedWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Whether prices include tax by default.",
          "default": null
        },
        "active": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Active; `false` deactivates.",
          "default": null
        }
      },
      "description": "Params of `vendor.create`. `name` and `currency` are required."
    },
    "VendorInfo": {
      "type": "object",
      "properties": {
        "guid": {
          "$ref": "#/$defs/Guid"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "addr": {
          "$ref": "#/$defs/AddressInfo"
        },
        "notes": {
          "type": "string"
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ]
        },
        "terms": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "taxTable": {
          "anyOf": [
            {
              "$ref": "#/$defs/Guid"
            },
            {
              "type": "null"
            }
          ]
        },
        "taxTableOverride": {
          "type": "boolean"
        },
        "taxIncluded": {
          "$ref": "#/$defs/TaxIncludedWire"
        },
        "active": {
          "type": "boolean"
        }
      },
      "required": [
        "guid",
        "id",
        "name",
        "addr",
        "notes",
        "taxTableOverride",
        "taxIncluded",
        "active"
      ],
      "description": "A vendor."
    },
    "VendorKey": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "vendor": {
          "$ref": "#/$defs/Guid",
          "description": "The vendor."
        }
      },
      "required": [
        "vendor"
      ],
      "description": "Names one vendor."
    },
    "VendorList": {
      "type": "object",
      "properties": {
        "vendors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VendorInfo"
          },
          "description": "In GUID order."
        }
      },
      "required": [
        "vendors"
      ],
      "description": "Vendors."
    },
    "VendorUpdate": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "vendor": {
          "$ref": "#/$defs/Guid",
          "description": "The vendor."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Company name.",
          "default": null
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Vendor number. On create, absent or empty takes the next number from the book's `gncVendor` counter.",
          "default": null
        },
        "currency": {
          "anyOf": [
            {
              "$ref": "#/$defs/CommodityId"
            },
            {
              "type": "null"
            }
          ],
          "description": "The currency of the vendor's documents.",
          "default": null
        },
        "addr": {
          "anyOf": [
            {
              "$ref": "#/$defs/AddressParams"
            },
            {
              "type": "null"
            }
          ],
          "description": "Payment address."
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notes.",
          "default": null
        },
        "terms": {
          "anyOf": [
            {
              "$ref": "#/$defs/BillTermRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Default billing term for new bills, by GUID or name; `null` for none."
        },
        "taxTable": {
          "anyOf": [
            {
              "$ref": "#/$defs/TaxTableRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "Tax table, by GUID or name; `null` for none."
        },
        "taxTableOverride": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "New bill lines use `taxTable` rather than the book's default.",
          "default": null
        },
        "taxIncluded": {
          "anyOf": [
            {
              "$ref": "#/$defs/TaxIncludedWire"
            },
            {
              "type": "null"
            }
          ],
          "description": "Whether prices include tax by default.",
          "default": null
        },
        "active": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Active; `false` deactivates.",
          "default": null
        }
      },
      "required": [
        "vendor"
      ],
      "description": "Params of `vendor.update`: the fields to change."
    }
  }
}
