Skip to content

Commit

Permalink
https://docs.microsoft.com/en-us/gaming/playfab/release-notes/#240426
Browse files Browse the repository at this point in the history
  • Loading branch information
PlayFab SDK Team authored and PlayFab SDK Team committed Apr 30, 2024
2 parents d0daab0 + 9e4068a commit b044e7c
Show file tree
Hide file tree
Showing 32 changed files with 1,106 additions and 140 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.192.240412"; } }
namespace PlayFab.PfEditor { public static partial class PlayFabEditorHelper { public static string EDEX_VERSION = "2.193.240426"; } }
78 changes: 57 additions & 21 deletions ExampleMacProject/Assets/PlayFabSDK/Admin/PlayFabAdminModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,6 @@ public class BanInfo : PlayFabBaseModel
/// </summary>
public DateTime? Expires;
/// <summary>
/// Whether or not the Microsoft family members are included in the ban.
/// </summary>
public bool? IncludeMicrosoftFamily;
/// <summary>
/// The IP address on which the ban was applied. May affect multiple players.
/// </summary>
public string IPAddress;
Expand All @@ -424,6 +420,10 @@ public class BanInfo : PlayFabBaseModel
/// The reason why this ban was applied.
/// </summary>
public string Reason;
/// <summary>
/// The family type of the suer that is included in the ban.
/// </summary>
public string UserFamilyType;
}

[Serializable]
Expand Down Expand Up @@ -463,10 +463,6 @@ public class BanRequest : PlayFabBaseModel
/// </summary>
public uint? DurationInHours;
/// <summary>
/// Whether the Microsoft family members should be included in the ban. May affect multiple players.
/// </summary>
public bool? IncludeMicrosoftFamily;
/// <summary>
/// IP address to be banned. May affect multiple players.
/// </summary>
public string IPAddress;
Expand All @@ -478,6 +474,10 @@ public class BanRequest : PlayFabBaseModel
/// The reason for this ban. Maximum 140 characters.
/// </summary>
public string Reason;
/// <summary>
/// The family type of the user that should be included in the ban if applicable. May affect multiple players.
/// </summary>
public UserFamilyType? UserFamilyType;
}

