From 2f688f1ce25b266201eac86c4ff8511f838e3818 Mon Sep 17 00:00:00 2001 From: AccelbyteBuild Date: Wed, 10 Jul 2024 09:33:46 +0000 Subject: [PATCH] Updated from pipeline, Version : 26.0.1 --- .variables | 13 +- AccelByteUe4Sdk.uplugin | 4 +- CHANGELOG.md | 12 ++ .../Private/Api/AccelByteAgreementApi.cpp | 36 ++++ .../Private/Api/AccelByteChallengeApi.cpp | 87 +++++++-- .../Private/Blueprints/ABAgreement.cpp | 22 +++ .../AccelByteServerChallengeApi.cpp | 6 +- .../Public/Api/AccelByteAgreementApi.h | 13 ++ .../Public/Api/AccelByteChallengeApi.h | 7 +- .../Public/Blueprints/ABAgreement.h | 6 + .../Public/Models/AccelByteAgreementModels.h | 13 +- .../Public/Models/AccelByteChallengeModels.h | 175 ++++++++++++++++-- version.json | 2 +- 13 files changed, 346 insertions(+), 50 deletions(-) diff --git a/.variables b/.variables index 1238087b..11c558c9 100644 --- a/.variables +++ b/.variables @@ -1,10 +1,9 @@ -export DO_UPDATE=true export LEVEL=CRITICAL export REPO_NAME=justice-unreal-sdk-plugin -export WORKDIR=/tmp/pipelines/7272771584/1361819099/ -export COMMIT_HASH=edffe839efc117d94c6650bb36a5904883d2b90c -export GIT_HASH=edffe839efc117d94c6650bb36a5904883d2b90c -export VERSION=26.0.0 -export REVISION_ID=26.0.0 +export WORKDIR=/tmp/pipelines/7306428285/1367733336/ +export COMMIT_HASH=202166e3284d36a5ebb1a7658542a7c19f037772 +export GIT_HASH=202166e3284d36a5ebb1a7658542a7c19f037772 +export VERSION=26.0.1 +export REVISION_ID=26.0.1 export SLACK_EMAIL=build@accelbyte.net -export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDI2LjAuMCAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2luc2Fnc1ZlcnNpb246IjMuNzUuMCIKCg==' +export COMMIT_MESSAGE_BASE64='Y2hvcmUocmVsZWFzZSk6IDI2LjAuMSAtIGNvbW1pdGVkIGFuZCB0YWdnZWQgYnkgSmVua2lucwo=' diff --git a/AccelByteUe4Sdk.uplugin b/AccelByteUe4Sdk.uplugin index bc1046d0..1c412724 100644 --- a/AccelByteUe4Sdk.uplugin +++ b/AccelByteUe4Sdk.uplugin @@ -1,7 +1,7 @@ { "FileVersion": 3, - "Version": 71, - "VersionName": "26.0.0", + "Version": 72, + "VersionName": "26.0.1", "FriendlyName": "AccelByte Unreal Engine SDK", "Description": "Official AccelByte SDK for Unreal Engine 4", "Category": "Online Platform", diff --git a/CHANGELOG.md b/CHANGELOG.md index 46ec4115..5e62b8a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [26.0.1](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/26.0.1%0D26.0.0) (2024-07-10) + + +### Features + +* **Agreement:** add change policy preferences ([fb82474](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/fb82474e01884078698a43f4759f3e8be8ca3bdd)) + + +### Bug Fixes + +* **challenge:** update data model and add request validation ([780a246](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/commits/780a2468fb7752453562587dbd129a7d6a06a7e2)) + ## [26.0.0](https://bitbucket.org/accelbyte/justice-unreal-sdk-plugin/branches/compare/26.0.0%0D25.5.2) (2024-07-05) diff --git a/Source/AccelByteUe4Sdk/Private/Api/AccelByteAgreementApi.cpp b/Source/AccelByteUe4Sdk/Private/Api/AccelByteAgreementApi.cpp index 35cf4d62..16339db3 100644 --- a/Source/AccelByteUe4Sdk/Private/Api/AccelByteAgreementApi.cpp +++ b/Source/AccelByteUe4Sdk/Private/Api/AccelByteAgreementApi.cpp @@ -141,6 +141,42 @@ FAccelByteTaskWPtr Agreement::AcceptPolicyVersion(FString const& LocalizedPolicy return HttpClient.ApiRequest(TEXT("POST"), Url, {}, FString(), OnSuccess, OnError); } +FAccelByteTaskWPtr Agreement::ChangePolicyPreferences(TArray const& ChangeAgreementRequests + , FVoidHandler const& OnSuccess + , FErrorHandler const& OnError) +{ + FReport::Log(FString(__FUNCTION__)); + + if (ChangeAgreementRequests.Num() == 0) + { + OnError.ExecuteIfBound(static_cast(ErrorCodes::InvalidRequest), TEXT("Cannot change preference for current consent. Request is empty.")); + return nullptr; + } + + // Validate each request to make sure they are not failing later. + for (const FAccelByteModelsAcceptAgreementRequest& ChangeAgreement : ChangeAgreementRequests) + { + if (ChangeAgreement.PolicyVersionId.IsEmpty()) + { + OnError.ExecuteIfBound(static_cast(ErrorCodes::InvalidRequest), TEXT("Cannot change preference for current consent. Policy version id is empty.")); + return nullptr; + } + if (ChangeAgreement.LocalizedPolicyVersionId.IsEmpty()) + { + OnError.ExecuteIfBound(static_cast(ErrorCodes::InvalidRequest), TEXT("Cannot change preference for current consent. Localized policy id is empty.")); + return nullptr; + } + } + + const FString Url = FString::Printf(TEXT("%s/public/agreements/localized-policy-versions/preferences") + , *SettingsRef.AgreementServerUrl); + + FString Content; + FAccelByteUtilities::TArrayUStructToJsonString(ChangeAgreementRequests, Content); + + return HttpClient.ApiRequest(TEXT("PATCH"), Url, {}, Content, OnSuccess, OnError); +} + FAccelByteTaskWPtr Agreement::QueryLegalEligibilities(FString const& Namespace , THandler> const& OnSuccess , FErrorHandler const& OnError) diff --git a/Source/AccelByteUe4Sdk/Private/Api/AccelByteChallengeApi.cpp b/Source/AccelByteUe4Sdk/Private/Api/AccelByteChallengeApi.cpp index 63d28e2b..84b94e4d 100644 --- a/Source/AccelByteUe4Sdk/Private/Api/AccelByteChallengeApi.cpp +++ b/Source/AccelByteUe4Sdk/Private/Api/AccelByteChallengeApi.cpp @@ -29,13 +29,21 @@ FAccelByteTaskWPtr Challenge::GetChallenges(THandler QueryParams = { - { TEXT("sortBy"), FAccelByteUtilities::ConvertChallengeSortByToString(SortBy) }, - { TEXT("status"), (Status != EAccelByteModelsChallengeStatus::NONE) ? FAccelByteUtilities::GetUEnumValueAsString(Status) : FString() }, + TMap QueryParams = { { TEXT("offset"), FString::FromInt(Offset) }, { TEXT("limit"), FString::FromInt(Limit) }, }; + if (SortBy != EAccelByteModelsChallengeSortBy::NONE) + { + QueryParams.Emplace(TEXT("sortBy"), FAccelByteUtilities::ConvertChallengeSortByToString(SortBy)); + } + + if (Status != EAccelByteModelsChallengeStatus::NONE) + { + QueryParams.Emplace(TEXT("status"), FAccelByteUtilities::GetUEnumValueAsString(Status)); + } + const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/challenges") , *SettingsRef.ChallengeServerUrl , *CredentialsRef->GetNamespace()); @@ -46,28 +54,29 @@ FAccelByteTaskWPtr Challenge::GetChallenges(THandler const& OnSuccess , FErrorHandler const& OnError - , TArray Tags + , const TArray& Tags , uint64 Offset , uint64 Limit) { FReport::Log(FString(__FUNCTION__)); - FString TagsString{}; - for (int64 Index = 0; Index < Tags.Num(); Index++) + if (ChallengeCode.IsEmpty()) { - TagsString.Append(Tags[Index]); - if (Index != Tags.Num() - 1) - { - TagsString.AppendChar(','); - } + OnError.ExecuteIfBound(static_cast(ErrorCodes::InvalidRequest), TEXT("ChallengeCode cannot be empty.")); + return nullptr; } - const TMap QueryParams{ - { TEXT("tags"), FGenericPlatformHttp::UrlEncode(TagsString) }, + TMap QueryParams{ { TEXT("offset"), FString::FromInt(Offset) }, { TEXT("limit"), FString::FromInt(Limit) }, }; + if (Tags.Num() > 0) + { + FString TagsString = CreateTagsString(Tags); + QueryParams.Emplace(TEXT("tags"), TagsString); + } + const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/challenges/%s/goals") , *SettingsRef.ChallengeServerUrl , *CredentialsRef->GetNamespace() @@ -81,16 +90,33 @@ FAccelByteTaskWPtr Challenge::GetChallengeProgress(FString const& ChallengeCode , THandler const& OnSuccess , FErrorHandler const& OnError , uint64 Offset - , uint64 Limit) + , uint64 Limit + , TArray const& Tags) { FReport::Log(FString(__FUNCTION__)); - const TMap QueryParams{ - { TEXT("goalCode"), GoalCode }, + if (ChallengeCode.IsEmpty()) + { + OnError.ExecuteIfBound(static_cast(ErrorCodes::InvalidRequest), TEXT("ChallengeCode cannot be empty.")); + return nullptr; + } + + TMap QueryParams{ { TEXT("offset"), FString::FromInt(Offset) }, { TEXT("limit"), FString::FromInt(Limit) }, }; + if (!GoalCode.IsEmpty()) + { + QueryParams.Emplace(TEXT("goalCode"), GoalCode); + } + + if (Tags.Num() > 0) + { + FString TagsString = CreateTagsString(Tags); + QueryParams.Emplace(TEXT("tags"), TagsString); + } + const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/me/progress/%s") , *SettingsRef.ChallengeServerUrl , *CredentialsRef->GetNamespace() @@ -109,14 +135,18 @@ FAccelByteTaskWPtr Challenge::GetRewards(THandler QueryParams{ - { TEXT("sortBy"), FAccelByteUtilities::ConvertChallengeSortByToString(SortBy) }, { TEXT("offset"), FString::FromInt(Offset) }, { TEXT("limit"), FString::FromInt(Limit) }, }; + if (SortBy != EAccelByteModelsChallengeSortBy::NONE) + { + QueryParams.Emplace(TEXT("sortBy"), FAccelByteUtilities::ConvertChallengeSortByToString(SortBy)); + } + if (Status != EAccelByteModelsChallengeRewardStatus::NONE) { - QueryParams.Add(TEXT("status"), FAccelByteUtilities::GetUEnumValueAsString(Status)); + QueryParams.Emplace(TEXT("status"), FAccelByteUtilities::GetUEnumValueAsString(Status)); } const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/me/rewards") @@ -131,6 +161,12 @@ FAccelByteTaskWPtr Challenge::ClaimReward(FAccelByteModelsChallengeRewardClaimRe , FErrorHandler const& OnError) { FReport::Log(FString(__FUNCTION__)); + + if(Request.RewardIDs.Num() < 1) + { + OnError.ExecuteIfBound(static_cast(ErrorCodes::InvalidRequest), TEXT("RewardIDs cannot be empty.")); + return nullptr; + } const FString Url = FString::Printf(TEXT("%s/v1/public/namespaces/%s/users/me/rewards/claim") , *SettingsRef.ChallengeServerUrl @@ -151,6 +187,21 @@ FAccelByteTaskWPtr Challenge::EvaluateChallengeProgress(FVoidHandler const& OnSu return HttpClient.ApiRequest(TEXT("POST"), Url, {}, FString(), OnSuccess, OnError); } +FString Challenge::CreateTagsString(const TArray& Tags) +{ + FString TagsString; + + for (int64 Index = 0; Index < Tags.Num(); Index++) + { + TagsString.Append(Tags[Index]); + if (Index != Tags.Num() - 1) + { + TagsString.AppendChar(','); + } + } + + return TagsString; +} } // Namespace Api } // Namespace AccelByte \ No newline at end of file diff --git a/Source/AccelByteUe4Sdk/Private/Blueprints/ABAgreement.cpp b/Source/AccelByteUe4Sdk/Private/Blueprints/ABAgreement.cpp index c0f68fa1..61fe2828 100644 --- a/Source/AccelByteUe4Sdk/Private/Blueprints/ABAgreement.cpp +++ b/Source/AccelByteUe4Sdk/Private/Blueprints/ABAgreement.cpp @@ -190,6 +190,28 @@ void UABAgreement::AcceptPolicyVersion( ); } +void UABAgreement::ChangePolicyPreferences( + TArray const& ChangeAgreementRequests, + FDHandler const& OnSuccess, + FDErrorHandler const& OnError) +{ + ApiClientPtr->Agreement.ChangePolicyPreferences( + ChangeAgreementRequests, + FVoidHandler::CreateLambda( + [OnSuccess]() + { + OnSuccess.ExecuteIfBound(); + } + ), + FErrorHandler::CreateLambda( + [OnError](int Code, FString const& Message) + { + OnError.ExecuteIfBound(Code, Message); + } + ) + ); +} + void UABAgreement::QueryLegalEligibilities( FString const& Namespace, FDArrayModelsRetrieveUserEligibilitiesResponse const& OnSuccess, diff --git a/Source/AccelByteUe4Sdk/Private/GameServerApi/AccelByteServerChallengeApi.cpp b/Source/AccelByteUe4Sdk/Private/GameServerApi/AccelByteServerChallengeApi.cpp index 9f87a4e7..bafa74e4 100644 --- a/Source/AccelByteUe4Sdk/Private/GameServerApi/AccelByteServerChallengeApi.cpp +++ b/Source/AccelByteUe4Sdk/Private/GameServerApi/AccelByteServerChallengeApi.cpp @@ -59,11 +59,15 @@ FAccelByteTaskWPtr ServerChallenge::GetUserRewards(const FString& UserId TMap QueryParams { - { TEXT("sortBy"), FAccelByteUtilities::ConvertChallengeSortByToString(SortBy) }, { TEXT("offset"), FString::FromInt(Offset) }, { TEXT("limit"), FString::FromInt(Limit) }, }; + if (SortBy != EAccelByteModelsChallengeSortBy::NONE) + { + QueryParams.Add(TEXT("sortBy"), FAccelByteUtilities::ConvertChallengeSortByToString(SortBy)); + } + if (Status != EAccelByteModelsChallengeRewardStatus::NONE) { QueryParams.Add(TEXT("status"), FAccelByteUtilities::GetUEnumValueAsString(Status)); diff --git a/Source/AccelByteUe4Sdk/Public/Api/AccelByteAgreementApi.h b/Source/AccelByteUe4Sdk/Public/Api/AccelByteAgreementApi.h index 02647788..4a34a8a0 100644 --- a/Source/AccelByteUe4Sdk/Public/Api/AccelByteAgreementApi.h +++ b/Source/AccelByteUe4Sdk/Public/Api/AccelByteAgreementApi.h @@ -149,6 +149,19 @@ class ACCELBYTEUE4SDK_API Agreement : public FApiBase , FVoidHandler const& OnSuccess , FErrorHandler const& OnError); + /** + * @brief Accept or changes preference to specific legal policy versions. + * + * @param ChangeAgreementRequests Request for localized policy version id to change. + * @param OnSuccess This will be called when the operation succeeded. + * @param OnError This will be called when the operation failed. + * + * @return AccelByteTask object to track and cancel the ongoing API operation. + */ + FAccelByteTaskWPtr ChangePolicyPreferences(TArray const& ChangeAgreementRequests + , FVoidHandler const& OnSuccess + , FErrorHandler const& OnError); + /** * @brief Query all player's legal eligibilities on a namespace, use to check is player already commited to legal or not. * diff --git a/Source/AccelByteUe4Sdk/Public/Api/AccelByteChallengeApi.h b/Source/AccelByteUe4Sdk/Public/Api/AccelByteChallengeApi.h index c28c9669..7d1b023b 100644 --- a/Source/AccelByteUe4Sdk/Public/Api/AccelByteChallengeApi.h +++ b/Source/AccelByteUe4Sdk/Public/Api/AccelByteChallengeApi.h @@ -60,7 +60,7 @@ class ACCELBYTEUE4SDK_API Challenge : public FApiBase FAccelByteTaskWPtr GetScheduledChallengeGoals(FString const& ChallengeCode , THandler const& OnSuccess , FErrorHandler const& OnError - , TArray Tags = {} + , const TArray& Tags = {} , uint64 Offset = 0 , uint64 Limit = 20); @@ -73,6 +73,7 @@ class ACCELBYTEUE4SDK_API Challenge : public FApiBase * @param OnError Delegate executed when request fails * @param Offset Number of goals to skip when returning goal progress list, defaults to 0 * @param Limit Number of goals to include when returning goal progress list, defaults to 20 + * @param Tags Array of tag strings used to filter resulting challenge progress list * * @return AccelByteTask object to track and cancel the ongoing API operation. */ @@ -81,7 +82,8 @@ class ACCELBYTEUE4SDK_API Challenge : public FApiBase , THandler const& OnSuccess , FErrorHandler const& OnError , uint64 Offset = 0 - , uint64 Limit = 20); + , uint64 Limit = 20 + , TArray const& Tags = {}); /** * @brief Send a request to get status of all challenge rewards @@ -131,6 +133,7 @@ class ACCELBYTEUE4SDK_API Challenge : public FApiBase Challenge(Challenge const&) = delete; Challenge(Challenge&&) = delete; + static FString CreateTagsString(const TArray& Tags); }; } // Namespace Api diff --git a/Source/AccelByteUe4Sdk/Public/Blueprints/ABAgreement.h b/Source/AccelByteUe4Sdk/Public/Blueprints/ABAgreement.h index 8207fb5d..af82b61f 100644 --- a/Source/AccelByteUe4Sdk/Public/Blueprints/ABAgreement.h +++ b/Source/AccelByteUe4Sdk/Public/Blueprints/ABAgreement.h @@ -107,6 +107,12 @@ class UABAgreement : public UObject FDHandler const& OnSuccess, FDErrorHandler const& OnError); + UFUNCTION(BlueprintCallable, Category = "AccelByte | Agreement | Api") + void ChangePolicyPreferences( + TArray const& ChangeAgreementRequests, + FDHandler const& OnSuccess, + FDErrorHandler const& OnError); + UFUNCTION(BlueprintCallable, Category = "AccelByte | Agreement | Api") void QueryLegalEligibilities( FString const& Namespace, diff --git a/Source/AccelByteUe4Sdk/Public/Models/AccelByteAgreementModels.h b/Source/AccelByteUe4Sdk/Public/Models/AccelByteAgreementModels.h index aa5d674e..3b1a264a 100644 --- a/Source/AccelByteUe4Sdk/Public/Models/AccelByteAgreementModels.h +++ b/Source/AccelByteUe4Sdk/Public/Models/AccelByteAgreementModels.h @@ -36,7 +36,18 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsAcceptAgreementRequest /** @brief Flag that the Agreement is accepted */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Agreement | Models | AcceptAgreementRequest") - bool IsAccepted{}; + bool IsAccepted{false}; +}; + +/** @brief Data Model for Changing request of specific Agreement */ +USTRUCT(BlueprintType) +struct ACCELBYTEUE4SDK_API FAccelByteModelsChangeAgreementRequest : public FAccelByteModelsAcceptAgreementRequest +{ + GENERATED_BODY() + + /** @brief Flag that the Agreement is needed for marketing */ + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Agreement | Models | ChangeAgreementRequest") + bool IsNeedToSendEventMarketing{false}; }; /** @brief Data Model for Accept Agreement Response */ diff --git a/Source/AccelByteUe4Sdk/Public/Models/AccelByteChallengeModels.h b/Source/AccelByteUe4Sdk/Public/Models/AccelByteChallengeModels.h index fe2b6831..8b2c27ea 100644 --- a/Source/AccelByteUe4Sdk/Public/Models/AccelByteChallengeModels.h +++ b/Source/AccelByteUe4Sdk/Public/Models/AccelByteChallengeModels.h @@ -12,7 +12,8 @@ UENUM(BlueprintType) enum class EAccelByteModelsChallengeSortBy : uint8 { - UPDATED_AT = 0, + NONE = 0, + UPDATED_AT, UPDATED_AT_ASC, UPDATED_AT_DESC, CREATED_AT, @@ -42,7 +43,8 @@ enum class EAccelByteModelsChallengeRotation : uint8 UENUM(BlueprintType) enum class EAccelByteModelsChallengeAssignmentRule : uint8 { - FIXED = 0, + NONE = 0, + FIXED, RANDOMIZED, UNSCHEDULED }; @@ -50,10 +52,40 @@ enum class EAccelByteModelsChallengeAssignmentRule : uint8 UENUM(BlueprintType) enum class EAccelByteModelsChallengeGoalsVisibility : uint8 { - SHOWALL = 0, + NONE = 0, + SHOWALL, PERIODONLY, }; +UENUM(BlueprintType) +enum class EAccelByteModelsChallengeMatcher : uint8 +{ + NONE = 0, + EQUAL, + LESS_THAN, + GREATER_THAN, + LESS_THAN_EQUAL, + GREATER_THAN_EQUAL +}; + +USTRUCT(BlueprintType) +struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeResetConfig +{ + GENERATED_BODY() + + // Valid value are 1 to 31, default to 1 for MONTHLY rotation + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | ResetConfig") + int32 ResetDate{}; + + // Valid value are 1 (Monday) to 7 (Sunday), default to 1 for WEEKLY rotation + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | ResetConfig") + int32 ResetDay{}; + + // Format hh:mm, must be in UTC timezone, default '00:00' for all rotation + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | ResetConfig") + FString ResetTime{}; +}; + USTRUCT(BlueprintType) struct ACCELBYTEUE4SDK_API FAccelByteModelsChallenge { @@ -90,10 +122,23 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsChallenge EAccelByteModelsChallengeRotation Rotation{EAccelByteModelsChallengeRotation::NONE}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges") - EAccelByteModelsChallengeAssignmentRule AssignmentRule{EAccelByteModelsChallengeAssignmentRule::FIXED}; + EAccelByteModelsChallengeAssignmentRule AssignmentRule{EAccelByteModelsChallengeAssignmentRule::NONE}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges") + EAccelByteModelsChallengeGoalsVisibility GoalsVisibility{EAccelByteModelsChallengeGoalsVisibility::NONE}; + + // Describe number of period challenge will be retired after. + // The unit depends on rotation type. If rotation is DAILY the unit is in days, MONTHLY the unit is in months etc. + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges") + int32 EndAfter{0}; + + // Describe number of period challenge's goals will be repeated after. + // The unit depends on rotation type. If rotation is DAILY the unit is in days, MONTHLY the unit is in months etc. + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges") + int32 RepeatAfter{0}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges") - EAccelByteModelsChallengeGoalsVisibility GoalsVisibility{EAccelByteModelsChallengeGoalsVisibility::SHOWALL}; + FAccelByteModelsChallengeResetConfig ResetConfig; }; USTRUCT(BlueprintType) @@ -111,10 +156,12 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsGetChallengesResponse UENUM(BlueprintType) enum class EAccelByteModelsChallengeGoalRequirementPredicateParameterType : uint8 { - STATISTIC = 0, + NONE = 0, + STATISTIC, ENTITLEMENT, ACHIEVEMENT, USERACCOUNT, + STATISTIC_CYCLE, }; USTRUCT(BlueprintType) @@ -123,22 +170,27 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeGoalRequirementPredicate GENERATED_BODY() UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Goals") - EAccelByteModelsChallengeGoalRequirementPredicateParameterType ParameterType{}; + EAccelByteModelsChallengeGoalRequirementPredicateParameterType ParameterType{EAccelByteModelsChallengeGoalRequirementPredicateParameterType::NONE}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Goals") FString ParameterName{}; + // EQUAL, LESS_THAN, GREATER_THAN, LESS_THAN_EQUAL, GREATER_THAN_EQUAL UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Goals") FString Matcher{}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Goals") float TargetValue{0.0f}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Goals") + FString StatCycleId{}; }; UENUM(BlueprintType) enum class EAccelByteModelsChallengeGoalRequirementOperator : uint8 { - AND = 0, + NONE = 0, + AND, }; USTRUCT(BlueprintType) @@ -147,7 +199,7 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeGoalRequirement GENERATED_BODY() UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Goals") - EAccelByteModelsChallengeGoalRequirementOperator Operator{}; + EAccelByteModelsChallengeGoalRequirementOperator Operator{EAccelByteModelsChallengeGoalRequirementOperator::NONE}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Goals") TArray Predicates{}; @@ -156,7 +208,8 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeGoalRequirement UENUM(BlueprintType) enum class EAccelByteModelsChallengeRewardType : uint8 { - STATISTIC = 0, + NONE = 0, + STATISTIC, ENTITLEMENT, }; @@ -175,7 +228,22 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeGoalReward FString ItemName{}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Rewards") - EAccelByteModelsChallengeRewardType Type{EAccelByteModelsChallengeRewardType::STATISTIC}; + EAccelByteModelsChallengeRewardType Type{EAccelByteModelsChallengeRewardType::NONE}; +}; + +USTRUCT(BlueprintType) +struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeSchedule +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Schedule") + FDateTime EndTime{0}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Schedule") + int32 Order{0}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Schedule") + FDateTime StartTime{0}; }; USTRUCT(BlueprintType) @@ -215,6 +283,64 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeGoal UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Goals") TArray Rewards{}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Goals") + FAccelByteModelsChallengeSchedule Schedule{}; +}; + +USTRUCT(BlueprintType) +struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeGoalMeta +{ + GENERATED_BODY() + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + int32 ActiveGoalsPerRotation{0}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + EAccelByteModelsChallengeAssignmentRule AssignmentRule{EAccelByteModelsChallengeAssignmentRule::NONE}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + FString Code{}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + FDateTime CreatedAt{0}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + FString Description{}; + + // Describe number of period challenge will be retired after. + // The unit depends on rotation type. If rotation is DAILY the unit is in days, MONTHLY the unit is in months etc. + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + int32 EndAfter{0}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + FDateTime EndDate{0}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + EAccelByteModelsChallengeGoalsVisibility GoalsVisibility{EAccelByteModelsChallengeGoalsVisibility::NONE}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + FString Name{}; + + // Describe number of period challenge's goals will be repeated after. + // The unit depends on rotation type. If rotation is DAILY the unit is in days, MONTHLY the unit is in months etc. + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + int32 RepeatAfter{0}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + FAccelByteModelsChallengeResetConfig ResetConfig{}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + EAccelByteModelsChallengeRotation Rotation{EAccelByteModelsChallengeRotation::NONE}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + FDateTime StartDate{0}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + EAccelByteModelsChallengeStatus Status{EAccelByteModelsChallengeStatus::NONE}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | GoalMeta") + FDateTime UpdatedAt{0}; }; USTRUCT(BlueprintType) @@ -225,6 +351,9 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsGetScheduledChallengeGoalsResponse UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Goals") TArray Data{}; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Goals") + FAccelByteModelsChallengeGoalMeta Meta; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Goals") FAccelByteModelsPaging Paging{}; }; @@ -252,7 +381,7 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeReward FString GoalCode{}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Rewards") - EAccelByteModelsChallengeRewardStatus Status{EAccelByteModelsChallengeRewardStatus::UNCLAIMED}; + EAccelByteModelsChallengeRewardStatus Status{EAccelByteModelsChallengeRewardStatus::NONE}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Rewards") FString UserId{}; @@ -267,7 +396,7 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeReward FString ItemName{}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Rewards") - EAccelByteModelsChallengeRewardType Type{EAccelByteModelsChallengeRewardType::STATISTIC}; + EAccelByteModelsChallengeRewardType Type{EAccelByteModelsChallengeRewardType::NONE}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Rewards") FString CreatedAt{}; @@ -364,7 +493,8 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeGoalProgressRequirement UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Progress") float CurrentValue{0.0f}; - + + // EQUAL, LESS_THAN, GREATER_THAN, LESS_THAN_EQUAL, GREATER_THAN_EQUAL UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Progress") FString Matcher{}; @@ -381,10 +511,11 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeGoalProgressRequirement UENUM(BlueprintType) enum class EAccelByteModelsChallengeGoalProgressStatus : uint8 { - ACTIVE = 0, + NONE = 0, + ACTIVE, COMPLETED, RETIRED, - NOT_STARTED + NOT_STARTED, }; USTRUCT(BlueprintType) @@ -392,6 +523,12 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeGoalProgress { GENERATED_BODY() + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Progress") + FString ChallengeCode{}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Progress") + FAccelByteModelsChallengeGoal Goal{}; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Progress") FString GoalCode{}; @@ -402,7 +539,7 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeGoalProgress TArray RequirementProgressions{}; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Progress") - EAccelByteModelsChallengeGoalProgressStatus Status{}; + EAccelByteModelsChallengeGoalProgressStatus Status{EAccelByteModelsChallengeGoalProgressStatus::NONE}; }; USTRUCT(BlueprintType) @@ -439,6 +576,9 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeProgressResponse UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Progress") FAccelByteModelsChallengeProgressMeta Meta{}; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Progress") + FAccelByteModelsPaging Paging{}; }; USTRUCT(BlueprintType) @@ -448,5 +588,4 @@ struct ACCELBYTEUE4SDK_API FAccelByteModelsChallengeServerEvaluateProgressReques UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AccelByte | Category | Models | Challenges | Server | Progress") TArray UserIds{}; - }; diff --git a/version.json b/version.json index de7b6625..ab6e1764 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "26.0.0" + "version": "26.0.1" }