X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fweb%2Fapi_spec%2Foperations%2Faccount_operation.ex;h=e20f57fec3e7bed9adbb565587344144f572406c;hb=0cfd5b4e89b02688342345755577e58eece3db0f;hp=bdbae9b747cedc5a2e94a6a07fd4fe4292da4b1c;hpb=72bdb0640f28021ecbcc28711cc9268b17f5ea87;p=akkoma diff --git a/lib/pleroma/web/api_spec/operations/account_operation.ex b/lib/pleroma/web/api_spec/operations/account_operation.ex index bdbae9b74..e20f57fec 100644 --- a/lib/pleroma/web/api_spec/operations/account_operation.ex +++ b/lib/pleroma/web/api_spec/operations/account_operation.ex @@ -223,12 +223,12 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do type: :object, properties: %{ reblogs: %Schema{ - type: :boolean, + allOf: [BooleanLike], description: "Receive this account's reblogs in home timeline? Defaults to true.", default: true }, notify: %Schema{ - type: :boolean, + allOf: [BooleanLike], description: "Receive notifications for all statuses posted by the account? Defaults to false.", default: false @@ -334,6 +334,22 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do } end + def remove_from_followers_operation do + %Operation{ + tags: ["Account actions"], + summary: "Remove from followers", + operationId: "AccountController.remove_from_followers", + security: [%{"oAuth" => ["follow", "write:follows"]}], + description: "Remove the given account from followers", + parameters: [%Reference{"$ref": "#/components/parameters/accountIdOrNickname"}], + responses: %{ + 200 => Operation.response("Relationship", "application/json", AccountRelationship), + 400 => Operation.response("Error", "application/json", ApiError), + 404 => Operation.response("Error", "application/json", ApiError) + } + } + end + def note_operation do %Operation{ tags: ["Account actions"], @@ -595,11 +611,6 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do nullable: true, description: "Whether manual approval of follow requests is required." }, - accepts_chat_messages: %Schema{ - allOf: [BooleanLike], - nullable: true, - description: "Whether the user accepts receiving chat messages." - }, fields_attributes: %Schema{ nullable: true, oneOf: [ @@ -689,7 +700,13 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do description: "Discovery (listing, indexing) of this account by external services (search bots etc.) is allowed." }, - actor_type: ActorType + actor_type: ActorType, + status_ttl_days: %Schema{ + type: :integer, + nullable: true, + description: + "Number of days after which statuses will be deleted. Set to -1 to disable." + } }, example: %{ bot: false, @@ -709,7 +726,8 @@ defmodule Pleroma.Web.ApiSpec.AccountOperation do allow_following_move: false, also_known_as: ["https://foo.bar/users/foo"], discoverable: false, - actor_type: "Person" + actor_type: "Person", + status_ttl_days: 30 } } end