You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

250 lines
9.1 KiB

syntax = "proto2";
import "steammessages_base.proto";
import "steammessages_unified_base.proto";
option py_generic_services = true;
enum EInternalAccountType {
k_EInternalSteamAccountType = 1;
k_EInternalClanType = 2;
k_EInternalAppType = 3;
k_EInternalBroadcastChannelType = 4;
}
enum EExternalAccountType {
k_EExternalNone = 0;
k_EExternalSteamAccount = 1;
k_EExternalGoogleAccount = 2;
k_EExternalFacebookAccount = 3;
k_EExternalTwitterAccount = 4;
k_EExternalTwitchAccount = 5;
k_EExternalYouTubeChannelAccount = 6;
k_EExternalFacebookPage = 7;
}
message CUserAccount_GetAvailableValveDiscountPromotions_Request {
optional string country_code = 1;
}
message CUserAccount_GetAvailableValveDiscountPromotions_Response {
message 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;
}
repeated .CUserAccount_GetAvailableValveDiscountPromotions_Response.ValveDiscountPromotionDetails promotions = 1;
}
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_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;
}
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_CancelLicenseForApp_Request {
optional uint32 appid = 1;
}
message CUserAccount_CancelLicenseForApp_Response {
}
message CUserAccount_GetUserCountry_Request {
optional fixed64 steamid = 1;
}
message CUserAccount_GetUserCountry_Response {
optional string country = 1;
}
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_GetFriendInviteTokens_Request {
}
message CUserAccount_GetFriendInviteTokens_Response {
repeated .CUserAccount_CreateFriendInviteToken_Response tokens = 1;
}
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;
}
message CUserAccount_RedeemFriendInviteToken_Request {
optional fixed64 steamid = 1;
optional string invite_token = 2;
}
message CUserAccount_RedeemFriendInviteToken_Response {
}
message CUserAccount_RevokeFriendInviteToken_Request {
optional string invite_token = 1;
}
message CUserAccount_RevokeFriendInviteToken_Response {
}
message CUserAccount_RegisterCompatTool_Request {
optional uint32 compat_tool = 1;
}
message CUserAccount_RegisterCompatTool_Response {
}
message CAccountLinking_GetLinkedAccountInfo_Request {
optional .EInternalAccountType account_type = 1 [default = k_EInternalSteamAccountType];
optional uint64 account_id = 2 [(description) = "Internal account ID"];
optional .EExternalAccountType filter = 3 [default = k_EExternalNone, (description) = "if specified then only return this external account type"];
optional bool return_access_token = 4 [(description) = "if provided and true, then returns valid access token if available. It may refresh the token. "];
}
message CAccountLinking_GetLinkedAccountInfo_Response {
message CExternalAccountTuple_Response {
optional .EExternalAccountType external_type = 1 [default = k_EExternalNone];
optional string external_id = 2 [(description) = "unique external account identifier"];
optional string external_user_name = 3 [(description) = "user readable; best effort"];
optional string external_url = 4 [(description) = "required for all, can be a sentinal to verify correctness"];
optional string access_token = 5 [(description) = "provided if requeest and it was valid."];
optional string access_token_secret = 6 [(description) = "required for OAuth v1 and signing the message, provided with access token."];
optional bool is_valid = 7 [(description) = "If false, it means access token no longer work (expired, disconnected) and the link is now broken. Inform user to refresh."];
}
repeated .CAccountLinking_GetLinkedAccountInfo_Response.CExternalAccountTuple_Response external_accounts = 1;
}
message CEmbeddedClient_AuthorizeCurrentDevice_Request {
optional fixed64 steamid = 1;
optional uint32 appid = 2;
optional string device_info = 3;
optional uint32 deviceid = 4;
}
message CEmbeddedClient_Token {
optional fixed64 steamid = 1;
optional bytes client_token = 2;
optional uint32 expiry = 3;
optional uint32 deviceid = 4;
}
message CEmbeddedClient_AuthorizeDevice_Response {
optional uint32 result = 1;
optional .CEmbeddedClient_Token token = 2;
}
service UserAccount {
option (service_description) = "A service to get user account information";
rpc GetAvailableValveDiscountPromotions (.CUserAccount_GetAvailableValveDiscountPromotions_Request) returns (.CUserAccount_GetAvailableValveDiscountPromotions_Response) {
option (method_description) = "Gets the available promotional discounts available to the user";
}
rpc GetClientWalletDetails (.CUserAccount_GetClientWalletDetails_Request) returns (.CUserAccount_GetWalletDetails_Response) {
option (method_description) = "Returns balance and details about any users wallet";
}
rpc GetAccountLinkStatus (.CUserAccount_GetAccountLinkStatus_Request) returns (.CUserAccount_GetAccountLinkStatus_Response) {
option (method_description) = "Fetches account link status";
}
rpc CancelLicenseForApp (.CUserAccount_CancelLicenseForApp_Request) returns (.CUserAccount_CancelLicenseForApp_Response) {
option (method_description) = "Cancels a free license for a user";
}
rpc GetUserCountry (.CUserAccount_GetUserCountry_Request) returns (.CUserAccount_GetUserCountry_Response) {
option (method_description) = "Get the country code associated with the passed steamid (only available for logged-in user or support)";
}
rpc CreateFriendInviteToken (.CUserAccount_CreateFriendInviteToken_Request) returns (.CUserAccount_CreateFriendInviteToken_Response) {
option (method_description) = "Create a limited-use token that can be used to create a friend request";
}
rpc GetFriendInviteTokens (.CUserAccount_GetFriendInviteTokens_Request) returns (.CUserAccount_GetFriendInviteTokens_Response) {
option (method_description) = "Get the set of active tokens for the user";
}
rpc ViewFriendInviteToken (.CUserAccount_ViewFriendInviteToken_Request) returns (.CUserAccount_ViewFriendInviteToken_Response) {
option (method_description) = "View details about an invite token ";
}
rpc RedeemFriendInviteToken (.CUserAccount_RedeemFriendInviteToken_Request) returns (.CUserAccount_RedeemFriendInviteToken_Response) {
option (method_description) = "Create a friend relationship using the given invite token";
}
rpc RevokeFriendInviteToken (.CUserAccount_RevokeFriendInviteToken_Request) returns (.CUserAccount_RevokeFriendInviteToken_Response) {
option (method_description) = "Revoke an active friend invite token";
}
rpc RegisterCompatTool (.CUserAccount_RegisterCompatTool_Request) returns (.CUserAccount_RegisterCompatTool_Response) {
option (method_description) = "Register intended account usage of a tool";
}
}
service AccountLinking {
option (service_description) = "A service to manage and link to external accounts";
rpc GetLinkedAccountInfo (.CAccountLinking_GetLinkedAccountInfo_Request) returns (.CAccountLinking_GetLinkedAccountInfo_Response) {
option (method_description) = "List all my active linked external accounts; may be requested to return the access token";
}
}
service EmbeddedClient {
option (service_description) = "Service to authorize and manage Steam functions directly embedded in games";
rpc AuthorizeCurrentDevice (.CEmbeddedClient_AuthorizeCurrentDevice_Request) returns (.CEmbeddedClient_AuthorizeDevice_Response) {
option (method_description) = "Use a logged-in (password/etc) session to create a durable access token";
}
}