2023-11-03 17:01:00 +02:00
|
|
|
from dataclasses import dataclass, field
|
|
|
|
|
from marshmallow_dataclass import class_schema
|
2023-11-17 08:47:22 +02:00
|
|
|
from typing import Optional, Union
|
2023-11-01 14:02:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
|
class MessageRpcResponse:
|
|
|
|
|
payload: str
|
2023-11-03 17:01:00 +02:00
|
|
|
contentTopic: str
|
|
|
|
|
version: Optional[int]
|
2023-11-17 08:47:22 +02:00
|
|
|
timestamp: Optional[int]
|
2023-11-03 17:01:00 +02:00
|
|
|
ephemeral: Optional[bool]
|
2023-11-17 08:47:22 +02:00
|
|
|
meta: Optional[str]
|
|
|
|
|
rateLimitProof: Optional[Union[dict, str]] = field(default_factory=dict)
|
2023-11-03 17:01:00 +02:00
|
|
|
rate_limit_proof: Optional[dict] = field(default_factory=dict)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
message_rpc_response_schema = class_schema(MessageRpcResponse)()
|