@@ -21,9 +21,9 @@ if(!PlayFab.settings) {
2121if ( ! PlayFab . _internalSettings ) {
2222 PlayFab . _internalSettings = {
2323 entityToken : null ,
24- sdkVersion : "1.63.200402 " ,
24+ sdkVersion : "1.64.200421 " ,
2525 requestGetParams : {
26- sdk : "JavaScriptSDK-1.63.200402 "
26+ sdk : "JavaScriptSDK-1.64.200421 "
2727 } ,
2828 sessionTicket : null ,
2929 verticalName : null , // The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this
@@ -231,8 +231,8 @@ if(!PlayFab._internalSettings) {
231231 }
232232}
233233
234- PlayFab . buildIdentifier = "jbuild_javascriptsdk__sdk-genericslave-3_1 " ;
235- PlayFab . sdkVersion = "1.63.200402 " ;
234+ PlayFab . buildIdentifier = "jbuild_javascriptsdk__sdk-genericslave-3_2 " ;
235+ PlayFab . sdkVersion = "1.64.200421 " ;
236236PlayFab . GenerateErrorReport = function ( error ) {
237237 if ( error == null )
238238 return "" ;
@@ -328,6 +328,10 @@ PlayFab.ClientApi = {
328328 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/GetAccountInfo" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
329329 } ,
330330
331+ GetAdPlacements : function ( request , callback , customData , extraHeaders ) {
332+ return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/GetAdPlacements" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
333+ } ,
334+
331335 GetAllUsersCharacters : function ( request , callback , customData , extraHeaders ) {
332336 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/GetAllUsersCharacters" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
333337 } ,
@@ -576,6 +580,10 @@ PlayFab.ClientApi = {
576580 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/LinkKongregate" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
577581 } ,
578582
583+ LinkNintendoSwitchAccount : function ( request , callback , customData , extraHeaders ) {
584+ return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/LinkNintendoSwitchAccount" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
585+ } ,
586+
579587 LinkNintendoSwitchDeviceId : function ( request , callback , customData , extraHeaders ) {
580588 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/LinkNintendoSwitchDeviceId" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
581589 } ,
@@ -854,6 +862,31 @@ PlayFab.ClientApi = {
854862 return new Promise ( function ( resolve ) { resolve ( authenticationContext ) ; } ) ;
855863 } ,
856864
865+ LoginWithNintendoSwitchAccount : function ( request , callback , customData , extraHeaders ) {
866+ request . TitleId = PlayFab . settings . titleId ? PlayFab . settings . titleId : request . TitleId ; if ( ! request . TitleId ) throw PlayFab . _internalSettings . errorTitleId ;
867+ // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
868+ // Deep-copy the authenticationContext here to safely update it
869+ var authenticationContext = JSON . parse ( JSON . stringify ( PlayFab . _internalSettings . authenticationContext ) ) ;
870+ var overloadCallback = function ( result , error ) {
871+ if ( result != null ) {
872+ if ( result . data . SessionTicket != null ) {
873+ PlayFab . _internalSettings . sessionTicket = result . data . SessionTicket ;
874+ }
875+ if ( result . data . EntityToken != null ) {
876+ PlayFab . _internalSettings . entityToken = result . data . EntityToken . EntityToken ;
877+ }
878+ // Apply the updates for the AuthenticationContext returned to the client
879+ authenticationContext = PlayFab . _internalSettings . UpdateAuthenticationContext ( authenticationContext , result ) ;
880+ PlayFab . ClientApi . _MultiStepClientLogin ( result . data . SettingsForUser . NeedsAttribution ) ;
881+ }
882+ if ( callback != null && typeof ( callback ) === "function" )
883+ callback ( result , error ) ;
884+ } ;
885+ PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/LoginWithNintendoSwitchAccount" , request , null , overloadCallback , customData , extraHeaders ) ;
886+ // Return a Promise so that multiple asynchronous calls to this method can be handled simultaneously with Promise.all()
887+ return new Promise ( function ( resolve ) { resolve ( authenticationContext ) ; } ) ;
888+ } ,
889+
857890 LoginWithNintendoSwitchDeviceId : function ( request , callback , customData , extraHeaders ) {
858891 request . TitleId = PlayFab . settings . titleId ? PlayFab . settings . titleId : request . TitleId ; if ( ! request . TitleId ) throw PlayFab . _internalSettings . errorTitleId ;
859892 // PlayFab._internalSettings.authenticationContext can be modified by other asynchronous login attempts
@@ -1139,6 +1172,10 @@ PlayFab.ClientApi = {
11391172 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/RemoveSharedGroupMembers" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
11401173 } ,
11411174
1175+ ReportAdActivity : function ( request , callback , customData , extraHeaders ) {
1176+ return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/ReportAdActivity" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
1177+ } ,
1178+
11421179 ReportDeviceInfo : function ( request , callback , customData , extraHeaders ) {
11431180 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/ReportDeviceInfo" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
11441181 } ,
@@ -1151,6 +1188,10 @@ PlayFab.ClientApi = {
11511188 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/RestoreIOSPurchases" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
11521189 } ,
11531190
1191+ RewardAdActivity : function ( request , callback , customData , extraHeaders ) {
1192+ return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/RewardAdActivity" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
1193+ } ,
1194+
11541195 SendAccountRecoveryEmail : function ( request , callback , customData , extraHeaders ) {
11551196 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/SendAccountRecoveryEmail" , request , null , callback , customData , extraHeaders ) ;
11561197 } ,
@@ -1211,6 +1252,10 @@ PlayFab.ClientApi = {
12111252 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/UnlinkKongregate" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
12121253 } ,
12131254
1255+ UnlinkNintendoSwitchAccount : function ( request , callback , customData , extraHeaders ) {
1256+ return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/UnlinkNintendoSwitchAccount" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
1257+ } ,
1258+
12141259 UnlinkNintendoSwitchDeviceId : function ( request , callback , customData , extraHeaders ) {
12151260 return PlayFab . _internalSettings . ExecuteRequestWrapper ( "/Client/UnlinkNintendoSwitchDeviceId" , request , "X-Authorization" , callback , customData , extraHeaders ) ;
12161261 } ,
0 commit comments