Skip to content

Commit

Permalink
https://docs.microsoft.com/en-us/gaming/playfab/release-notes/#240105
Browse files Browse the repository at this point in the history
  • Loading branch information
PlayFab SDK Team authored and PlayFab SDK Team committed Jan 9, 2024
2 parents e450285 + a0b318d commit 09d31eb
Show file tree
Hide file tree
Showing 25 changed files with 781 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
namespace PlayFab.PfEditor { public static partial class PlayFabEditorHelper { public static string EDEX_VERSION = "2.183.231124"; } }
namespace PlayFab.PfEditor { public static partial class PlayFabEditorHelper { public static string EDEX_VERSION = "2.185.240105"; } }
102 changes: 101 additions & 1 deletion ExampleMacProject/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,31 @@ public class AdCampaignSegmentFilter : PlayFabBaseModel
public SegmentFilterComparison? Comparison;
}

[Serializable]
public class AddInventoryItemsV2SegmentAction : PlayFabBaseModel
{
/// <summary>
/// Amount of the item to be granted to a player
/// </summary>
public int? Amount;
/// <summary>
/// The collection id for where the item will be granted in the player inventory
/// </summary>
public string CollectionId;
/// <summary>
/// The duration in seconds of the subscription to be granted to a player
/// </summary>
public int? DurationInSeconds;
/// <summary>
/// The id of item to be granted to the player
/// </summary>
public string ItemId;
/// <summary>
/// The stack id for where the item will be granted in the player inventory
/// </summary>
public string StackId;
}

[Serializable]
public class AddInventoryItemV2Content : PlayFabBaseModel
{
Expand Down Expand Up @@ -1499,6 +1524,23 @@ public class DeleteContentRequest : PlayFabRequestCommon
public string Key;
}

[Serializable]
public class DeleteInventoryItemsV2SegmentAction : PlayFabBaseModel
{
/// <summary>
/// The collection id for where the item will be removed from the player inventory
/// </summary>
public string CollectionId;
/// <summary>
/// The id of item to be removed from the player
/// </summary>
public string ItemId;
/// <summary>
/// The stack id for where the item will be removed from the player inventory
/// </summary>
public string StackId;
}

[Serializable]
public class DeleteInventoryItemV2Content : PlayFabBaseModel
{
Expand Down Expand Up @@ -2568,6 +2610,8 @@ public enum GenericErrorCodes
LeaderboardColumnLengthMismatch,
InvalidStatisticScore,
LeaderboardColumnsNotSpecified,
LeaderboardMaxSizeTooLarge,
InvalidAttributeStatisticsSpecified,
MatchmakingEntityInvalid,
MatchmakingPlayerAttributesInvalid,
MatchmakingQueueNotFound,
Expand Down Expand Up @@ -2611,6 +2655,7 @@ public enum GenericErrorCodes
CatalogItemTypeInvalid,
CatalogBadRequest,
CatalogTooManyRequests,
InvalidCatalogItemConfiguration,
ExportInvalidStatusUpdate,
ExportInvalidPrefix,
ExportBlobContainerDoesNotExist,
Expand Down Expand Up @@ -2742,6 +2787,8 @@ public enum GenericErrorCodes
EventSinkAadNotFound,
EventSinkDatabaseNotFound,
EventSinkTitleUnauthorized,
EventSinkInsufficientRoleAssignment,
EventSinkContainerNotFound,
OperationCanceled,
InvalidDisplayNameRandomSuffixLength,
AllowNonUniquePlayerDisplayNamesDisableNotAllowed,
Expand All @@ -2764,7 +2811,23 @@ public enum GenericErrorCodes
AddonDoesntExist,
CopilotDisabled,
CopilotInvalidRequest,
TrueSkillUnauthorized
TrueSkillUnauthorized,
TrueSkillBadRequest,
TrueSkillMatchResultAlreadySubmitted,
TrueSkillDuplicatePlayerInMatchResult,
TrueSkillInvalidRanksInMatchResult,
TrueSkillNoWinnerInMatchResult,
TrueSkillMissingRequiredConditionInMatchResult,
TrueSkillMissingRequiredEventInMatchResult,
TrueSkillUnknownEventInMatchResult,
TrueSkillUnknownConditionName,
TrueSkillUnknownConditionValue,
TrueSkillUnknownScenarioId,
TrueSkillUnknownModelId,
TrueSkillNoActiveModelInScenario,
StateShareUnauthorized,
StateShareStateNotFound,
StateShareLinkNotFound
}

