import "common_base.proto";
import "common.proto";

message CAppPriority {
	optional uint32 priority = 1;
	repeated uint32 appid = 2;
}

message CCDDBAppDetailCommon {
	optional uint32 appid = 1;
	optional string name = 2;
	optional string icon = 3;
	optional bool tool = 6;
	optional bool demo = 7;
	optional bool media = 8;
	optional bool community_visible_stats = 9;
	optional string friendly_name = 10;
	optional string propagation = 11;
	optional bool has_adult_content = 12;
	optional bool is_visible_in_steam_china = 13;
	optional uint32 app_type = 14;
	optional bool has_adult_content_sex = 15;
	optional bool has_adult_content_violence = 16;
	repeated uint32 content_descriptorids = 17;
	repeated uint32 content_descriptorids_including_dlc = 18;
}

message CClanEventUserNewsTuple {
	optional uint32 clanid = 1;
	optional fixed64 event_gid = 2;
	optional fixed64 announcement_gid = 3;
	optional uint32 rtime_start = 4;
	optional uint32 rtime_end = 5;
	optional uint32 priority_score = 6;
	optional uint32 type = 7;
	optional uint32 clamp_range_slot = 8;
	optional uint32 appid = 9;
	optional uint32 rtime32_last_modified = 10;
}

message CClanMatchEventByRange {
	optional uint32 rtime_before = 1;
	optional uint32 rtime_after = 2;
	optional uint32 qualified = 3;
	repeated .CClanEventUserNewsTuple events = 4;
}

message CCommunity_ClanLocGroupImage {
	optional uint64 loc_group_id = 1;
	optional string image_hash = 2;
	optional string thumbnail_hash = 3;
	optional int32 file_type = 4 [(.description) = "enum"];
	optional int32 group = 5 [(.description) = "enum"];
	optional uint32 width = 6;
	optional uint32 height = 7;
	optional string extensions = 8;
}

message CCommunity_ClearSinglePartnerEventsAppPriority_Request {
	optional uint32 appid = 1;
}

message CCommunity_ClearSinglePartnerEventsAppPriority_Response {
}

message CCommunity_ClearUserPartnerEventsAppPriorities_Request {
}

message CCommunity_ClearUserPartnerEventsAppPriorities_Response {
}

message CCommunity_Comment {
	optional fixed64 gidcomment = 1;
	optional fixed64 steamid = 2;
	optional uint32 timestamp = 3;
	optional string text = 4;
	optional int32 upvotes = 5;
	optional bool hidden = 6;
	optional bool hidden_by_user = 7;
	optional bool deleted = 8;
	optional .CMsgIPAddress ipaddress = 9;
	optional int32 total_hidden = 10;
	optional bool upvoted_by_user = 11;
	repeated .CCommunity_Comment_Reaction reactions = 12;
	optional fixed64 gidparentcomment = 13;
	optional int32 delete_reason = 14 [(.description) = "enum"];
}

message CCommunity_Comment_Reaction {
	optional uint32 reactionid = 1;
	optional uint32 count = 2;
}

message CCommunity_DeleteCommentFromThread_Request {
	optional fixed64 steamid = 1;
	optional int32 comment_thread_type = 2 [(.description) = "enum"];
	optional fixed64 gidfeature = 3;
	optional fixed64 gidfeature2 = 4;
	optional fixed64 gidcomment = 5;
	optional bool undelete = 6;
}

message CCommunity_DeleteCommentFromThread_Response {
}

message CCommunity_FetchTranslationFromCrowdIn_Request {
	optional fixed64 steamid = 1;
	optional uint64 itemid = 2;
	optional int32 language = 3;
}

message CCommunity_FetchTranslationFromCrowdIn_Response {
}

message CCommunity_GetAppRichPresenceLocalization_Request {
	optional int32 appid = 1;
	optional string language = 2;
}

message CCommunity_GetAppRichPresenceLocalization_Response {
	optional int32 appid = 1;
	repeated .CCommunity_GetAppRichPresenceLocalization_Response_TokenList token_lists = 2;
}

