
message CClanFAQContent {
	optional uint64 faq_id = 1;
	optional uint32 language = 2;
	optional uint64 version = 3;
	optional string content = 4;
	optional string title = 5;
	optional fixed32 timestamp = 6;
	optional uint64 author_account_id = 7;
	optional string url_code = 8;
}

message CClanFAQS_CheckFAQPermissions_Request {
	optional fixed64 steamid = 1;
}

message CClanFAQS_CheckFAQPermissions_Response {
}

message CClanFAQS_Create_Request {
	optional uint64 steamid = 1;
	optional string internal_name = 2;
	optional string json_data = 3;
}

message CClanFAQS_Create_Response {
	optional uint64 faq_id = 1;
}

message CClanFAQS_Delete_Request {
	optional uint64 steamid = 1;
	optional uint64 faq_id = 2;
}

message CClanFAQS_Delete_Response {
}

message CClanFAQs_FetchLocalizationFromCrowdIn_Request {
	optional uint64 faq_id = 1;
	optional uint32 language = 2;
	optional fixed64 steamid = 3;
}

message CClanFAQs_FetchLocalizationFromCrowdIn_Response {
}

message CClanFAQS_GetAllDrafts_Request {
	optional uint64 steamid = 1;
	optional uint64 faq_id = 2;
}

message CClanFAQS_GetAllDrafts_Response {
	optional .CClanFAQSummary summary = 1;
	repeated .CClanFAQContent draft = 2;
}

message CClanFAQS_GetAllFAQsForClan_Request {
	optional uint64 steamid = 1;
}

message CClanFAQS_GetAllFAQsForClan_Response {
	repeated .CClanFAQSummary faq = 1;
}

message CClanFAQS_GetAllLatestVersionPublishedFAQS_Request {
	optional uint64 steamid = 1;
	optional uint64 faq_id = 2;
}

message CClanFAQS_GetAllLatestVersionPublishedFAQS_Response {
	repeated .CClanFAQContent faqs = 1;
}

message CClanFAQs_GetCrowdInMetadata_Request {
	optional uint64 faq_id = 1;
	optional fixed64 steamid = 2;
}

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

message CClanFAQS_GetFAQ_Request {
	optional uint64 faq_id = 2;
	optional uint32 language = 3;
}

message CClanFAQS_GetFAQ_Response {
	optional .CClanFAQContent faq = 1;
	optional bool faq_exists = 2 [default = false];
}

message CClanFAQS_GetFAQVersion_Request {
	optional uint64 steamid = 1;
	optional uint64 faq_id = 2;
	optional uint32 language = 3;
	optional uint64 version = 4;
}

message CClanFAQS_GetFAQVersion_Response {
	optional .CClanFAQContent faq = 1;
}

message CClanFAQS_PreviewDraft_Request {
	optional uint64 steamid = 1;
	optional uint64 faq_id = 2;
	optional uint32 language = 3;
}

message CClanFAQS_PreviewDraft_Response {
	optional .CClanFAQContent faq = 1;
}

message CClanFAQS_PublishDraft_Request {
	optional uint64 steamid = 1;
	optional uint64 faq_id = 2;
	repeated uint32 language = 3;
}

message CClanFAQS_PublishDraft_Response {
	optional fixed32 last_publish_timestamp = 1;
}

message CClanFAQS_SearchFAQs_Request {
	optional string search_text = 1;
	repeated int32 elanguages = 2;
	optional int32 count = 3;
	optional string cursor = 4;
	repeated uint32 filter_clanids = 5;
}

message CClanFAQS_SearchFAQs_Response {
	repeated .CClanFAQS_SearchFAQs_Response_CFAQSearchResult faqs = 1;
	optional int32 num_total_results = 2;
	optional string next_cursor = 3;
}

message CClanFAQS_SearchFAQs_Response_CFAQSearchResult {
	optional uint64 articleid = 1;
	optional string name = 2;
	optional string content = 3;
	optional uint32 clan_accountid = 4;
	optional string url_code = 5;
	repeated string localized_names = 6;
}

message CClanFAQS_SetVisibility_Request {
	optional uint64 steamid = 1;
	optional uint64 faq_id = 2;
	optional bool visible_in_global_realm = 3;
	optional bool visible_in_china_realm = 4;
}

message CClanFAQS_SetVisibility_Response {
}

