mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-22 08:48:38 +00:00
Resolves the authenticated requester's email (ADR-0059), resolves + caps the property selection, pins the recipe (landlord_property_ids, recipient_email, package_name) onto one pre-created sub_task (raw SQL, dodging the mirror double-registration), and enqueues one message to the worker. Refuses double-submits (409) and oversized selections (400). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
19 lines
542 B
Python
19 lines
542 B
Python
from typing import Optional
|
|
from uuid import UUID
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class BulkDownloadRequest(BaseModel):
|
|
"""A request to assemble a Download Package (ADR-0060).
|
|
|
|
The front end creates the app-owned Task first (its own request lands in
|
|
``task.inputs``) and passes ``task_id`` here. Either an explicit
|
|
``property_ids`` selection or ``select_all`` (the whole portfolio) must be
|
|
given.
|
|
"""
|
|
|
|
task_id: UUID
|
|
portfolio_id: int
|
|
property_ids: Optional[list[int]] = None
|
|
select_all: bool = False
|