2020-09-17 20:02:52 +00:00
|
|
|
''' actor serializer '''
|
|
|
|
from dataclasses import dataclass, field
|
|
|
|
from typing import Dict
|
|
|
|
|
|
|
|
from .base_activity import ActivityObject, Image, PublicKey
|
|
|
|
|
|
|
|
@dataclass(init=False)
|
|
|
|
class Person(ActivityObject):
|
|
|
|
''' actor activitypub json '''
|
|
|
|
preferredUsername: str
|
|
|
|
name: str
|
|
|
|
inbox: str
|
|
|
|
outbox: str
|
|
|
|
followers: str
|
|
|
|
summary: str
|
|
|
|
publicKey: PublicKey
|
|
|
|
endpoints: Dict
|
|
|
|
icon: Image = field(default=lambda: {})
|
2020-09-21 15:10:37 +00:00
|
|
|
bookwyrmUser: str = False
|
2020-09-17 20:02:52 +00:00
|
|
|
manuallyApprovesFollowers: str = False
|
|
|
|
discoverable: str = True
|
|
|
|
type: str = 'Person'
|