message CCommunity_GetAppRichPresenceLocalization_Response_Token {
	optional string name = 1;
	optional string value = 2;
}

message CCommunity_GetAppRichPresenceLocalization_Response_TokenList {
	optional string language = 1;
	repeated .CCommunity_GetAppRichPresenceLocalization_Response_Token tokens = 2;
}

message CCommunity_GetApps_Request {
	repeated int32 appids = 1;
	optional uint32 language = 2;
}

message CCommunity_GetApps_Response {
	repeated .CCDDBAppDetailCommon apps = 1;
}

message CCommunity_GetAvatarHistory_Request {
	optional fixed64 steamid = 1;
	optional bool filter_user_uploaded_only = 2;
}

message CCommunity_GetAvatarHistory_Response {
	repeated .CCommunity_GetAvatarHistory_Response_AvatarData avatars = 1;
}

message CCommunity_GetAvatarHistory_Response_AvatarData {
	optional string avatar_sha1 = 1;
	optional bool user_uploaded = 2;
	optional uint32 timestamp = 3;
}

message CCommunity_GetBestEventsForUser_Request {
	optional bool include_steam_blog = 1;
	optional uint32 filter_to_played_within_days = 2;
	optional bool include_only_game_updates = 3;
}

message CCommunity_GetBestEventsForUser_Response {
	repeated .CCommunity_PartnerEventResult results = 1;
}

message CCommunity_GetClanAnnouncementVoteForUser_Request {
	optional uint64 announcementid = 1;
}

message CCommunity_GetClanAnnouncementVoteForUser_Response {
	optional bool voted_up = 1;
	optional bool voted_down = 2;
}

message CCommunity_GetClanCrowdInMetadata_Request {
	optional fixed64 steamid = 1;
}

message CCommunity_GetClanCrowdInMetadata_Response {
	optional uint64 crowdin_project_id = 1;
	optional uint64 crowdin_directory_id = 2;
	optional bool push_by_default = 3;
}

message CCommunity_GetClanEventCrowdInMetadata_Request {
	optional fixed64 steamid = 1;
	optional uint64 itemid = 2;
}

message CCommunity_GetClanEventCrowdInMetadata_Response {
	optional uint64 crowdin_project_id = 1;
	optional uint64 crowdin_file_id = 2;
}

message CCommunity_GetClanLocGroupImages_Request {
	optional uint64 steamid = 1;
	optional int32 group = 2 [(.description) = "enum"];
	optional uint32 language = 3;
	repeated uint64 loc_group_ids = 4;
}

message CCommunity_GetClanLocGroupImages_Response {
	repeated .CCommunity_ClanLocGroupImage images = 1;
}

message CCommunity_GetCommentThread_Request {
	optional fixed64 steamid = 1;
	optional int32 comment_thread_type = 2 [(.description) = "enum"];
	optional fixed64 gidfeature = 3;
	optional fixed64 gidfeature2 = 4;
	optional fixed64 commentthreadid = 5;
	optional int32 start = 6;
	optional int32 count = 7;
	optional int32 upvoters = 8;
	optional bool include_deleted = 9;
	optional fixed64 gidcomment = 10;
	optional uint32 time_oldest = 11;
	optional bool oldest_first = 12;
}

message CCommunity_GetCommentThread_Response {
	repeated .CCommunity_Comment comments = 1;
	repeated .CCommunity_Comment deleted_comments = 2;
	optional fixed64 steamid = 3;
	optional fixed64 commentthreadid = 4;
	optional int32 start = 5;
	optional int32 count = 6;
	optional int32 total_count = 7;
	optional int32 upvotes = 8;
	repeated uint32 upvoters = 9;
	optional bool user_subscribed = 10;
	optional bool user_upvoted = 11;
	optional fixed64 answer_commentid = 12;
	optional uint32 answer_actor = 13;
	optional int32 answer_actor_rank = 14;
	optional bool can_post = 15;
	optional uint32 comment_thread_type = 16;
	optional fixed64 gidfeature = 17;
	optional fixed64 gidfeature2 = 18;
}

