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.AccountUpdateCredentialsRequest do
6 alias OpenApiSpex.Schema
7 alias Pleroma.Web.ApiSpec.Schemas.AccountAttributeField
8 alias Pleroma.Web.ApiSpec.Schemas.ActorType
9 alias Pleroma.Web.ApiSpec.Schemas.VisibilityScope
13 title: "AccountUpdateCredentialsRequest",
14 description: "POST body for creating an account",
19 description: "Whether the account has a bot flag."
21 display_name: %Schema{
23 description: "The display name to use for the profile."
25 note: %Schema{type: :string, description: "The account bio."},
28 description: "Avatar image encoded using multipart/form-data",
33 description: "Header image encoded using multipart/form-data",
38 description: "Whether manual approval of follow requests is required."
40 fields_attributes: %Schema{
42 %Schema{type: :array, items: AccountAttributeField},
43 %Schema{type: :object, additionalProperties: %Schema{type: AccountAttributeField}}
46 # NOTE: `source` field is not supported
51 # privacy: %Schema{type: :string},
52 # sensitive: %Schema{type: :boolean},
53 # language: %Schema{type: :string}
57 # Pleroma-specific fields
58 no_rich_text: %Schema{
60 description: "html tags are stripped from all statuses requested from the API"
62 hide_followers: %Schema{type: :boolean, description: "user's followers will be hidden"},
63 hide_follows: %Schema{type: :boolean, description: "user's follows will be hidden"},
64 hide_followers_count: %Schema{
66 description: "user's follower count will be hidden"
68 hide_follows_count: %Schema{
70 description: "user's follow count will be hidden"
72 hide_favorites: %Schema{
74 description: "user's favorites timeline will be hidden"
78 description: "user's role (e.g admin, moderator) will be exposed to anyone in the
81 default_scope: VisibilityScope,
82 pleroma_settings_store: %Schema{
84 description: "Opaque user settings to be saved on the backend."
86 skip_thread_containment: %Schema{
88 description: "Skip filtering out broken threads"
90 allow_following_move: %Schema{
92 description: "Allows automatically follow moved following accounts"
94 pleroma_background_image: %Schema{
96 description: "Sets the background image of the user.",
99 discoverable: %Schema{
101 description: "Discovery of this account in search results and other services is allowed."
103 actor_type: ActorType
107 display_name: "cofe",
109 fields_attributes: [%{name: "foo", value: "bar"}],
111 hide_followers: true,
113 hide_followers_count: false,
114 hide_follows_count: false,
115 hide_favorites: false,
117 default_scope: "private",
118 pleroma_settings_store: %{"pleroma-fe" => %{"key" => "val"}},
119 skip_thread_containment: false,
120 allow_following_move: false,