Files
docs/khata-app/lib/interfaces/openapi/index.html

12614 lines
396 KiB
HTML

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="icon" href="../../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.23">
<title>Openapi - Khata App — Library Reference</title>
<link rel="stylesheet" href="../../assets/stylesheets/main.84d31ad4.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/palette.06af60db.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300,300i,400,400i,700,700i%7CJetBrains+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Inter";--md-code-font:"JetBrains Mono"}</style>
<link rel="stylesheet" href="../../assets/_mkdocstrings.css">
<link rel="stylesheet" href="https://unpkg.com/dracula-prism/dist/css/dracula-prism.css">
<script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
</head>
<body dir="ltr" data-md-color-scheme="slate" data-md-color-primary="deep-purple" data-md-color-accent="cyan">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#openapi" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="Khata App — Library Reference" class="md-header__button md-logo" aria-label="Khata App — Library Reference" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 8c0 2.21-1.79 4-4 4s-4-1.79-4-4 1.79-4 4-4 4 1.79 4 4m0 6.72V20H0v-2c0-2.21 3.13-4 7-4 1.5 0 2.87.27 4 .72M24 20H13V3h11zm-8-8.5a2.5 2.5 0 0 1 5 0 2.5 2.5 0 0 1-5 0M22 7a2 2 0 0 1-2-2h-3c0 1.11-.89 2-2 2v9a2 2 0 0 1 2 2h3c0-1.1.9-2 2-2z"/></svg>
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
Khata App — Library Reference
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Openapi
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="deep-purple" data-md-color-accent="cyan" aria-hidden="true" type="radio" name="__palette" id="__palette_0">
</form>
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<a href="javascript:void(0)" class="md-search__icon md-icon" title="Share" aria-label="Share" data-clipboard data-clipboard-text="" data-md-component="search-share" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9a3 3 0 0 0-3 3 3 3 0 0 0 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.15c-.05.21-.08.43-.08.66 0 1.61 1.31 2.91 2.92 2.91s2.92-1.3 2.92-2.91A2.92 2.92 0 0 0 18 16.08"/></svg>
</a>
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
</button>
</nav>
<div class="md-search__suggest" data-md-component="search-suggest"></div>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../.." title="Khata App — Library Reference" class="md-nav__button md-logo" aria-label="Khata App — Library Reference" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 8c0 2.21-1.79 4-4 4s-4-1.79-4-4 1.79-4 4-4 4 1.79 4 4m0 6.72V20H0v-2c0-2.21 3.13-4 7-4 1.5 0 2.87.27 4 .72M24 20H13V3h11zm-8-8.5a2.5 2.5 0 0 1 5 0 2.5 2.5 0 0 1-5 0M22 7a2 2 0 0 1-2-2h-3c0 1.11-.89 2-2 2v9a2 2 0 0 1 2 2h3c0-1.1.9-2 2-2z"/></svg>
</a>
Khata App — Library Reference
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../.." class="md-nav__link">
<span class="md-ellipsis">
Home
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_2" >
<div class="md-nav__link md-nav__container">
<a href="../../domain/" class="md-nav__link ">
<span class="md-ellipsis">
Domain
</span>
</a>
<label class="md-nav__link " for="__nav_2" id="__nav_2_label" tabindex="">
<span class="md-nav__icon md-icon"></span>
</label>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_2">
<span class="md-nav__icon md-icon"></span>
Domain
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../domain/enrichment/" class="md-nav__link">
<span class="md-ellipsis">
Enrichment
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../domain/fetch_pipeline/" class="md-nav__link">
<span class="md-ellipsis">
Fetch Pipeline
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../domain/fetch_request/" class="md-nav__link">
<span class="md-ellipsis">
Fetch Request
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_3" >
<div class="md-nav__link md-nav__container">
<a href="../../infra/" class="md-nav__link ">
<span class="md-ellipsis">
Infra
</span>
</a>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_3">
<span class="md-nav__icon md-icon"></span>
Infra
</label>
<ul class="md-nav__list" data-md-scrollfix>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_4" >
<div class="md-nav__link md-nav__container">
<a href="../" class="md-nav__link ">
<span class="md-ellipsis">
Interfaces
</span>
</a>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4">
<span class="md-nav__icon md-icon"></span>
Interfaces
</label>
<ul class="md-nav__list" data-md-scrollfix>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_5" >
<div class="md-nav__link md-nav__container">
<a href="../../pipelines/" class="md-nav__link ">
<span class="md-ellipsis">
Pipelines
</span>
</a>
</div>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_5">
<span class="md-nav__icon md-icon"></span>
Pipelines
</label>
<ul class="md-nav__list" data-md-scrollfix>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#interfaces.openapi" class="md-nav__link">
<span class="md-ellipsis">
openapi
</span>
</a>
<nav class="md-nav" aria-label="openapi">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi--summary" class="md-nav__link">
<span class="md-ellipsis">
Summary
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi-classes" class="md-nav__link">
<span class="md-ellipsis">
Classes
</span>
</a>
<nav class="md-nav" aria-label="Classes">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.AccountCrudsService" class="md-nav__link">
<span class="md-ellipsis">
AccountCrudsService
</span>
</a>
<nav class="md-nav" aria-label="AccountCrudsService">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.AccountCrudsService-functions" class="md-nav__link">
<span class="md-ellipsis">
Functions
</span>
</a>
<nav class="md-nav" aria-label="Functions">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.AccountCrudsService.create" class="md-nav__link">
<span class="md-ellipsis">
create
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.AccountCrudsService.delete" class="md-nav__link">
<span class="md-ellipsis">
delete
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.AccountCrudsService.model_to_dict" class="md-nav__link">
<span class="md-ellipsis">
model_to_dict
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.AccountCrudsService.patch" class="md-nav__link">
<span class="md-ellipsis">
patch
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.AccountCrudsService.read" class="md-nav__link">
<span class="md-ellipsis">
read
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.AccountCrudsService.search" class="md-nav__link">
<span class="md-ellipsis">
search
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.AccountCrudsService.update" class="md-nav__link">
<span class="md-ellipsis">
update
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.EntityCrudsService" class="md-nav__link">
<span class="md-ellipsis">
EntityCrudsService
</span>
</a>
<nav class="md-nav" aria-label="EntityCrudsService">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.EntityCrudsService-functions" class="md-nav__link">
<span class="md-ellipsis">
Functions
</span>
</a>
<nav class="md-nav" aria-label="Functions">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.EntityCrudsService.create" class="md-nav__link">
<span class="md-ellipsis">
create
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.EntityCrudsService.delete" class="md-nav__link">
<span class="md-ellipsis">
delete
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.EntityCrudsService.model_to_dict" class="md-nav__link">
<span class="md-ellipsis">
model_to_dict
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.EntityCrudsService.patch" class="md-nav__link">
<span class="md-ellipsis">
patch
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.EntityCrudsService.read" class="md-nav__link">
<span class="md-ellipsis">
read
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.EntityCrudsService.search" class="md-nav__link">
<span class="md-ellipsis">
search
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.EntityCrudsService.update" class="md-nav__link">
<span class="md-ellipsis">
update
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.ExpenseCrudsService" class="md-nav__link">
<span class="md-ellipsis">
ExpenseCrudsService
</span>
</a>
<nav class="md-nav" aria-label="ExpenseCrudsService">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.ExpenseCrudsService-functions" class="md-nav__link">
<span class="md-ellipsis">
Functions
</span>
</a>
<nav class="md-nav" aria-label="Functions">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.ExpenseCrudsService.create" class="md-nav__link">
<span class="md-ellipsis">
create
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.ExpenseCrudsService.delete" class="md-nav__link">
<span class="md-ellipsis">
delete
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.ExpenseCrudsService.model_to_dict" class="md-nav__link">
<span class="md-ellipsis">
model_to_dict
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.ExpenseCrudsService.patch" class="md-nav__link">
<span class="md-ellipsis">
patch
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.ExpenseCrudsService.read" class="md-nav__link">
<span class="md-ellipsis">
read
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.ExpenseCrudsService.search" class="md-nav__link">
<span class="md-ellipsis">
search
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.ExpenseCrudsService.update" class="md-nav__link">
<span class="md-ellipsis">
update
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.FetchRequestCrudsService" class="md-nav__link">
<span class="md-ellipsis">
FetchRequestCrudsService
</span>
</a>
<nav class="md-nav" aria-label="FetchRequestCrudsService">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.FetchRequestCrudsService-functions" class="md-nav__link">
<span class="md-ellipsis">
Functions
</span>
</a>
<nav class="md-nav" aria-label="Functions">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.FetchRequestCrudsService.create" class="md-nav__link">
<span class="md-ellipsis">
create
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.FetchRequestCrudsService.delete" class="md-nav__link">
<span class="md-ellipsis">
delete
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.FetchRequestCrudsService.model_to_dict" class="md-nav__link">
<span class="md-ellipsis">
model_to_dict
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.FetchRequestCrudsService.patch" class="md-nav__link">
<span class="md-ellipsis">
patch
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.FetchRequestCrudsService.read" class="md-nav__link">
<span class="md-ellipsis">
read
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.FetchRequestCrudsService.save_enrichment" class="md-nav__link">
<span class="md-ellipsis">
save_enrichment
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.FetchRequestCrudsService.save_raw_lines" class="md-nav__link">
<span class="md-ellipsis">
save_raw_lines
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.FetchRequestCrudsService.save_txn_blocks" class="md-nav__link">
<span class="md-ellipsis">
save_txn_blocks
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.FetchRequestCrudsService.save_txn_dicts" class="md-nav__link">
<span class="md-ellipsis">
save_txn_dicts
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.FetchRequestCrudsService.search" class="md-nav__link">
<span class="md-ellipsis">
search
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.FetchRequestCrudsService.update" class="md-nav__link">
<span class="md-ellipsis">
update
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.FetchRequestCrudsService.update_status" class="md-nav__link">
<span class="md-ellipsis">
update_status
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.ReportQuery" class="md-nav__link">
<span class="md-ellipsis">
ReportQuery
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.ReportService" class="md-nav__link">
<span class="md-ellipsis">
ReportService
</span>
</a>
<nav class="md-nav" aria-label="ReportService">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.ReportService-functions" class="md-nav__link">
<span class="md-ellipsis">
Functions
</span>
</a>
<nav class="md-nav" aria-label="Functions">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.ReportService.delete_snapshot" class="md-nav__link">
<span class="md-ellipsis">
delete_snapshot
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.ReportService.fetch_report" class="md-nav__link">
<span class="md-ellipsis">
fetch_report
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.ReportService.generate_snapshot" class="md-nav__link">
<span class="md-ellipsis">
generate_snapshot
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.ReportService.list_snapshots" class="md-nav__link">
<span class="md-ellipsis">
list_snapshots
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.TagCrudsService" class="md-nav__link">
<span class="md-ellipsis">
TagCrudsService
</span>
</a>
<nav class="md-nav" aria-label="TagCrudsService">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.TagCrudsService-functions" class="md-nav__link">
<span class="md-ellipsis">
Functions
</span>
</a>
<nav class="md-nav" aria-label="Functions">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.TagCrudsService.create" class="md-nav__link">
<span class="md-ellipsis">
create
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.TagCrudsService.delete" class="md-nav__link">
<span class="md-ellipsis">
delete
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.TagCrudsService.get_by_names" class="md-nav__link">
<span class="md-ellipsis">
get_by_names
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.TagCrudsService.model_to_dict" class="md-nav__link">
<span class="md-ellipsis">
model_to_dict
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.TagCrudsService.patch" class="md-nav__link">
<span class="md-ellipsis">
patch
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.TagCrudsService.read" class="md-nav__link">
<span class="md-ellipsis">
read
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.TagCrudsService.search" class="md-nav__link">
<span class="md-ellipsis">
search
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.TagCrudsService.update" class="md-nav__link">
<span class="md-ellipsis">
update
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UploadCrudsService" class="md-nav__link">
<span class="md-ellipsis">
UploadCrudsService
</span>
</a>
<nav class="md-nav" aria-label="UploadCrudsService">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.UploadCrudsService-functions" class="md-nav__link">
<span class="md-ellipsis">
Functions
</span>
</a>
<nav class="md-nav" aria-label="Functions">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.UploadCrudsService.create" class="md-nav__link">
<span class="md-ellipsis">
create
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UploadCrudsService.delete" class="md-nav__link">
<span class="md-ellipsis">
delete
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UploadCrudsService.model_to_dict" class="md-nav__link">
<span class="md-ellipsis">
model_to_dict
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UploadCrudsService.patch" class="md-nav__link">
<span class="md-ellipsis">
patch
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UploadCrudsService.read" class="md-nav__link">
<span class="md-ellipsis">
read
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UploadCrudsService.search" class="md-nav__link">
<span class="md-ellipsis">
search
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UploadCrudsService.update" class="md-nav__link">
<span class="md-ellipsis">
update
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UploadResult" class="md-nav__link">
<span class="md-ellipsis">
UploadResult
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UserCrudsService" class="md-nav__link">
<span class="md-ellipsis">
UserCrudsService
</span>
</a>
<nav class="md-nav" aria-label="UserCrudsService">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.UserCrudsService-functions" class="md-nav__link">
<span class="md-ellipsis">
Functions
</span>
</a>
<nav class="md-nav" aria-label="Functions">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.UserCrudsService.create" class="md-nav__link">
<span class="md-ellipsis">
create
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UserCrudsService.delete" class="md-nav__link">
<span class="md-ellipsis">
delete
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UserCrudsService.model_to_dict" class="md-nav__link">
<span class="md-ellipsis">
model_to_dict
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UserCrudsService.patch" class="md-nav__link">
<span class="md-ellipsis">
patch
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UserCrudsService.read" class="md-nav__link">
<span class="md-ellipsis">
read
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UserCrudsService.search" class="md-nav__link">
<span class="md-ellipsis">
search
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.UserCrudsService.update" class="md-nav__link">
<span class="md-ellipsis">
update
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi-functions" class="md-nav__link">
<span class="md-ellipsis">
Functions
</span>
</a>
<nav class="md-nav" aria-label="Functions">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#interfaces.openapi.cache_response" class="md-nav__link">
<span class="md-ellipsis">
cache_response
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.create_account" class="md-nav__link">
<span class="md-ellipsis">
create_account
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.create_entity" class="md-nav__link">
<span class="md-ellipsis">
create_entity
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.create_expense" class="md-nav__link">
<span class="md-ellipsis">
create_expense
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.create_fetch_request" class="md-nav__link">
<span class="md-ellipsis">
create_fetch_request
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.create_report" class="md-nav__link">
<span class="md-ellipsis">
create_report
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.create_tag" class="md-nav__link">
<span class="md-ellipsis">
create_tag
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.create_user" class="md-nav__link">
<span class="md-ellipsis">
create_user
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.delete_account" class="md-nav__link">
<span class="md-ellipsis">
delete_account
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.delete_entity" class="md-nav__link">
<span class="md-ellipsis">
delete_entity
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.delete_expense" class="md-nav__link">
<span class="md-ellipsis">
delete_expense
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.delete_fetch_request" class="md-nav__link">
<span class="md-ellipsis">
delete_fetch_request
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.delete_report" class="md-nav__link">
<span class="md-ellipsis">
delete_report
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.delete_tag" class="md-nav__link">
<span class="md-ellipsis">
delete_tag
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.get_account" class="md-nav__link">
<span class="md-ellipsis">
get_account
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.get_current_user" class="md-nav__link">
<span class="md-ellipsis">
get_current_user
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.get_entity" class="md-nav__link">
<span class="md-ellipsis">
get_entity
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.get_expense" class="md-nav__link">
<span class="md-ellipsis">
get_expense
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.get_fetch_request" class="md-nav__link">
<span class="md-ellipsis">
get_fetch_request
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.get_report" class="md-nav__link">
<span class="md-ellipsis">
get_report
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.get_tag" class="md-nav__link">
<span class="md-ellipsis">
get_tag
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.get_uploaded_file" class="md-nav__link">
<span class="md-ellipsis">
get_uploaded_file
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.get_user" class="md-nav__link">
<span class="md-ellipsis">
get_user
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.list_accounts" class="md-nav__link">
<span class="md-ellipsis">
list_accounts
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.list_ambiguities" class="md-nav__link">
<span class="md-ellipsis">
list_ambiguities
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.list_entities" class="md-nav__link">
<span class="md-ellipsis">
list_entities
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.list_expenses" class="md-nav__link">
<span class="md-ellipsis">
list_expenses
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.list_fetch_requests" class="md-nav__link">
<span class="md-ellipsis">
list_fetch_requests
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.list_reports" class="md-nav__link">
<span class="md-ellipsis">
list_reports
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.list_tags" class="md-nav__link">
<span class="md-ellipsis">
list_tags
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.list_uploads" class="md-nav__link">
<span class="md-ellipsis">
list_uploads
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.list_users" class="md-nav__link">
<span class="md-ellipsis">
list_users
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.resolve_ambiguity" class="md-nav__link">
<span class="md-ellipsis">
resolve_ambiguity
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.stream_fetch_events" class="md-nav__link">
<span class="md-ellipsis">
stream_fetch_events
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.update_account" class="md-nav__link">
<span class="md-ellipsis">
update_account
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.update_current_user" class="md-nav__link">
<span class="md-ellipsis">
update_current_user
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.update_entity" class="md-nav__link">
<span class="md-ellipsis">
update_entity
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.update_expense" class="md-nav__link">
<span class="md-ellipsis">
update_expense
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.update_fetch_request" class="md-nav__link">
<span class="md-ellipsis">
update_fetch_request
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.update_fetch_request_put" class="md-nav__link">
<span class="md-ellipsis">
update_fetch_request_put
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.update_tag" class="md-nav__link">
<span class="md-ellipsis">
update_tag
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.upload_entity_logo" class="md-nav__link">
<span class="md-ellipsis">
upload_entity_logo
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#interfaces.openapi.upload_file" class="md-nav__link">
<span class="md-ellipsis">
upload_file
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1 id="openapi">Openapi</h1>
<div class="doc doc-object doc-module">
<h2 id="interfaces.openapi" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-module"></code> <span class="doc doc-object-name doc-module-name">interfaces.openapi</span>
</h2>
<div class="doc doc-contents first">
<h3 id="interfaces.openapi--summary">Summary</h3>
<p>All handler functions — names must match openapi.yaml operationId values. The
OpenAPI-first router resolves each operation to a handler by name, so this module
re-exports every route handler from the subpackages into one flat namespace.</p>
<div class="doc doc-children">
<h3 id="interfaces.openapi-classes">Classes</h3>
<div class="doc doc-object doc-class">
<h4 id="interfaces.openapi.AccountCrudsService" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">AccountCrudsService</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">AccountCrudsService</span><span class="p">(</span><span class="o">*</span><span class="p">,</span> <span class="n">repo</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="infra.adapters.service.CrudsServiceAdaptor" href="../../infra/adapters/service/#infra.adapters.service.CrudsServiceAdaptor">CrudsServiceAdaptor</a>[<a class="autorefs autorefs-internal" title="domain.account.models.Account" href="../../domain/account/models/#domain.account.models.Account">Account</a>, <a class="autorefs autorefs-internal" title="domain.account.ports.db.AccountDocument" href="../../domain/account/ports/db/#domain.account.ports.db.AccountDocument">AccountDocument</a>]</code></p>
<p>Account CRUD service resolving :class:<code>Account</code> documents from a repo.</p>
<details class="notes" open>
<summary>Notes</summary>
<p>Instances are created by :func:<code>get_account_service</code>. The <code>model</code>
and <code>schema</code> class attributes bind the domain model and its document
type.</p>
</details>
<p>Initialize the adaptor with a backing repository.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>repo</code></td>
<td>
<code><span title="infra.db.repos.mongo.BaseRepository">BaseRepository</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Repository used for all operations.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<div class="doc doc-children">
<h5 id="interfaces.openapi.AccountCrudsService-functions">Functions</h5>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.AccountCrudsService.create" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">create</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">create</span><span class="p">(</span><span class="n">data</span><span class="p">:</span> <span class="n">Model</span> <span class="o">|</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Create a document from a model or raw mapping.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span> | dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Model instance or field mapping to persist.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Schema</code></td> <td>
<code><span title="infra.adapters.service.Schema">Schema</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Persisted document.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.AccountCrudsService.delete" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">delete</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">delete</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Delete a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>bool</code></td> <td>
<code>bool</code>
</td>
<td>
<div class="doc-md-description">
<p><code>True</code> when a document was deleted.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.AccountCrudsService.model_to_dict" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">model_to_dict</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-staticmethod"><code>staticmethod</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">model_to_dict</span><span class="p">(</span><span class="n">model_obj</span><span class="p">:</span> <span class="n">Model</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">dict</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Serialize a model into a sparse dictionary.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>model_obj</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Model instance to serialize.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>dict</code></td> <td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields that are set and not <code>None</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.AccountCrudsService.patch" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">patch</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">patch</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Partially update a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields to patch.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Updated document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.AccountCrudsService.read" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">read</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">read</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Read a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Matching document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.AccountCrudsService.search" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">search</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">search</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="nb">filter</span><span class="p">:</span> <span class="nb">dict</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">list</span><span class="p">[</span><span class="n">Schema</span><span class="p">]</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List documents matching an optional filter.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>filter</code></td>
<td>
<code>dict | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Query filter passed to the repository.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code>list[<span title="infra.adapters.service.Schema">Schema</span>]</code>
</td>
<td>
<div class="doc-md-description">
<p>list[Schema]: Matching documents.</p>
</div>
</td>
</tr>
</tbody>
</table>
<details class="notes" open>
<summary>Notes</summary>
<p>Extra positional and keyword arguments are forwarded to the
repository.</p>
</details>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.AccountCrudsService.update" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">update</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="n">Model</span> <span class="o">|</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Replace a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span> | dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Replacement model or field mapping.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Updated document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h4 id="interfaces.openapi.EntityCrudsService" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">EntityCrudsService</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">EntityCrudsService</span><span class="p">(</span><span class="o">*</span><span class="p">,</span> <span class="n">repo</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="infra.adapters.service.CrudsServiceAdaptor" href="../../infra/adapters/service/#infra.adapters.service.CrudsServiceAdaptor">CrudsServiceAdaptor</a>[<a class="autorefs autorefs-internal" title="domain.entity.models.Entity" href="../../domain/entity/models/#domain.entity.models.Entity">Entity</a>, <a class="autorefs autorefs-internal" title="domain.entity.ports.db.EntityDocument" href="../../domain/entity/ports/db/#domain.entity.ports.db.EntityDocument">EntityDocument</a>]</code></p>
<p>Entity CRUD service resolving :class:<code>Entity</code> documents from a repo.</p>
<details class="notes" open>
<summary>Notes</summary>
<p>Instances are created by :func:<code>get_entity_service</code>. The <code>model</code>
and <code>schema</code> class attributes bind the domain model and its document
type.</p>
</details>
<p>Initialize the adaptor with a backing repository.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>repo</code></td>
<td>
<code><span title="infra.db.repos.mongo.BaseRepository">BaseRepository</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Repository used for all operations.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<div class="doc doc-children">
<h5 id="interfaces.openapi.EntityCrudsService-functions">Functions</h5>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.EntityCrudsService.create" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">create</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">create</span><span class="p">(</span><span class="n">data</span><span class="p">:</span> <span class="n">Model</span> <span class="o">|</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Create a document from a model or raw mapping.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span> | dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Model instance or field mapping to persist.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Schema</code></td> <td>
<code><span title="infra.adapters.service.Schema">Schema</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Persisted document.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.EntityCrudsService.delete" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">delete</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">delete</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Delete a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>bool</code></td> <td>
<code>bool</code>
</td>
<td>
<div class="doc-md-description">
<p><code>True</code> when a document was deleted.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.EntityCrudsService.model_to_dict" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">model_to_dict</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-staticmethod"><code>staticmethod</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">model_to_dict</span><span class="p">(</span><span class="n">model_obj</span><span class="p">:</span> <span class="n">Model</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">dict</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Serialize a model into a sparse dictionary.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>model_obj</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Model instance to serialize.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>dict</code></td> <td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields that are set and not <code>None</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.EntityCrudsService.patch" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">patch</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">patch</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Partially update a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields to patch.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Updated document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.EntityCrudsService.read" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">read</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">read</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Read a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Matching document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.EntityCrudsService.search" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">search</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">search</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="nb">filter</span><span class="p">:</span> <span class="nb">dict</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">list</span><span class="p">[</span><span class="n">Schema</span><span class="p">]</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List documents matching an optional filter.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>filter</code></td>
<td>
<code>dict | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Query filter passed to the repository.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code>list[<span title="infra.adapters.service.Schema">Schema</span>]</code>
</td>
<td>
<div class="doc-md-description">
<p>list[Schema]: Matching documents.</p>
</div>
</td>
</tr>
</tbody>
</table>
<details class="notes" open>
<summary>Notes</summary>
<p>Extra positional and keyword arguments are forwarded to the
repository.</p>
</details>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.EntityCrudsService.update" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">update</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="n">Model</span> <span class="o">|</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Replace a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span> | dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Replacement model or field mapping.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Updated document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h4 id="interfaces.openapi.ExpenseCrudsService" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">ExpenseCrudsService</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">ExpenseCrudsService</span><span class="p">(</span><span class="o">*</span><span class="p">,</span> <span class="n">repo</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="infra.adapters.service.CrudsServiceAdaptor" href="../../infra/adapters/service/#infra.adapters.service.CrudsServiceAdaptor">CrudsServiceAdaptor</a>[<a class="autorefs autorefs-internal" title="domain.expense.models.Expense" href="../../domain/expense/models/#domain.expense.models.Expense">Expense</a>, <a class="autorefs autorefs-internal" title="domain.expense.ports.db.ExpenseDocument" href="../../domain/expense/ports/db/#domain.expense.ports.db.ExpenseDocument">ExpenseDocument</a>]</code></p>
<p>Expense CRUD service resolving :class:<code>Expense</code> documents from a repo.</p>
<details class="notes" open>
<summary>Notes</summary>
<p>Instances are created by :func:<code>get_expense_service</code>. The <code>model</code>
and <code>schema</code> class attributes bind the domain model and its document
type.</p>
</details>
<p>Initialize the adaptor with a backing repository.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>repo</code></td>
<td>
<code><span title="infra.db.repos.mongo.BaseRepository">BaseRepository</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Repository used for all operations.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<div class="doc doc-children">
<h5 id="interfaces.openapi.ExpenseCrudsService-functions">Functions</h5>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.ExpenseCrudsService.create" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">create</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">create</span><span class="p">(</span><span class="n">data</span><span class="p">:</span> <span class="n">Model</span> <span class="o">|</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Create a document from a model or raw mapping.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span> | dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Model instance or field mapping to persist.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Schema</code></td> <td>
<code><span title="infra.adapters.service.Schema">Schema</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Persisted document.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.ExpenseCrudsService.delete" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">delete</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">delete</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Delete a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>bool</code></td> <td>
<code>bool</code>
</td>
<td>
<div class="doc-md-description">
<p><code>True</code> when a document was deleted.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.ExpenseCrudsService.model_to_dict" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">model_to_dict</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-staticmethod"><code>staticmethod</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">model_to_dict</span><span class="p">(</span><span class="n">model_obj</span><span class="p">:</span> <span class="n">Model</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">dict</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Serialize a model into a sparse dictionary.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>model_obj</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Model instance to serialize.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>dict</code></td> <td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields that are set and not <code>None</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.ExpenseCrudsService.patch" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">patch</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">patch</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Partially update a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields to patch.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Updated document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.ExpenseCrudsService.read" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">read</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">read</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Read a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Matching document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.ExpenseCrudsService.search" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">search</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">search</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="nb">filter</span><span class="p">:</span> <span class="nb">dict</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">list</span><span class="p">[</span><span class="n">Schema</span><span class="p">]</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List documents matching an optional filter.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>filter</code></td>
<td>
<code>dict | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Query filter passed to the repository.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code>list[<span title="infra.adapters.service.Schema">Schema</span>]</code>
</td>
<td>
<div class="doc-md-description">
<p>list[Schema]: Matching documents.</p>
</div>
</td>
</tr>
</tbody>
</table>
<details class="notes" open>
<summary>Notes</summary>
<p>Extra positional and keyword arguments are forwarded to the
repository.</p>
</details>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.ExpenseCrudsService.update" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">update</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="n">Model</span> <span class="o">|</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Replace a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span> | dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Replacement model or field mapping.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Updated document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h4 id="interfaces.openapi.FetchRequestCrudsService" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">FetchRequestCrudsService</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">FetchRequestCrudsService</span><span class="p">(</span><span class="o">*</span><span class="p">,</span> <span class="n">repo</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="infra.adapters.service.CrudsServiceAdaptor" href="../../infra/adapters/service/#infra.adapters.service.CrudsServiceAdaptor">CrudsServiceAdaptor</a>[<a class="autorefs autorefs-internal" title="domain.fetch_request.models.FetchRequest" href="../../domain/fetch_request/models/#domain.fetch_request.models.FetchRequest">FetchRequest</a>, <a class="autorefs autorefs-internal" title="domain.fetch_request.ports.db.FetchRequestDocument" href="../../domain/fetch_request/ports/db/#domain.fetch_request.ports.db.FetchRequestDocument">FetchRequestDocument</a>]</code></p>
<p>CRUD service for fetch requests with pipeline stage helpers.</p>
<p><span class="doc-section-title">Attributes:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.FetchRequestCrudsService.model">model</span></code></td>
<td>
<code><a class="autorefs autorefs-internal" title="domain.fetch_request.models.FetchRequest" href="../../domain/fetch_request/models/#domain.fetch_request.models.FetchRequest">FetchRequest</a></code>
</td>
<td>
<div class="doc-md-description">
<p>Domain model class.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.FetchRequestCrudsService.schema">schema</span></code></td>
<td>
<code><a class="autorefs autorefs-internal" title="domain.fetch_request.ports.db.FetchRequestDocument" href="../../domain/fetch_request/ports/db/#domain.fetch_request.ports.db.FetchRequestDocument">FetchRequestDocument</a></code>
</td>
<td>
<div class="doc-md-description">
<p>Persistence document class.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p>Initialize the adaptor with a backing repository.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>repo</code></td>
<td>
<code><span title="infra.db.repos.mongo.BaseRepository">BaseRepository</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Repository used for all operations.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<div class="doc doc-children">
<h5 id="interfaces.openapi.FetchRequestCrudsService-functions">Functions</h5>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.FetchRequestCrudsService.create" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">create</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">create</span><span class="p">(</span><span class="n">data</span><span class="p">:</span> <span class="n">Model</span> <span class="o">|</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Create a document from a model or raw mapping.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span> | dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Model instance or field mapping to persist.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Schema</code></td> <td>
<code><span title="infra.adapters.service.Schema">Schema</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Persisted document.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.FetchRequestCrudsService.delete" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">delete</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">delete</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Delete a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>bool</code></td> <td>
<code>bool</code>
</td>
<td>
<div class="doc-md-description">
<p><code>True</code> when a document was deleted.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.FetchRequestCrudsService.model_to_dict" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">model_to_dict</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-staticmethod"><code>staticmethod</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">model_to_dict</span><span class="p">(</span><span class="n">model_obj</span><span class="p">:</span> <span class="n">Model</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">dict</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Serialize a model into a sparse dictionary.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>model_obj</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Model instance to serialize.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>dict</code></td> <td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields that are set and not <code>None</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.FetchRequestCrudsService.patch" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">patch</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">patch</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Partially update a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields to patch.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Updated document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.FetchRequestCrudsService.read" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">read</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">read</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Read a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Matching document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.FetchRequestCrudsService.save_enrichment" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">save_enrichment</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">save_enrichment</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">enrichment_dicts</span><span class="p">:</span> <span class="nb">list</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Persist the enriched expense dicts on the request source.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Fetch request id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>enrichment_dicts</code></td>
<td>
<code>list</code>
</td>
<td>
<div class="doc-md-description">
<p>Enriched expense dicts.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>None</code></td> <td>
<code>None</code>
</td>
<td>
<div class="doc-md-description">
<p>Nothing.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.FetchRequestCrudsService.save_raw_lines" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">save_raw_lines</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">save_raw_lines</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">raw_lines</span><span class="p">:</span> <span class="nb">list</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Persist the extracted raw lines on the request source.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Fetch request id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>raw_lines</code></td>
<td>
<code>list</code>
</td>
<td>
<div class="doc-md-description">
<p>Raw OCR/text lines.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>None</code></td> <td>
<code>None</code>
</td>
<td>
<div class="doc-md-description">
<p>Nothing.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.FetchRequestCrudsService.save_txn_blocks" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">save_txn_blocks</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">save_txn_blocks</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">txn_blocks</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Persist the extracted transaction blocks on the request source.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Fetch request id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>txn_blocks</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Transaction blocks keyed by order id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>None</code></td> <td>
<code>None</code>
</td>
<td>
<div class="doc-md-description">
<p>Nothing.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.FetchRequestCrudsService.save_txn_dicts" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">save_txn_dicts</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">save_txn_dicts</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">txn_dicts</span><span class="p">:</span> <span class="nb">list</span><span class="p">,</span> <span class="n">txn_dicts_count</span><span class="p">:</span> <span class="nb">int</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Persist the parsed transaction dicts and count on the request source.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Fetch request id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>txn_dicts</code></td>
<td>
<code>list</code>
</td>
<td>
<div class="doc-md-description">
<p>Raw expense dicts.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>txn_dicts_count</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Number of parsed transaction dicts.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>None</code></td> <td>
<code>None</code>
</td>
<td>
<div class="doc-md-description">
<p>Nothing.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.FetchRequestCrudsService.search" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">search</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">search</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="nb">filter</span><span class="p">:</span> <span class="nb">dict</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">list</span><span class="p">[</span><span class="n">Schema</span><span class="p">]</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List documents matching an optional filter.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>filter</code></td>
<td>
<code>dict | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Query filter passed to the repository.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code>list[<span title="infra.adapters.service.Schema">Schema</span>]</code>
</td>
<td>
<div class="doc-md-description">
<p>list[Schema]: Matching documents.</p>
</div>
</td>
</tr>
</tbody>
</table>
<details class="notes" open>
<summary>Notes</summary>
<p>Extra positional and keyword arguments are forwarded to the
repository.</p>
</details>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.FetchRequestCrudsService.update" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">update</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="n">Model</span> <span class="o">|</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Replace a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span> | dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Replacement model or field mapping.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Updated document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.FetchRequestCrudsService.update_status" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">update_status</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span>
<span class="normal"><a href="#__codelineno-0-4">4</a></span>
<span class="normal"><a href="#__codelineno-0-5">5</a></span>
<span class="normal"><a href="#__codelineno-0-6">6</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update_status</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a> <span class="n">status</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4"></a> <span class="n">error_message</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5"></a> <span class="n">retry_count</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Update the request status, optionally carrying failure detail.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Fetch request id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>status</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>New status value.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>error_message</code></td>
<td>
<code><span title="typing.Optional">Optional</span>[str]</code>
</td>
<td>
<div class="doc-md-description">
<p>Message recorded when failing.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>retry_count</code></td>
<td>
<code><span title="typing.Optional">Optional</span>[int]</code>
</td>
<td>
<div class="doc-md-description">
<p>Retry counter recorded when failing.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>bool</code></td> <td>
<code>bool</code>
</td>
<td>
<div class="doc-md-description">
<p><code>True</code> when a document was patched.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code>ValueError</code>
</td>
<td>
<div class="doc-md-description">
<p>If <code>status == "failed"</code> and either
<code>error_message</code> or <code>retry_count</code> is <code>None</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h4 id="interfaces.openapi.ReportQuery" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">ReportQuery</span>
</h4>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><span title="pydantic.BaseModel">BaseModel</span></code></p>
<p>Definition of a report snapshot. Bounds the data set; dimensions are sliced at read time.</p>
<p><span class="doc-section-title">Attributes:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.ReportQuery.name">name</span></code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Snapshot name; empty for an auto-generated name.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.ReportQuery.granularities">granularities</span></code></td>
<td>
<code><span title="typing.List">List</span>[str]</code>
</td>
<td>
<div class="doc-md-description">
<p>Granularities to precompute in the cube.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.ReportQuery.group_dims">group_dims</span></code></td>
<td>
<code><span title="typing.List">List</span>[str]</code>
</td>
<td>
<div class="doc-md-description">
<p>Dimensions to group by, e.g. <code>"payee"</code>, <code>"tag"</code>.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.ReportQuery.flow">flow</span></code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Flow filter: inflows, outflows, or both.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.ReportQuery.accounts">accounts</span></code></td>
<td>
<code><span title="typing.Optional">Optional</span>[<span title="typing.List">List</span>[str]]</code>
</td>
<td>
<div class="doc-md-description">
<p>Account names to include; all when <code>None</code>.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.ReportQuery.ignore_self">ignore_self</span></code></td>
<td>
<code>bool</code>
</td>
<td>
<div class="doc-md-description">
<p>Exclude self-transfer tagged expenses.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.ReportQuery.start_date">start_date</span></code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Inclusive start boundary, DD-MM-YYYY.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.ReportQuery.end_date">end_date</span></code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Inclusive end boundary, DD-MM-YYYY.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.ReportQuery.min_amount">min_amount</span></code></td>
<td>
<code><span title="typing.Optional">Optional</span>[float]</code>
</td>
<td>
<div class="doc-md-description">
<p>Minimum absolute amount to include.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.ReportQuery.max_amount">max_amount</span></code></td>
<td>
<code><span title="typing.Optional">Optional</span>[float]</code>
</td>
<td>
<div class="doc-md-description">
<p>Maximum absolute amount to include.</p>
</div>
</td>
</tr>
</tbody>
</table>
<div class="doc doc-children">
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h4 id="interfaces.openapi.ReportService" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">ReportService</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span>
<span class="normal"><a href="#__codelineno-0-4">4</a></span>
<span class="normal"><a href="#__codelineno-0-5">5</a></span>
<span class="normal"><a href="#__codelineno-0-6">6</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">ReportService</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">expense_svc</span><span class="p">:</span> <span class="n">ExpenseCrudsService</span><span class="p">,</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a> <span class="n">tag_svc</span><span class="p">:</span> <span class="n">TagCrudsService</span><span class="p">,</span>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4"></a> <span class="n">store</span><span class="p">:</span> <span class="n">ReportStore</span><span class="p">,</span>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5"></a> <span class="n">report_repo</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6"></a><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Build, persist, and serve precomputed report snapshots.</p>
<details class="notes" open>
<summary>Notes</summary>
<p>Instances are created by :func:<code>get_report_service</code>. The service scans
expenses in batches, expands tag hierarchies, and persists period
series into the configured :class:<code>ReportStore</code>.</p>
</details>
<p>Initialize the report service with its dependencies.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>expense_svc</code></td>
<td>
<code><a class="autorefs autorefs-internal" title="domain.expense.ports.service.ExpenseCrudsService" href="../../domain/expense/ports/service/#domain.expense.ports.service.ExpenseCrudsService">ExpenseCrudsService</a></code>
</td>
<td>
<div class="doc-md-description">
<p>Expense CRUD service used as the
cube source.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>tag_svc</code></td>
<td>
<code><a class="autorefs autorefs-internal" title="domain.tag.ports.service.TagCrudsService" href="../../domain/tag/ports/service/#domain.tag.ports.service.TagCrudsService">TagCrudsService</a></code>
</td>
<td>
<div class="doc-md-description">
<p>Tag CRUD service used to expand tag
hierarchies and resolve ignore tags.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>store</code></td>
<td>
<code><a class="autorefs autorefs-internal" title="domain.report.ports.store.ReportStore" href="../../domain/report/ports/store/#domain.report.ports.store.ReportStore">ReportStore</a></code>
</td>
<td>
<div class="doc-md-description">
<p>Key-value store for cube period data.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>report_repo</code></td>
<td>
<code><span title="typing.Any">Any</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Report snapshot repository; defaults to
:func:<code>create_report_repo</code> when omitted.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<div class="doc doc-children">
<h5 id="interfaces.openapi.ReportService-functions">Functions</h5>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.ReportService.delete_snapshot" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">delete_snapshot</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">delete_snapshot</span><span class="p">(</span><span class="n">report_id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Delete a snapshot and all of its cube keys from the store.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>report_id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Snapshot ID to delete.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>bool</code></td> <td>
<code>bool</code>
</td>
<td>
<div class="doc-md-description">
<p><code>True</code> when the snapshot existed and was deleted.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.ReportService.fetch_report" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">fetch_report</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span>
<span class="normal"><a href="#__codelineno-0-4">4</a></span>
<span class="normal"><a href="#__codelineno-0-5">5</a></span>
<span class="normal"><a href="#__codelineno-0-6">6</a></span>
<span class="normal"><a href="#__codelineno-0-7">7</a></span>
<span class="normal"><a href="#__codelineno-0-8">8</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">fetch_report</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">report_id</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a> <span class="n">granularities</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4"></a> <span class="n">period_ids</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5"></a> <span class="n">flow</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;outflows&quot;</span><span class="p">,</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6"></a> <span class="n">payees</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7"></a> <span class="n">tags</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
</span><span id="__span-0-8"><a id="__codelineno-0-8" name="__codelineno-0-8"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Report</span><span class="p">]</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Slice a stored snapshot into a report API response.</p>
<p><code>"*"</code> in <code>payees</code> or <code>tags</code> expands to every value stored in the
cube meta.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>report_id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Snapshot ID to slice.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>granularities</code></td>
<td>
<code><span title="typing.Optional">Optional</span>[<span title="typing.List">List</span>[str]]</code>
</td>
<td>
<div class="doc-md-description">
<p>Granularities to include;
defaults to the snapshot's own.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>period_ids</code></td>
<td>
<code><span title="typing.Optional">Optional</span>[<span title="typing.List">List</span>[str]]</code>
</td>
<td>
<div class="doc-md-description">
<p>Period labels to filter to.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>flow</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Flow to serve; <code>both</code> includes inflows and outflows.</p>
</div>
</td>
<td>
<code>&#39;outflows&#39;</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>payees</code></td>
<td>
<code><span title="typing.Optional">Optional</span>[<span title="typing.List">List</span>[str]]</code>
</td>
<td>
<div class="doc-md-description">
<p>Payee filters applied per bucket.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>tags</code></td>
<td>
<code><span title="typing.Optional">Optional</span>[<span title="typing.List">List</span>[str]]</code>
</td>
<td>
<div class="doc-md-description">
<p>Tag path filters applied per bucket.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="typing.Optional">Optional</span>[<a class="autorefs autorefs-internal" title="domain.report.models.Report" href="../../domain/report/models/#domain.report.models.Report">Report</a>]</code>
</td>
<td>
<div class="doc-md-description">
<p>Optional[Report]: The sliced report view, or <code>None</code> when the
snapshot does not exist.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.ReportService.generate_snapshot" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">generate_snapshot</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">generate_snapshot</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">query</span><span class="p">:</span> <span class="n">ReportQuery</span><span class="p">,</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">ReportSnapshotDocument</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Validate a query and return an existing or newly built snapshot.</p>
<p>If a snapshot with the same canonical signature already exists it is
returned directly; otherwise a fresh cube is built and persisted.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>query</code></td>
<td>
<code><a class="autorefs autorefs-internal" title="domain.report.models.ReportQuery" href="../../domain/report/models/#domain.report.models.ReportQuery">ReportQuery</a></code>
</td>
<td>
<div class="doc-md-description">
<p>Raw snapshot definition.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>ReportSnapshotDocument</code></td> <td>
<code><a class="autorefs autorefs-internal" title="domain.report.ports.db.ReportSnapshotDocument" href="../../domain/report/ports/db/#domain.report.ports.db.ReportSnapshotDocument">ReportSnapshotDocument</a></code>
</td>
<td>
<div class="doc-md-description">
<p>The existing or newly created snapshot.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.ReportService.list_snapshots" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">list_snapshots</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">list_snapshots</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">offset</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">limit</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="n">DEFAULT_LIMIT</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">List</span><span class="p">[</span><span class="n">ReportSnapshotDocument</span><span class="p">]</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List stored snapshots, newest first.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>offset</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Number of snapshots to skip.</p>
</div>
</td>
<td>
<code>0</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>limit</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Maximum number of snapshots to return.</p>
</div>
</td>
<td>
<code><span title="domain.report.ports.service.DEFAULT_LIMIT">DEFAULT_LIMIT</span></code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="typing.List">List</span>[<a class="autorefs autorefs-internal" title="domain.report.ports.db.ReportSnapshotDocument" href="../../domain/report/ports/db/#domain.report.ports.db.ReportSnapshotDocument">ReportSnapshotDocument</a>]</code>
</td>
<td>
<div class="doc-md-description">
<p>List[ReportSnapshotDocument]: Snapshots ordered by creation time,
newest first.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h4 id="interfaces.openapi.TagCrudsService" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">TagCrudsService</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">TagCrudsService</span><span class="p">(</span><span class="o">*</span><span class="p">,</span> <span class="n">repo</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="infra.adapters.service.CrudsServiceAdaptor" href="../../infra/adapters/service/#infra.adapters.service.CrudsServiceAdaptor">CrudsServiceAdaptor</a>[<a class="autorefs autorefs-internal" title="domain.tag.models.Tag" href="../../domain/tag/models/#domain.tag.models.Tag">Tag</a>, <a class="autorefs autorefs-internal" title="domain.tag.ports.db.TagDocument" href="../../domain/tag/ports/db/#domain.tag.ports.db.TagDocument">TagDocument</a>]</code></p>
<p>Tag CRUD service resolving :class:<code>Tag</code> documents from a repo.</p>
<details class="notes" open>
<summary>Notes</summary>
<p>Instances are created by :func:<code>get_tag_service</code>. The <code>model</code>
and <code>schema</code> class attributes bind the domain model and its document
type. An additional lookup helper <code>get_by_names</code> is provided.</p>
</details>
<p>Initialize the adaptor with a backing repository.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>repo</code></td>
<td>
<code><span title="infra.db.repos.mongo.BaseRepository">BaseRepository</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Repository used for all operations.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<div class="doc doc-children">
<h5 id="interfaces.openapi.TagCrudsService-functions">Functions</h5>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.TagCrudsService.create" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">create</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">create</span><span class="p">(</span><span class="n">data</span><span class="p">:</span> <span class="n">Model</span> <span class="o">|</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Create a document from a model or raw mapping.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span> | dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Model instance or field mapping to persist.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Schema</code></td> <td>
<code><span title="infra.adapters.service.Schema">Schema</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Persisted document.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.TagCrudsService.delete" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">delete</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">delete</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Delete a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>bool</code></td> <td>
<code>bool</code>
</td>
<td>
<div class="doc-md-description">
<p><code>True</code> when a document was deleted.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.TagCrudsService.get_by_names" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">get_by_names</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">get_by_names</span><span class="p">(</span><span class="n">names</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">])</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Return tags whose names match any of the provided values.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>names</code></td>
<td>
<code>list[str]</code>
</td>
<td>
<div class="doc-md-description">
<p>Tag names to look up.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>list</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>Matching tag documents.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.TagCrudsService.model_to_dict" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">model_to_dict</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-staticmethod"><code>staticmethod</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">model_to_dict</span><span class="p">(</span><span class="n">model_obj</span><span class="p">:</span> <span class="n">Model</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">dict</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Serialize a model into a sparse dictionary.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>model_obj</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Model instance to serialize.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>dict</code></td> <td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields that are set and not <code>None</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.TagCrudsService.patch" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">patch</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">patch</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Partially update a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields to patch.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Updated document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.TagCrudsService.read" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">read</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">read</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Read a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Matching document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.TagCrudsService.search" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">search</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">search</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="nb">filter</span><span class="p">:</span> <span class="nb">dict</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">list</span><span class="p">[</span><span class="n">Schema</span><span class="p">]</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List documents matching an optional filter.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>filter</code></td>
<td>
<code>dict | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Query filter passed to the repository.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code>list[<span title="infra.adapters.service.Schema">Schema</span>]</code>
</td>
<td>
<div class="doc-md-description">
<p>list[Schema]: Matching documents.</p>
</div>
</td>
</tr>
</tbody>
</table>
<details class="notes" open>
<summary>Notes</summary>
<p>Extra positional and keyword arguments are forwarded to the
repository.</p>
</details>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.TagCrudsService.update" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">update</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="n">Model</span> <span class="o">|</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Replace a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span> | dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Replacement model or field mapping.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Updated document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h4 id="interfaces.openapi.UploadCrudsService" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">UploadCrudsService</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">UploadCrudsService</span><span class="p">(</span><span class="o">*</span><span class="p">,</span> <span class="n">repo</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="infra.adapters.service.CrudsServiceAdaptor" href="../../infra/adapters/service/#infra.adapters.service.CrudsServiceAdaptor">CrudsServiceAdaptor</a>[<a class="autorefs autorefs-internal" title="domain.upload.models.UploadResult" href="../../domain/upload/models/#domain.upload.models.UploadResult">UploadResult</a>, <a class="autorefs autorefs-internal" title="domain.upload.ports.db.UploadResultDocument" href="../../domain/upload/ports/db/#domain.upload.ports.db.UploadResultDocument">UploadResultDocument</a>]</code></p>
<p>Upload result CRUD service resolving :class:<code>UploadResult</code> documents.</p>
<details class="notes" open>
<summary>Notes</summary>
<p>Instances are created by :func:<code>get_upload_service</code>. The <code>model</code>
and <code>schema</code> class attributes bind the domain model and its document
type.</p>
</details>
<p>Initialize the adaptor with a backing repository.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>repo</code></td>
<td>
<code><span title="infra.db.repos.mongo.BaseRepository">BaseRepository</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Repository used for all operations.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<div class="doc doc-children">
<h5 id="interfaces.openapi.UploadCrudsService-functions">Functions</h5>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.UploadCrudsService.create" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">create</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">create</span><span class="p">(</span><span class="n">data</span><span class="p">:</span> <span class="n">Model</span> <span class="o">|</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Create a document from a model or raw mapping.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span> | dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Model instance or field mapping to persist.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Schema</code></td> <td>
<code><span title="infra.adapters.service.Schema">Schema</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Persisted document.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.UploadCrudsService.delete" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">delete</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">delete</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Delete a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>bool</code></td> <td>
<code>bool</code>
</td>
<td>
<div class="doc-md-description">
<p><code>True</code> when a document was deleted.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.UploadCrudsService.model_to_dict" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">model_to_dict</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-staticmethod"><code>staticmethod</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">model_to_dict</span><span class="p">(</span><span class="n">model_obj</span><span class="p">:</span> <span class="n">Model</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">dict</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Serialize a model into a sparse dictionary.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>model_obj</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Model instance to serialize.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>dict</code></td> <td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields that are set and not <code>None</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.UploadCrudsService.patch" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">patch</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">patch</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Partially update a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields to patch.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Updated document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.UploadCrudsService.read" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">read</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">read</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Read a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Matching document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.UploadCrudsService.search" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">search</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">search</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="nb">filter</span><span class="p">:</span> <span class="nb">dict</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">list</span><span class="p">[</span><span class="n">Schema</span><span class="p">]</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List documents matching an optional filter.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>filter</code></td>
<td>
<code>dict | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Query filter passed to the repository.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code>list[<span title="infra.adapters.service.Schema">Schema</span>]</code>
</td>
<td>
<div class="doc-md-description">
<p>list[Schema]: Matching documents.</p>
</div>
</td>
</tr>
</tbody>
</table>
<details class="notes" open>
<summary>Notes</summary>
<p>Extra positional and keyword arguments are forwarded to the
repository.</p>
</details>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.UploadCrudsService.update" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">update</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="n">Model</span> <span class="o">|</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Replace a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span> | dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Replacement model or field mapping.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Updated document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h4 id="interfaces.openapi.UploadResult" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">UploadResult</span>
</h4>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><span title="pydantic.BaseModel">BaseModel</span></code></p>
<p>Metadata describing a stored file upload.</p>
<p><span class="doc-section-title">Attributes:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.UploadResult.original_filename">original_filename</span></code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Name of the file as uploaded by the client.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.UploadResult.saved_as">saved_as</span></code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Name the file was stored under on disk.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.UploadResult.content_type">content_type</span></code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>MIME type of the uploaded file.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.UploadResult.url">url</span></code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Public URL serving the stored file.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td><code><span title="interfaces.openapi.UploadResult.absolute_path">absolute_path</span></code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Absolute filesystem path of the stored file.</p>
</div>
</td>
</tr>
</tbody>
</table>
<div class="doc doc-children">
</div>
</div>
</div>
<div class="doc doc-object doc-class">
<h4 id="interfaces.openapi.UserCrudsService" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-class"></code> <span class="doc doc-object-name doc-class-name">UserCrudsService</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">UserCrudsService</span><span class="p">(</span><span class="o">*</span><span class="p">,</span> <span class="n">repo</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p class="doc doc-class-bases">
Bases: <code><a class="autorefs autorefs-internal" title="infra.adapters.service.CrudsServiceAdaptor" href="../../infra/adapters/service/#infra.adapters.service.CrudsServiceAdaptor">CrudsServiceAdaptor</a>[<a class="autorefs autorefs-internal" title="domain.user.models.User" href="../../domain/user/models/#domain.user.models.User">User</a>, <a class="autorefs autorefs-internal" title="domain.user.ports.db.UserDocument" href="../../domain/user/ports/db/#domain.user.ports.db.UserDocument">UserDocument</a>]</code></p>
<p>User CRUD service resolving :class:<code>User</code> documents from a repo.</p>
<details class="notes" open>
<summary>Notes</summary>
<p>Instances are created by :func:<code>get_user_service</code>. The <code>model</code>
and <code>schema</code> class attributes bind the domain model and its document
type.</p>
</details>
<p>Initialize the adaptor with a backing repository.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>repo</code></td>
<td>
<code><span title="infra.db.repos.mongo.BaseRepository">BaseRepository</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Repository used for all operations.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<div class="doc doc-children">
<h5 id="interfaces.openapi.UserCrudsService-functions">Functions</h5>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.UserCrudsService.create" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">create</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">create</span><span class="p">(</span><span class="n">data</span><span class="p">:</span> <span class="n">Model</span> <span class="o">|</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Create a document from a model or raw mapping.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span> | dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Model instance or field mapping to persist.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Schema</code></td> <td>
<code><span title="infra.adapters.service.Schema">Schema</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Persisted document.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.UserCrudsService.delete" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">delete</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">delete</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Delete a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>bool</code></td> <td>
<code>bool</code>
</td>
<td>
<div class="doc-md-description">
<p><code>True</code> when a document was deleted.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.UserCrudsService.model_to_dict" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">model_to_dict</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-staticmethod"><code>staticmethod</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">model_to_dict</span><span class="p">(</span><span class="n">model_obj</span><span class="p">:</span> <span class="n">Model</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">dict</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Serialize a model into a sparse dictionary.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>model_obj</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Model instance to serialize.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>dict</code></td> <td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields that are set and not <code>None</code>.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.UserCrudsService.patch" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">patch</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">patch</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Partially update a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields to patch.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Updated document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.UserCrudsService.read" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">read</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">read</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Read a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Matching document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.UserCrudsService.search" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">search</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">search</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="nb">filter</span><span class="p">:</span> <span class="nb">dict</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">list</span><span class="p">[</span><span class="n">Schema</span><span class="p">]</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List documents matching an optional filter.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>filter</code></td>
<td>
<code>dict | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Query filter passed to the repository.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code>list[<span title="infra.adapters.service.Schema">Schema</span>]</code>
</td>
<td>
<div class="doc-md-description">
<p>list[Schema]: Matching documents.</p>
</div>
</td>
</tr>
</tbody>
</table>
<details class="notes" open>
<summary>Notes</summary>
<p>Extra positional and keyword arguments are forwarded to the
repository.</p>
</details>
</div>
</div>
<div class="doc doc-object doc-function">
<h6 id="interfaces.openapi.UserCrudsService.update" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-method"></code> <span class="doc doc-object-name doc-function-name">update</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h6>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update</span><span class="p">(</span><span class="nb">id</span><span class="p">:</span> <span class="n">PyObjectId</span><span class="p">,</span> <span class="n">data</span><span class="p">:</span> <span class="n">Model</span> <span class="o">|</span> <span class="nb">dict</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Schema</span> <span class="o">|</span> <span class="kc">None</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Replace a document by primary key.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code><span title="mongo_ops.models.PyObjectId">PyObjectId</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Document identifier.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>data</code></td>
<td>
<code><span title="infra.adapters.service.Model">Model</span> | dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Replacement model or field mapping.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="infra.adapters.service.Schema">Schema</span> | None</code>
</td>
<td>
<div class="doc-md-description">
<p>Schema | None: Updated document, or <code>None</code> when absent.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<h3 id="interfaces.openapi-functions">Functions</h3>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.cache_response" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">cache_response</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">cache_response</span><span class="p">(</span><span class="n">ttl</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="nb">int</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Callable</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Decorate a GET-style route handler to cache its JSON response.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>ttl</code></td>
<td>
<code><span title="typing.Optional">Optional</span>[int]</code>
</td>
<td>
<div class="doc-md-description">
<p>Cache lifetime in seconds; defaults to
<code>settings.cache_ttl</code>.</p>
</div>
</td>
<td>
<code>None</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Callable</code></td> <td>
<code><span title="typing.Callable">Callable</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Decorator that wraps the route handler.</p>
</div>
</td>
</tr>
</tbody>
</table>
<details class="notes" open>
<summary>Notes</summary>
<p>The wrapped handler must accept a <code>request: Request</code> parameter (as
every openapi_first handler does). Responses that are already a
<code>fastapi.Response</code> (for example 204) are returned untouched and
never cached. When no <code>http_cache_store</code> is wired on
<code>request.app.state.db_resources</code> the decorator passes through to the
handler without caching.</p>
</details>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.create_account" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">create_account</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">create_account</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Create a new account.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Account payload forwarded to the service.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>AccountDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The created account.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.create_entity" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">create_entity</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">create_entity</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Create a new entity.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Entity payload forwarded to the service.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>EntityDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The created entity.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.create_expense" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">create_expense</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">create_expense</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Create a new expense.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Expense payload forwarded to the service.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>ExpenseDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The created expense.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.create_fetch_request" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">create_fetch_request</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">create_fetch_request</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Create a new fetch request.</p>
<p>A stable fingerprint is derived from the source payload and stored on the
document when the payload does not already provide one.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fetch request payload forwarded to the service.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>FetchRequestDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The created fetch request.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.create_report" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">create_report</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">create_report</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Generate a report snapshot from a query definition.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Report query payload; validated into a ReportQuery.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>ReportSnapshotDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The generated snapshot.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>400 when the query payload is invalid.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.create_tag" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">create_tag</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">create_tag</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Create a new tag.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Tag payload forwarded to the service.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>TagDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The created tag.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.create_user" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">create_user</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">create_user</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Create a new user.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>User payload forwarded to the service.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>UserDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The created user.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.delete_account" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">delete_account</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">delete_account</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Delete an account by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Account id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Response</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>Empty 204 response on successful delete.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no account matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.delete_entity" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">delete_entity</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">delete_entity</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Delete an entity by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Entity id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Response</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>Empty 204 response on successful delete.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no entity matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.delete_expense" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">delete_expense</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">delete_expense</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Delete an expense by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Expense id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Response</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>Empty 204 response on successful delete.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no expense matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.delete_fetch_request" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">delete_fetch_request</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">delete_fetch_request</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Delete a fetch request and its dependent data.</p>
<p>Cascades deletes to related expenses and ambiguities, removes the fetch
request, and invalidates the expenses HTTP cache.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Fetch request id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Response</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>Empty 204 response on successful delete.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no fetch request matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.delete_report" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">delete_report</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">delete_report</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Delete a report snapshot by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Report snapshot id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Response</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>Empty 204 response on successful delete.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when the snapshot does not exist.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.delete_tag" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">delete_tag</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">delete_tag</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Delete a tag by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Tag id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Response</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>Empty 204 response on successful delete.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no tag matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.get_account" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">get_account</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">get_account</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Get an account by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Account id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>AccountDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The matching account.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no account matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.get_current_user" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">get_current_user</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">get_current_user</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Get the profile of the authenticated user.</p>
<p>Reads the principal from request.state and creates the profile on first
access when it does not exist yet.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries the authenticated user
and app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>UserDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The current user's profile.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>401 when the request is not authenticated.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.get_entity" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">get_entity</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">get_entity</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Get an entity by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Entity id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>EntityDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The matching entity.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no entity matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.get_expense" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">get_expense</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">get_expense</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Get an expense by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Expense id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>ExpenseDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The matching expense.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no expense matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.get_fetch_request" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">get_fetch_request</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">get_fetch_request</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Get a fetch request by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Fetch request id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>FetchRequestDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The matching fetch request.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no fetch request matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.get_report" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">get_report</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span>
<span class="normal"><a href="#__codelineno-0-4">4</a></span>
<span class="normal"><a href="#__codelineno-0-5">5</a></span>
<span class="normal"><a href="#__codelineno-0-6">6</a></span>
<span class="normal"><a href="#__codelineno-0-7">7</a></span>
<span class="normal"><a href="#__codelineno-0-8">8</a></span>
<span class="normal"><a href="#__codelineno-0-9">9</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">get_report</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4"></a> <span class="n">granularity</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="n">Query</span><span class="p">(</span><span class="kc">None</span><span class="p">),</span>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5"></a> <span class="n">period_ids</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="n">Query</span><span class="p">(</span><span class="kc">None</span><span class="p">),</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6"></a> <span class="n">flow</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;outflows&quot;</span><span class="p">,</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7"></a> <span class="n">payee</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="n">Query</span><span class="p">(</span><span class="kc">None</span><span class="p">),</span>
</span><span id="__span-0-8"><a id="__codelineno-0-8" name="__codelineno-0-8"></a> <span class="n">tags</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="n">Query</span><span class="p">(</span><span class="kc">None</span><span class="p">),</span>
</span><span id="__span-0-9"><a id="__codelineno-0-9" name="__codelineno-0-9"></a><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Fetch a report snapshot with optional granularity, flow, and filter overrides.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Report snapshot id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>granularity</code></td>
<td>
<code><span title="typing.Optional">Optional</span>[<span title="typing.List">List</span>[str]]</code>
</td>
<td>
<div class="doc-md-description">
<p>Granularities to materialize; empty
means the snapshot's default set.</p>
</div>
</td>
<td>
<code><span title="fastapi.Query">Query</span>(None)</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>period_ids</code></td>
<td>
<code><span title="typing.Optional">Optional</span>[<span title="typing.List">List</span>[str]]</code>
</td>
<td>
<div class="doc-md-description">
<p>Period labels to constrain output.</p>
</div>
</td>
<td>
<code><span title="fastapi.Query">Query</span>(None)</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>flow</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Flow filter of inflows, outflows, or both. Defaults to
outflows.</p>
</div>
</td>
<td>
<code>&#39;outflows&#39;</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>payee</code></td>
<td>
<code><span title="typing.Optional">Optional</span>[<span title="typing.List">List</span>[str]]</code>
</td>
<td>
<div class="doc-md-description">
<p>Payee names to include.</p>
</div>
</td>
<td>
<code><span title="fastapi.Query">Query</span>(None)</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>tags</code></td>
<td>
<code><span title="typing.Optional">Optional</span>[<span title="typing.List">List</span>[str]]</code>
</td>
<td>
<div class="doc-md-description">
<p>Tag paths to include.</p>
</div>
</td>
<td>
<code><span title="fastapi.Query">Query</span>(None)</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>Report</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The fetched report.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>400 when the report arguments are invalid.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when the snapshot does not exist.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.get_tag" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">get_tag</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">get_tag</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Get a tag by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Tag id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>TagDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The matching tag.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no tag matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.get_uploaded_file" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">get_uploaded_file</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">get_uploaded_file</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">filepath</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Serve an uploaded file from disk.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>filepath</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Relative path of the file under UPLOAD_DIR.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>FileResponse</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The requested file with its original filename.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when the file does not exist.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.get_user" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">get_user</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">get_user</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Get a user by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>User id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>UserDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The matching user.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no user matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.list_accounts" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">list_accounts</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">list_accounts</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">skip</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">limit</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">100</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List accounts with pagination.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>skip</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Number of accounts to skip (offset). Defaults to 0.</p>
</div>
</td>
<td>
<code>0</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>limit</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Maximum number of accounts to return. Defaults to 100.</p>
</div>
</td>
<td>
<code>100</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
</td>
<td>
<div class="doc-md-description">
<p>list[AccountDocument]: Matching accounts from AccountCrudsService.search.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.list_ambiguities" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">list_ambiguities</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">list_ambiguities</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List pending ambiguities for a fetch request.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Fetch request id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>list</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>Pending ambiguity documents from the ambiguity service.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.list_entities" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">list_entities</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">list_entities</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">skip</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">limit</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">100</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List entities with pagination.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>skip</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Number of entities to skip (offset). Defaults to 0.</p>
</div>
</td>
<td>
<code>0</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>limit</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Maximum number of entities to return. Defaults to 100.</p>
</div>
</td>
<td>
<code>100</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
</td>
<td>
<div class="doc-md-description">
<p>list[EntityDocument]: Matching entities from EntityCrudsService.search.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.list_expenses" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">list_expenses</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span>
<span class="normal"><a href="#__codelineno-0-4">4</a></span>
<span class="normal"><a href="#__codelineno-0-5">5</a></span>
<span class="normal"><a href="#__codelineno-0-6">6</a></span>
<span class="normal"><a href="#__codelineno-0-7">7</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">list_expenses</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a> <span class="n">offset</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4"></a> <span class="n">limit</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">10</span><span class="p">,</span>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5"></a> <span class="n">start_date</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6"></a> <span class="n">end_date</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7"></a><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List expenses with pagination, excluding self-transfers.</p>
<p>Expenses tagged with a self-transfer tag are filtered out. The start_date and
end_date parameters are accepted by the signature but not applied to the
underlying search filter.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>offset</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Number of expenses to skip (offset). Defaults to 0.</p>
</div>
</td>
<td>
<code>0</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>limit</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Maximum number of expenses to return. Defaults to 10.</p>
</div>
</td>
<td>
<code>10</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>start_date</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Accepted date-range start; not applied to the search.</p>
</div>
</td>
<td>
<code>&#39;&#39;</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>end_date</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Accepted date-range end; not applied to the search.</p>
</div>
</td>
<td>
<code>&#39;&#39;</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
</td>
<td>
<div class="doc-md-description">
<p>list[ExpenseDocument]: Matching expenses from ExpenseCrudsService.search.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.list_fetch_requests" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">list_fetch_requests</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">list_fetch_requests</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">offset</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">limit</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">100</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List fetch requests with pagination.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>offset</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Number of fetch requests to skip (offset). Defaults to 0.</p>
</div>
</td>
<td>
<code>0</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>limit</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Maximum number of fetch requests to return. Defaults to 100.</p>
</div>
</td>
<td>
<code>100</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
</td>
<td>
<div class="doc-md-description">
<p>list[FetchRequestDocument]: Matching fetch requests from the service.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.list_reports" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">list_reports</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">list_reports</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">offset</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">limit</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">100</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List report snapshots with pagination.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>offset</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Number of snapshots to skip (offset). Defaults to 0.</p>
</div>
</td>
<td>
<code>0</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>limit</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Maximum number of snapshots to return. Defaults to 100.</p>
</div>
</td>
<td>
<code>100</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
</td>
<td>
<div class="doc-md-description">
<p>list[ReportSnapshotDocument]: Matching snapshots from the report service.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.list_tags" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">list_tags</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">list_tags</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">skip</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">limit</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1000</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List tags with pagination.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>skip</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Number of tags to skip (offset). Defaults to 0.</p>
</div>
</td>
<td>
<code>0</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>limit</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Maximum number of tags to return. Defaults to 1000.</p>
</div>
</td>
<td>
<code>1000</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
</td>
<td>
<div class="doc-md-description">
<p>list[TagDocument]: Matching tags from TagCrudsService.search.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.list_uploads" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">list_uploads</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">list_uploads</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List all upload records.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
</td>
<td>
<div class="doc-md-description">
<p>list[UploadDocument]: All uploads from the upload service.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.list_users" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">list_users</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">list_users</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">skip</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">limit</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">100</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>List users with pagination.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>skip</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Number of users to skip (offset). Defaults to 0.</p>
</div>
</td>
<td>
<code>0</code>
</td>
</tr>
<tr class="doc-section-item">
<td><code>limit</code></td>
<td>
<code>int</code>
</td>
<td>
<div class="doc-md-description">
<p>Maximum number of users to return. Defaults to 100.</p>
</div>
</td>
<td>
<code>100</code>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
</td>
<td>
<div class="doc-md-description">
<p>list[UserDocument]: Matching users from UserCrudsService.search.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.resolve_ambiguity" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">resolve_ambiguity</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">resolve_ambiguity</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Resolve an ambiguity by choosing one of its candidates.</p>
<p>Marks the ambiguity resolved, then requeues the parent fetch request when no
pending ambiguities remain and the fetch request is paused.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Ambiguity id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Resolution payload; must contain the chosen candidate.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
</td>
<td>
<div class="doc-md-description">
<p>Updated ambiguity document.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>400 when the chosen candidate is missing.</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when the ambiguity is not found.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.stream_fetch_events" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">stream_fetch_events</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">stream_fetch_events</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Stream progress events for a fetch request as server-sent events.</p>
<p>If the SSE bus is not configured on app.state.db_resources an empty events
list is returned. Otherwise a <code>text/event-stream</code> response is yielded,
polling the bus every 500 ms until the client disconnects.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Fetch request id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
</td>
<td>
<div class="doc-md-description">
<p>StreamingResponse | dict: SSE stream, or <code>{"events": []}</code> when the bus</p>
</div>
</td>
</tr>
<tr class="doc-section-item">
<td>
</td>
<td>
<div class="doc-md-description">
<p>is unavailable.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.update_account" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">update_account</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update_account</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Update an account by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Account id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields to update, forwarded to the service.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>AccountDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The updated account.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no account matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.update_current_user" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">update_current_user</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update_current_user</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Update the profile of the authenticated user.</p>
<p>Creates the profile on first access, then applies the update payload.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries the authenticated user
and app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields to update on the current user's profile.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>UserDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The updated profile.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>401 when the request is not authenticated.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.update_entity" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">update_entity</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update_entity</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Update an entity by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Entity id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields to update, forwarded to the service.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>EntityDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The updated entity.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no entity matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.update_expense" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">update_expense</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update_expense</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Update an expense by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Expense id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields to update, forwarded to the service.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>ExpenseDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The updated expense.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no expense matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.update_fetch_request" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">update_fetch_request</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update_fetch_request</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Patch a fetch request's status and retry bookkeeping.</p>
<p>Delegates to FetchRequestCrudsService.update_status with the status,
error_message, and retry_count fields from the payload, then returns the
refreshed document.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Fetch request id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Payload with status, error_message, and retry_count fields.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>FetchRequestDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The refreshed fetch request.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no fetch request matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.update_fetch_request_put" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">update_fetch_request_put</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update_fetch_request_put</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Replace a fetch request by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Fetch request id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Full fetch request payload forwarded to the service.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>FetchRequestDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The updated fetch request.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no fetch request matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.update_tag" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">update_tag</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">update_tag</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">body</span><span class="p">:</span> <span class="nb">dict</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Update a tag by id.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Tag id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>body</code></td>
<td>
<code>dict</code>
</td>
<td>
<div class="doc-md-description">
<p>Fields to update, forwarded to the service.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>TagDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The updated tag.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no tag matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.upload_entity_logo" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">upload_entity_logo</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span>
<span class="normal"><a href="#__codelineno-0-2">2</a></span>
<span class="normal"><a href="#__codelineno-0-3">3</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">upload_entity_logo</span><span class="p">(</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2"></a> <span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">,</span> <span class="nb">id</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">file</span><span class="p">:</span> <span class="n">UploadFile</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3"></a><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Upload a logo for an entity and persist it to the logo directory.</p>
<p>The file contents are hashed to derive a stable filename, written under
LOGO_DIR, and the entity's logo field is updated with the served URL.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>id</code></td>
<td>
<code>str</code>
</td>
<td>
<div class="doc-md-description">
<p>Entity id.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
<tr class="doc-section-item">
<td><code>file</code></td>
<td>
<code><span title="fastapi.UploadFile">UploadFile</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Uploaded logo image.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>dict</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>A mapping with keys id, url, logo, and status.</p>
</div>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Raises:</span></p>
<table>
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td>
<code><span title="fastapi.HTTPException">HTTPException</span></code>
</td>
<td>
<div class="doc-md-description">
<p>404 when no entity matches the id.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="doc doc-object doc-function">
<h4 id="interfaces.openapi.upload_file" class="doc doc-heading">
<code class="doc-symbol doc-symbol-heading doc-symbol-function"></code> <span class="doc doc-object-name doc-function-name">upload_file</span>
<span class="doc doc-labels">
<small class="doc doc-label doc-label-async"><code>async</code></small>
</span>
</h4>
<div class="language-python doc-signature highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1">1</a></span></pre></div></td><td class="code"><div><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1"></a><span class="nf">upload_file</span><span class="p">(</span><span class="n">request</span><span class="p">:</span> <span class="n">Request</span><span class="p">)</span>
</span></code></pre></div></td></tr></table></div>
<div class="doc doc-contents ">
<p>Upload a raw request body as a file.</p>
<p>The filename is parsed from the content-disposition header (defaulting to
<code>upload</code>) and combined with a content hash to form the stored filename
under UPLOAD_DIR. The resulting UploadResult is persisted via the upload
service.</p>
<p><span class="doc-section-title">Parameters:</span></p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>request</code></td>
<td>
<code><span title="fastapi.Request">Request</span></code>
</td>
<td>
<div class="doc-md-description">
<p>Incoming HTTP request; carries the body, content type,
and app.state.db_resources.</p>
</div>
</td>
<td>
<em>required</em>
</td>
</tr>
</tbody>
</table>
<p><span class="doc-section-title">Returns:</span></p>
<table>
<thead>
<tr>
<th>Name</th> <th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr class="doc-section-item">
<td><code>UploadDocument</code></td> <td>
</td>
<td>
<div class="doc-md-description">
<p>The created upload record.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</article>
</div>
<script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
<button type="button" class="md-top md-icon" data-md-component="top" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg>
Back to top
</button>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "../..", "features": ["navigation.sections", "navigation.expand", "navigation.top", "navigation.instant", "navigation.tracking", "navigation.indexes", "content.code.copy", "content.code.annotate", "content.tabs.link", "content.action.edit", "search.highlight", "search.share", "search.suggest"], "search": "../../assets/javascripts/workers/search.973d3a69.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
<script src="../../assets/javascripts/bundle.f55a23d4.min.js"></script>
</body>
</html>