schemas.import_schemas¶
src.schemas.import_schemas
¶
Import schemas for file upload API.
Request and response schemas for file import endpoints.
Reference
- docs/architecture/api-design-patterns.md
Classes¶
ImportResponse
¶
Bases: BaseModel
Response schema for file import.
Attributes:
| Name | Type | Description |
|---|---|---|
connection_id |
UUID
|
Provider connection ID. |
accounts_created |
int
|
Number of new accounts created. |
accounts_updated |
int
|
Number of existing accounts updated. |
transactions_created |
int
|
Number of new transactions imported. |
transactions_skipped |
int
|
Number of duplicate transactions skipped. |
message |
str
|
Human-readable summary. |
Source code in src/schemas/import_schemas.py
Functions¶
from_result
classmethod
¶
Create response from ImportResult.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
ImportResult
|
Handler result. |
required |
Returns:
| Type | Description |
|---|---|
ImportResponse
|
ImportResponse instance. |
Source code in src/schemas/import_schemas.py
SupportedFormatsResponse
¶
Bases: BaseModel
Response schema for supported file formats.
Attributes:
| Name | Type | Description |
|---|---|---|
formats |
list[FileFormatInfo]
|
List of supported file format objects. |
Source code in src/schemas/import_schemas.py
FileFormatInfo
¶
Bases: BaseModel
Information about a supported file format.
Attributes:
| Name | Type | Description |
|---|---|---|
format |
str
|
Format identifier. |
name |
str
|
Human-readable format name. |
extensions |
list[str]
|
File extensions for this format. |
provider_slugs |
list[str]
|
Providers that support this format. |