diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/PROTOCOL.md | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md index bbe8166..5aa4ff6 100644 --- a/docs/PROTOCOL.md +++ b/docs/PROTOCOL.md @@ -644,6 +644,105 @@ updated and the `invoice.send` audit entry stores `{id,to,subject}` only. `dry_run` validates configuration, recipient and stored document and returns the recipient and subject without sending or updating anything. +<!-- generated:commands begin --> +## Command catalogue (generated) + +Generated by `make gen-protocol` from the command tables; do not edit by hand. +Args: `name:type[!][=default][ enum a\|b]`, `!` = required. + +| Command | Permission | Org | Mutating | Dry run | Args | +|---|---|---|---|---|---| +| `health` | public | no | no | no | — | +| `meta` | public | no | no | no | — | +| `session.open` | public | no | no | no | `method:enum! enum password\|token`, `username:string`, `password:string`, `token:string` | +| `session.close` | viewer | no | no | no | — | +| `session.whoami` | viewer | no | no | no | — | +| `session.list_orgs` | viewer | no | no | no | — | +| `session.use_org` | viewer | no | no | no | `org:int!` | +| `org.create` | viewer | no | yes | yes | `name:string!`, `org_nr:string`, `fiscal_year_start_month:int=1`, `moms_period:enum=month enum month\|quarter\|year`, `framework:enum=K2 enum K2\|K3` | +| `org.list` | viewer | no | no | no | — | +| `org.get` | viewer | yes | no | no | — | +| `org.update` | owner | yes | yes | yes | `name:string`, `org_nr:string`, `vat_nr:string`, `address:string`, `postal_code:string`, `city:string`, `country:string`, `email:string`, `phone:string`, `moms_period:enum enum month\|quarter\|year`, `framework:enum enum K2\|K3`, `description:string`, `fiscal_year_start_month:int`, `shares:int` | +| `org.member_list` | viewer | yes | no | no | — | +| `org.member_add` | owner | yes | yes | yes | `username:string!`, `role:enum! enum owner\|bookkeeper\|viewer` | +| `org.member_set_role` | owner | yes | yes | yes | `username:string!`, `role:enum! enum owner\|bookkeeper\|viewer` | +| `org.member_remove` | owner | yes | yes | yes | `username:string!` | +| `board.list` | viewer | yes | no | no | — | +| `board.add` | owner | yes | yes | yes | `name:string!`, `title:string=Styrelseledamot` | +| `board.update` | owner | yes | yes | yes | `id:int!`, `name:string`, `title:string` | +| `board.remove` | owner | yes | yes | yes | `id:int!` | +| `user.create` | admin | no | yes | yes | `username:string!`, `password:string!`, `display_name:string`, `is_admin:bool=false` | +| `user.list` | admin | no | no | no | — | +| `token.create` | viewer | yes | yes | yes | `label:string!`, `scopes:json`, `expires_at:date` | +| `token.list` | viewer | yes | no | no | — | +| `token.revoke` | viewer | yes | yes | yes | `id:int!` | +| `describe` | viewer | no | no | no | `cmd:string` | +| `agent.instructions` | viewer | no | no | no | — | +| `audit.list` | viewer | yes | no | no | `cursor:int`, `limit:int=100`, `action:string` | +| `audit.verify` | viewer | no | no | no | `full:bool=false` | +| `backup.snapshot` | admin | no | yes | no | `dest:string` | +| `account.list` | viewer | yes | no | no | `active_only:bool` | +| `account.get` | viewer | yes | no | no | `id:int`, `number:string` | +| `account.create` | bookkeeper | yes | yes | yes | `number:string!`, `name:string!`, `type:enum! enum asset\|liability\|equity\|revenue\|expense`, `sru_code:string`, `vat_code:string` | +| `account.update` | bookkeeper | yes | yes | yes | `id:int!`, `name:string`, `sru_code:string`, `vat_code:string`, `active:bool` | +| `fiscal_year.list` | viewer | yes | no | no | — | +| `fiscal_year.get` | viewer | yes | no | no | `id:int` | +| `fiscal_year.open` | owner | yes | yes | yes | `label:string!`, `start_date:date!`, `end_date:date!` | +| `fiscal_year.close` | owner | yes | yes | no | `id:int!`, `confirm:bool!` | +| `fiscal_year.reopen` | owner | yes | yes | yes | `id:int!`, `confirm:bool!` | +| `fiscal_year.update` | bookkeeper | yes | yes | yes | `id:int!`, `dividend_ore:int`, `events:string`, `agm_date:string`, `dividend_date:string`, `employees:string`, `notes:string` | +| `period.lock` | owner | yes | yes | yes | `fiscal_year:int!`, `until:date!`, `reason:string` | +| `period.unlock` | owner | yes | yes | yes | `fiscal_year:int!`, `reason:string` | +| `voucher.post` | bookkeeper | yes | yes | yes | `date:date!`, `description:string`, `series:string`, `client_ref:string`, `corrects_voucher:int`, `rows:json`, `template:json`, `x:json`, `attachment_ids:json` | +| `voucher.get` | viewer | yes | no | no | `id:int!` | +| `voucher.list` | viewer | yes | no | no | `fiscal_year:int`, `from:date`, `to:date`, `series:string`, `account:string`, `text:string`, `cursor:int`, `limit:int=100` | +| `voucher.correct` | bookkeeper | yes | yes | yes | `voucher:int!`, `description:string!`, `date:date`, `client_ref:string` | +| `bokslut.post` | bookkeeper | yes | yes | yes | `fiscal_year:int`, `entries:json`, `periodiseringsfond_ore:int`, `tax_rate:json=20.6`, `dispose:bool=true`, `date:date` | +| `settings.get` | viewer | yes | no | no | — | +| `settings.set` | bookkeeper | yes | yes | yes | `key:string!`, `value:string` | +| `bank.import` | bookkeeper | yes | yes | yes | `format:enum! enum seb`, `content_base64:string`, `path:string`, `account:string` | +| `bank.list` | viewer | yes | no | no | `status:enum=all enum all\|unmatched\|matched`, `from:date`, `to:date`, `account:string`, `limit:int=200` | +| `bank.match` | bookkeeper | yes | yes | yes | `transaction_id:int!`, `voucher_id:int!` | +| `bank.unmatch` | bookkeeper | yes | yes | yes | `transaction_id:int!`, `voucher_id:int!` | +| `report.rule_list` | viewer | yes | no | no | `report:enum enum vat` | +| `report.rule_create` | owner | yes | yes | yes | `report:enum! enum vat`, `box:string!`, `match_type:enum! enum account\|range\|type`, `pattern:string!`, `sign:int=1`, `sort_order:int=0` | +| `report.rule_update` | owner | yes | yes | yes | `id:int!`, `box:string`, `match_type:enum enum account\|range\|type`, `pattern:string`, `sign:int`, `sort_order:int` | +| `report.rule_delete` | owner | yes | yes | yes | `id:int!` | +| `template.list` | viewer | yes | no | no | `active_only:bool` | +| `template.get` | viewer | yes | no | no | `id:int`, `name:string` | +| `template.create` | bookkeeper | yes | yes | yes | `name:string!`, `series:string`, `description:string`, `rows:json!` | +| `template.update` | bookkeeper | yes | yes | yes | `id:int`, `name:string`, `series:string`, `description:string`, `active:bool`, `rows:json` | +| `template.archive` | bookkeeper | yes | yes | yes | `id:int`, `name:string` | +| `attachment.put` | bookkeeper | yes | yes | yes | `filename:string!`, `mime:string=application/octet-stream`, `content_base64:string!`, `voucher_id:int` | +| `attachment.link` | bookkeeper | yes | yes | yes | `id:int!`, `voucher_id:int!` | +| `attachment.unlink` | bookkeeper | yes | yes | yes | `id:int!`, `voucher_id:int!` | +| `attachment.get` | viewer | yes | no | no | `id:int!` | +| `attachment.list` | viewer | yes | no | no | `voucher_id:int`, `unlinked:bool`, `cursor:int`, `limit:int=100` | +| `report.trial_balance` | viewer | yes | no | no | `fiscal_year:int`, `from:date`, `to:date`, `include_zero:bool=false` | +| `report.income_statement` | viewer | yes | no | no | `fiscal_year:int`, `from:date`, `to:date` | +| `report.balance_sheet` | viewer | yes | no | no | `fiscal_year:int`, `to:date` | +| `report.vat` | viewer | yes | no | no | `from:date!`, `to:date!` | +| `report.general_ledger` | viewer | yes | no | no | `fiscal_year:int`, `accounts:json`, `from:date`, `to:date` | +| `report.voucher_list` | viewer | yes | no | no | `fiscal_year:int`, `series:string` | +| `report.vat_eskd` | viewer | yes | no | no | `from:date!`, `to:date!`, `upplysning:string` | +| `sru.export` | viewer | yes | no | no | `fiscal_year:int`, `adjustments:json`, `submitter:json`, `assisted:bool`, `audited:bool`, `ignore_unmapped:bool=false` | +| `sie.export` | viewer | yes | no | no | `fiscal_year:int`, `inline:bool=false` | +| `sie.import` | bookkeeper | yes | yes | yes | `content_base64:string`, `path:string` | +| `customer.list` | viewer | yes | no | no | `active_only:bool` | +| `customer.get` | viewer | yes | no | no | `id:int!` | +| `customer.create` | bookkeeper | yes | yes | yes | `name:string!`, `address:string`, `postal_code:string`, `city:string`, `country:string=SE`, `vat_nr:string`, `email:string`, `your_ref:string`, `notes:string`, `payment_days:int=30` | +| `customer.update` | bookkeeper | yes | yes | yes | `id:int!`, `name:string`, `address:string`, `postal_code:string`, `city:string`, `country:string`, `vat_nr:string`, `email:string`, `your_ref:string`, `notes:string`, `payment_days:int`, `active:bool` | +| `customer.archive` | bookkeeper | yes | yes | yes | `id:int!`, `active:bool!` | +| `invoice.sequence_get` | viewer | yes | no | no | — | +| `invoice.sequence_set` | owner | yes | yes | yes | `next_number:int!` | +| `invoice.preview` | viewer | yes | no | no | `customer_id:int!`, `invoice_date:date!`, `due_date:date!`, `delivery_date:string`, `your_ref:string`, `our_ref:string`, `notes:string`, `rows:json!` | +| `invoice.issue` | bookkeeper | yes | yes | yes | `customer_id:int!`, `invoice_date:date!`, `due_date:date!`, `delivery_date:string`, `your_ref:string`, `our_ref:string`, `notes:string`, `rows:json!` | +| `invoice.get` | viewer | yes | no | no | `id:int!` | +| `invoice.list` | viewer | yes | no | no | `customer_id:int`, `status:enum enum issued\|credited`, `limit:int=200` | +| `invoice.pdf` | viewer | yes | no | no | `id:int!` | +| `invoice.send` | bookkeeper | yes | yes | yes | `id:int!`, `to:string` | +<!-- generated:commands end --> + ## 8. The TUI is just a client `bokftui` logs in over the same socket, picks an org and issues the same |