[Serializable]
Expand Down Expand Up @@ -5906,11 +5969,19 @@ public enum SegmentPushNotificationDevicePlatform
[Serializable]
public class SegmentTrigger : PlayFabBaseModel
{
/// <summary>
/// Add inventory item v2 segment trigger action.
/// </summary>
public AddInventoryItemsV2SegmentAction AddInventoryItemsV2Action;
/// <summary>
/// Ban player segment trigger action.
/// </summary>
public BanPlayerSegmentAction BanPlayerAction;
/// <summary>
/// Delete inventory item v2 segment trigger action.
/// </summary>
public DeleteInventoryItemsV2SegmentAction DeleteInventoryItemsV2Action;
/// <summary>
/// Delete player segment trigger action.
/// </summary>
public DeletePlayerSegmentAction DeletePlayerAction;
Expand Down Expand Up @@ -5946,6 +6017,10 @@ public class SegmentTrigger : PlayFabBaseModel
/// Push notification segment trigger action.
/// </summary>
public PushNotificationSegmentAction PushNotificationAction;
/// <summary>
/// Subtract inventory item v2 segment trigger action.
/// </summary>
public SubtractInventoryItemsV2SegmentAction SubtractInventoryItemsV2Action;
}

/// <summary>
Expand Down Expand Up @@ -6373,6 +6448,31 @@ public enum SubscriptionProviderStatus
PaymentPending
}

[Serializable]
public class SubtractInventoryItemsV2SegmentAction : PlayFabBaseModel
{
/// <summary>
/// Amount of the item to removed from the player
/// </summary>
public int? Amount;
/// <summary>
/// The collection id for where the item will be removed from the player inventory
/// </summary>
public string CollectionId;
/// <summary>
/// The duration in seconds to be removed from the subscription in the players inventory
/// </summary>
public int? DurationInSeconds;
/// <summary>
/// The id of item to be removed from the player
/// </summary>
public string ItemId;
/// <summary>
/// The stack id for where the item will be removed from the player inventory
/// </summary>
public string StackId;
}

