api.routes.internal.ultimate3000

UltiMate 3000 buy-back estimations, used by info.rewake.fr/ultimate3000 (through its Next proxy routes).

Clients are identified by their personal-link token (32 hex); estimations live in Redis and are synced to Airtable by the Celery task ultimate3000_offer once the client requests an offer. See api/services/ultimate3000/.

Attributes

Classes

ClientIn

First step: just enough for a personal link. The rest is asked with the offer request.

ModuleIn

EstimateIn

OfferIn

The offer request: modules, the client's details, pickup address and logistics.

ResumeIn

Functions

get_store() → api.services.ultimate3000.store.Store

get_catalog() → dict[str, Any]

post_estimate(body) → dict[str, Any]

create_client(body, request, store, tasks) → dict[str, str]

resume_client(body, store, tasks) → dict[str, Any]

E-mails the client-space link. Same answer whether the email exists or not, so it can't

read_client(token, store) → dict[str, Any]

request_offer(token, body, store) → dict[str, Any]

read_estimation(est_id, store) → dict[str, Any]

What the /ultimate3000/render page draws: modules and packing only, no personal data.

estimation_image(est_id, store) → fastapi.responses.Response

The machines as a PNG (for e-mails). Rendered once; an estimation never changes.

Package Contents

api.routes.internal.ultimate3000.router
api.routes.internal.ultimate3000.Str
api.routes.internal.ultimate3000.OptStr
api.routes.internal.ultimate3000.Mobile
api.routes.internal.ultimate3000.Langue
api.routes.internal.ultimate3000.Token
api.routes.internal.ultimate3000.Email
api.routes.internal.ultimate3000.get_store() → api.services.ultimate3000.store.Store
api.routes.internal.ultimate3000.DB
class api.routes.internal.ultimate3000.ClientIn

Bases: pydantic.BaseModel

First step: just enough for a personal link. The rest is asked with the offer request.

email: Email
mobile: Mobile | None = None
langue: Langue = 'fr'
telemetry: Annotated[dict[str, str], Field(max_length=30)]
class api.routes.internal.ultimate3000.ModuleIn

Bases: pydantic.BaseModel

categorie: Literal[*pricing.CATEGORIES]
modele: Str
annee_fabrication: Annotated[int, Field(ge=1990, le=date.today.year)]
etat: Literal['fonctionnel', 'non_fonctionnel', 'non_teste'] = 'non_teste'
numero_serie: OptStr = None
commentaire: Annotated[str | None, Field(max_length=1000)] = None
in_price_list() → ModuleIn
class api.routes.internal.ultimate3000.EstimateIn

Bases: pydantic.BaseModel

modules: Annotated[list[ModuleIn], Field(max_length=pricing.MAX_MODULES)]
logistique: Literal[*pricing.LOGISTICS] | None = None
cables_vipers: bool = False
class api.routes.internal.ultimate3000.OfferIn

Bases: EstimateIn

The offer request: modules, the client’s details, pickup address and logistics.

modules: Annotated[list[ModuleIn], Field(min_length=1, max_length=pricing.MAX_MODULES)]
logistique: Literal[*pricing.LOGISTICS]
france_metropolitaine: bool = True
prenom: Str
nom: Str
mobile: Mobile
telephone_fixe: OptStr = None
poste: OptStr = None
entreprise: Str
siret: Annotated[str | None, Field(pattern='^\\d{9}(\\d{5})?$')] = None
numero_tva: OptStr = None
site_web: OptStr = None
numero_rue: Str
code_postal: Annotated[str, Field(min_length=2, max_length=10)]
ville: Str
pays: Annotated[str, Field(min_length=2, max_length=2)] = 'FR'
livraison_esperee_avant: datetime.date | None = None
langue: Langue = 'fr'
class api.routes.internal.ultimate3000.ResumeIn

Bases: pydantic.BaseModel

email: Email
api.routes.internal.ultimate3000.get_catalog() → dict[str, Any]
api.routes.internal.ultimate3000.post_estimate(body: EstimateIn) → dict[str, Any]
api.routes.internal.ultimate3000.create_client(body: ClientIn, request: fastapi.Request, store: DB, tasks: fastapi.BackgroundTasks) → dict[str, str]
api.routes.internal.ultimate3000.resume_client(body: ResumeIn, store: DB, tasks: fastapi.BackgroundTasks) → dict[str, Any]

E-mails the client-space link. Same answer whether the email exists or not, so it can’t be used to probe clients.

api.routes.internal.ultimate3000.read_client(token: Token, store: DB) → dict[str, Any]
api.routes.internal.ultimate3000.request_offer(token: Token, body: OfferIn, store: DB) → dict[str, Any]
api.routes.internal.ultimate3000.read_estimation(est_id: Token, store: DB) → dict[str, Any]

What the /ultimate3000/render page draws: modules and packing only, no personal data.

api.routes.internal.ultimate3000.estimation_image(est_id: Token, store: DB) → fastapi.responses.Response

The machines as a PNG (for e-mails). Rendered once; an estimation never changes.