feat(guild): controller scaffolding + /guild/info baseline
- 5 common DTOs under Models/Dtos/Common/Guild/ (GuildDetailDto, GuildUserBaseDto, GuildMemberInfoDto, ChatUserDto, ChatMessageDto) - 28 per-endpoint request/response DTOs under Models/Dtos/Guild/ and Models/Dtos/GuildChat/ with full [MessagePackObject]/[Key]/ [JsonPropertyName] attribute mirrors on every property - GuildController (22 actions): /guild/info returns prod-shape with config-backed max_member_num/max_sub_leader_num/usable_stamp_list; 21 stubs return empty/default DTOs - GuildChatController (7 stubs), /guild_chat/messages stub returns wait_interval=10 per config - 29 new routing smoke test cases (100 total, all pass) - GuildWireShape literal-JSON test for GuildInfoResponse (1/1 pass) - GameConfigurationJsonbTests updated for 17th GuildConfig section - Total: 1422 tests pass, 0 errors Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Request for POST /guild/cancel_invite. Leader/sub-leader retracts an outstanding invite.</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildCancelInviteRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
/// <summary>Invite id from /guild/invite_user_list.</summary>
|
||||
[JsonPropertyName("invite_id"), Key("invite_id")]
|
||||
public long InviteId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>
|
||||
/// Request for POST /guild/cancel_join_request.
|
||||
/// No fields — server identifies the pending request from the calling user's state.
|
||||
/// Uses explicit DTO (not BaseRequest) so we can add fields if needed in later tasks.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildCancelJoinRequestRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Request for POST /guild/change_role. Change a member's role (promote/demote/transfer leadership).</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildChangeRoleRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
/// <summary>ViewerId of the member whose role is changing.</summary>
|
||||
[JsonPropertyName("target_viewer_id"), Key("target_viewer_id")]
|
||||
public long TargetViewerId { get; set; }
|
||||
|
||||
/// <summary>New role: 0 = REGULAR, 1 = LEADER, 2 = SUB_LEADER.</summary>
|
||||
[JsonPropertyName("role_id"), Key("role_id")]
|
||||
public int RoleId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common.Guild;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>
|
||||
/// Response for POST /guild/change_role.
|
||||
/// Returns the full updated member list so the client can redraw without re-fetching /guild/info.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildChangeRoleResponse
|
||||
{
|
||||
[JsonPropertyName("members"), Key("members")]
|
||||
public List<GuildMemberInfoDto> Members { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Request for POST /guild/create.</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildCreateRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("guild_name"), Key("guild_name")]
|
||||
public string GuildName { get; set; } = "";
|
||||
|
||||
/// <summary>GuildDetailInfo.ActivityType enum (1..16).</summary>
|
||||
[JsonPropertyName("activity"), Key("activity")]
|
||||
public int Activity { get; set; }
|
||||
|
||||
/// <summary>GuildDetailInfo.JoinConditionType enum (1 FREE, 2 APPROVAL, 3 ONLY_INVITE).</summary>
|
||||
[JsonPropertyName("join_condition"), Key("join_condition")]
|
||||
public int JoinCondition { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Response for POST /guild/emblem_list. List of emblem entries the leader can select.</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildEmblemListResponse
|
||||
{
|
||||
[JsonPropertyName("guild_emblem_list"), Key("guild_emblem_list")]
|
||||
public List<GuildEmblemEntry> EmblemList { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>One emblem entry. emblem_id is long per spec.</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildEmblemEntry
|
||||
{
|
||||
[JsonPropertyName("emblem_id"), Key("emblem_id"), JsonConverter(typeof(StringifiedLongConverter))]
|
||||
public long EmblemId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common.Guild;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>
|
||||
/// Response for POST /guild/friend_list.
|
||||
/// NOTE: per guild-friend_list.md, `data` is an array at the root — BUT we return this
|
||||
/// as a wrapper for now; the controller returns the List directly.
|
||||
/// TODO(task-14): verify array-root shape via capture; may need a custom response wrapper.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildFriendListResponse
|
||||
{
|
||||
// Placeholder — see controller; actual wire shape is array-at-root per spec.
|
||||
// The controller returns List<GuildInviteCandidateDto> directly for now.
|
||||
[JsonPropertyName("friends"), Key("friends")]
|
||||
public List<GuildInviteCandidateDto> Friends { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>InviteCandidate — UserInfoBase + is_join_guild flag.</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildInviteCandidateDto
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id"), JsonConverter(typeof(SVSim.EmulatedEntrypoint.Models.Dtos.Common.StringifiedLongConverter))]
|
||||
public long ViewerId { get; set; }
|
||||
|
||||
[JsonPropertyName("name"), Key("name")]
|
||||
public string Name { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("emblem_id"), Key("emblem_id"), JsonConverter(typeof(SVSim.EmulatedEntrypoint.Models.Dtos.Common.StringifiedLongConverter))]
|
||||
public long EmblemId { get; set; }
|
||||
|
||||
[JsonPropertyName("country_code"), Key("country_code")]
|
||||
public string CountryCode { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("rank"), Key("rank"), JsonConverter(typeof(SVSim.EmulatedEntrypoint.Models.Dtos.Common.StringifiedIntConverter))]
|
||||
public int Rank { get; set; }
|
||||
|
||||
[JsonPropertyName("degree_id"), Key("degree_id"), JsonConverter(typeof(SVSim.EmulatedEntrypoint.Models.Dtos.Common.StringifiedIntConverter))]
|
||||
public int DegreeId { get; set; }
|
||||
|
||||
[JsonPropertyName("is_friend"), Key("is_friend")]
|
||||
public int? IsFriend { get; set; }
|
||||
|
||||
[JsonPropertyName("is_friend_apply"), Key("is_friend_apply")]
|
||||
public int? IsFriendApply { get; set; }
|
||||
|
||||
/// <summary>true => friend is already in a guild and can't be invited.</summary>
|
||||
[JsonPropertyName("is_join_guild"), Key("is_join_guild")]
|
||||
public bool IsJoinGuild { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common.Guild;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>
|
||||
/// Mirrors GuildInfo.cs:68-86. Always-present: max_member_num, max_sub_leader_num,
|
||||
/// guild_status, usable_stamp_list. Conditionally present (client `Keys.Contains` -gated):
|
||||
/// guild (detail + members), join_request_count, invite_count.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildInfoResponse
|
||||
{
|
||||
[JsonPropertyName("max_member_num"), Key("max_member_num"), JsonConverter(typeof(StringifiedIntConverter)),
|
||||
JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public int MaxMemberNum { get; set; }
|
||||
|
||||
[JsonPropertyName("max_sub_leader_num"), Key("max_sub_leader_num"), JsonConverter(typeof(StringifiedIntConverter)),
|
||||
JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public int MaxSubLeaderNum { get; set; }
|
||||
|
||||
[JsonPropertyName("guild_status"), Key("guild_status"), JsonConverter(typeof(StringifiedIntConverter)),
|
||||
JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public int GuildStatus { get; set; }
|
||||
|
||||
/// <summary>Stamp ids the viewer can use in chat. Stringified ints (capture: ["100001",...]).</summary>
|
||||
[JsonPropertyName("usable_stamp_list"), Key("usable_stamp_list"),
|
||||
JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public List<string> UsableStampList { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("guild"), Key("guild")]
|
||||
public GuildBundle? Guild { get; set; }
|
||||
|
||||
[JsonPropertyName("join_request_count"), Key("join_request_count"), JsonConverter(typeof(StringifiedIntConverter))]
|
||||
public int? JoinRequestCount { get; set; }
|
||||
|
||||
[JsonPropertyName("invite_count"), Key("invite_count"), JsonConverter(typeof(StringifiedIntConverter))]
|
||||
public int? InviteCount { get; set; }
|
||||
}
|
||||
|
||||
[MessagePackObject]
|
||||
public class GuildBundle
|
||||
{
|
||||
[JsonPropertyName("detail"), Key("detail")]
|
||||
public GuildDetailDto Detail { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("members"), Key("members")]
|
||||
public List<GuildMemberInfoDto> Members { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Request for POST /guild/invite. Leader/sub-leader sends invite to a user.</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildInviteRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
/// <summary>ViewerId of the user to invite.</summary>
|
||||
[JsonPropertyName("invited_viewer_id"), Key("invited_viewer_id")]
|
||||
public long InvitedViewerId { get; set; }
|
||||
|
||||
/// <summary>Free-text invite message. Client hardcodes "" — always empty on wire.</summary>
|
||||
[JsonPropertyName("invite_message"), Key("invite_message")]
|
||||
public string InviteMessage { get; set; } = "";
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>
|
||||
/// Response for POST /guild/invite_user_list.
|
||||
/// Lists outstanding invites the guild has sent out (leader/sub-leader view).
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildInviteUserListResponse
|
||||
{
|
||||
[JsonPropertyName("list"), Key("list")]
|
||||
public List<GuildOutgoingInviteDto> Users { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OutgoingInvite — UserInfoBase fields flat-spread + invite_id + invite_time.
|
||||
/// Matches guild-invite_user_list.md OutgoingInvite interface.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildOutgoingInviteDto
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id"), JsonConverter(typeof(StringifiedLongConverter))]
|
||||
public long ViewerId { get; set; }
|
||||
|
||||
[JsonPropertyName("name"), Key("name")]
|
||||
public string Name { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("emblem_id"), Key("emblem_id"), JsonConverter(typeof(StringifiedLongConverter))]
|
||||
public long EmblemId { get; set; }
|
||||
|
||||
[JsonPropertyName("country_code"), Key("country_code")]
|
||||
public string CountryCode { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("rank"), Key("rank"), JsonConverter(typeof(StringifiedIntConverter))]
|
||||
public int Rank { get; set; }
|
||||
|
||||
[JsonPropertyName("degree_id"), Key("degree_id"), JsonConverter(typeof(StringifiedIntConverter))]
|
||||
public int DegreeId { get; set; }
|
||||
|
||||
[JsonPropertyName("is_friend"), Key("is_friend")]
|
||||
public int? IsFriend { get; set; }
|
||||
|
||||
[JsonPropertyName("is_friend_apply"), Key("is_friend_apply")]
|
||||
public int? IsFriendApply { get; set; }
|
||||
|
||||
/// <summary>Invite id — pass to /guild/cancel_invite to retract.</summary>
|
||||
[JsonPropertyName("invite_id"), Key("invite_id")]
|
||||
public long InviteId { get; set; }
|
||||
|
||||
/// <summary>Unix seconds when the invite was sent.</summary>
|
||||
[JsonPropertyName("invite_time"), Key("invite_time")]
|
||||
public long InviteTime { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Request for POST /guild/invited_guild_list. Lists pending invites the user has received.</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildInvitedGuildListRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
/// <summary>Pagination page index. This list is the only one the client actually scrolls.</summary>
|
||||
[JsonPropertyName("page"), Key("page")]
|
||||
public int Page { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common.Guild;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>
|
||||
/// Response for POST /guild/invited_guild_list.
|
||||
/// Each entry is GuildDetail fields + invite_id as flat siblings on the wire.
|
||||
/// Per spec: client constructs GuildDetailInfo + reads invite_id from the SAME object.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildInvitedGuildListResponse
|
||||
{
|
||||
[JsonPropertyName("list"), Key("list")]
|
||||
public List<GuildReceivedInviteDto> List { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ReceivedInvite — GuildDetail fields flat-spread + invite_id.
|
||||
/// invite_id and detail fields are siblings, not nested (per guild-invited_guild_list.md).
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildReceivedInviteDto
|
||||
{
|
||||
[JsonPropertyName("guild_id"), Key("guild_id"), JsonConverter(typeof(StringifiedIntConverter))]
|
||||
public int GuildId { get; set; }
|
||||
|
||||
[JsonPropertyName("guild_name"), Key("guild_name")]
|
||||
public string GuildName { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("description"), Key("description")]
|
||||
public string Description { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("guild_emblem_id"), Key("guild_emblem_id"), JsonConverter(typeof(StringifiedLongConverter))]
|
||||
public long GuildEmblemId { get; set; }
|
||||
|
||||
[JsonPropertyName("join_condition"), Key("join_condition"), JsonConverter(typeof(StringifiedIntConverter))]
|
||||
public int JoinCondition { get; set; }
|
||||
|
||||
[JsonPropertyName("activity"), Key("activity"), JsonConverter(typeof(StringifiedIntConverter))]
|
||||
public int Activity { get; set; }
|
||||
|
||||
[JsonPropertyName("member_num"), Key("member_num"), JsonConverter(typeof(StringifiedIntConverter))]
|
||||
public int MemberNum { get; set; }
|
||||
|
||||
[JsonPropertyName("leader_name"), Key("leader_name")]
|
||||
public string LeaderName { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("leader_viewer_id"), Key("leader_viewer_id"), JsonConverter(typeof(StringifiedLongConverter))]
|
||||
public long LeaderViewerId { get; set; }
|
||||
|
||||
/// <summary>Invite id — pass to /guild/join (from_invite=true) or /guild/reject_invite.</summary>
|
||||
[JsonPropertyName("invite_id"), Key("invite_id")]
|
||||
public long InviteId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>
|
||||
/// Request for POST /guild/join.
|
||||
/// NOTE: named GuildJoinEndpointRequest (not GuildJoinRequest) to avoid collision with
|
||||
/// SVSim.Database.Entities.Guild.GuildJoinRequest which is an EF entity.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildJoinEndpointRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("guild_id"), Key("guild_id"), JsonConverter(typeof(StringifiedIntConverter))]
|
||||
public int GuildId { get; set; }
|
||||
|
||||
/// <summary>true = consuming an open invite (from /guild/invited_guild_list).</summary>
|
||||
[JsonPropertyName("from_invite"), Key("from_invite")]
|
||||
public bool FromInvite { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>
|
||||
/// Request for POST /guild/join_request_accept.
|
||||
/// GuildJoinRequestActionParam shape — single field request_viewer_id.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildJoinRequestAcceptRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
/// <summary>ViewerId of the user whose join request is being accepted.</summary>
|
||||
[JsonPropertyName("request_viewer_id"), Key("request_viewer_id")]
|
||||
public long RequestViewerId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>
|
||||
/// Request for POST /guild/join_request_list.
|
||||
/// KeysetPagination shape — client always sends page=0, oldest_time=0.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildJoinRequestListRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("page"), Key("page")]
|
||||
public int Page { get; set; }
|
||||
|
||||
[JsonPropertyName("oldest_time"), Key("oldest_time")]
|
||||
public long OldestTime { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Response for POST /guild/join_request_list (leader/sub-leader view).</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildJoinRequestListResponse
|
||||
{
|
||||
[JsonPropertyName("list"), Key("list")]
|
||||
public List<GuildJoinRequestEntryDto> Users { get; set; } = new();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// JoinRequest entry — UserInfoBase fields flat-spread + is_official_mark_displayed + request_time.
|
||||
/// Matches guild-join_request_list.md JoinRequest interface.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildJoinRequestEntryDto
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id"), JsonConverter(typeof(StringifiedLongConverter))]
|
||||
public long ViewerId { get; set; }
|
||||
|
||||
[JsonPropertyName("name"), Key("name")]
|
||||
public string Name { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("emblem_id"), Key("emblem_id"), JsonConverter(typeof(StringifiedLongConverter))]
|
||||
public long EmblemId { get; set; }
|
||||
|
||||
[JsonPropertyName("country_code"), Key("country_code")]
|
||||
public string CountryCode { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("rank"), Key("rank"), JsonConverter(typeof(StringifiedIntConverter))]
|
||||
public int Rank { get; set; }
|
||||
|
||||
[JsonPropertyName("degree_id"), Key("degree_id"), JsonConverter(typeof(StringifiedIntConverter))]
|
||||
public int DegreeId { get; set; }
|
||||
|
||||
[JsonPropertyName("is_friend"), Key("is_friend")]
|
||||
public int? IsFriend { get; set; }
|
||||
|
||||
[JsonPropertyName("is_friend_apply"), Key("is_friend_apply")]
|
||||
public int? IsFriendApply { get; set; }
|
||||
|
||||
[JsonPropertyName("is_official_mark_displayed"), Key("is_official_mark_displayed")]
|
||||
public int IsOfficialMarkDisplayed { get; set; }
|
||||
|
||||
/// <summary>Unix seconds when the request was submitted. Don't send millisecond timestamps.</summary>
|
||||
[JsonPropertyName("request_time"), Key("request_time")]
|
||||
public long RequestTime { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>
|
||||
/// Response for POST /guild/join.
|
||||
/// Returns the user's new guild_status; client calls /guild/info next when status is JOINING.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildJoinResponse
|
||||
{
|
||||
/// <summary>eGUILD_STATUS the user is now in. Stringified.</summary>
|
||||
[JsonPropertyName("guild_status"), Key("guild_status"), JsonConverter(typeof(StringifiedIntConverter)),
|
||||
JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public int GuildStatus { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Request for POST /guild/others_info. Browse another guild's public detail.</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildOthersInfoRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("guild_id"), Key("guild_id"), JsonConverter(typeof(StringifiedIntConverter))]
|
||||
public int GuildId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>
|
||||
/// Response for POST /guild/others_info. Only the detail sub-tree — no member list (privacy).
|
||||
/// Reuses GuildDetailSubTree (same shape as /guild/update response).
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildOthersInfoResponse
|
||||
{
|
||||
[JsonPropertyName("guild"), Key("guild")]
|
||||
public GuildDetailSubTree Guild { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Request for POST /guild/reject_invite. User declines an incoming invite.</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildRejectInviteRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
/// <summary>Invite id from /guild/invited_guild_list.</summary>
|
||||
[JsonPropertyName("invite_id"), Key("invite_id")]
|
||||
public long InviteId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>
|
||||
/// Request for POST /guild/reject_join_request.
|
||||
/// GuildJoinRequestActionParam shape — single field request_viewer_id.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildRejectJoinRequestRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
/// <summary>ViewerId of the user whose join request is being rejected.</summary>
|
||||
[JsonPropertyName("request_viewer_id"), Key("request_viewer_id")]
|
||||
public long RequestViewerId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Request for POST /guild/remove. Kick a member (leader/sub-leader only).</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildRemoveRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
/// <summary>ViewerId of the member to remove. Field is `remove_viewer_id`, not `viewer_id`.</summary>
|
||||
[JsonPropertyName("remove_viewer_id"), Key("remove_viewer_id")]
|
||||
public long RemoveViewerId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Request for POST /guild/search_guild.</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildSearchGuildRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
/// <summary>Name query. Empty string = match-all.</summary>
|
||||
[JsonPropertyName("guild_name"), Key("guild_name")]
|
||||
public string GuildName { get; set; } = "";
|
||||
|
||||
/// <summary>ActivityType filter (1..16). 0 = any.</summary>
|
||||
[JsonPropertyName("activity"), Key("activity")]
|
||||
public int Activity { get; set; }
|
||||
|
||||
/// <summary>JoinConditionType filter (1..3). 0 = any.</summary>
|
||||
[JsonPropertyName("join_condition"), Key("join_condition")]
|
||||
public int JoinCondition { get; set; }
|
||||
|
||||
/// <summary>Member-count bucket filter. 0 = any, 1 = small, 2 = medium, 3 = large.</summary>
|
||||
[JsonPropertyName("member_condition_range"), Key("member_condition_range")]
|
||||
public int MemberConditionRange { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common.Guild;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Response for POST /guild/search_guild. Flat list of guild details matching the filter.</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildSearchGuildResponse
|
||||
{
|
||||
[JsonPropertyName("list"), Key("list")]
|
||||
public List<GuildDetailDto> List { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Request for POST /guild/update_description. Leader-only.</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildUpdateDescriptionRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("description"), Key("description")]
|
||||
public string Description { get; set; } = "";
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Request for POST /guild/update_emblem. Leader-only. emblem_id is long.</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildUpdateEmblemRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
/// <summary>Emblem id from /guild/emblem_list. long per spec.</summary>
|
||||
[JsonPropertyName("emblem_id"), Key("emblem_id"), JsonConverter(typeof(StringifiedLongConverter))]
|
||||
public long EmblemId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>Request for POST /guild/update. Leader-only.</summary>
|
||||
[MessagePackObject]
|
||||
public class GuildUpdateRequest
|
||||
{
|
||||
[JsonPropertyName("viewer_id"), Key("viewer_id")]
|
||||
public string ViewerId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("steam_id"), Key("steam_id")]
|
||||
public ulong SteamId { get; set; }
|
||||
|
||||
[JsonPropertyName("steam_session_ticket"), Key("steam_session_ticket")]
|
||||
public string SteamSessionTicket { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("guild_name"), Key("guild_name")]
|
||||
public string GuildName { get; set; } = "";
|
||||
|
||||
/// <summary>ActivityType enum (1..16).</summary>
|
||||
[JsonPropertyName("activity"), Key("activity")]
|
||||
public int Activity { get; set; }
|
||||
|
||||
/// <summary>JoinConditionType enum (1..3).</summary>
|
||||
[JsonPropertyName("join_condition"), Key("join_condition")]
|
||||
public int JoinCondition { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common.Guild;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Guild;
|
||||
|
||||
/// <summary>
|
||||
/// Response for POST /guild/update and POST /guild/update_emblem.
|
||||
/// Returns the full updated guild detail sub-tree; client merges without re-fetching members.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class GuildUpdateResponse
|
||||
{
|
||||
[JsonPropertyName("guild"), Key("guild")]
|
||||
public GuildDetailSubTree Guild { get; set; } = new();
|
||||
}
|
||||
|
||||
[MessagePackObject]
|
||||
public class GuildDetailSubTree
|
||||
{
|
||||
[JsonPropertyName("detail"), Key("detail")]
|
||||
public GuildDetailDto Detail { get; set; } = new();
|
||||
}
|
||||
Reference in New Issue
Block a user