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.Status do
6 alias OpenApiSpex.Schema
7 alias Pleroma.Web.ApiSpec.Schemas.Account
8 alias Pleroma.Web.ApiSpec.Schemas.Attachment
9 alias Pleroma.Web.ApiSpec.Schemas.Emoji
10 alias Pleroma.Web.ApiSpec.Schemas.FlakeID
11 alias Pleroma.Web.ApiSpec.Schemas.Poll
12 alias Pleroma.Web.ApiSpec.Schemas.Tag
13 alias Pleroma.Web.ApiSpec.Schemas.VisibilityScope
19 description: "Response schema for a status",
26 name: %Schema{type: :string},
27 website: %Schema{type: :string, nullable: true, format: :uri}
30 bookmarked: %Schema{type: :boolean},
35 type: %Schema{type: :string, enum: ["link", "photo", "video", "rich"]},
36 provider_name: %Schema{type: :string, nullable: true},
37 provider_url: %Schema{type: :string, format: :uri},
38 url: %Schema{type: :string, format: :uri},
39 image: %Schema{type: :string, nullable: true, format: :uri},
40 title: %Schema{type: :string},
41 description: %Schema{type: :string}
44 content: %Schema{type: :string, format: :html},
45 created_at: %Schema{type: :string, format: "date-time"},
46 emojis: %Schema{type: :array, items: Emoji},
47 favourited: %Schema{type: :boolean},
48 favourites_count: %Schema{type: :integer},
50 in_reply_to_account_id: %Schema{type: :string, nullable: true},
51 in_reply_to_id: %Schema{type: :string, nullable: true},
52 language: %Schema{type: :string, nullable: true},
53 media_attachments: %Schema{
62 id: %Schema{type: :string},
63 acct: %Schema{type: :string},
64 username: %Schema{type: :string},
65 url: %Schema{type: :string, format: :uri}
69 muted: %Schema{type: :boolean},
70 pinned: %Schema{type: :boolean},
74 content: %Schema{type: :object, additionalProperties: %Schema{type: :string}},
75 conversation_id: %Schema{type: :integer},
76 direct_conversation_id: %Schema{
80 "The ID of the Mastodon direct message conversation the status is associated with (if any)"
82 emoji_reactions: %Schema{
87 name: %Schema{type: :string},
88 count: %Schema{type: :integer},
89 me: %Schema{type: :boolean}
93 expires_at: %Schema{type: :string, format: "date-time", nullable: true},
94 in_reply_to_account_acct: %Schema{type: :string, nullable: true},
95 local: %Schema{type: :boolean},
96 spoiler_text: %Schema{type: :object, additionalProperties: %Schema{type: :string}},
97 thread_muted: %Schema{type: :boolean}
100 poll: %Schema{type: Poll, nullable: true},
102 allOf: [%OpenApiSpex.Reference{"$ref": "#/components/schemas/Status"}],
105 reblogged: %Schema{type: :boolean},
106 reblogs_count: %Schema{type: :integer},
107 replies_count: %Schema{type: :integer},
108 sensitive: %Schema{type: :boolean},
109 spoiler_text: %Schema{type: :string},
110 tags: %Schema{type: :array, items: Tag},
111 uri: %Schema{type: :string, format: :uri},
112 url: %Schema{type: :string, nullable: true, format: :uri},
113 visibility: VisibilityScope
118 "avatar" => "http://localhost:4001/images/avi.png",
119 "avatar_static" => "http://localhost:4001/images/avi.png",
121 "created_at" => "2020-04-07T19:48:51.000Z",
122 "display_name" => "Test テスト User 6",
125 "followers_count" => 1,
126 "following_count" => 0,
127 "header" => "http://localhost:4001/images/banner.png",
128 "header_static" => "http://localhost:4001/images/banner.png",
129 "id" => "9toJCsKN7SmSf3aj5c",
131 "note" => "Tester Number 6",
133 "background_image" => nil,
134 "confirmation_pending" => false,
135 "hide_favorites" => true,
136 "hide_followers" => false,
137 "hide_followers_count" => false,
138 "hide_follows" => false,
139 "hide_follows_count" => false,
141 "is_moderator" => false,
143 "blocked_by" => false,
145 "domain_blocking" => false,
147 "followed_by" => false,
149 "id" => "9toJCsKN7SmSf3aj5c",
151 "muting_notifications" => false,
152 "requested" => false,
153 "showing_reblogs" => true,
154 "subscribing" => false
156 "skip_thread_containment" => false,
161 "note" => "Tester Number 6",
162 "pleroma" => %{"actor_type" => "Person", "discoverable" => false},
165 "statuses_count" => 1,
166 "url" => "http://localhost:4001/users/nick6",
167 "username" => "nick6"
169 "application" => %{"name" => "Web", "website" => nil},
170 "bookmarked" => false,
172 "content" => "foobar",
173 "created_at" => "2020-04-07T19:48:51.000Z",
175 "favourited" => false,
176 "favourites_count" => 0,
177 "id" => "9toJCu5YZW7O7gfvH6",
178 "in_reply_to_account_id" => nil,
179 "in_reply_to_id" => nil,
181 "media_attachments" => [],
186 "content" => %{"text/plain" => "foobar"},
187 "conversation_id" => 345_972,
188 "direct_conversation_id" => nil,
189 "emoji_reactions" => [],
191 "in_reply_to_account_acct" => nil,
193 "spoiler_text" => %{"text/plain" => ""},
194 "thread_muted" => false
198 "reblogged" => false,
199 "reblogs_count" => 0,
200 "replies_count" => 0,
201 "sensitive" => false,
202 "spoiler_text" => "",
204 "uri" => "http://localhost:4001/objects/0f5dad44-0e9e-4610-b377-a2631e499190",
205 "url" => "http://localhost:4001/notice/9toJCu5YZW7O7gfvH6",
206 "visibility" => "private"