/// <summary>
Expand Down Expand Up @@ -2627,6 +2627,12 @@ public enum GenericErrorCodes
NoLinkedStatisticToLeaderboard,
StatDefinitionAlreadyLinkedToLeaderboard,
LinkingStatsNotAllowedForEntityType,
LeaderboardCountLimitExceeded,
LeaderboardSizeLimitExceeded,
LeaderboardDefinitionModificationNotAllowedWhileLinked,
StatisticDefinitionModificationNotAllowedWhileLinked,
LeaderboardUpdateNotAllowedWhileLinked,
CloudScriptAzureFunctionsEventHubRequestError,
MatchmakingEntityInvalid,
MatchmakingPlayerAttributesInvalid,
MatchmakingQueueNotFound,
Expand Down Expand Up @@ -2827,29 +2833,52 @@ public enum GenericErrorCodes
CopilotDisabled,
CopilotInvalidRequest,
TrueSkillUnauthorized,
TrueSkillBadRequest,
TrueSkillInvalidTitleId,
TrueSkillInvalidScenarioId,
TrueSkillInvalidModelId,
TrueSkillInvalidModelName,
TrueSkillInvalidPlayerIds,
TrueSkillInvalidEntityKey,
TrueSkillInvalidConditionKey,
TrueSkillInvalidConditionValue,
TrueSkillInvalidConditionAffinityWeight,
TrueSkillInvalidEventName,
TrueSkillMatchResultCreated,
TrueSkillMatchResultAlreadySubmitted,
TrueSkillBadPlayerIdInMatchResult,
TrueSkillInvalidBotIdInMatchResult,
TrueSkillDuplicatePlayerInMatchResult,
TrueSkillInvalidRanksInMatchResult,
TrueSkillNoWinnerInMatchResult,
TrueSkillMissingRequiredCondition,
TrueSkillMissingRequiredEvent,
TrueSkillUnknownEventName,
TrueSkillUnknownConditionKey,
TrueSkillUnknownConditionValue,
TrueSkillUnknownModelId,
TrueSkillNoPlayerInMatchResultTeam,
TrueSkillPlayersInMatchResultExceedingLimit,
TrueSkillInvalidPreMatchPartyInMatchResult,
TrueSkillInvalidTimestampInMatchResult,
TrueSkillStartTimeMissingInMatchResult,
TrueSkillEndTimeMissingInMatchResult,
TrueSkillInvalidPlayerSecondsPlayedInMatchResult,
TrueSkillNoTeamInMatchResult,
TrueSkillNotEnoughTeamsInMatchResult,
TrueSkillInvalidRanksInMatchResult,
TrueSkillNoWinnerInMatchResult,
TrueSkillMissingRequiredCondition,
TrueSkillMissingRequiredEvent,
TrueSkillUnknownEventName,
TrueSkillInvalidEventCount,
TrueSkillUnknownConditionKey,
TrueSkillUnknownConditionValue,
TrueSkillScenarioConfigDoesNotExist,
TrueSkillUnknownModelId,
TrueSkillNoModelInScenario,
TrueSkillNotSupportedForTitle,
TrueSkillModelIsNotActive,
TrueSkillUnauthorizedToQueryOtherPlayerSkills,
TrueSkillInvalidMaxIterations,
TrueSkillEndTimeBeforeStartTime,
TrueSkillInvalidJobId,
TrueSkillInvalidMetadataId,
TrueSkillMissingBuildVerison,
TrueSkillJobAlreadyExists,
TrueSkillJobNotFound,
TrueSkillOperationCanceled,
StateShareUnauthorized,
StateShareStateNotFound,
StateShareLinkNotFound
Expand Down Expand Up @@ -6676,10 +6705,6 @@ public class UpdateBanRequest : PlayFabBaseModel
/// </summary>
public DateTime? Expires;
/// <summary>
/// The updated decision to ban the Microsoft family members to be updated. Null for no change.
/// </summary>
public bool? IncludeMicrosoftFamily;
/// <summary>
/// The updated IP address for the ban. Null for no change.
/// </summary>
public string IPAddress;
Expand All @@ -6691,6 +6716,10 @@ public class UpdateBanRequest : PlayFabBaseModel
/// The updated reason for the ban to be updated. Maximum 140 characters. Null for no change.
/// </summary>
public string Reason;
/// <summary>
/// The updated family type of the user that should be included in the ban. Null for no change.
/// </summary>
public UserFamilyType? UserFamilyType;
}

/// <summary>
Expand Down Expand Up @@ -7341,6 +7370,13 @@ public class UserFacebookInstantGamesIdInfo : PlayFabBaseModel
public string FacebookInstantGamesId;
}

public enum UserFamilyType
{
None,
Xbox,
Steam
}