message CCommunity_GetCommentThreadRatings_Request {
	optional string commentthreadtype = 1;
	optional uint64 steamid = 2;
	optional uint64 gidfeature = 3;
	optional uint64 gidfeature2 = 4;
	optional uint64 gidcomment = 5;
	optional uint32 max_results = 6;
}

message CCommunity_GetCommentThreadRatings_Response {
	optional uint64 commentthreadid = 1;
	optional uint64 gidcomment = 2;
	optional uint32 upvotes = 3;
	optional bool has_upvoted = 4;
	repeated uint32 upvoter_accountids = 5;
}

message CCommunity_GetUserPartnerEventNews_Request {
	optional uint32 count = 1;
	optional uint32 offset = 2;
	optional uint32 rtime32_start_time = 3;
	optional uint32 rtime32_end_time = 4;
	repeated uint32 language_preference = 5;
	repeated int32 filter_event_type = 6 [(.description) = "enum"];
	optional bool filter_to_appid = 7;
	repeated .CAppPriority app_list = 8;
	optional uint32 count_after = 9 [default = 0];
	optional uint32 count_before = 10 [default = 0];
}

message CCommunity_GetUserPartnerEventNews_Response {
	repeated .CClanMatchEventByRange results = 1;
}

message CCommunity_GetUserPartnerEventsAppPriorities_Request {
}

message CCommunity_GetUserPartnerEventsAppPriorities_Response {
	repeated .CCommunity_PartnerEventsAppPriority priorities = 1;
}

message CCommunity_GetUserPartnerEventViewStatus_Request {
	repeated fixed64 event_gids = 1;
	optional bool include_read_events_only = 2;
}

message CCommunity_GetUserPartnerEventViewStatus_Response {
	repeated .CCommunity_GetUserPartnerEventViewStatus_Response_PartnerEvent events = 1;
}

message CCommunity_GetUserPartnerEventViewStatus_Response_PartnerEvent {
	optional fixed64 event_gid = 1;
	optional uint32 last_shown_time = 2;
	optional uint32 last_read_time = 3;
	optional uint32 clan_account_id = 4;
}

message CCommunity_HideAndReportComment_Request {
	optional uint64 gidfeature = 1;
	optional uint64 gidfeature2 = 2;
	optional uint64 gidcomment = 3;
	optional fixed64 steamid = 4;
	optional string commentthreadtype = 5;
	optional bool hide = 6;
	optional int32 report_reason = 7 [(.description) = "enum"];
	optional string report_text = 8;
}

message CCommunity_HideAndReportComment_Response {
}

message CCommunity_MarkPartnerEventsForUser_Request {
	repeated .CCommunity_MarkPartnerEventsForUser_Request_PartnerEventMarking markings = 1;
}

message CCommunity_MarkPartnerEventsForUser_Request_PartnerEventMarking {
	optional uint32 clanid = 1;
	optional fixed64 event_gid = 2;
	optional int32 display_location = 3 [(.description) = "enum"];
	optional bool mark_shown = 4;
	optional bool mark_read = 5;
}

message CCommunity_MarkPartnerEventsForUser_Response {
}

message CCommunity_PartnerEventResult {
	optional uint32 clanid = 1;
	optional fixed64 event_gid = 2;
	optional fixed64 announcement_gid = 3;
	optional uint32 appid = 4;
	optional bool possible_takeover = 5;
	optional uint32 rtime32_last_modified = 6 [default = 0];
	optional int32 user_app_priority = 7;
}

message CCommunity_PartnerEventsAppPriority {
	optional uint32 appid = 1;
	optional int32 user_app_priority = 2;
}

message CCommunity_PartnerEventsShowLessForApp_Request {
	optional uint32 appid = 1;
}

message CCommunity_PartnerEventsShowLessForApp_Response {
}

