2023-03-10 00:23:05 +00:00
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
|
|
|
|
|
|
class ContactDataBuyerSeller(BaseModel):
|
|
|
|
username: str
|
|
|
|
name: str
|
|
|
|
feedback_score: int
|
|
|
|
trade_count: str
|
|
|
|
last_online: str
|
|
|
|
|
|
|
|
|
|
|
|
class ContactDataAd(BaseModel):
|
|
|
|
payment_method: str
|
|
|
|
trade_type: str
|
|
|
|
advertiser: ContactDataBuyerSeller
|
|
|
|
asset: str
|
2023-03-10 15:27:30 +00:00
|
|
|
id: str | None
|
|
|
|
contact_id: str | None
|
2023-03-10 00:23:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ContactData(BaseModel):
|
|
|
|
buyer: ContactDataBuyerSeller
|
|
|
|
seller: ContactDataBuyerSeller
|
|
|
|
amount: str
|
2023-03-11 11:45:24 +00:00
|
|
|
amount_xmr: str | None
|
|
|
|
fee_xmr: str | None
|
|
|
|
amount_btc: str | None
|
|
|
|
fee_btc: str | None
|
2023-03-10 00:23:05 +00:00
|
|
|
advertisement: ContactDataAd
|
|
|
|
contact_id: str
|
|
|
|
currency: str
|
|
|
|
country: str
|
|
|
|
account_info: str
|
|
|
|
price_equation: str
|
|
|
|
is_buying: bool
|
|
|
|
is_selling: bool
|
|
|
|
created_at: str
|
|
|
|
escrowed_at: str
|
|
|
|
funded_at: str
|
|
|
|
canceled_at: str | None
|
|
|
|
closed_at: str | None
|
|
|
|
msg: str
|
|
|
|
released_at: str | None
|
|
|
|
payment_completed_at: str | None
|
|
|
|
disputed_at: str | None
|
|
|
|
arbitrated: bool
|
|
|
|
transfer_to_seller_non_custodial_wallet_transaction_confirmations: str | None
|
|
|
|
transfer_to_buyer_settlement_wallet_transaction_id: str | None
|
|
|
|
transfer_to_buyer_settlement_wallet_transaction_key: str | None
|
|
|
|
buyer_settlement_address: str | None
|
|
|
|
buyer_settlement_fee_level: str | None
|
|
|
|
seller_non_custodial_wallet_mnemonic: str | None
|
|
|
|
transfer_to_seller_non_custodial_wallet_transaction_id: str | None
|
|
|
|
|
|
|
|
|
|
|
|
class ContactActions(BaseModel):
|
2023-03-10 15:27:30 +00:00
|
|
|
advertisement_public_view: str | None
|
|
|
|
advertisement_url: str | None
|
2023-03-10 00:23:05 +00:00
|
|
|
message_post_url: str
|
|
|
|
messages_url: str
|
|
|
|
release_url: str
|
|
|
|
|
|
|
|
|
|
|
|
class Contact(BaseModel):
|
|
|
|
data: ContactData
|
|
|
|
actions: ContactActions
|
|
|
|
|
|
|
|
|
|
|
|
class ResponseData(BaseModel):
|
|
|
|
contact_count: int
|
|
|
|
contact_list: list[Contact]
|
|
|
|
|
|
|
|
|
|
|
|
class Response(BaseModel):
|
|
|
|
data: ResponseData
|
|
|
|
|
|
|
|
|
|
|
|
class Dashboard(BaseModel):
|
|
|
|
success: bool
|
|
|
|
message: str
|
|
|
|
response: Response
|
|
|
|
|
|
|
|
|
|
|
|
DashboardSchema = {
|
|
|
|
"success": "success",
|
|
|
|
"message": "message",
|
|
|
|
"contact_count": "response.data.contact_count",
|
|
|
|
"contact_list": "response.data.contact_list",
|
|
|
|
}
|