1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.ApiSpec.Schemas.Account do
6 alias OpenApiSpex.Schema
7 alias Pleroma.Web.ApiSpec.Schemas.AccountEmoji
8 alias Pleroma.Web.ApiSpec.Schemas.AccountField
9 alias Pleroma.Web.ApiSpec.Schemas.ActorType
10 alias Pleroma.Web.ApiSpec.Schemas.VisibilityScope
16 description: "Response schema for an account",
19 acct: %Schema{type: :string},
20 avatar_static: %Schema{type: :string},
21 avatar: %Schema{type: :string},
22 bot: %Schema{type: :boolean},
23 created_at: %Schema{type: :string, format: "date-time"},
24 display_name: %Schema{type: :string},
25 emojis: %Schema{type: :array, items: AccountEmoji},
26 fields: %Schema{type: :array, items: AccountField},
27 follow_requests_count: %Schema{type: :integer},
28 followers_count: %Schema{type: :integer},
29 following_count: %Schema{type: :integer},
30 header_static: %Schema{type: :string},
31 header: %Schema{type: :string},
32 id: %Schema{type: :string},
33 locked: %Schema{type: :boolean},
34 note: %Schema{type: :string},
35 statuses_count: %Schema{type: :integer},
36 url: %Schema{type: :string},
37 username: %Schema{type: :string},
41 allow_following_move: %Schema{type: :boolean},
42 background_image: %Schema{type: :boolean, nullable: true},
43 chat_token: %Schema{type: :string},
44 confirmation_pending: %Schema{type: :boolean},
45 hide_favorites: %Schema{type: :boolean},
46 hide_followers_count: %Schema{type: :boolean},
47 hide_followers: %Schema{type: :boolean},
48 hide_follows_count: %Schema{type: :boolean},
49 hide_follows: %Schema{type: :boolean},
50 is_admin: %Schema{type: :boolean},
51 is_moderator: %Schema{type: :boolean},
52 skip_thread_containment: %Schema{type: :boolean},
53 tags: %Schema{type: :array, items: %Schema{type: :string}},
54 unread_conversation_count: %Schema{type: :integer},
55 notification_settings: %Schema{
58 followers: %Schema{type: :boolean},
59 follows: %Schema{type: :boolean},
60 non_followers: %Schema{type: :boolean},
61 non_follows: %Schema{type: :boolean},
62 privacy_option: %Schema{type: :boolean}
65 relationship: %Schema{
68 blocked_by: %Schema{type: :boolean},
69 blocking: %Schema{type: :boolean},
70 domain_blocking: %Schema{type: :boolean},
71 endorsed: %Schema{type: :boolean},
72 followed_by: %Schema{type: :boolean},
73 following: %Schema{type: :boolean},
74 id: %Schema{type: :string},
75 muting: %Schema{type: :boolean},
76 muting_notifications: %Schema{type: :boolean},
77 requested: %Schema{type: :boolean},
78 showing_reblogs: %Schema{type: :boolean},
79 subscribing: %Schema{type: :boolean}
82 settings_store: %Schema{
90 fields: %Schema{type: :array, items: AccountField},
91 note: %Schema{type: :string},
92 privacy: VisibilityScope,
93 sensitive: %Schema{type: :boolean},
97 actor_type: ActorType,
98 discoverable: %Schema{type: :boolean},
99 no_rich_text: %Schema{type: :boolean},
100 show_role: %Schema{type: :boolean}
109 "avatar" => "https://mypleroma.com/images/avi.png",
110 "avatar_static" => "https://mypleroma.com/images/avi.png",
112 "created_at" => "2020-03-24T13:05:58.000Z",
113 "display_name" => "foobar",
116 "follow_requests_count" => 0,
117 "followers_count" => 0,
118 "following_count" => 1,
119 "header" => "https://mypleroma.com/images/banner.png",
120 "header_static" => "https://mypleroma.com/images/banner.png",
121 "id" => "9tKi3esbG7OQgZ2920",
125 "allow_following_move" => true,
126 "background_image" => nil,
127 "confirmation_pending" => true,
128 "hide_favorites" => true,
129 "hide_followers" => false,
130 "hide_followers_count" => false,
131 "hide_follows" => false,
132 "hide_follows_count" => false,
134 "is_moderator" => false,
135 "skip_thread_containment" => false,
137 "SFMyNTY.g3QAAAACZAAEZGF0YW0AAAASOXRLaTNlc2JHN09RZ1oyOTIwZAAGc2lnbmVkbgYARNplS3EB.Mb_Iaqew2bN1I1o79B_iP7encmVCpTKC4OtHZRxdjKc",
138 "unread_conversation_count" => 0,
140 "notification_settings" => %{
143 "non_followers" => true,
144 "non_follows" => true,
145 "privacy_option" => false
148 "blocked_by" => false,
150 "domain_blocking" => false,
152 "followed_by" => false,
153 "following" => false,
154 "id" => "9tKi3esbG7OQgZ2920",
156 "muting_notifications" => false,
157 "requested" => false,
158 "showing_reblogs" => true,
159 "subscribing" => false
161 "settings_store" => %{
169 "actor_type" => "Person",
170 "discoverable" => false,
171 "no_rich_text" => false,
174 "privacy" => "public",
177 "statuses_count" => 0,
178 "url" => "https://mypleroma.com/users/foobar",
179 "username" => "foobar"