mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-24 22:58:46 +01:00
* explicitly exclude all extensions from mypy * fix example extension mypy * fix subdomains extension mypy + 1 type error fixed * fix mypy discordbot * mypy check copilot extensnion * copilot black * add invoices ext to ignore * add boltz and boltcard * copilit id is necessary * was discordbot is ok Co-authored-by: dni <dni.khr@gmail.com>
52 lines
1.3 KiB
Python
52 lines
1.3 KiB
Python
from fastapi.params import Query
|
|
from pydantic.main import BaseModel
|
|
|
|
|
|
class CreateDomain(BaseModel):
|
|
wallet: str = Query(...) # type: ignore
|
|
domain: str = Query(...) # type: ignore
|
|
cf_token: str = Query(...) # type: ignore
|
|
cf_zone_id: str = Query(...) # type: ignore
|
|
webhook: str = Query("") # type: ignore
|
|
description: str = Query(..., min_length=0) # type: ignore
|
|
cost: int = Query(..., ge=0) # type: ignore
|
|
allowed_record_types: str = Query(...) # type: ignore
|
|
|
|
|
|
class CreateSubdomain(BaseModel):
|
|
domain: str = Query(...) # type: ignore
|
|
subdomain: str = Query(...) # type: ignore
|
|
email: str = Query(...) # type: ignore
|
|
ip: str = Query(...) # type: ignore
|
|
sats: int = Query(..., ge=0) # type: ignore
|
|
duration: int = Query(...) # type: ignore
|
|
record_type: str = Query(...) # type: ignore
|
|
|
|
|
|
class Domains(BaseModel):
|
|
id: str
|
|
wallet: str
|
|
domain: str
|
|
cf_token: str
|
|
cf_zone_id: str
|
|
webhook: str
|
|
description: str
|
|
cost: int
|
|
amountmade: int
|
|
time: int
|
|
allowed_record_types: str
|
|
|
|
|
|
class Subdomains(BaseModel):
|
|
id: str
|
|
wallet: str
|
|
domain: str
|
|
domain_name: str
|
|
subdomain: str
|
|
email: str
|
|
ip: str
|
|
sats: int
|
|
duration: int
|
|
paid: bool
|
|
time: int
|
|
record_type: str
|