Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 63 additions & 1 deletion Source/Immutable/Public/Immutable/ImmutableDataTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,69 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FImmutableDeepLinkDynamicMulticastDe

// This is the version of the Unreal Immutable SDK that is being used. This is not the version of the engine.
// This hardcoded value will be updated by a workflow during the release process.
#define ENGINE_SDK_VERSION TEXT("1.11.0")
#define ENGINE_SDK_VERSION TEXT("1.12.0")

/**
* Enum representing marketing consent status for authentication
*/
UENUM(BlueprintType)
enum class EImmutableMarketingConsentStatus : uint8
{
Opted_In,
Unsubscribed,
Subscribed
};

/**
* Enum representing direct login methods for authentication providers
*/
UENUM(BlueprintType)
enum class EImmutableDirectLoginMethod : uint8
{
Email,
Google,
Apple,
Facebook
};

/**
* Structure representing direct login options for authentication
* Can be used for social login (google, apple, facebook) or email login
*/
USTRUCT(BlueprintType)
struct IMMUTABLE_API FImmutableDirectLoginOptions
{
GENERATED_BODY()

bool IsEmailValid() const;

TSharedPtr<FJsonObject> ToJsonObject() const;

/** Direct login method for authentication */
UPROPERTY(EditAnywhere, BlueprintReadWrite)
EImmutableDirectLoginMethod DirectLoginMethod = EImmutableDirectLoginMethod::Email;

/** Email address for email-based authentication (only used when DirectLoginMethod is Email) */
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FString Email;

/** Marketing consent status for authentication (defaults to opted in) */
UPROPERTY(EditAnywhere, BlueprintReadWrite)
EImmutableMarketingConsentStatus MarketingConsentStatus = EImmutableMarketingConsentStatus::Opted_In;

UPROPERTY(EditAnywhere, BlueprintReadWrite)
FString ImPassportTraceId;
};

UCLASS()
class UImmutableDirectLoginOptionsStatics : public UBlueprintFunctionLibrary
{
GENERATED_BODY()

public:
UFUNCTION(BlueprintCallable)
static bool FromJSResponse(const FImtblJSResponse& Response, FImmutableDirectLoginOptions& DirectLoginOptions);
};

USTRUCT()
struct FImmutableEngineVersionData
Expand Down