Skip to content

Commit

Permalink
https://docs.microsoft.com/en-us/gaming/playfab/release-notes/#230901
Browse files Browse the repository at this point in the history
  • Loading branch information
PlayFab SDK Team authored and PlayFab SDK Team committed Sep 4, 2023
2 parents 6c0c449 + b095894 commit 348c7a6
Show file tree
Hide file tree
Showing 14 changed files with 232 additions and 13 deletions.
2 changes: 2 additions & 0 deletions code/include/playfab/PlayFabAdminApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ namespace PlayFab
static void CreateSegment(AdminModels::CreateSegmentRequest& request, const ProcessApiCallback<AdminModels::CreateSegmentResponse> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void DeleteContent(AdminModels::DeleteContentRequest& request, const ProcessApiCallback<AdminModels::BlankResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void DeleteMasterPlayerAccount(AdminModels::DeleteMasterPlayerAccountRequest& request, const ProcessApiCallback<AdminModels::DeleteMasterPlayerAccountResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void DeleteMasterPlayerEventData(AdminModels::DeleteMasterPlayerEventDataRequest& request, const ProcessApiCallback<AdminModels::DeleteMasterPlayerEventDataResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void DeleteMembershipSubscription(AdminModels::DeleteMembershipSubscriptionRequest& request, const ProcessApiCallback<AdminModels::DeleteMembershipSubscriptionResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void DeleteOpenIdConnection(AdminModels::DeleteOpenIdConnectionRequest& request, const ProcessApiCallback<AdminModels::EmptyResponse> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void DeletePlayer(AdminModels::DeletePlayerRequest& request, const ProcessApiCallback<AdminModels::DeletePlayerResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
Expand Down Expand Up @@ -167,6 +168,7 @@ namespace PlayFab
static void OnCreateSegmentResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnDeleteContentResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnDeleteMasterPlayerAccountResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnDeleteMasterPlayerEventDataResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnDeleteMembershipSubscriptionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnDeleteOpenIdConnectionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnDeletePlayerResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
Expand Down
77 changes: 76 additions & 1 deletion code/include/playfab/PlayFabAdminDataModels.h
Original file line number Diff line number Diff line change
Expand Up @@ -5523,6 +5523,7 @@ namespace PlayFab
GenericErrorCodesNamespaceMismatch,
GenericErrorCodesInvalidServiceConfiguration,
GenericErrorCodesInvalidNamespaceMismatch,
GenericErrorCodesLeaderboardColumnLengthMismatch,
GenericErrorCodesMatchmakingEntityInvalid,
GenericErrorCodesMatchmakingPlayerAttributesInvalid,
GenericErrorCodesMatchmakingQueueNotFound,
Expand Down Expand Up @@ -8459,6 +8460,11 @@ namespace PlayFab
output = Json::Value("InvalidNamespaceMismatch");
return;
}
if (input == GenericErrorCodes::GenericErrorCodesLeaderboardColumnLengthMismatch)
{
output = Json::Value("LeaderboardColumnLengthMismatch");
return;
}
if (input == GenericErrorCodes::GenericErrorCodesMatchmakingEntityInvalid)
{
output = Json::Value("MatchmakingEntityInvalid");
Expand Down Expand Up @@ -12147,6 +12153,11 @@ namespace PlayFab
output = GenericErrorCodes::GenericErrorCodesInvalidNamespaceMismatch;
return;
}
if (inputStr == "LeaderboardColumnLengthMismatch")
{
output = GenericErrorCodes::GenericErrorCodesLeaderboardColumnLengthMismatch;
return;
}
if (inputStr == "MatchmakingEntityInvalid")
{
output = GenericErrorCodes::GenericErrorCodesMatchmakingEntityInvalid;
Expand Down Expand Up @@ -18359,7 +18370,8 @@ namespace PlayFab
SegmentLoginIdentityProviderFacebookInstantGames,
SegmentLoginIdentityProviderOpenIdConnect,
SegmentLoginIdentityProviderApple,
SegmentLoginIdentityProviderNintendoSwitchAccount
SegmentLoginIdentityProviderNintendoSwitchAccount,
SegmentLoginIdentityProviderGooglePlayGames
};

inline void ToJsonEnum(const SegmentLoginIdentityProvider input, Json::Value& output)
Expand Down Expand Up @@ -18469,6 +18481,11 @@ namespace PlayFab
output = Json::Value("NintendoSwitchAccount");
return;
}
if (input == SegmentLoginIdentityProvider::SegmentLoginIdentityProviderGooglePlayGames)
{
output = Json::Value("GooglePlayGames");
return;
}
}
inline void FromJsonEnum(const Json::Value& input, SegmentLoginIdentityProvider& output)
{
Expand Down Expand Up @@ -18582,6 +18599,11 @@ namespace PlayFab
output = SegmentLoginIdentityProvider::SegmentLoginIdentityProviderNintendoSwitchAccount;
return;
}
if (inputStr == "GooglePlayGames")
{
output = SegmentLoginIdentityProvider::SegmentLoginIdentityProviderGooglePlayGames;
return;
}
}

enum class SegmentPushNotificationDevicePlatform
Expand Down Expand Up @@ -23091,6 +23113,59 @@ namespace PlayFab
}
};

struct DeleteMasterPlayerEventDataRequest : public PlayFabRequestCommon
{
std::string PlayFabId;

DeleteMasterPlayerEventDataRequest() :
PlayFabRequestCommon(),
PlayFabId()
{}

DeleteMasterPlayerEventDataRequest(const DeleteMasterPlayerEventDataRequest& src) :
PlayFabRequestCommon(),
PlayFabId(src.PlayFabId)
{}

~DeleteMasterPlayerEventDataRequest() = default;

void FromJson(const Json::Value& input) override
{
FromJsonUtilS(input["PlayFabId"], PlayFabId);
}

Json::Value ToJson() const override
{
Json::Value output;
Json::Value each_PlayFabId; ToJsonUtilS(PlayFabId, each_PlayFabId); output["PlayFabId"] = each_PlayFabId;
return output;
}
};

struct DeleteMasterPlayerEventDataResult : public PlayFabResultCommon
{

DeleteMasterPlayerEventDataResult() :
PlayFabResultCommon()
{}

DeleteMasterPlayerEventDataResult(const DeleteMasterPlayerEventDataResult&) :
PlayFabResultCommon()
{}

~DeleteMasterPlayerEventDataResult() = default;

void FromJson(const Json::Value&) override
{
}

Json::Value ToJson() const override
{
Json::Value output;
return output;
}
};

struct DeleteMembershipSubscriptionRequest : public PlayFabRequestCommon
{
std::map<std::string, std::string> CustomTags;
Expand Down
2 changes: 2 additions & 0 deletions code/include/playfab/PlayFabAdminInstanceApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ namespace PlayFab
void CreateSegment(AdminModels::CreateSegmentRequest& request, const ProcessApiCallback<AdminModels::CreateSegmentResponse> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void DeleteContent(AdminModels::DeleteContentRequest& request, const ProcessApiCallback<AdminModels::BlankResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void DeleteMasterPlayerAccount(AdminModels::DeleteMasterPlayerAccountRequest& request, const ProcessApiCallback<AdminModels::DeleteMasterPlayerAccountResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void DeleteMasterPlayerEventData(AdminModels::DeleteMasterPlayerEventDataRequest& request, const ProcessApiCallback<AdminModels::DeleteMasterPlayerEventDataResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void DeleteMembershipSubscription(AdminModels::DeleteMembershipSubscriptionRequest& request, const ProcessApiCallback<AdminModels::DeleteMembershipSubscriptionResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void DeleteOpenIdConnection(AdminModels::DeleteOpenIdConnectionRequest& request, const ProcessApiCallback<AdminModels::EmptyResponse> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void DeletePlayer(AdminModels::DeletePlayerRequest& request, const ProcessApiCallback<AdminModels::DeletePlayerResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
Expand Down Expand Up @@ -181,6 +182,7 @@ namespace PlayFab
void OnCreateSegmentResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnDeleteContentResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnDeleteMasterPlayerAccountResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnDeleteMasterPlayerEventDataResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnDeleteMembershipSubscriptionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnDeleteOpenIdConnectionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnDeletePlayerResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
Expand Down
29 changes: 29 additions & 0 deletions code/include/playfab/PlayFabEconomyDataModels.h
Original file line number Diff line number Diff line change
Expand Up @@ -7278,6 +7278,30 @@ namespace PlayFab
}
};

struct PurchaseOverridesInfo : public PlayFabBaseModel
{

PurchaseOverridesInfo() :
PlayFabBaseModel()
{}

PurchaseOverridesInfo(const PurchaseOverridesInfo&) :
PlayFabBaseModel()
{}

~PurchaseOverridesInfo() = default;

void FromJson(const Json::Value&) override
{
}

Json::Value ToJson() const override
{
Json::Value output;
return output;
}
};

struct RedeemAppleAppStoreInventoryItemsRequest : public PlayFabRequestCommon
{
std::string CollectionId;
Expand Down Expand Up @@ -8748,13 +8772,15 @@ namespace PlayFab
std::string GivingETag;
std::list<std::string> GivingTransactionIds;
std::string IdempotencyId;
std::string OperationStatus;
std::list<std::string> ReceivingTransactionIds;

TransferInventoryItemsResponse() :
PlayFabResultCommon(),
GivingETag(),
GivingTransactionIds(),
IdempotencyId(),
OperationStatus(),
ReceivingTransactionIds()
{}

Expand All @@ -8763,6 +8789,7 @@ namespace PlayFab
GivingETag(src.GivingETag),
GivingTransactionIds(src.GivingTransactionIds),
IdempotencyId(src.IdempotencyId),
OperationStatus(src.OperationStatus),
ReceivingTransactionIds(src.ReceivingTransactionIds)
{}

Expand All @@ -8773,6 +8800,7 @@ namespace PlayFab
FromJsonUtilS(input["GivingETag"], GivingETag);
FromJsonUtilS(input["GivingTransactionIds"], GivingTransactionIds);
FromJsonUtilS(input["IdempotencyId"], IdempotencyId);
FromJsonUtilS(input["OperationStatus"], OperationStatus);
FromJsonUtilS(input["ReceivingTransactionIds"], ReceivingTransactionIds);
}

Expand All @@ -8782,6 +8810,7 @@ namespace PlayFab
Json::Value each_GivingETag; ToJsonUtilS(GivingETag, each_GivingETag); output["GivingETag"] = each_GivingETag;
Json::Value each_GivingTransactionIds; ToJsonUtilS(GivingTransactionIds, each_GivingTransactionIds); output["GivingTransactionIds"] = each_GivingTransactionIds;
Json::Value each_IdempotencyId; ToJsonUtilS(IdempotencyId, each_IdempotencyId); output["IdempotencyId"] = each_IdempotencyId;
Json::Value each_OperationStatus; ToJsonUtilS(OperationStatus, each_OperationStatus); output["OperationStatus"] = each_OperationStatus;
Json::Value each_ReceivingTransactionIds; ToJsonUtilS(ReceivingTransactionIds, each_ReceivingTransactionIds); output["ReceivingTransactionIds"] = each_ReceivingTransactionIds;
return output;
}
Expand Down
1 change: 1 addition & 0 deletions code/include/playfab/PlayFabError.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ namespace PlayFab
PlayFabErrorNamespaceMismatch = 1559,
PlayFabErrorInvalidServiceConfiguration = 1560,
PlayFabErrorInvalidNamespaceMismatch = 1561,
PlayFabErrorLeaderboardColumnLengthMismatch = 1562,
PlayFabErrorMatchmakingEntityInvalid = 2001,
PlayFabErrorMatchmakingPlayerAttributesInvalid = 2002,
PlayFabErrorMatchmakingQueueNotFound = 2016,
Expand Down
11 changes: 11 additions & 0 deletions code/include/playfab/PlayFabServerDataModels.h
Original file line number Diff line number Diff line change
Expand Up @@ -5507,6 +5507,7 @@ namespace PlayFab
GenericErrorCodesNamespaceMismatch,
GenericErrorCodesInvalidServiceConfiguration,
GenericErrorCodesInvalidNamespaceMismatch,
GenericErrorCodesLeaderboardColumnLengthMismatch,
GenericErrorCodesMatchmakingEntityInvalid,
GenericErrorCodesMatchmakingPlayerAttributesInvalid,
GenericErrorCodesMatchmakingQueueNotFound,
Expand Down Expand Up @@ -8443,6 +8444,11 @@ namespace PlayFab
output = Json::Value("InvalidNamespaceMismatch");
return;
}
if (input == GenericErrorCodes::GenericErrorCodesLeaderboardColumnLengthMismatch)
{
output = Json::Value("LeaderboardColumnLengthMismatch");
return;
}
if (input == GenericErrorCodes::GenericErrorCodesMatchmakingEntityInvalid)
{
output = Json::Value("MatchmakingEntityInvalid");
Expand Down Expand Up @@ -12131,6 +12137,11 @@ namespace PlayFab
output = GenericErrorCodes::GenericErrorCodesInvalidNamespaceMismatch;
return;
}
if (inputStr == "LeaderboardColumnLengthMismatch")
{
output = GenericErrorCodes::GenericErrorCodesLeaderboardColumnLengthMismatch;
return;
}
if (inputStr == "MatchmakingEntityInvalid")
{
output = GenericErrorCodes::GenericErrorCodesMatchmakingEntityInvalid;
Expand Down
49 changes: 49 additions & 0 deletions code/source/playfab/PlayFabAdminApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,55 @@ namespace PlayFab
}
}

void PlayFabAdminAPI::DeleteMasterPlayerEventData(
DeleteMasterPlayerEventDataRequest& request,
const ProcessApiCallback<DeleteMasterPlayerEventDataResult> callback,
const ErrorCallback errorCallback,
void* customData
)
{
std::shared_ptr<PlayFabAuthenticationContext> context = request.authenticationContext != nullptr ? request.authenticationContext : PlayFabSettings::staticPlayer;
std::shared_ptr<PlayFabApiSettings> settings = PlayFabSettings::staticSettings;

IPlayFabHttpPlugin& http = *PlayFabPluginManager::GetPlugin<IPlayFabHttpPlugin>(PlayFabPluginContract::PlayFab_Transport);
const Json::Value requestJson = request.ToJson();
std::string jsonAsString = requestJson.toStyledString();

std::unordered_map<std::string, std::string> headers;
headers.emplace("X-SecretKey", settings->developerSecretKey);

auto reqContainer = std::unique_ptr<CallRequestContainer>(new CallRequestContainer(
"/Admin/DeleteMasterPlayerEventData",
headers,
jsonAsString,
OnDeleteMasterPlayerEventDataResult,
settings,
context,
customData));

reqContainer->successCallback = std::shared_ptr<void>((callback == nullptr) ? nullptr : new ProcessApiCallback<DeleteMasterPlayerEventDataResult>(callback));
reqContainer->errorCallback = errorCallback;

http.MakePostRequest(std::unique_ptr<CallRequestContainerBase>(static_cast<CallRequestContainerBase*>(reqContainer.release())));
}

void PlayFabAdminAPI::OnDeleteMasterPlayerEventDataResult(int /*httpCode*/, const std::string& /*result*/, const std::shared_ptr<CallRequestContainerBase>& reqContainer)
{
CallRequestContainer& container = static_cast<CallRequestContainer&>(*reqContainer);
std::shared_ptr<PlayFabAuthenticationContext> context = container.GetContext();

DeleteMasterPlayerEventDataResult outResult;
if (ValidateResult(outResult, container))
{
std::shared_ptr<void> internalPtr = container.successCallback;
if (internalPtr.get() != nullptr)
{
const auto& callback = (*static_cast<ProcessApiCallback<DeleteMasterPlayerEventDataResult> *>(internalPtr.get()));
callback(outResult, container.GetCustomData());
}
}
}

void PlayFabAdminAPI::DeleteMembershipSubscription(
DeleteMembershipSubscriptionRequest& request,
const ProcessApiCallback<DeleteMembershipSubscriptionResult> callback,
Expand Down
Loading

0 comments on commit 348c7a6

Please sign in to comment.