@@ -14,9 +14,9 @@ if(!PlayFab.settings) {
1414if ( ! PlayFab . _internalSettings ) {
1515 PlayFab . _internalSettings = {
1616 entityToken : null ,
17- sdkVersion : "1.189.250328 " ,
17+ sdkVersion : "1.190.250428 " ,
1818 requestGetParams : {
19- sdk : "JavaScriptSDK-1.189.250328 "
19+ sdk : "JavaScriptSDK-1.190.250428 "
2020 } ,
2121 sessionTicket : null ,
2222 verticalName : null , // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
@@ -223,8 +223,8 @@ if(!PlayFab._internalSettings) {
223223 }
224224}
225225
226- PlayFab . buildIdentifier = "adobuild_javascriptsdk_116 " ;
227- PlayFab . sdkVersion = "1.189.250328 " ;
226+ PlayFab . buildIdentifier = "adobuild_javascriptsdk_8 " ;
227+ PlayFab . sdkVersion = "1.190.250428 " ;
228228PlayFab . GenerateErrorReport = function ( error ) {
229229 if ( error == null )
230230 return "" ;
@@ -429,6 +429,10 @@ PlayFab.ClientApi = {
429429 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/GetPlayerTrades" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
430430 } ,
431431
432+ GetPlayFabIDsFromBattleNetAccountIds : function ( request , callback , customData , extraHeaders ) {
433+ return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/GetPlayFabIDsFromBattleNetAccountIds" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
434+ } ,
435+
432436 GetPlayFabIDsFromFacebookIDs : function ( request , callback , customData , extraHeaders ) {
433437 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/GetPlayFabIDsFromFacebookIDs" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
434438 } ,
@@ -557,6 +561,10 @@ PlayFab.ClientApi = {
557561 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/LinkApple" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
558562 } ,
559563
564+ LinkBattleNet : function ( request , callback , customData , extraHeaders ) {
565+ return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/LinkBattleNet" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
566+ } ,
567+
560568 LinkCustomID : function ( request , callback , customData , extraHeaders ) {
561569 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/LinkCustomID" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
562570 } ,
@@ -669,6 +677,30 @@ PlayFab.ClientApi = {
669677 return new Promise ( function ( resolve ) { resolve ( authenticationContext ) ; } ) ;
670678 } ,
671679
680+ LoginWithBattleNet : function ( request , callback , customData , extraHeaders ) {
681+ request . TitleId = PlayFab . settings . titleId ? PlayFab . settings . titleId : request . TitleId ; if ( ! request . TitleId ) throw PlayFab . _internalSettings . errorTitleId ;
682+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
683+ // Deep-copy the authenticationContext here to safely update it
684+ var authenticationContext = JSON . parse ( JSON . stringify ( PlayFab . _internalSettings . authenticationContext ) ) ;
685+ var overloadCallback = function ( result , error ) {
686+ if ( result != null ) {
687+ if ( result . data . SessionTicket != null ) {
688+ PlayFab . _internalSettings . sessionTicket = result . data . SessionTicket ;
689+ }
690+ if ( result . data . EntityToken != null ) {
691+ PlayFab . _internalSettings . entityToken = result . data . EntityToken . EntityToken ;
692+ }
693+ // Apply the updates for the AuthenticationContext returned to the client
694+ authenticationContext = PlayFab . _internalSettings . UpdateAuthenticationContext ( authenticationContext , result ) ;
695+ }
696+ if ( callback != null && typeof ( callback ) === "function" )
697+ callback ( result , error ) ;
698+ } ;
699+ PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/LoginWithBattleNet" , request , null , overloadCallback , customData , extraHeaders ) ;
700+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
701+ return new Promise ( function ( resolve ) { resolve ( authenticationContext ) ; } ) ;
702+ } ,
703+
672704 LoginWithCustomID : function ( request , callback , customData , extraHeaders ) {
673705 request . TitleId = PlayFab . settings . titleId ? PlayFab . settings . titleId : request . TitleId ; if ( ! request . TitleId ) throw PlayFab . _internalSettings . errorTitleId ;
674706 // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
@@ -1187,6 +1219,10 @@ PlayFab.ClientApi = {
11871219 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/UnlinkApple" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
11881220 } ,
11891221
1222+ UnlinkBattleNet : function ( request , callback , customData , extraHeaders ) {
1223+ return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/UnlinkBattleNet" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
1224+ } ,
1225+
11901226 UnlinkCustomID : function ( request , callback , customData , extraHeaders ) {
11911227 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/UnlinkCustomID" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
11921228 } ,
0 commit comments