[Serializable]
public class SubtractInventoryItemV2Content : PlayFabBaseModel
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,14 @@ public partial class PlayFabEvents
public event PlayFabResultEvent<JoinLobbyResult> OnMultiplayerJoinArrangedLobbyResultEvent;
public event PlayFabRequestEvent<JoinLobbyRequest> OnMultiplayerJoinLobbyRequestEvent;
public event PlayFabResultEvent<JoinLobbyResult> OnMultiplayerJoinLobbyResultEvent;
public event PlayFabRequestEvent<JoinLobbyAsServerRequest> OnMultiplayerJoinLobbyAsServerRequestEvent;
public event PlayFabResultEvent<JoinLobbyAsServerResult> OnMultiplayerJoinLobbyAsServerResultEvent;
public event PlayFabRequestEvent<JoinMatchmakingTicketRequest> OnMultiplayerJoinMatchmakingTicketRequestEvent;
public event PlayFabResultEvent<JoinMatchmakingTicketResult> OnMultiplayerJoinMatchmakingTicketResultEvent;
public event PlayFabRequestEvent<LeaveLobbyRequest> OnMultiplayerLeaveLobbyRequestEvent;
public event PlayFabResultEvent<LobbyEmptyResult> OnMultiplayerLeaveLobbyResultEvent;
public event PlayFabRequestEvent<LeaveLobbyAsServerRequest> OnMultiplayerLeaveLobbyAsServerRequestEvent;
public event PlayFabResultEvent<LobbyEmptyResult> OnMultiplayerLeaveLobbyAsServerResultEvent;
public event PlayFabRequestEvent<ListMultiplayerServersRequest> OnMultiplayerListArchivedMultiplayerServersRequestEvent;
public event PlayFabResultEvent<ListMultiplayerServersResponse> OnMultiplayerListArchivedMultiplayerServersResultEvent;
public event PlayFabRequestEvent<ListAssetSummariesRequest> OnMultiplayerListAssetSummariesRequestEvent;
Expand Down Expand Up @@ -165,6 +169,8 @@ public partial class PlayFabEvents
public event PlayFabResultEvent<EmptyResponse> OnMultiplayerUpdateBuildRegionsResultEvent;
public event PlayFabRequestEvent<UpdateLobbyRequest> OnMultiplayerUpdateLobbyRequestEvent;
public event PlayFabResultEvent<LobbyEmptyResult> OnMultiplayerUpdateLobbyResultEvent;
public event PlayFabRequestEvent<UpdateLobbyAsServerRequest> OnMultiplayerUpdateLobbyAsServerRequestEvent;
public event PlayFabResultEvent<LobbyEmptyResult> OnMultiplayerUpdateLobbyAsServerResultEvent;
public event PlayFabRequestEvent<UploadCertificateRequest> OnMultiplayerUploadCertificateRequestEvent;
public event PlayFabResultEvent<EmptyResponse> OnMultiplayerUploadCertificateResultEvent;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,19 @@ public static void JoinLobby(JoinLobbyRequest request, Action<JoinLobbyResult> r
PlayFabHttp.MakeApiCall("/Lobby/JoinLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
}

/// <summary>
/// Preview: Join a lobby as a server entity. This is restricted to client lobbies which are using connections.
/// </summary>
public static void JoinLobbyAsServer(JoinLobbyAsServerRequest request, Action<JoinLobbyAsServerResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
{
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
var callSettings = PlayFabSettings.staticSettings;
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");


PlayFabHttp.MakeApiCall("/Lobby/JoinLobbyAsServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
}

/// <summary>
/// Join a matchmaking ticket.
/// </summary>
Expand All @@ -664,6 +677,19 @@ public static void LeaveLobby(LeaveLobbyRequest request, Action<LobbyEmptyResult
PlayFabHttp.MakeApiCall("/Lobby/LeaveLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
}

/// <summary>
/// Preview: Request for server to leave a lobby. This is restricted to client owned lobbies which are using connections.
/// </summary>
public static void LeaveLobbyAsServer(LeaveLobbyAsServerRequest request, Action<LobbyEmptyResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
{
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
var callSettings = PlayFabSettings.staticSettings;
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");


PlayFabHttp.MakeApiCall("/Lobby/LeaveLobbyAsServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
}

/// <summary>
/// Lists archived multiplayer server sessions for a build.
/// </summary>
Expand Down Expand Up @@ -1083,6 +1109,21 @@ public static void UpdateLobby(UpdateLobbyRequest request, Action<LobbyEmptyResu
PlayFabHttp.MakeApiCall("/Lobby/UpdateLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
}

/// <summary>
/// Preview: Update fields related to a joined server in the lobby the server is in. Servers can keep a lobby from expiring
/// by being the one to "update" the lobby in some way. Servers have no impact on last member leave/last member disconnect
/// behavior.
/// </summary>
public static void UpdateLobbyAsServer(UpdateLobbyAsServerRequest request, Action<LobbyEmptyResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
{
var context = (request == null ? null : request.AuthenticationContext) ?? PlayFabSettings.staticPlayer;
var callSettings = PlayFabSettings.staticSettings;
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");


PlayFabHttp.MakeApiCall("/Lobby/UpdateLobbyAsServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
}

/// <summary>
/// Uploads a multiplayer server game certificate.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,17 @@ public void JoinLobby(JoinLobbyRequest request, Action<JoinLobbyResult> resultCa
PlayFabHttp.MakeApiCall("/Lobby/JoinLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
}

/// <summary>
/// Preview: Join a lobby as a server entity. This is restricted to client lobbies which are using connections.
/// </summary>
public void JoinLobbyAsServer(JoinLobbyAsServerRequest request, Action<JoinLobbyAsServerResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
{
var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext;
var callSettings = apiSettings ?? PlayFabSettings.staticSettings;
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
PlayFabHttp.MakeApiCall("/Lobby/JoinLobbyAsServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
}

/// <summary>
/// Join a matchmaking ticket.
/// </summary>
Expand All @@ -587,6 +598,17 @@ public void LeaveLobby(LeaveLobbyRequest request, Action<LobbyEmptyResult> resul
PlayFabHttp.MakeApiCall("/Lobby/LeaveLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
}

/// <summary>
/// Preview: Request for server to leave a lobby. This is restricted to client owned lobbies which are using connections.
/// </summary>
public void LeaveLobbyAsServer(LeaveLobbyAsServerRequest request, Action<LobbyEmptyResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
{
var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext;
var callSettings = apiSettings ?? PlayFabSettings.staticSettings;
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
PlayFabHttp.MakeApiCall("/Lobby/LeaveLobbyAsServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
}

/// <summary>
/// Lists archived multiplayer server sessions for a build.
/// </summary>
Expand Down Expand Up @@ -942,6 +964,19 @@ public void UpdateLobby(UpdateLobbyRequest request, Action<LobbyEmptyResult> res
PlayFabHttp.MakeApiCall("/Lobby/UpdateLobby", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
}

/// <summary>
/// Preview: Update fields related to a joined server in the lobby the server is in. Servers can keep a lobby from expiring
/// by being the one to "update" the lobby in some way. Servers have no impact on last member leave/last member disconnect
/// behavior.
/// </summary>
public void UpdateLobbyAsServer(UpdateLobbyAsServerRequest request, Action<LobbyEmptyResult> resultCallback, Action<PlayFabError> errorCallback, object customData = null, Dictionary<string, string> extraHeaders = null)
{
var context = (request == null ? null : request.AuthenticationContext) ?? authenticationContext;
var callSettings = apiSettings ?? PlayFabSettings.staticSettings;
if (!context.IsEntityLoggedIn()) throw new PlayFabException(PlayFabExceptionCode.NotLoggedIn,"Must be logged in to call this method");
PlayFabHttp.MakeApiCall("/Lobby/UpdateLobbyAsServer", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
}

/// <summary>
/// Uploads a multiplayer server game certificate.
/// </summary>
Expand Down
Loading

0 comments on commit 09d31eb

Please sign in to comment.