diff --git a/PlayFabSdk/Scripts/PlayFab/PlayFab.js b/PlayFabSdk/Scripts/PlayFab/PlayFab.js index 1e73c23..89738f7 100644 --- a/PlayFabSdk/Scripts/PlayFab/PlayFab.js +++ b/PlayFabSdk/Scripts/PlayFab/PlayFab.js @@ -3,8 +3,8 @@ var url = require("url"); var https = require("https"); -exports.sdk_version = "2.100.220718"; -exports.buildIdentifier = "adobuild_nodesdk_118"; +exports.sdk_version = "2.101.220801"; +exports.buildIdentifier = "adobuild_nodesdk_116"; var settings = (exports.settings = { productionUrl: ".playfabapi.com", @@ -19,7 +19,7 @@ var _internalSettings = (exports._internalSettings = { entityToken: null, sessionTicket: null, requestGetParams: { - sdk: "JavaScriptSDK-2.100.220718", + sdk: "JavaScriptSDK-2.101.220801", }, }); diff --git a/PlayFabSdk/Scripts/PlayFab/PlayFabClient.js b/PlayFabSdk/Scripts/PlayFab/PlayFabClient.js index 220995d..827118c 100644 --- a/PlayFabSdk/Scripts/PlayFab/PlayFabClient.js +++ b/PlayFabSdk/Scripts/PlayFab/PlayFabClient.js @@ -1694,6 +1694,28 @@ exports.LoginWithGoogleAccount = function (request, callback) { ); }; +exports.LoginWithGooglePlayGamesServices = function (request, callback) { + request.TitleId = request.titleId != null ? request.TitleId : PlayFab.settings.titleId; + if (request.TitleId == null) { + throw "Must be have PlayFab.settings.titleId set to call this method"; + } + PlayFab.MakeRequest( + PlayFab.GetServerUrl() + "/Client/LoginWithGooglePlayGamesServices", + request, + null, + null, + function (error, result) { + if (result != null && result.data != null) { + PlayFab._internalSettings.sessionTicket = result.data.hasOwnProperty("SessionTicket") ? result.data.SessionTicket : PlayFab._internalSettings.sessionTicket; + PlayFab._internalSettings.entityToken = result.data.hasOwnProperty("EntityToken") ? result.data.EntityToken.EntityToken : PlayFab._internalSettings.entityToken; + } + if (callback != null) { + callback(error, result); + } + }, + ); +}; + exports.LoginWithIOSDeviceID = function (request, callback) { request.TitleId = request.titleId != null ? request.TitleId : PlayFab.settings.titleId; if (request.TitleId == null) { diff --git a/PlayFabSdk/Scripts/typings/PlayFab/PlayFabAdmin.d.ts b/PlayFabSdk/Scripts/typings/PlayFab/PlayFabAdmin.d.ts index 345a860..a13a530 100644 --- a/PlayFabSdk/Scripts/typings/PlayFab/PlayFabAdmin.d.ts +++ b/PlayFabSdk/Scripts/typings/PlayFab/PlayFabAdmin.d.ts @@ -2367,6 +2367,7 @@ declare module PlayFabAdminModels { | "AutomationInvalidRuleName" | "AutomationRuleAlreadyExists" | "AutomationRuleLimitExceeded" + | "InvalidGooglePlayGamesServerAuthCode" | "MatchmakingEntityInvalid" | "MatchmakingPlayerAttributesInvalid" | "MatchmakingQueueNotFound" @@ -3221,7 +3222,8 @@ declare module PlayFabAdminModels { | "FacebookInstantGames" | "OpenIdConnect" | "Apple" - | "NintendoSwitchAccount"; + | "NintendoSwitchAccount" + | "GooglePlayGames"; export interface LogStatement { // Optional object accompanying the message as contextual information @@ -4898,6 +4900,8 @@ declare module PlayFabAdminModels { GameCenterInfo?: UserGameCenterInfo; // User Google account information, if a Google account has been linked GoogleInfo?: UserGoogleInfo; + // User Google Play Games account information, if a Google Play Games account has been linked + GooglePlayGamesInfo?: UserGooglePlayGamesInfo; // User iOS device information, if an iOS device has been linked IosDeviceInfo?: UserIosDeviceInfo; // User Kongregate account information, if a Kongregate account has been linked @@ -4984,6 +4988,15 @@ declare module PlayFabAdminModels { GoogleName?: string; } + export interface UserGooglePlayGamesInfo { + // Avatar image url of the Google Play Games player + GooglePlayGamesPlayerAvatarImageUrl?: string; + // Display name of the Google Play Games player + GooglePlayGamesPlayerDisplayName?: string; + // Google Play Games player ID + GooglePlayGamesPlayerId?: string; + } + export interface UserIosDeviceInfo { // iOS device ID IosDeviceId?: string; @@ -5037,7 +5050,8 @@ declare module PlayFabAdminModels { | "FacebookInstantGamesId" | "OpenIdConnect" | "Apple" - | "NintendoSwitchAccount"; + | "NintendoSwitchAccount" + | "GooglePlayGames"; export interface UserOriginationSegmentFilter { // User login provider. diff --git a/PlayFabSdk/Scripts/typings/PlayFab/PlayFabAuthentication.d.ts b/PlayFabSdk/Scripts/typings/PlayFab/PlayFabAuthentication.d.ts index f779041..9fd378e 100644 --- a/PlayFabSdk/Scripts/typings/PlayFab/PlayFabAuthentication.d.ts +++ b/PlayFabSdk/Scripts/typings/PlayFab/PlayFabAuthentication.d.ts @@ -82,7 +82,8 @@ declare module PlayFabAuthenticationModels { | "FacebookInstantGames" | "OpenIdConnect" | "Apple" - | "NintendoSwitchAccount"; + | "NintendoSwitchAccount" + | "GooglePlayGames"; export interface ValidateEntityTokenRequest extends PlayFabModule.IPlayFabRequestCommon { // The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). diff --git a/PlayFabSdk/Scripts/typings/PlayFab/PlayFabClient.d.ts b/PlayFabSdk/Scripts/typings/PlayFab/PlayFabClient.d.ts index b3fb3a4..3d7b91a 100644 --- a/PlayFabSdk/Scripts/typings/PlayFab/PlayFabClient.d.ts +++ b/PlayFabSdk/Scripts/typings/PlayFab/PlayFabClient.d.ts @@ -645,6 +645,12 @@ declare module PlayFabClientModule { request: PlayFabClientModels.LoginWithGoogleAccountRequest | null, callback: PlayFabModule.ApiCallback | null, ): void; + // Signs the user in using their Google Play Games account credentials + // https://docs.microsoft.com/rest/api/playfab/client/authentication/loginwithgoogleplaygamesservices + LoginWithGooglePlayGamesServices( + request: PlayFabClientModels.LoginWithGooglePlayGamesServicesRequest | null, + callback: PlayFabModule.ApiCallback | null, + ): void; // Signs the user in using the vendor-specific iOS device identifier, returning a session identifier that can subsequently // be used for API calls which require an authenticated user // https://docs.microsoft.com/rest/api/playfab/client/authentication/loginwithiosdeviceid @@ -3219,7 +3225,8 @@ declare module PlayFabClientModels { | "FacebookInstantGames" | "OpenIdConnect" | "Apple" - | "NintendoSwitchAccount"; + | "NintendoSwitchAccount" + | "GooglePlayGames"; export interface LoginResult extends PlayFabModule.IPlayFabResultCommon { // If LoginTitlePlayerAccountEntity flag is set on the login request the title_player_account will also be logged in and @@ -3396,6 +3403,25 @@ declare module PlayFabClientModels { TitleId?: string; } + export interface LoginWithGooglePlayGamesServicesRequest extends PlayFabModule.IPlayFabRequestCommon { + // Automatically create a PlayFab account if one is not currently linked to this ID. + CreateAccount?: boolean; + // The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). + CustomTags?: { [key: string]: string | null }; + // Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only). + EncryptedRequest?: string; + // Flags for which pieces of info to return for the user. + InfoRequestParameters?: GetPlayerCombinedInfoRequestParams; + // Player secret that is used to verify API request signatures (Enterprise Only). + PlayerSecret?: string; + // OAuth 2.0 server authentication code obtained on the client by calling the requestServerSideAccess() + // (https://developers.google.com/games/services/android/signin) Google Play Games client API. + ServerAuthCode?: string; + // Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a + // title has been selected. + TitleId?: string; + } + export interface LoginWithIOSDeviceIDRequest extends PlayFabModule.IPlayFabRequestCommon { // Automatically create a PlayFab account if one is not currently linked to this ID. CreateAccount?: boolean; @@ -4676,6 +4702,8 @@ declare module PlayFabClientModels { GameCenterInfo?: UserGameCenterInfo; // User Google account information, if a Google account has been linked GoogleInfo?: UserGoogleInfo; + // User Google Play Games account information, if a Google Play Games account has been linked + GooglePlayGamesInfo?: UserGooglePlayGamesInfo; // User iOS device information, if an iOS device has been linked IosDeviceInfo?: UserIosDeviceInfo; // User Kongregate account information, if a Kongregate account has been linked @@ -4762,6 +4790,15 @@ declare module PlayFabClientModels { GoogleName?: string; } + export interface UserGooglePlayGamesInfo { + // Avatar image url of the Google Play Games player + GooglePlayGamesPlayerAvatarImageUrl?: string; + // Display name of the Google Play Games player + GooglePlayGamesPlayerDisplayName?: string; + // Google Play Games player ID + GooglePlayGamesPlayerId?: string; + } + export interface UserIosDeviceInfo { // iOS device ID IosDeviceId?: string; @@ -4815,7 +4852,8 @@ declare module PlayFabClientModels { | "FacebookInstantGamesId" | "OpenIdConnect" | "Apple" - | "NintendoSwitchAccount"; + | "NintendoSwitchAccount" + | "GooglePlayGames"; export interface UserPrivateAccountInfo { // user email address diff --git a/PlayFabSdk/Scripts/typings/PlayFab/PlayFabCloudScript.d.ts b/PlayFabSdk/Scripts/typings/PlayFab/PlayFabCloudScript.d.ts index 2afd9f0..038d287 100644 --- a/PlayFabSdk/Scripts/typings/PlayFab/PlayFabCloudScript.d.ts +++ b/PlayFabSdk/Scripts/typings/PlayFab/PlayFabCloudScript.d.ts @@ -564,7 +564,8 @@ declare module PlayFabCloudScriptModels { | "FacebookInstantGames" | "OpenIdConnect" | "Apple" - | "NintendoSwitchAccount"; + | "NintendoSwitchAccount" + | "GooglePlayGames"; export interface LogStatement { // Optional object accompanying the message as contextual information diff --git a/PlayFabSdk/Scripts/typings/PlayFab/PlayFabMultiplayer.d.ts b/PlayFabSdk/Scripts/typings/PlayFab/PlayFabMultiplayer.d.ts index 60395ad..9fb85fa 100644 --- a/PlayFabSdk/Scripts/typings/PlayFab/PlayFabMultiplayer.d.ts +++ b/PlayFabSdk/Scripts/typings/PlayFab/PlayFabMultiplayer.d.ts @@ -2280,6 +2280,8 @@ declare module PlayFabMultiplayerModels { } export interface MatchmakingQueueConfig { + // This is the buildAlias that will be used to allocate the multiplayer server for the match. + BuildAliasParams?: BuildAliasParams; // This is the buildId that will be used to allocate the multiplayer server for the match. BuildId?: string; // List of difference rules used to find an optimal match. diff --git a/PlayFabSdk/Scripts/typings/PlayFab/PlayFabServer.d.ts b/PlayFabSdk/Scripts/typings/PlayFab/PlayFabServer.d.ts index 3fa6f3b..ead2b38 100644 --- a/PlayFabSdk/Scripts/typings/PlayFab/PlayFabServer.d.ts +++ b/PlayFabSdk/Scripts/typings/PlayFab/PlayFabServer.d.ts @@ -2333,6 +2333,7 @@ declare module PlayFabServerModels { | "AutomationInvalidRuleName" | "AutomationRuleAlreadyExists" | "AutomationRuleLimitExceeded" + | "InvalidGooglePlayGamesServerAuthCode" | "MatchmakingEntityInvalid" | "MatchmakingPlayerAttributesInvalid" | "MatchmakingQueueNotFound" @@ -3461,7 +3462,8 @@ declare module PlayFabServerModels { | "FacebookInstantGames" | "OpenIdConnect" | "Apple" - | "NintendoSwitchAccount"; + | "NintendoSwitchAccount" + | "GooglePlayGames"; export interface LoginWithServerCustomIdRequest extends PlayFabModule.IPlayFabRequestCommon { // Automatically create a PlayFab account if one is not currently linked to this ID. @@ -4666,6 +4668,8 @@ declare module PlayFabServerModels { GameCenterInfo?: UserGameCenterInfo; // User Google account information, if a Google account has been linked GoogleInfo?: UserGoogleInfo; + // User Google Play Games account information, if a Google Play Games account has been linked + GooglePlayGamesInfo?: UserGooglePlayGamesInfo; // User iOS device information, if an iOS device has been linked IosDeviceInfo?: UserIosDeviceInfo; // User Kongregate account information, if a Kongregate account has been linked @@ -4752,6 +4756,15 @@ declare module PlayFabServerModels { GoogleName?: string; } + export interface UserGooglePlayGamesInfo { + // Avatar image url of the Google Play Games player + GooglePlayGamesPlayerAvatarImageUrl?: string; + // Display name of the Google Play Games player + GooglePlayGamesPlayerDisplayName?: string; + // Google Play Games player ID + GooglePlayGamesPlayerId?: string; + } + export interface UserIosDeviceInfo { // iOS device ID IosDeviceId?: string; @@ -4805,7 +4818,8 @@ declare module PlayFabServerModels { | "FacebookInstantGamesId" | "OpenIdConnect" | "Apple" - | "NintendoSwitchAccount"; + | "NintendoSwitchAccount" + | "GooglePlayGames"; export interface UserPrivateAccountInfo { // user email address diff --git a/PlayFabSdk/package-lock.json b/PlayFabSdk/package-lock.json index 717abee..29a6049 100644 --- a/PlayFabSdk/package-lock.json +++ b/PlayFabSdk/package-lock.json @@ -1,12 +1,12 @@ { "name": "playfab-sdk", - "version": "2.100.220718", + "version": "2.101.220801", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "playfab-sdk", - "version": "2.100.220718", + "version": "2.101.220801", "license": "Apache-2.0", "devDependencies": { "@types/node": "^9.6.55", diff --git a/PlayFabSdk/package.json b/PlayFabSdk/package.json index d4f0d2d..2c7fd48 100644 --- a/PlayFabSdk/package.json +++ b/PlayFabSdk/package.json @@ -1,6 +1,6 @@ { "name": "playfab-sdk", - "version": "2.100.220718", + "version": "2.101.220801", "description": "Playfab SDK for node.js applications", "license": "Apache-2.0", "devDependencies": {