{"openapi":"3.1.0","info":{"title":"BeanHub API","description":"BeanHub API provides an easy way to access your repository on BeanHub. Create an access token and send it as `Authorization: Bearer <token>`. The `access-token` header still works and is deprecated.","version":"1.0.5","x-logo":{"url":"/static/api-doc-logo.svg"}},"paths":{"/.well-known/oauth-protected-resource/mcp":{"get":{"summary":"Oauth Protected Resource","operationId":"oauth_protected_resource__well_known_oauth_protected_resource_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtectedResourceMetadata"}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"summary":"Oauth Protected Resource","operationId":"oauth_protected_resource__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtectedResourceMetadata"}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"summary":"Oauth Authorization Server","operationId":"oauth_authorization_server__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizationServerMetadata"}}}}}}},"/.well-known/openai-apps-challenge":{"get":{"summary":"Openai Apps Challenge","operationId":"openai_apps_challenge__well_known_openai_apps_challenge_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/authorize":{"get":{"summary":"Redirect Authorize","operationId":"redirect_authorize_oauth_authorize_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/register":{"post":{"summary":"Register Client","operationId":"register_client_oauth_register_post","responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/token":{"post":{"summary":"Token","operationId":"token_oauth_token_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/revoke":{"post":{"summary":"Revoke","operationId":"revoke_oauth_revoke_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp/":{"get":{"summary":"Mcp","operationId":"mcp_mcp__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Mcp","operationId":"mcp_mcp__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp":{"get":{"summary":"Mcp","operationId":"mcp_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Mcp","operationId":"mcp_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/repos/{username}/{repo_name}/entries":{"get":{"tags":["entries"],"summary":"Get entries from the repository","operationId":"get_entries","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]},{"HTTPBearer":["API_ENTRIES_READ"]},{"APIKeyHeader":["API_ENTRIES_READ"]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"repo_name","in":"path","required":true,"schema":{"type":"string","title":"Repo Name"}},{"name":"branch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Current page","default":0,"title":"Page"},"description":"Current page"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"description":"Limit of item number in the page","default":50,"title":"Limit"},"description":"Limit of item number in the page"},{"name":"filter","in":"query","required":false,"schema":{"$ref":"#/components/schemas/EntryFilter"}},{"name":"order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/EntryOrder"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntryListResponse"}}}},"404":{"description":"The repository was not found or no commit found in the repository","content":{"application/json":{"example":{"detail":"No commit found in the repository"},"schema":{"$ref":"#/components/schemas/GenericError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["entries"],"summary":"Add new entries to the repository","operationId":"create_entries","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]},{"HTTPBearer":["API_ENTRIES_WRITE"]},{"APIKeyHeader":["API_ENTRIES_WRITE"]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"repo_name","in":"path","required":true,"schema":{"type":"string","title":"Repo Name"}},{"name":"branch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEntryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEntryResponse"}}}},"404":{"description":"The repository was not found or no commit found in the repository","content":{"application/json":{"example":{"detail":"No commit found in the repository"},"schema":{"$ref":"#/components/schemas/GenericError"}}}},"422":{"description":"Encountered error while processing the request data","content":{"application/json":{"example":{"errors":[{"type":"BEANCOUNT_VALIDATION_ERROR","messages":["Invalid account name: Windfalls:Cash"]}]},"schema":{"anyOf":[{"$ref":"#/components/schemas/GenericError"},{"$ref":"#/components/schemas/CreateEntryErrorResponse"}],"title":"Response 422 Create Entries"}}}}}}},"/v1/repos/{username}/{repo_name}/entries/{entry_id}":{"put":{"tags":["entries"],"summary":"Update an entry in the repository","operationId":"update_entry","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]},{"HTTPBearer":["API_ENTRIES_WRITE"]},{"APIKeyHeader":["API_ENTRIES_WRITE"]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entry Id"}},{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"repo_name","in":"path","required":true,"schema":{"type":"string","title":"Repo Name"}},{"name":"branch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEntryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEntryResponse"}}}},"404":{"description":"The repository was not found or no commit found in the repository, or given entry id not found in the repository","content":{"application/json":{"example":{"detail":"No commit found in the repository"},"schema":{"$ref":"#/components/schemas/GenericError"}}}},"422":{"description":"Encountered error while processing the request data","content":{"application/json":{"example":{"errors":[{"type":"BEANCOUNT_VALIDATION_ERROR","messages":["Invalid reference to unknown account: Windfalls:Cash"]}]},"schema":{"anyOf":[{"$ref":"#/components/schemas/GenericError"},{"$ref":"#/components/schemas/GenericEntryErrorResponse"}],"title":"Response 422 Update Entry"}}}}}},"delete":{"tags":["entries"],"summary":"Delete an entry in the repository","operationId":"delete_entry","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]},{"HTTPBearer":["API_ENTRIES_WRITE"]},{"APIKeyHeader":["API_ENTRIES_WRITE"]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Entry Id"}},{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"repo_name","in":"path","required":true,"schema":{"type":"string","title":"Repo Name"}},{"name":"branch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEntryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteEntryResponse"}}}},"404":{"description":"The repository was not found or no commit found in the repository, or given entry id not found in the repository","content":{"application/json":{"example":{"detail":"No commit found in the repository"},"schema":{"$ref":"#/components/schemas/GenericError"}}}},"422":{"description":"Encountered error while processing the request data","content":{"application/json":{"example":{"errors":[{"type":"BEANCOUNT_VALIDATION_ERROR","messages":["Invalid reference to unknown account: Windfalls:Cash"]}]},"schema":{"anyOf":[{"$ref":"#/components/schemas/GenericError"},{"$ref":"#/components/schemas/GenericEntryErrorResponse"}],"title":"Response 422 Delete Entry"}}}}}}},"/v1/repos/{username}/{repo_name}/accounts/{account}/rename":{"put":{"tags":["entries"],"summary":"Rename an account in the repository","operationId":"rename_account","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]},{"HTTPBearer":["API_ENTRIES_WRITE"]},{"APIKeyHeader":["API_ENTRIES_WRITE"]}],"parameters":[{"name":"account","in":"path","required":true,"schema":{"type":"string","title":"Beancount account name","examples":["Assets:Cash"]}},{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"repo_name","in":"path","required":true,"schema":{"type":"string","title":"Repo Name"}},{"name":"branch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameAccountResponse"}}}},"404":{"description":"The repository was not found or no commit found in the repository, or given account not found in the repository","content":{"application/json":{"example":{"detail":"Account Assets:Cash not found in the repository"},"schema":{"$ref":"#/components/schemas/GenericError"}}}},"422":{"description":"Encountered error while processing the request data","content":{"application/json":{"example":{"errors":[{"type":"BEANCOUNT_VALIDATION_ERROR","messages":["Invalid reference to unknown account: Windfalls:Cash"]}]},"schema":{"anyOf":[{"$ref":"#/components/schemas/GenericError"},{"$ref":"#/components/schemas/GenericEntryErrorResponse"}],"title":"Response 422 Rename Account"}}}}}}},"/v1/repos/{username}/{repo_name}/accounts":{"get":{"tags":["entries"],"summary":"Get accounts of a the repository","operationId":"get_accounts","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]},{"HTTPBearer":["API_ENTRIES_READ"]},{"APIKeyHeader":["API_ENTRIES_READ"]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"repo_name","in":"path","required":true,"schema":{"type":"string","title":"Repo Name"}},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}},{"name":"branch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountListResponse"}}}},"404":{"description":"The repository was not found or no commit found in the repository","content":{"application/json":{"example":{"detail":"No commit found in the repository"},"schema":{"$ref":"#/components/schemas/GenericError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/repos/{username}/{repo_name}/forms":{"get":{"tags":["forms"],"summary":"Get forms of from the repository","operationId":"get_forms","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]},{"HTTPBearer":["API_FORMS_READ"]},{"APIKeyHeader":["API_FORMS_READ"]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"repo_name","in":"path","required":true,"schema":{"type":"string","title":"Repo Name"}},{"name":"branch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Current page","default":0,"title":"Page"},"description":"Current page"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"description":"Limit of item number in the page","default":50,"title":"Limit"},"description":"Limit of item number in the page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormListResponse"}}}},"404":{"description":"The repository was not found or no commit found in the repository","content":{"application/json":{"example":{"detail":"No commit found in the repository"},"schema":{"$ref":"#/components/schemas/GenericError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/repos/{username}/{repo_name}/forms/{name}":{"post":{"tags":["forms"],"summary":"Submit data to a form of the repository","operationId":"submit_form","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]},{"HTTPBearer":["API_FORMS_SUBMIT"]},{"APIKeyHeader":["API_FORMS_SUBMIT"]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"repo_name","in":"path","required":true,"schema":{"type":"string","title":"Repo Name"}},{"name":"branch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BatchSubmitFormRequest"},{"$ref":"#/components/schemas/SubmitFormRequest"}],"title":"Submit Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitFormResponse"}}}},"404":{"description":"The repository was not found or no commit found in the repository","content":{"application/json":{"example":{"detail":"No commit found in the repository"},"schema":{"$ref":"#/components/schemas/GenericError"}}}},"422":{"description":"Encountered error while processing the submit data","content":{"application/json":{"example":{"errors":[{"type":"FORM_VALIDATION","field":"account","messages":["Invalid account name."]}]},"schema":{"anyOf":[{"$ref":"#/components/schemas/GenericError"},{"$ref":"#/components/schemas/SubmitFormErrorResponse"}],"title":"Response 422 Submit Form"}}}}}}},"/v1/repos/{username}/{repo_name}/branches":{"get":{"tags":["commits"],"summary":"Get branches of from the repository","operationId":"get_branches","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]},{"HTTPBearer":["API_COMMITS_READ"]},{"APIKeyHeader":["API_COMMITS_READ"]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"repo_name","in":"path","required":true,"schema":{"type":"string","title":"Repo Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchListResponse"}}}},"404":{"description":"The repository was not found or no commit found in the repository","content":{"application/json":{"example":{"detail":"No commit found in the repository"},"schema":{"$ref":"#/components/schemas/GenericError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/repos/{username}/{repo_name}/commits":{"get":{"tags":["commits"],"summary":"Get commits of from the repository","operationId":"get_commits","security":[{"HTTPBearer":[]},{"APIKeyHeader":[]},{"HTTPBearer":["API_COMMITS_READ"]},{"APIKeyHeader":["API_COMMITS_READ"]}],"parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string","title":"Username"}},{"name":"repo_name","in":"path","required":true,"schema":{"type":"string","title":"Repo Name"}},{"name":"branch","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Current page","default":0,"title":"Page"},"description":"Current page"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"description":"Limit of item number in the page","default":50,"title":"Limit"},"description":"Limit of item number in the page"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitListResponse"}}}},"404":{"description":"The repository was not found or no commit found in the repository","content":{"application/json":{"example":{"detail":"No commit found in the repository"},"schema":{"$ref":"#/components/schemas/GenericError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountFormField":{"properties":{"name":{"type":"string","maxLength":32,"minLength":1,"title":"Name"},"required":{"type":"boolean","title":"Required","default":false},"default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default"},"display_name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Display Name"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"render_default_value":{"type":"boolean","title":"Render Default Value","default":false},"type":{"type":"string","const":"account","title":"Type","default":"account"},"creatable":{"type":"boolean","title":"Creatable","default":false}},"type":"object","required":["name"],"title":"AccountFormField"},"AccountListResponse":{"properties":{"branch":{"type":"string","title":"Branch"},"commit":{"$ref":"#/components/schemas/Commit"},"accounts":{"items":{"$ref":"#/components/schemas/Open"},"type":"array","title":"Accounts"}},"type":"object","required":["branch","commit","accounts"],"title":"AccountListResponse"},"Amount-Input":{"properties":{"number":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Number"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["currency"],"title":"Amount"},"Amount-Output":{"properties":{"number":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Number"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["currency"],"title":"Amount"},"Author":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["name","email"],"title":"Author"},"AuthorizationServerMetadata":{"properties":{"issuer":{"type":"string","title":"Issuer"},"authorization_endpoint":{"type":"string","title":"Authorization Endpoint"},"token_endpoint":{"type":"string","title":"Token Endpoint"},"registration_endpoint":{"type":"string","title":"Registration Endpoint"},"revocation_endpoint":{"type":"string","title":"Revocation Endpoint"},"response_types_supported":{"items":{"type":"string"},"type":"array","title":"Response Types Supported"},"grant_types_supported":{"items":{"type":"string"},"type":"array","title":"Grant Types Supported"},"code_challenge_methods_supported":{"items":{"type":"string"},"type":"array","title":"Code Challenge Methods Supported"},"token_endpoint_auth_methods_supported":{"items":{"type":"string"},"type":"array","title":"Token Endpoint Auth Methods Supported"},"scopes_supported":{"items":{"type":"string"},"type":"array","title":"Scopes Supported"},"resource_indicators_supported":{"type":"boolean","title":"Resource Indicators Supported"},"revocation_endpoint_auth_methods_supported":{"items":{"type":"string"},"type":"array","title":"Revocation Endpoint Auth Methods Supported"}},"type":"object","required":["issuer","authorization_endpoint","token_endpoint","registration_endpoint","revocation_endpoint","response_types_supported","grant_types_supported","code_challenge_methods_supported","token_endpoint_auth_methods_supported","scopes_supported","resource_indicators_supported","revocation_endpoint_auth_methods_supported"],"title":"AuthorizationServerMetadata"},"Balance-Input":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"balance","title":"Entry Type","default":"balance"},"account":{"type":"string","title":"Account"},"amount":{"$ref":"#/components/schemas/Amount-Input"},"tolerance":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tolerance"},"diff":{"anyOf":[{"$ref":"#/components/schemas/Amount-Input"},{"type":"null"}]}},"type":"object","required":["date","account","amount"],"title":"Balance"},"Balance-Output":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"balance","title":"Entry Type","default":"balance"},"account":{"type":"string","title":"Account"},"amount":{"$ref":"#/components/schemas/Amount-Output"},"tolerance":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tolerance"},"diff":{"anyOf":[{"$ref":"#/components/schemas/Amount-Output"},{"type":"null"}]}},"type":"object","required":["date","account","amount"],"title":"Balance"},"BatchSubmitFormRequest":{"properties":{"preview":{"type":"boolean","title":"Preview","description":"Preview file updates only without making actual commit to the repository","default":false},"commit":{"anyOf":[{"$ref":"#/components/schemas/CommitConfig"},{"type":"null"}],"description":"Git commit configuration for overriding the default values or values from the form definitions."},"data":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Data","description":"List of data to submit for form fields"}},"type":"object","required":["data"],"title":"BatchSubmitFormRequest"},"BeancountValidationError":{"properties":{"type":{"type":"string","const":"BEANCOUNT_VALIDATION_ERROR","title":"Type","default":"BEANCOUNT_VALIDATION_ERROR"},"messages":{"items":{"type":"string"},"type":"array","title":"Messages","description":"Deprecated. Use native_errors.","deprecated":true},"native_errors":{"items":{"$ref":"#/components/schemas/NativeBeancountError"},"type":"array","title":"Native Errors","description":"Beancount validation errors, with a code, message, and location when known. Empty when only a text message is available."}},"type":"object","required":["messages"],"title":"BeancountValidationError"},"Booking":{"type":"string","enum":["STRICT","NONE","AVERAGE","FIFO","LIFO"],"title":"Booking"},"Branch":{"properties":{"name":{"type":"string","title":"Name"},"commit":{"$ref":"#/components/schemas/Commit"}},"type":"object","required":["name","commit"],"title":"Branch"},"BranchListResponse":{"properties":{"branches":{"items":{"$ref":"#/components/schemas/Branch"},"type":"array","title":"Branches"},"default_branch":{"type":"string","title":"Default Branch"}},"type":"object","required":["branches","default_branch"],"title":"BranchListResponse"},"Close":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"close","title":"Entry Type","default":"close"},"account":{"type":"string","title":"Account"}},"type":"object","required":["date","account"],"title":"Close"},"Commit":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"hexsha":{"type":"string","title":"Hexsha"},"message":{"type":"string","title":"Message"},"author":{"$ref":"#/components/schemas/Author"},"committer":{"$ref":"#/components/schemas/Author"}},"type":"object","required":["id","hexsha","message","author","committer"],"title":"Commit"},"CommitConfig":{"properties":{"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Git message for overriding the default values."}},"type":"object","title":"CommitConfig"},"CommitListResponse":{"properties":{"branch":{"type":"string","title":"Branch"},"commits":{"items":{"$ref":"#/components/schemas/Commit"},"type":"array","title":"Commits"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["branch","commits","pagination"],"title":"CommitListResponse"},"CommitOptions":{"properties":{"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"CommitOptions"},"Commodity":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"commodity","title":"Entry Type","default":"commodity"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["date","currency"],"title":"Commodity"},"Cost-Input":{"properties":{"number":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Number"},"currency":{"type":"string","title":"Currency"},"date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["number","currency"],"title":"Cost"},"Cost-Output":{"properties":{"number":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Number"},"currency":{"type":"string","title":"Currency"},"date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["number","currency"],"title":"Cost"},"CostSpec-Input":{"properties":{"number_per":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Number Per"},"number_total":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Number Total"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"date":{"type":"string","format":"date","title":"Date"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"merge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Merge"}},"type":"object","required":["date"],"title":"CostSpec"},"CostSpec-Output":{"properties":{"number_per":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Number Per"},"number_total":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Number Total"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"date":{"type":"string","format":"date","title":"Date"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"merge":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Merge"}},"type":"object","required":["date"],"title":"CostSpec"},"CreateEntryErrorResponse":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/BeancountValidationError"},"type":"array","title":"Errors"}},"type":"object","required":["errors"],"title":"CreateEntryErrorResponse"},"CreateEntryRequest":{"properties":{"commit":{"anyOf":[{"$ref":"#/components/schemas/CommitConfig"},{"type":"null"}],"description":"Git commit configuration for overriding the default values."},"insertions":{"items":{"$ref":"#/components/schemas/EntryInsertion"},"type":"array","title":"Insertions","description":"List of EntryInsertion"}},"type":"object","required":["insertions"],"title":"CreateEntryRequest"},"CreateEntryResponse":{"properties":{"branch":{"type":"string","title":"Branch"},"commit":{"$ref":"#/components/schemas/Commit"}},"type":"object","required":["branch","commit"],"title":"CreateEntryResponse"},"CurrencyFormField":{"properties":{"name":{"type":"string","maxLength":32,"minLength":1,"title":"Name"},"required":{"type":"boolean","title":"Required","default":false},"default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default"},"display_name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Display Name"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"render_default_value":{"type":"boolean","title":"Render Default Value","default":false},"type":{"type":"string","const":"currency","title":"Type","default":"currency"},"creatable":{"type":"boolean","title":"Creatable","default":false},"multiple":{"type":"boolean","title":"Multiple","default":false}},"type":"object","required":["name"],"title":"CurrencyFormField"},"Custom-Input":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"custom","title":"Entry Type","default":"custom"},"type":{"type":"string","title":"Type"},"values":{"items":{"anyOf":[{"$ref":"#/components/schemas/Amount-Input"},{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"boolean"},{"type":"string"}]},"type":"array","title":"Values"}},"type":"object","required":["date","type","values"],"title":"Custom"},"Custom-Output":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"custom","title":"Entry Type","default":"custom"},"type":{"type":"string","title":"Type"},"values":{"items":{"anyOf":[{"$ref":"#/components/schemas/Amount-Output"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"boolean"},{"type":"string"}]},"type":"array","title":"Values"}},"type":"object","required":["date","type","values"],"title":"Custom"},"DateFormField":{"properties":{"name":{"type":"string","maxLength":32,"minLength":1,"title":"Name"},"required":{"type":"boolean","title":"Required","default":false},"default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default"},"display_name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Display Name"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"render_default_value":{"type":"boolean","title":"Render Default Value","default":false},"type":{"type":"string","const":"date","title":"Type","default":"date"}},"type":"object","required":["name"],"title":"DateFormField"},"DeleteEntryRequest":{"properties":{"commit":{"anyOf":[{"$ref":"#/components/schemas/CommitConfig"},{"type":"null"}],"description":"Git commit configuration for overriding the default values."}},"type":"object","title":"DeleteEntryRequest"},"DeleteEntryResponse":{"properties":{"branch":{"type":"string","title":"Branch"},"commit":{"$ref":"#/components/schemas/Commit"}},"type":"object","required":["branch","commit"],"title":"DeleteEntryResponse"},"Document":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"document","title":"Entry Type","default":"document"},"account":{"type":"string","title":"Account"},"filename":{"type":"string","title":"Filename"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"links":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["date","account","filename"],"title":"Document"},"EntryInsertion":{"properties":{"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File","description":"The target bean file to insert new entries to. By default `main.bean` file or the custom entry bean file of the repository will be used if not specified."},"entries":{"items":{"anyOf":[{"$ref":"#/components/schemas/Open"},{"$ref":"#/components/schemas/Close"},{"$ref":"#/components/schemas/Commodity"},{"$ref":"#/components/schemas/Pad"},{"$ref":"#/components/schemas/Balance-Input"},{"$ref":"#/components/schemas/Transaction-Input"},{"$ref":"#/components/schemas/Note"},{"$ref":"#/components/schemas/Event"},{"$ref":"#/components/schemas/Price-Input"},{"$ref":"#/components/schemas/Document"},{"$ref":"#/components/schemas/Custom-Input"}]},"type":"array","title":"Entries","description":"List of entries to create. The `id` field of entries will be ignored."}},"type":"object","required":["entries"],"title":"EntryInsertion"},"EntryListResponse":{"properties":{"branch":{"type":"string","title":"Branch"},"commit":{"$ref":"#/components/schemas/Commit"},"entries":{"items":{"anyOf":[{"$ref":"#/components/schemas/Open"},{"$ref":"#/components/schemas/Close"},{"$ref":"#/components/schemas/Commodity"},{"$ref":"#/components/schemas/Pad"},{"$ref":"#/components/schemas/Balance-Output"},{"$ref":"#/components/schemas/Transaction-Output"},{"$ref":"#/components/schemas/Note"},{"$ref":"#/components/schemas/Event"},{"$ref":"#/components/schemas/Price-Output"},{"$ref":"#/components/schemas/Document"},{"$ref":"#/components/schemas/Custom-Output"}]},"type":"array","title":"Entries"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["branch","commit","entries","pagination"],"title":"EntryListResponse"},"Event":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"event","title":"Entry Type","default":"event"},"type":{"type":"string","title":"Type"},"description":{"type":"string","title":"Description"}},"type":"object","required":["date","type","description"],"title":"Event"},"FileFormField":{"properties":{"name":{"type":"string","maxLength":32,"minLength":1,"title":"Name"},"required":{"type":"boolean","title":"Required","default":false},"default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default"},"display_name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Display Name"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"render_default_value":{"type":"boolean","title":"Render Default Value","default":false},"type":{"type":"string","const":"file","title":"Type","default":"file"},"creatable":{"type":"boolean","title":"Creatable","default":false}},"type":"object","required":["name"],"title":"FileFormField"},"FileUpdate":{"properties":{"file":{"type":"string","title":"File"},"new_file":{"type":"boolean","title":"New File"},"content":{"type":"string","title":"Content"}},"type":"object","required":["file","new_file","content"],"title":"FileUpdate"},"FormListResponse":{"properties":{"branch":{"type":"string","title":"Branch"},"commit":{"$ref":"#/components/schemas/Commit"},"forms":{"items":{"$ref":"#/components/schemas/FormSchema"},"type":"array","title":"Forms"},"pagination":{"$ref":"#/components/schemas/Pagination"}},"type":"object","required":["branch","commit","forms","pagination"],"title":"FormListResponse"},"FormProcessingError":{"properties":{"type":{"type":"string","const":"FORM_PROCESSING_ERROR","title":"Type","default":"FORM_PROCESSING_ERROR"},"messages":{"items":{"type":"string"},"type":"array","title":"Messages"}},"type":"object","required":["messages"],"title":"FormProcessingError"},"FormSchema":{"properties":{"name":{"type":"string","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","title":"Name"},"fields":{"items":{"anyOf":[{"$ref":"#/components/schemas/StrFormField"},{"$ref":"#/components/schemas/NumberFormField"},{"$ref":"#/components/schemas/DateFormField"},{"$ref":"#/components/schemas/FileFormField"},{"$ref":"#/components/schemas/AccountFormField"},{"$ref":"#/components/schemas/CurrencyFormField"},{"$ref":"#/components/schemas/PostingsFormField"},{"$ref":"#/components/schemas/MetaFormField"},{"$ref":"#/components/schemas/HeaderField"}]},"type":"array","maxItems":32,"title":"Fields"},"operations":{"items":{"$ref":"#/components/schemas/Operation"},"type":"array","title":"Operations"},"auto_format":{"type":"boolean","title":"Auto Format","default":true},"commit":{"anyOf":[{"$ref":"#/components/schemas/CommitOptions"},{"type":"null"}]},"display_name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["name","fields","operations"],"title":"FormSchema"},"FormValidationError":{"properties":{"type":{"type":"string","const":"FORM_VALIDATION_ERROR","title":"Type","default":"FORM_VALIDATION_ERROR"},"field":{"type":"string","title":"Field"},"messages":{"items":{"type":"string"},"type":"array","title":"Messages"},"index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Index","description":"The index of submit request data item causing the validation error"}},"type":"object","required":["field","messages"],"title":"FormValidationError"},"GenericEntryErrorResponse":{"properties":{"errors":{"items":{"$ref":"#/components/schemas/BeancountValidationError"},"type":"array","title":"Errors"}},"type":"object","required":["errors"],"title":"GenericEntryErrorResponse"},"GenericError":{"properties":{"detail":{"title":"Detail"}},"type":"object","title":"GenericError"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HeaderField":{"properties":{"name":{"type":"string","maxLength":32,"minLength":1,"title":"Name"},"required":{"type":"boolean","title":"Required","default":false},"default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default"},"display_name":{"anyOf":[{"type":"string","maxLength":160,"minLength":1},{"type":"null"}],"title":"Display Name"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"render_default_value":{"type":"boolean","title":"Render Default Value","default":false},"type":{"type":"string","const":"header","title":"Type","default":"header"},"href":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Href"}},"type":"object","required":["name"],"title":"HeaderField"},"MetaFormField":{"properties":{"name":{"type":"string","maxLength":32,"minLength":1,"title":"Name"},"required":{"type":"boolean","title":"Required","default":false},"default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default"},"display_name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Display Name"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"render_default_value":{"type":"boolean","title":"Render Default Value","default":false},"type":{"type":"string","const":"meta","title":"Type","default":"meta"}},"type":"object","required":["name"],"title":"MetaFormField"},"NativeBeancountError":{"properties":{"code":{"type":"string","title":"Code"},"severity":{"type":"string","enum":["error","warning"],"title":"Severity","default":"error"},"message":{"type":"string","title":"Message"},"location":{"anyOf":[{"$ref":"#/components/schemas/NativeErrorLocation"},{"type":"null"}]},"txn":{"anyOf":[{"$ref":"#/components/schemas/NativeErrorTxn"},{"type":"null"}]},"residual":{"anyOf":[{"$ref":"#/components/schemas/NativeErrorAmount"},{"type":"null"}]},"account":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account"}},"type":"object","required":["code","message"],"title":"NativeBeancountError"},"NativeErrorAmount":{"properties":{"number":{"type":"string","title":"Number"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["number","currency"],"title":"NativeErrorAmount"},"NativeErrorLocation":{"properties":{"file":{"type":"string","title":"File"},"line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line"},"column":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Column"}},"type":"object","required":["file"],"title":"NativeErrorLocation"},"NativeErrorTxn":{"properties":{"date":{"type":"string","title":"Date"},"payee":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payee"},"narration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Narration"}},"type":"object","required":["date"],"title":"NativeErrorTxn"},"Note":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"note","title":"Entry Type","default":"note"},"account":{"type":"string","title":"Account"},"comment":{"type":"string","title":"Comment"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"links":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Links"}},"type":"object","required":["date","account","comment"],"title":"Note"},"NumberFormField":{"properties":{"name":{"type":"string","maxLength":32,"minLength":1,"title":"Name"},"required":{"type":"boolean","title":"Required","default":false},"default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default"},"display_name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Display Name"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"render_default_value":{"type":"boolean","title":"Render Default Value","default":false},"type":{"type":"string","const":"number","title":"Type","default":"number"}},"type":"object","required":["name"],"title":"NumberFormField"},"Open":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"open","title":"Entry Type","default":"open"},"account":{"type":"string","title":"Account"},"currencies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Currencies"},"booking":{"anyOf":[{"$ref":"#/components/schemas/Booking"},{"type":"null"}]}},"type":"object","required":["date","account"],"title":"Open"},"Operation":{"properties":{"file":{"type":"string","title":"File"},"content":{"type":"string","title":"Content"},"type":{"$ref":"#/components/schemas/OperationType","default":"append"}},"type":"object","required":["file","content"],"title":"Operation"},"OperationType":{"type":"string","enum":["append"],"title":"OperationType"},"Pad":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"pad","title":"Entry Type","default":"pad"},"account":{"type":"string","title":"Account"},"source_account":{"type":"string","title":"Source Account"}},"type":"object","required":["date","account","source_account"],"title":"Pad"},"Pagination":{"properties":{"total_items":{"type":"integer","title":"Total Items"},"total_pages":{"type":"integer","title":"Total Pages"},"page":{"type":"integer","title":"Page"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["total_items","total_pages","page","limit"],"title":"Pagination"},"Posting-Input":{"properties":{"account":{"type":"string","title":"Account"},"units":{"$ref":"#/components/schemas/Amount-Input"},"cost":{"anyOf":[{"$ref":"#/components/schemas/Cost-Input"},{"$ref":"#/components/schemas/CostSpec-Input"},{"type":"null"}],"title":"Cost"},"price":{"anyOf":[{"$ref":"#/components/schemas/Amount-Input"},{"type":"null"}]},"total_price":{"type":"boolean","title":"Total Price","default":false},"flag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flag"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","required":["account","units"],"title":"Posting"},"Posting-Output":{"properties":{"account":{"type":"string","title":"Account"},"units":{"$ref":"#/components/schemas/Amount-Output"},"cost":{"anyOf":[{"$ref":"#/components/schemas/Cost-Output"},{"$ref":"#/components/schemas/CostSpec-Output"},{"type":"null"}],"title":"Cost"},"price":{"anyOf":[{"$ref":"#/components/schemas/Amount-Output"},{"type":"null"}]},"total_price":{"type":"boolean","title":"Total Price","default":false},"flag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flag"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"}},"type":"object","required":["account","units"],"title":"Posting"},"PostingsFormField":{"properties":{"name":{"type":"string","maxLength":32,"minLength":1,"title":"Name"},"required":{"type":"boolean","title":"Required","default":false},"default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default"},"display_name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Display Name"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"render_default_value":{"type":"boolean","title":"Render Default Value","default":false},"type":{"type":"string","const":"postings","title":"Type","default":"postings"}},"type":"object","required":["name"],"title":"PostingsFormField"},"Price-Input":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"price","title":"Entry Type","default":"price"},"currency":{"type":"string","title":"Currency"},"amount":{"$ref":"#/components/schemas/Amount-Input"}},"type":"object","required":["date","currency","amount"],"title":"Price"},"Price-Output":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"price","title":"Entry Type","default":"price"},"currency":{"type":"string","title":"Currency"},"amount":{"$ref":"#/components/schemas/Amount-Output"}},"type":"object","required":["date","currency","amount"],"title":"Price"},"ProtectedResourceMetadata":{"properties":{"resource":{"type":"string","title":"Resource"},"authorization_servers":{"items":{"type":"string"},"type":"array","title":"Authorization Servers"},"scopes_supported":{"items":{"type":"string"},"type":"array","title":"Scopes Supported"},"bearer_methods_supported":{"items":{"type":"string"},"type":"array","title":"Bearer Methods Supported"}},"type":"object","required":["resource","authorization_servers","scopes_supported","bearer_methods_supported"],"title":"ProtectedResourceMetadata"},"RenameAccountRequest":{"properties":{"name":{"type":"string","pattern":"^[A-Z][0-9a-zA-Z-]*(:[A-Z0-9][0-9a-zA-Z-]*)*$","title":"Name","description":"The new name of account to rename to","examples":["Assets:Cash"]},"commit":{"anyOf":[{"$ref":"#/components/schemas/CommitConfig"},{"type":"null"}],"description":"Git commit configuration for overriding the default values."}},"type":"object","required":["name"],"title":"RenameAccountRequest"},"RenameAccountResponse":{"properties":{"branch":{"type":"string","title":"Branch"},"commit":{"$ref":"#/components/schemas/Commit"}},"type":"object","required":["branch","commit"],"title":"RenameAccountResponse"},"StrFormField":{"properties":{"name":{"type":"string","maxLength":32,"minLength":1,"title":"Name"},"required":{"type":"boolean","title":"Required","default":false},"default":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default"},"display_name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Display Name"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"render_default_value":{"type":"boolean","title":"Render Default Value","default":false},"type":{"type":"string","const":"str","title":"Type","default":"str"}},"type":"object","required":["name"],"title":"StrFormField"},"SubmitFormErrorResponse":{"properties":{"errors":{"items":{"anyOf":[{"$ref":"#/components/schemas/FormValidationError"},{"$ref":"#/components/schemas/FormProcessingError"},{"$ref":"#/components/schemas/BeancountValidationError"}]},"type":"array","title":"Errors"}},"type":"object","required":["errors"],"title":"SubmitFormErrorResponse"},"SubmitFormRequest":{"properties":{"preview":{"type":"boolean","title":"Preview","description":"Preview file updates only without making actual commit to the repository","default":false},"commit":{"anyOf":[{"$ref":"#/components/schemas/CommitConfig"},{"type":"null"}],"description":"Git commit configuration for overriding the default values or values from the form definitions."},"data":{"additionalProperties":true,"type":"object","title":"Data","description":"Data to submit for form fields"}},"type":"object","required":["data"],"title":"SubmitFormRequest"},"SubmitFormResponse":{"properties":{"file_updates":{"items":{"$ref":"#/components/schemas/FileUpdate"},"type":"array","title":"File Updates","description":"File updates made from submitting form"},"commit":{"anyOf":[{"$ref":"#/components/schemas/Commit"},{"type":"null"}],"description":"The new commit created from submitting form"}},"type":"object","required":["file_updates"],"title":"SubmitFormResponse"},"Transaction-Input":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"transaction","title":"Entry Type","default":"transaction"},"flag":{"type":"string","title":"Flag"},"payee":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payee"},"narration":{"type":"string","title":"Narration"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"links":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Links"},"postings":{"items":{"$ref":"#/components/schemas/Posting-Input"},"type":"array","title":"Postings"}},"type":"object","required":["date","flag","narration","postings"],"title":"Transaction"},"Transaction-Output":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Id"},"meta":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Meta"},"date":{"type":"string","format":"date","title":"Date"},"entry_type":{"type":"string","const":"transaction","title":"Entry Type","default":"transaction"},"flag":{"type":"string","title":"Flag"},"payee":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payee"},"narration":{"type":"string","title":"Narration"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"links":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Links"},"postings":{"items":{"$ref":"#/components/schemas/Posting-Output"},"type":"array","title":"Postings"}},"type":"object","required":["date","flag","narration","postings"],"title":"Transaction"},"UpdateEntryRequest":{"properties":{"entry":{"anyOf":[{"$ref":"#/components/schemas/Open"},{"$ref":"#/components/schemas/Close"},{"$ref":"#/components/schemas/Commodity"},{"$ref":"#/components/schemas/Pad"},{"$ref":"#/components/schemas/Balance-Input"},{"$ref":"#/components/schemas/Transaction-Input"},{"$ref":"#/components/schemas/Note"},{"$ref":"#/components/schemas/Event"},{"$ref":"#/components/schemas/Price-Input"},{"$ref":"#/components/schemas/Document"},{"$ref":"#/components/schemas/Custom-Input"}],"title":"Entry"},"commit":{"anyOf":[{"$ref":"#/components/schemas/CommitConfig"},{"type":"null"}],"description":"Git commit configuration for overriding the default values."}},"type":"object","required":["entry"],"title":"UpdateEntryRequest"},"UpdateEntryResponse":{"properties":{"branch":{"type":"string","title":"Branch"},"commit":{"$ref":"#/components/schemas/Commit"}},"type":"object","required":["branch","commit"],"title":"UpdateEntryResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"DateSetOperator_EntryDateField_":{"properties":{"field":{"$ref":"#/components/schemas/EntryDateField"},"op":{"$ref":"#/components/schemas/SetOperatorType"},"values":{"items":{"format":"date","type":"string"},"title":"Values","type":"array"}},"required":["field","op","values"],"title":"DateSetOperator[EntryDateField]","type":"object"},"DateValueOperator_EntryDateField_":{"properties":{"field":{"$ref":"#/components/schemas/EntryDateField"},"op":{"anyOf":[{"$ref":"#/components/schemas/EqualOperatorType"},{"$ref":"#/components/schemas/MemberOperatorType"},{"$ref":"#/components/schemas/RelationalOperatorType"}],"title":"Op"},"value":{"format":"date","title":"Value","type":"string"}},"required":["field","op","value"],"title":"DateValueOperator[EntryDateField]","type":"object"},"DecimalOperator_EntryDecimalField_":{"properties":{"field":{"$ref":"#/components/schemas/EntryDecimalField"},"op":{"anyOf":[{"$ref":"#/components/schemas/EqualOperatorType"},{"$ref":"#/components/schemas/RelationalOperatorType"}],"title":"Op"},"value":{"anyOf":[{"type":"number"},{"pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","type":"string"}],"title":"Value"}},"required":["field","op","value"],"title":"DecimalOperator[EntryDecimalField]","type":"object"},"EntryDateField":{"enum":["date","posting.cost_date"],"title":"EntryDateField","type":"string"},"EntryDecimalField":{"enum":["price.amount_number","balance.tolerance","balance.amount_number","balance.diff_number","posting.units_number","posting.price_number","posting.cost_number","posting.cost_number_per","posting.cost_number_total"],"title":"EntryDecimalField","type":"string"},"EntryStringField":{"enum":["open.account","close.account","commodity.currency","pad.account","pad.source_account","transaction.narration","transaction.flag","transaction.payee","posting.account","posting.units_currency","posting.price_currency","posting.cost_currency","posting.cost_label","posting.flag","event.type","event.description","note.account","note.comment","balance.account","balance.amount_currency","balance.diff_currency","price.currency","price.amount_currency","custom.type","document.account","document.filename"],"title":"EntryStringField","type":"string"},"EntryStringListField":{"enum":["open.currencies","transaction.tags","transaction.links","note.tags","note.links","document.tags","document.links"],"title":"EntryStringListField","type":"string"},"EntryType":{"enum":["open","close","commodity","pad","balance","transaction","note","event","price","document","custom"],"title":"EntryType","type":"string"},"EntryTypeEnumField":{"enum":["entry_type"],"title":"EntryTypeEnumField","type":"string"},"EnumSetOperator_EntryTypeEnumField_EntryType_":{"properties":{"field":{"$ref":"#/components/schemas/EntryTypeEnumField"},"op":{"$ref":"#/components/schemas/SetOperatorType"},"values":{"items":{"$ref":"#/components/schemas/EntryType"},"title":"Values","type":"array"}},"required":["field","op","values"],"title":"EnumSetOperator[EntryTypeEnumField, EntryType]","type":"object"},"EnumValueOperator_EntryTypeEnumField_EntryType_":{"properties":{"field":{"$ref":"#/components/schemas/EntryTypeEnumField"},"op":{"anyOf":[{"$ref":"#/components/schemas/EqualOperatorType"},{"$ref":"#/components/schemas/MemberOperatorType"}],"title":"Op"},"value":{"$ref":"#/components/schemas/EntryType"}},"required":["field","op","value"],"title":"EnumValueOperator[EntryTypeEnumField, EntryType]","type":"object"},"EqualOperatorType":{"enum":["==","!="],"title":"EqualOperatorType","type":"string"},"LogicalOperator":{"properties":{"op":{"$ref":"#/components/schemas/LogicalOperatorType"},"values":{"items":{"anyOf":[{"$ref":"#/components/schemas/DateValueOperator_EntryDateField_"},{"$ref":"#/components/schemas/DateSetOperator_EntryDateField_"},{"$ref":"#/components/schemas/EnumValueOperator_EntryTypeEnumField_EntryType_"},{"$ref":"#/components/schemas/NullableEnumValueOperator_EntryTypeEnumField_"},{"$ref":"#/components/schemas/EnumSetOperator_EntryTypeEnumField_EntryType_"},{"$ref":"#/components/schemas/StringValueOperator_EntryStringField_"},{"$ref":"#/components/schemas/NullableStringValueOperator_EntryStringField_"},{"$ref":"#/components/schemas/StringSetOperator_EntryStringField_"},{"$ref":"#/components/schemas/StringListOperator_EntryStringListField_"},{"$ref":"#/components/schemas/DecimalOperator_EntryDecimalField_"},{"$ref":"#/components/schemas/NullableDecimalOperator_EntryDecimalField_"},{"$ref":"#/components/schemas/LogicalOperator"},{"$ref":"#/components/schemas/NotOperator"}]},"title":"Values","type":"array"}},"required":["op","values"],"title":"LogicalOperator","type":"object"},"LogicalOperatorType":{"enum":["and","or"],"title":"LogicalOperatorType","type":"string"},"MemberOperatorType":{"enum":["in","not_in"],"title":"MemberOperatorType","type":"string"},"NotOperator":{"properties":{"op":{"$ref":"#/components/schemas/NotOperatorType"},"value":{"anyOf":[{"$ref":"#/components/schemas/DateValueOperator_EntryDateField_"},{"$ref":"#/components/schemas/DateSetOperator_EntryDateField_"},{"$ref":"#/components/schemas/EnumValueOperator_EntryTypeEnumField_EntryType_"},{"$ref":"#/components/schemas/NullableEnumValueOperator_EntryTypeEnumField_"},{"$ref":"#/components/schemas/EnumSetOperator_EntryTypeEnumField_EntryType_"},{"$ref":"#/components/schemas/StringValueOperator_EntryStringField_"},{"$ref":"#/components/schemas/NullableStringValueOperator_EntryStringField_"},{"$ref":"#/components/schemas/StringSetOperator_EntryStringField_"},{"$ref":"#/components/schemas/StringListOperator_EntryStringListField_"},{"$ref":"#/components/schemas/DecimalOperator_EntryDecimalField_"},{"$ref":"#/components/schemas/NullableDecimalOperator_EntryDecimalField_"},{"$ref":"#/components/schemas/LogicalOperator"},{"$ref":"#/components/schemas/NotOperator"}],"title":"Value"}},"required":["op","value"],"title":"NotOperator","type":"object"},"NotOperatorType":{"enum":["not"],"title":"NotOperatorType","type":"string"},"NullOperatorType":{"enum":["is","is_not"],"title":"NullOperatorType","type":"string"},"NullableDecimalOperator_EntryDecimalField_":{"properties":{"field":{"$ref":"#/components/schemas/EntryDecimalField"},"op":{"$ref":"#/components/schemas/NullOperatorType"},"value":{"title":"Value","type":"null"}},"required":["field","op","value"],"title":"NullableDecimalOperator[EntryDecimalField]","type":"object"},"NullableEnumValueOperator_EntryTypeEnumField_":{"properties":{"field":{"$ref":"#/components/schemas/EntryTypeEnumField"},"op":{"$ref":"#/components/schemas/NullOperatorType"},"value":{"title":"Value","type":"null"}},"required":["field","op","value"],"title":"NullableEnumValueOperator[EntryTypeEnumField]","type":"object"},"NullableStringValueOperator_EntryStringField_":{"properties":{"field":{"$ref":"#/components/schemas/EntryStringField"},"op":{"$ref":"#/components/schemas/NullOperatorType"},"value":{"title":"Value","type":"null"}},"required":["field","op","value"],"title":"NullableStringValueOperator[EntryStringField]","type":"object"},"PatternOperatorType":{"enum":["like","ilike"],"title":"PatternOperatorType","type":"string"},"RelationalOperatorType":{"enum":[">",">=","<","<="],"title":"RelationalOperatorType","type":"string"},"SetOperatorType":{"enum":["contains","overlaps"],"title":"SetOperatorType","type":"string"},"StringListOperator_EntryStringListField_":{"properties":{"field":{"$ref":"#/components/schemas/EntryStringListField"},"op":{"anyOf":[{"$ref":"#/components/schemas/EqualOperatorType"},{"$ref":"#/components/schemas/SetOperatorType"}],"title":"Op"},"values":{"items":{"type":"string"},"title":"Values","type":"array"}},"required":["field","op","values"],"title":"StringListOperator[EntryStringListField]","type":"object"},"StringSetOperator_EntryStringField_":{"properties":{"field":{"$ref":"#/components/schemas/EntryStringField"},"op":{"$ref":"#/components/schemas/MemberOperatorType"},"values":{"items":{"type":"string"},"title":"Values","type":"array"}},"required":["field","op","values"],"title":"StringSetOperator[EntryStringField]","type":"object"},"StringValueOperator_EntryStringField_":{"properties":{"field":{"$ref":"#/components/schemas/EntryStringField"},"op":{"anyOf":[{"$ref":"#/components/schemas/EqualOperatorType"},{"$ref":"#/components/schemas/PatternOperatorType"}],"title":"Op"},"value":{"title":"Value","type":"string"}},"required":["field","op","value"],"title":"StringValueOperator[EntryStringField]","type":"object"},"EntryOrderField":{"enum":["date","entry_type","open.account","open.currencies","close.account","commodity.currency","pad.account","pad.source_account","transaction.narration","transaction.flag","transaction.payee","transaction.tags","transaction.links","event.type","event.description","note.account","note.comment","note.tags","note.links","balance.account","balance.amount_currency","balance.diff_currency","balance.tolerance","balance.amount_number","balance.diff_number","price.currency","price.amount_currency","price.amount_number","custom.type","document.account","document.filename","document.tags","document.links"],"title":"EntryOrderField","type":"string"},"OrderDirection":{"enum":["asc","desc"],"title":"OrderDirection","type":"string"},"OrderSpec_EntryOrderField_":{"properties":{"field":{"$ref":"#/components/schemas/EntryOrderField"},"direction":{"$ref":"#/components/schemas/OrderDirection","default":"asc"}},"required":["field"],"title":"OrderSpec[EntryOrderField]","type":"object"},"EntryFilter":{"anyOf":[{"$ref":"#/components/schemas/DateValueOperator_EntryDateField_"},{"$ref":"#/components/schemas/DateSetOperator_EntryDateField_"},{"$ref":"#/components/schemas/EnumValueOperator_EntryTypeEnumField_EntryType_"},{"$ref":"#/components/schemas/NullableEnumValueOperator_EntryTypeEnumField_"},{"$ref":"#/components/schemas/EnumSetOperator_EntryTypeEnumField_EntryType_"},{"$ref":"#/components/schemas/StringValueOperator_EntryStringField_"},{"$ref":"#/components/schemas/NullableStringValueOperator_EntryStringField_"},{"$ref":"#/components/schemas/StringSetOperator_EntryStringField_"},{"$ref":"#/components/schemas/StringListOperator_EntryStringListField_"},{"$ref":"#/components/schemas/DecimalOperator_EntryDecimalField_"},{"$ref":"#/components/schemas/NullableDecimalOperator_EntryDecimalField_"},{"$ref":"#/components/schemas/LogicalOperator"},{"$ref":"#/components/schemas/NotOperator"}],"examples":{"byDateRange":{"summary":"Filter by date range","value":"{\"op\": \"and\", \"values\": [{\"field\": \"date\", \"op\": \">=\", \"value\": \"2023-01-01\"}, {\"field\": \"date\", \"op\": \"<=\", \"value\": \"2023-01-31\"}]}"},"byPostingAccount":{"summary":"Filter by posting account","value":"{\"field\": \"posting.account\", \"op\": \"ilike\", \"value\": \"Assets:%\"}"},"byTransactionNarration":{"summary":"Filter by transaction narration","value":"{\"field\": \"transaction.narration\", \"op\": \"ilike\", \"value\": \"%contracting%\"}"},"byTransactionTags":{"summary":"Filter by transaction tags","value":"{\"field\": \"transaction.tags\", \"op\": \"contains\", \"values\": [\"saas\", \"office\"]}"},"logic":{"summary":"Filter by using logical operators","value":"{\"op\": \"and\", \"values\": [{\"field\": \"transaction.tags\", \"op\": \"contains\", \"values\": [\"saas\", \"office\"]}, {\"op\": \"not\", \"value\": {\"field\": \"transaction.tags\", \"op\": \"contains\", \"value\": [\"san_francisco\"]}}]}"}},"title":"EntryFilter"},"EntryOrder":{"default":"[{\"field\": \"date\"}, {\"field\": \"transaction.narration\"}]","examples":{"orderByDateAndAccountName":{"summary":"Order by date then account name","value":"[{\"field\": \"date\", \"direction\": \"desc\"}, {\"field\": \"open.account\"}, {\"field\": \"close.account\"}, {\"field\": \"balance.account\"}]"}},"items":{"$ref":"#/components/schemas/OrderSpec_EntryOrderField_"},"title":"EntryOrder","type":"array"}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"Access token from BeanHub settings as `Authorization: Bearer <token>`.","scheme":"bearer"},"APIKeyHeader":{"type":"apiKey","description":"Deprecated. Send the same token as `Authorization: Bearer <token>` instead.","in":"header","name":"access-token","deprecated":true}}}}