[Serializable]
public class UserGameCenterInfo : PlayFabBaseModel
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,19 @@ public static void GetFunction(GetFunctionRequest request, Action<GetFunctionRes
PlayFabHttp.MakeApiCall("/CloudScript/GetFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
}

/// <summary>
/// Lists all currently registered Event Hub triggered Azure Functions for a given title.
/// </summary>
public static void ListEventHubFunctions(ListFunctionsRequest request, Action<ListEventHubFunctionsResult> 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("/CloudScript/ListEventHubFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
}

/// <summary>
/// Lists all currently registered Azure Functions for a given title.
/// </summary>
Expand Down Expand Up @@ -172,6 +185,19 @@ public static void PostFunctionResultForScheduledTask(PostFunctionResultForSched
PlayFabHttp.MakeApiCall("/CloudScript/PostFunctionResultForScheduledTask", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
}

/// <summary>
/// Registers an event hub triggered Azure Function with a title.
/// </summary>
public static void RegisterEventHubFunction(RegisterEventHubFunctionRequest request, Action<EmptyResult> 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("/CloudScript/RegisterEventHubFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings);
}

/// <summary>
/// Registers an HTTP triggered Azure function with a title.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@ public void GetFunction(GetFunctionRequest request, Action<GetFunctionResult> re
PlayFabHttp.MakeApiCall("/CloudScript/GetFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
}

/// <summary>
/// Lists all currently registered Event Hub triggered Azure Functions for a given title.
/// </summary>
public void ListEventHubFunctions(ListFunctionsRequest request, Action<ListEventHubFunctionsResult> 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("/CloudScript/ListEventHubFunctions", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
}

/// <summary>
/// Lists all currently registered Azure Functions for a given title.
/// </summary>
Expand Down Expand Up @@ -163,6 +174,17 @@ public void PostFunctionResultForScheduledTask(PostFunctionResultForScheduledTas
PlayFabHttp.MakeApiCall("/CloudScript/PostFunctionResultForScheduledTask", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
}

/// <summary>
/// Registers an event hub triggered Azure Function with a title.
/// </summary>
public void RegisterEventHubFunction(RegisterEventHubFunctionRequest request, Action<EmptyResult> 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("/CloudScript/RegisterEventHubFunction", request, AuthType.EntityToken, resultCallback, errorCallback, customData, extraHeaders, context, callSettings, this);
}

/// <summary>
/// Registers an HTTP triggered Azure function with a title.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,23 @@ public class EntityKey : PlayFabBaseModel
public string Type;
}

[Serializable]
public class EventHubFunctionModel : PlayFabBaseModel
{
/// <summary>
/// The connection string for the event hub.
/// </summary>
public string ConnectionString;
/// <summary>
/// The name of the event hub that triggers the Azure Function.
/// </summary>
public string EventHubName;
/// <summary>
/// The name the function was registered under.
/// </summary>
public string FunctionName;
}

[Serializable]
public class ExecuteCloudScriptResult : PlayFabResultCommon
{
Expand Down Expand Up @@ -587,6 +604,15 @@ public class LinkedPlatformAccountModel : PlayFabBaseModel
public string Username;
}

[Serializable]
public class ListEventHubFunctionsResult : PlayFabResultCommon
{
/// <summary>
/// The list of EventHub triggered functions that are currently registered for the title.
/// </summary>
public List<EventHubFunctionModel> Functions;
}

/// <summary>
/// A title can have many functions, ListHttpFunctions will return a list of all the currently registered HTTP triggered
/// functions for a given title.
Expand Down Expand Up @@ -960,6 +986,31 @@ public class QueuedFunctionModel : PlayFabBaseModel
public string QueueName;
}

/// <summary>
/// A title can have many functions, RegisterEventHubFunction associates a function name with an event hub name and
/// connection string.
/// </summary>
[Serializable]
public class RegisterEventHubFunctionRequest : PlayFabRequestCommon
{
/// <summary>
/// A connection string for the namespace of the event hub for the Azure Function.
/// </summary>
public string ConnectionString;
/// <summary>
/// The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
/// </summary>
public Dictionary<string,string> CustomTags;
/// <summary>
/// The name of the event hub for the Azure Function.
/// </summary>
public string EventHubName;
/// <summary>
/// The name of the function to register
/// </summary>
public string FunctionName;
}

[Serializable]
public class RegisterHttpFunctionRequest : PlayFabRequestCommon
{
Expand Down Expand Up @@ -1094,7 +1145,8 @@ public class TagModel : PlayFabBaseModel
public enum TriggerType
{
HTTP,
Queue
Queue,
EventHub
}

[Serializable]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public partial class PlayFabEvents
public event PlayFabResultEvent<ExecuteFunctionResult> OnCloudScriptExecuteFunctionResultEvent;
public event PlayFabRequestEvent<GetFunctionRequest> OnCloudScriptGetFunctionRequestEvent;
public event PlayFabResultEvent<GetFunctionResult> OnCloudScriptGetFunctionResultEvent;
public event PlayFabRequestEvent<ListFunctionsRequest> OnCloudScriptListEventHubFunctionsRequestEvent;
public event PlayFabResultEvent<ListEventHubFunctionsResult> OnCloudScriptListEventHubFunctionsResultEvent;
public event PlayFabRequestEvent<ListFunctionsRequest> OnCloudScriptListFunctionsRequestEvent;
public event PlayFabResultEvent<ListFunctionsResult> OnCloudScriptListFunctionsResultEvent;
public event PlayFabRequestEvent<ListFunctionsRequest> OnCloudScriptListHttpFunctionsRequestEvent;
Expand All @@ -25,6 +27,8 @@ public partial class PlayFabEvents
public event PlayFabResultEvent<EmptyResult> OnCloudScriptPostFunctionResultForPlayerTriggeredActionResultEvent;
public event PlayFabRequestEvent<PostFunctionResultForScheduledTaskRequest> OnCloudScriptPostFunctionResultForScheduledTaskRequestEvent;
public event PlayFabResultEvent<EmptyResult> OnCloudScriptPostFunctionResultForScheduledTaskResultEvent;
public event PlayFabRequestEvent<RegisterEventHubFunctionRequest> OnCloudScriptRegisterEventHubFunctionRequestEvent;
public event PlayFabResultEvent<EmptyResult> OnCloudScriptRegisterEventHubFunctionResultEvent;
public event PlayFabRequestEvent<RegisterHttpFunctionRequest> OnCloudScriptRegisterHttpFunctionRequestEvent;
public event PlayFabResultEvent<EmptyResult> OnCloudScriptRegisterHttpFunctionResultEvent;
public event PlayFabRequestEvent<RegisterQueuedFunctionRequest> OnCloudScriptRegisterQueuedFunctionRequestEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ public class CatalogConfig : PlayFabBaseModel
/// </summary>
public List<string> Platforms;
/// <summary>
/// The set of configuration that only applies to Ratings and Reviews.
/// </summary>
public ReviewConfig Review;
/// <summary>
/// A set of player entity keys that are allowed to review content. There is a maximum of 128 entities that can be added.
/// </summary>
public List<EntityKey> ReviewerEntities;
Expand Down Expand Up @@ -395,6 +399,15 @@ public class CatalogSpecificConfig : PlayFabBaseModel
public List<string> Tags;
}

[Serializable]
public class CategoryRatingConfig : PlayFabBaseModel
{
/// <summary>
/// Name of the category.
/// </summary>
public string Name;
}

public enum ConcernCategory
{
None,
Expand Down Expand Up @@ -2320,7 +2333,7 @@ public class RedeemPlayStationStoreInventoryItemsRequest : PlayFabRequestCommon
/// </summary>
public EntityKey Entity;
/// <summary>
/// Redirect URI supplied to PlayStation :tm: Network when requesting an auth code
/// Redirect URI supplied to PlayStation :tm: Network when requesting an auth code.
/// </summary>
public string RedirectUri;
/// <summary>
Expand Down Expand Up @@ -2499,6 +2512,10 @@ public class ReportItemReviewResponse : PlayFabResultCommon
[Serializable]
public class Review : PlayFabBaseModel
{
/// <summary>
/// The star rating associated with each selected category in this review.
/// </summary>
public Dictionary<string,int> CategoryRatings;
/// <summary>
/// The number of negative helpfulness votes for this review.
/// </summary>
Expand Down Expand Up @@ -2553,6 +2570,15 @@ public class Review : PlayFabBaseModel
public string Title;
}

[Serializable]
public class ReviewConfig : PlayFabBaseModel
{
/// <summary>
/// A set of categories that can be applied toward ratings and reviews.
/// </summary>
public List<CategoryRatingConfig> CategoryRatings;
}

[Serializable]
public class ReviewItemRequest : PlayFabRequestCommon
{
Expand Down
Loading

0 comments on commit b044e7c

Please sign in to comment.