message CCommunity_PartnerEventsShowMoreForApp_Request {
	optional uint32 appid = 1;
}

message CCommunity_PartnerEventsShowMoreForApp_Response {
}

message CCommunity_PostCommentToThread_Request {
	optional fixed64 steamid = 1;
	optional int32 comment_thread_type = 2 [(.description) = "enum"];
	optional fixed64 gidfeature = 3;
	optional fixed64 gidfeature2 = 4;
	optional string text = 6;
	optional fixed64 gidparentcomment = 7;
	optional bool suppress_notifications = 8;
	optional bool is_report = 9;
	optional bool start_hidden = 10;
}

message CCommunity_PostCommentToThread_Response {
	optional fixed64 gidcomment = 1;
	optional fixed64 commentthreadid = 2;
	optional int32 count = 3;
	optional int32 upvotes = 4;
}

message CCommunity_RateClanAnnouncement_Request {
	optional uint64 announcementid = 1;
	optional bool vote_up = 2;
	optional uint32 clan_accountid = 3;
}

message CCommunity_RateClanAnnouncement_Response {
}

message CCommunity_RateCommentThread_Request {
	optional string commentthreadtype = 1;
	optional uint64 steamid = 2;
	optional uint64 gidfeature = 3;
	optional uint64 gidfeature2 = 4;
	optional uint64 gidcomment = 5;
	optional bool rate_up = 6;
	optional bool suppress_notifications = 7;
}

message CCommunity_RateCommentThread_Response {
	optional uint64 gidcomment = 1;
	optional uint64 commentthreadid = 2;
	optional uint32 count = 3;
	optional uint32 upvotes = 4;
	optional bool has_upvoted = 5;
}

message CCommunity_SetRecommendationBotReviewStatus_Request {
	repeated .CCommunity_SetRecommendationBotReviewStatus_Request_ReviewLabel review_labels = 1;
}

message CCommunity_SetRecommendationBotReviewStatus_Request_ReviewLabel {
	optional uint32 appid = 1;
	optional uint64 recommendationid = 2;
	optional bool is_bot_review = 3;
}

message CCommunity_SetRecommendationBotReviewStatus_Response {
}

message CCommunity_VerifyClanMembership_Request {
	optional uint64 steamid = 1;
	repeated uint64 steamids_verifymembership = 2;
}

message CCommunity_VerifyClanMembership_Response {
	repeated uint64 steamids_nonmembers = 1;
}