message CClanFAQS_UpdateDraft_Request {
	optional uint64 steamid = 1;
	optional uint64 faq_id = 2;
	optional uint32 language = 3;
	optional string content = 4;
	optional string title = 5;
}

message CClanFAQS_UpdateDraft_Response {
	optional fixed32 last_update_timestamp = 1;
}

message CClanFAQS_UpdateInternalName_Request {
	optional uint64 steamid = 1;
	optional uint64 faq_id = 2;
	optional string internal_name = 3;
}

message CClanFAQS_UpdateInternalName_Response {
}

message CClanFAQS_UpdateJsonData_Request {
	optional uint64 steamid = 1;
	optional uint64 faq_id = 2;
	optional string json_data = 3;
}

message CClanFAQS_UpdateJsonData_Response {
}

message CClanFAQSummary {
	optional uint64 faq_id = 1;
	optional string internal_name = 2;
	optional bool visible_in_global_realm = 3;
	optional bool visible_in_china_realm = 4;
	optional string json_data = 5;
	repeated .CClanFAQSummary_CLanguageInfo per_language_info = 6;
	optional string url_code = 7;
}

message CClanFAQSummary_CLanguageInfo {
	optional uint32 language = 1;
	optional fixed32 last_update_timestamp = 2;
	optional fixed32 last_publish_timestamp = 3;
}

service ClanFAQS {
	// ePrivilege=1
	rpc CheckFAQPermissions (.CClanFAQS_CheckFAQPermissions_Request) returns (.CClanFAQS_CheckFAQPermissions_Response);
	// ePrivilege=1
	rpc Create (.CClanFAQS_Create_Request) returns (.CClanFAQS_Create_Response);
	// ePrivilege=1
	rpc Delete (.CClanFAQS_Delete_Request) returns (.CClanFAQS_Delete_Response);
	// ePrivilege=1
	rpc FetchLocalizationFromCrowdIn (.CClanFAQs_FetchLocalizationFromCrowdIn_Request) returns (.CClanFAQs_FetchLocalizationFromCrowdIn_Response);
	// ePrivilege=1
	rpc GetAllDrafts (.CClanFAQS_GetAllDrafts_Request) returns (.CClanFAQS_GetAllDrafts_Response);
	// ePrivilege=1
	rpc GetAllFAQsForClan (.CClanFAQS_GetAllFAQsForClan_Request) returns (.CClanFAQS_GetAllFAQsForClan_Response);
	// ePrivilege=1
	rpc GetAllLatestVersionPublishedFAQS (.CClanFAQS_GetAllLatestVersionPublishedFAQS_Request) returns (.CClanFAQS_GetAllLatestVersionPublishedFAQS_Response);
	// ePrivilege=1
	rpc GetCrowdInMetadata (.CClanFAQs_GetCrowdInMetadata_Request) returns (.CClanFAQs_GetCrowdInMetadata_Response);
	// bConstMethod=true, ePrivilege=0, eWebAPIKeyRequirement=1
	rpc GetFAQ (.CClanFAQS_GetFAQ_Request) returns (.CClanFAQS_GetFAQ_Response);
	// ePrivilege=1
	rpc GetFAQVersion (.CClanFAQS_GetFAQVersion_Request) returns (.CClanFAQS_GetFAQVersion_Response);
	// ePrivilege=1
	rpc PreviewDraft (.CClanFAQS_PreviewDraft_Request) returns (.CClanFAQS_PreviewDraft_Response);
	// ePrivilege=1
	rpc PublishDraft (.CClanFAQS_PublishDraft_Request) returns (.CClanFAQS_PublishDraft_Response);
	// bConstMethod=true, ePrivilege=0, eWebAPIKeyRequirement=1
	rpc SearchFAQs (.CClanFAQS_SearchFAQs_Request) returns (.CClanFAQS_SearchFAQs_Response);
	// ePrivilege=1
	rpc SetVisibility (.CClanFAQS_SetVisibility_Request) returns (.CClanFAQS_SetVisibility_Response);
	// ePrivilege=1
	rpc UpdateDraft (.CClanFAQS_UpdateDraft_Request) returns (.CClanFAQS_UpdateDraft_Response);
	// ePrivilege=1
	rpc UpdateInternalName (.CClanFAQS_UpdateInternalName_Request) returns (.CClanFAQS_UpdateInternalName_Response);
	// ePrivilege=1
	rpc UpdateJsonData (.CClanFAQS_UpdateJsonData_Request) returns (.CClanFAQS_UpdateJsonData_Response);
}

