Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
218 changes: 217 additions & 1 deletion public/specs/service-social/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@
}
}
},
"GlobalChatSettings" : {
"description" : "Whether this player sees global chat.",
"type" : "object",
"required" : [ "enabled" ],
"properties" : {
"enabled" : {
"type" : [ "boolean", "null" ],
"description" : "False hides chat from the whole network; the player's own lines still show."
}
}
},
"ImportMinecraftFriendsBody" : {
"description" : "A player's Mojang friends.",
"type" : "object",
Expand Down Expand Up @@ -252,6 +263,26 @@
}
}
},
"PrivateMessageAllowed" : {
"description" : "Whether a private message may be delivered.",
"type" : "object",
"properties" : {
"allowed" : {
"type" : "boolean"
}
}
},
"PrivateMessageSettings" : {
"description" : "Whether this player accepts private messages.",
"type" : "object",
"required" : [ "enabled" ],
"properties" : {
"enabled" : {
"type" : [ "boolean", "null" ],
"description" : "False refuses every incoming private message."
}
}
},
"Problem" : {
"description" : "A failed request, in RFC 9457 problem-details form.",
"type" : "object",
Expand Down Expand Up @@ -316,17 +347,23 @@
"info" : {
"description" : "Friendships, parties and blocks — the three ways players are attached to each other across the network.\n\nA proxy only knows the players connected to itself, so anything that spans proxies has to ask here: whether two players are friends, which party someone is in, whether a message may be delivered at all.\n\nBlocks are one-directional and private. That shapes the rest of the API: a friend request refused because the receiver blocked the sender reports REQUESTS_DISABLED, and a party invite to someone who blocked the inviter is refused without saying why. Neither answer distinguishes a block from an ordinary refusal, on purpose.\n\nNames live here too, in an index that is never deleted — a friends list has to render a name for someone who is offline, which a session table cannot do.",
"title" : "Social API",
"version" : "v1.0.0"
"version" : "v1.4.0"
},
"tags" : [ {
"name" : "Blocks",
"description" : "One-directional, private blocks between players."
}, {
"name" : "Friends",
"description" : "Friendships and the requests that make them."
}, {
"name" : "Global chat",
"description" : "Whether a player sees chat from the whole network."
}, {
"name" : "Parties",
"description" : "Groups of players who queue and play together."
}, {
"name" : "Private messages",
"description" : "Who may send a player a private message."
} ],
"paths" : {
"/v1/social/parties/{partyId}" : {
Expand Down Expand Up @@ -606,6 +643,31 @@
"description" : "Bad Request"
}
}
},
"get" : {
"summary" : "Read whether this player accepts friend requests",
"description" : "A player who has never changed the setting accepts them.",
"tags" : [ "Friends" ],
"parameters" : [ {
"name" : "playerId",
"in" : "path",
"required" : true,
"schema" : {
"type" : [ "string", "null" ]
}
} ],
"responses" : {
"200" : {
"description" : "OK",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/FriendRequestSettings"
}
}
}
}
}
}
},
"/v1/social/players/{playerId}/friend-requests/{senderId}" : {
Expand Down Expand Up @@ -796,6 +858,70 @@
}
}
},
"/v1/social/players/{playerId}/global-chat/settings" : {
"put" : {
"summary" : "Show or hide global chat for this player",
"tags" : [ "Global chat" ],
"parameters" : [ {
"name" : "playerId",
"in" : "path",
"required" : true,
"schema" : {
"type" : [ "string", "null" ]
}
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/GlobalChatSettings"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "OK",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/GlobalChatSettings"
}
}
}
},
"400" : {
"description" : "Bad Request"
}
}
},
"get" : {
"summary" : "Read whether this player sees global chat",
"description" : "A player who has never changed the setting sees it.",
"tags" : [ "Global chat" ],
"parameters" : [ {
"name" : "playerId",
"in" : "path",
"required" : true,
"schema" : {
"type" : [ "string", "null" ]
}
} ],
"responses" : {
"200" : {
"description" : "OK",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/GlobalChatSettings"
}
}
}
}
}
}
},
"/v1/social/players/{playerId}/party" : {
"delete" : {
"summary" : "Leave the party",
Expand Down Expand Up @@ -1108,6 +1234,96 @@
}
}
}
},
"/v1/social/players/{playerId}/private-messages/allowed" : {
"get" : {
"summary" : "Ask whether one player may send this player a private message",
"description" : "False when this player has turned private messages off or has blocked the sender. Both read the same, so a sender cannot tell a block from a preference.",
"tags" : [ "Private messages" ],
"parameters" : [ {
"name" : "playerId",
"in" : "path",
"required" : true,
"schema" : {
"type" : [ "string", "null" ]
}
}, {
"name" : "from",
"in" : "query",
"schema" : {
"type" : [ "string", "null" ]
}
} ],
"responses" : {
"400" : {
"description" : "`from` is missing or not a UUID."
}
}
}
},
"/v1/social/players/{playerId}/private-messages/settings" : {
"put" : {
"summary" : "Turn private messages on or off for this player",
"tags" : [ "Private messages" ],
"parameters" : [ {
"name" : "playerId",
"in" : "path",
"required" : true,
"schema" : {
"type" : [ "string", "null" ]
}
} ],
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/PrivateMessageSettings"
}
}
},
"required" : true
},
"responses" : {
"200" : {
"description" : "OK",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/PrivateMessageSettings"
}
}
}
},
"400" : {
"description" : "Bad Request"
}
}
},
"get" : {
"summary" : "Read whether this player accepts private messages",
"description" : "A player who has never changed the setting accepts them.",
"tags" : [ "Private messages" ],
"parameters" : [ {
"name" : "playerId",
"in" : "path",
"required" : true,
"schema" : {
"type" : [ "string", "null" ]
}
} ],
"responses" : {
"200" : {
"description" : "OK",
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/PrivateMessageSettings"
}
}
}
}
}
}
}
},
"servers" : [ {
Expand Down
Loading