service Community {
	// ePrivilege=1
	rpc ClearSinglePartnerEventsAppPriority (.CCommunity_ClearSinglePartnerEventsAppPriority_Request) returns (.CCommunity_ClearSinglePartnerEventsAppPriority_Response);
	// ePrivilege=1
	rpc ClearUserPartnerEventsAppPriorities (.CCommunity_ClearUserPartnerEventsAppPriorities_Request) returns (.CCommunity_ClearUserPartnerEventsAppPriorities_Response);
	// ePrivilege=1
	rpc DeleteCommentFromThread (.CCommunity_DeleteCommentFromThread_Request) returns (.CCommunity_DeleteCommentFromThread_Response);
	// ePrivilege=1
	rpc FetchTranslationFromCrowdIn (.CCommunity_FetchTranslationFromCrowdIn_Request) returns (.CCommunity_FetchTranslationFromCrowdIn_Response);
	// ePrivilege=1
	rpc GetAppRichPresenceLocalization (.CCommunity_GetAppRichPresenceLocalization_Request) returns (.CCommunity_GetAppRichPresenceLocalization_Response);
	// bConstMethod=true, ePrivilege=2, eWebAPIKeyRequirement=1
	rpc GetApps (.CCommunity_GetApps_Request) returns (.CCommunity_GetApps_Response);
	// ePrivilege=1
	rpc GetAvatarHistory (.CCommunity_GetAvatarHistory_Request) returns (.CCommunity_GetAvatarHistory_Response);
	// bConstMethod=true, ePrivilege=1, eWebAPIKeyRequirement=2
	rpc GetBestEventsForUser (.CCommunity_GetBestEventsForUser_Request) returns (.CCommunity_GetBestEventsForUser_Response);
	// ePrivilege=1
	rpc GetClanAnnouncementVoteForUser (.CCommunity_GetClanAnnouncementVoteForUser_Request) returns (.CCommunity_GetClanAnnouncementVoteForUser_Response);
	// bConstMethod=true, ePrivilege=1
	rpc GetClanCrowdInMetadata (.CCommunity_GetClanCrowdInMetadata_Request) returns (.CCommunity_GetClanCrowdInMetadata_Response);
	// bConstMethod=true, ePrivilege=1
	rpc GetClanEventCrowdInMetadata (.CCommunity_GetClanEventCrowdInMetadata_Request) returns (.CCommunity_GetClanEventCrowdInMetadata_Response);
	// bConstMethod=true, ePrivilege=0
	rpc GetClanLocGroupImages (.CCommunity_GetClanLocGroupImages_Request) returns (.CCommunity_GetClanLocGroupImages_Response);
	// ePrivilege=2, eWebAPIKeyRequirement=1
	rpc GetCommentThread (.CCommunity_GetCommentThread_Request) returns (.CCommunity_GetCommentThread_Response);
	// ePrivilege=2
	rpc GetCommentThreadRatings (.CCommunity_GetCommentThreadRatings_Request) returns (.CCommunity_GetCommentThreadRatings_Response);
	// bConstMethod=true, ePrivilege=1, eWebAPIKeyRequirement=2
	rpc GetUserPartnerEventNews (.CCommunity_GetUserPartnerEventNews_Request) returns (.CCommunity_GetUserPartnerEventNews_Response);
	// ePrivilege=1
	rpc GetUserPartnerEventsAppPriorities (.CCommunity_GetUserPartnerEventsAppPriorities_Request) returns (.CCommunity_GetUserPartnerEventsAppPriorities_Response);
	// bConstMethod=true, ePrivilege=1
	rpc GetUserPartnerEventViewStatus (.CCommunity_GetUserPartnerEventViewStatus_Request) returns (.CCommunity_GetUserPartnerEventViewStatus_Response);
	// ePrivilege=3
	rpc HideAndReportComment (.CCommunity_HideAndReportComment_Request) returns (.CCommunity_HideAndReportComment_Response);
	// ePrivilege=1
	rpc MarkPartnerEventsForUser (.CCommunity_MarkPartnerEventsForUser_Request) returns (.CCommunity_MarkPartnerEventsForUser_Response);
	// ePrivilege=1
	rpc PartnerEventsShowLessForApp (.CCommunity_PartnerEventsShowLessForApp_Request) returns (.CCommunity_PartnerEventsShowLessForApp_Response);
	// ePrivilege=1
	rpc PartnerEventsShowMoreForApp (.CCommunity_PartnerEventsShowMoreForApp_Request) returns (.CCommunity_PartnerEventsShowMoreForApp_Response);
	// ePrivilege=3
	rpc PostCommentToThread (.CCommunity_PostCommentToThread_Request) returns (.CCommunity_PostCommentToThread_Response);
	// ePrivilege=3
	rpc RateClanAnnouncement (.CCommunity_RateClanAnnouncement_Request) returns (.CCommunity_RateClanAnnouncement_Response);
	// ePrivilege=3
	rpc RateCommentThread (.CCommunity_RateCommentThread_Request) returns (.CCommunity_RateCommentThread_Response);
	// ePrivilege=1
	rpc SetRecommendationBotReviewStatus (.CCommunity_SetRecommendationBotReviewStatus_Request) returns (.CCommunity_SetRecommendationBotReviewStatus_Response);
	// bConstMethod=true, ePrivilege=0, eWebAPIKeyRequirement=2
	rpc VerifyClanMembership (.CCommunity_VerifyClanMembership_Request) returns (.CCommunity_VerifyClanMembership_Response);
}

