
message CUserAccount_CancelLicenseForApp_Request {
	optional uint32 appid = 1;
}

message CUserAccount_CancelLicenseForApp_Response {
}

message CUserAccount_CreateFriendInviteToken_Request {
	optional uint32 invite_limit = 1;
	optional uint32 invite_duration = 2;
	optional string invite_note = 3;
}

message CUserAccount_CreateFriendInviteToken_Response {
	optional string invite_token = 1;
	optional uint64 invite_limit = 2;
	optional uint64 invite_duration = 3;
	optional fixed32 time_created = 4;
	optional bool valid = 5;
}

message CUserAccount_GetAccountLinkStatus_Request {
}

message CUserAccount_GetAccountLinkStatus_Response {
	optional uint32 pwid = 1;
	optional uint32 identity_verification = 2;
	optional bool performed_age_verification = 3;
}

message CUserAccount_GetAvailableValveDiscountPromotions_Request {
	optional string country_code = 1;
}

message CUserAccount_GetAvailableValveDiscountPromotions_Response {
	repeated .CUserAccount_GetAvailableValveDiscountPromotions_Response_ValveDiscountPromotionDetails promotions = 1;
}

message CUserAccount_GetAvailableValveDiscountPromotions_Response_ValveDiscountPromotionDetails {
	optional uint32 promotionid = 1;
	optional string promotion_description = 2;
	optional int64 minimum_cart_amount = 3;
	optional int64 minimum_cart_amount_for_display = 4;
	optional int64 discount_amount = 5;
	optional int32 currency_code = 6;
	optional int32 available_use_count = 7;
	optional int32 promotional_discount_type = 8;
	optional int32 loyalty_reward_id = 9;
	optional string localized_name_token = 10;
	optional int32 max_use_count = 11;
}

message CUserAccount_GetClientWalletDetails_Request {
	optional bool include_balance_in_usd = 1;
	optional int32 wallet_region = 2 [default = 1];
	optional bool include_formatted_balance = 3;
}

message CUserAccount_GetFriendInviteTokens_Request {
}

message CUserAccount_GetFriendInviteTokens_Response {
	repeated .CUserAccount_CreateFriendInviteToken_Response tokens = 1;
}

message CUserAccount_GetUserCountry_Request {
	optional fixed64 steamid = 1;
}

message CUserAccount_GetUserCountry_Response {
	optional string country = 1;
}

message CUserAccount_GetWalletDetails_Response {
	optional bool has_wallet = 1;
	optional string user_country_code = 2;
	optional string wallet_country_code = 3;
	optional string wallet_state = 4;
	optional int64 balance = 5;
	optional int64 delayed_balance = 6;
	optional int32 currency_code = 7;
	optional uint32 time_most_recent_txn = 8;
	optional uint64 most_recent_txnid = 9;
	optional int64 balance_in_usd = 10;
	optional int64 delayed_balance_in_usd = 11;
	optional bool has_wallet_in_other_regions = 12;
	repeated int32 other_regions = 13;
	optional string formatted_balance = 14;
	optional string formatted_delayed_balance = 15;
	optional int32 delayed_balance_available_min_time = 16;
	optional int32 delayed_balance_available_max_time = 17;
	optional int32 delayed_balance_newest_source = 18;
}

message CUserAccount_RedeemFriendInviteToken_Request {
	optional fixed64 steamid = 1;
	optional string invite_token = 2;
}

message CUserAccount_RedeemFriendInviteToken_Response {
}

message CUserAccount_RegisterCompatTool_Request {
	optional uint32 compat_tool = 1;
}

message CUserAccount_RegisterCompatTool_Response {
}

message CUserAccount_RevokeFriendInviteToken_Request {
	optional string invite_token = 1;
}

message CUserAccount_RevokeFriendInviteToken_Response {
}

message CUserAccount_ViewFriendInviteToken_Request {
	optional fixed64 steamid = 1;
	optional string invite_token = 2;
}

message CUserAccount_ViewFriendInviteToken_Response {
	optional bool valid = 1;
	optional uint64 steamid = 2;
	optional uint64 invite_duration = 3;
}

service UserAccount {
	// ePrivilege=1
	rpc CancelLicenseForApp (.CUserAccount_CancelLicenseForApp_Request) returns (.CUserAccount_CancelLicenseForApp_Response);
	// ePrivilege=3
	rpc CreateFriendInviteToken (.CUserAccount_CreateFriendInviteToken_Request) returns (.CUserAccount_CreateFriendInviteToken_Response);
	// ePrivilege=1
	rpc GetAccountLinkStatus (.CUserAccount_GetAccountLinkStatus_Request) returns (.CUserAccount_GetAccountLinkStatus_Response);
	// bConstMethod=true, ePrivilege=2, eWebAPIKeyRequirement=1
	rpc GetAvailableValveDiscountPromotions (.CUserAccount_GetAvailableValveDiscountPromotions_Request) returns (.CUserAccount_GetAvailableValveDiscountPromotions_Response);
	// ePrivilege=1
	rpc GetClientWalletDetails (.CUserAccount_GetClientWalletDetails_Request) returns (.CUserAccount_GetWalletDetails_Response);
	// ePrivilege=1
	rpc GetFriendInviteTokens (.CUserAccount_GetFriendInviteTokens_Request) returns (.CUserAccount_GetFriendInviteTokens_Response);
	// ePrivilege=1
	rpc GetUserCountry (.CUserAccount_GetUserCountry_Request) returns (.CUserAccount_GetUserCountry_Response);
	// ePrivilege=1
	rpc RedeemFriendInviteToken (.CUserAccount_RedeemFriendInviteToken_Request) returns (.CUserAccount_RedeemFriendInviteToken_Response);
	// ePrivilege=1
	rpc RegisterCompatTool (.CUserAccount_RegisterCompatTool_Request) returns (.CUserAccount_RegisterCompatTool_Response);
	// ePrivilege=1
	rpc RevokeFriendInviteToken (.CUserAccount_RevokeFriendInviteToken_Request) returns (.CUserAccount_RevokeFriendInviteToken_Response);
	// ePrivilege=1
	rpc ViewFriendInviteToken (.CUserAccount_ViewFriendInviteToken_Request) returns (.CUserAccount_ViewFriendInviteToken_Response);
}

