2.0.0: slug-based quests, scenarios and offers; environment carried by the token; regenerated models
Claude-Session: https://claude.ai/code/session_01SMCvdwDmuxoaqGgvGBLk1V
This commit is contained in:
@@ -26,7 +26,7 @@ public sealed class BattlePassEffect
|
||||
public string RunId => _handle.RunId;
|
||||
|
||||
/// <summary>Scenario id.</summary>
|
||||
public string ScenarioId => _handle.ScenarioId;
|
||||
public string ScenarioSlug => _handle.ScenarioSlug;
|
||||
|
||||
/// <summary>Node id.</summary>
|
||||
public string NodeId => _handle.NodeId;
|
||||
@@ -39,13 +39,13 @@ public sealed class BattlePassEffect
|
||||
|
||||
/// <summary>Reads current progress (xp, level, premium ownership, claimed tiers) for this node.</summary>
|
||||
public Task<GetBattlePassProgressResponse> GetProgressAsync(CancellationToken cancellationToken = default)
|
||||
=> _battlePass.GetProgressAsync(_handle.ScenarioId, _handle.NodeId, cancellationToken);
|
||||
=> _battlePass.GetProgressAsync(_handle.ScenarioSlug, _handle.NodeId, cancellationToken);
|
||||
|
||||
/// <summary>Credits xp from a configured source.</summary>
|
||||
public Task<AddBattlePassXpResponse> AddXpAsync(string source, long amount, CancellationToken cancellationToken = default)
|
||||
=> _battlePass.AddXpAsync(new AddBattlePassXpRequest
|
||||
{
|
||||
ScenarioId = _handle.ScenarioId,
|
||||
ScenarioSlug = _handle.ScenarioSlug,
|
||||
NodeId = _handle.NodeId,
|
||||
RunId = _handle.RunId,
|
||||
Source = source,
|
||||
@@ -59,7 +59,7 @@ public sealed class BattlePassEffect
|
||||
public Task<ClaimBattlePassRewardResponse> ClaimRewardAsync(int level, string track, CancellationToken cancellationToken = default)
|
||||
=> _battlePass.ClaimRewardAsync(new ClaimBattlePassRewardRequest
|
||||
{
|
||||
ScenarioId = _handle.ScenarioId,
|
||||
ScenarioSlug = _handle.ScenarioSlug,
|
||||
NodeId = _handle.NodeId,
|
||||
RunId = _handle.RunId,
|
||||
Level = level,
|
||||
@@ -71,7 +71,7 @@ public sealed class BattlePassEffect
|
||||
{
|
||||
var response = await _battlePass.PurchasePremiumAsync(new PurchaseBattlePassPremiumRequest
|
||||
{
|
||||
ScenarioId = _handle.ScenarioId,
|
||||
ScenarioSlug = _handle.ScenarioSlug,
|
||||
NodeId = _handle.NodeId,
|
||||
RunId = _handle.RunId,
|
||||
IdempotencyKey = Guid.NewGuid().ToString()
|
||||
|
||||
@@ -19,7 +19,7 @@ public sealed class BattlePassLevelEffect
|
||||
public string RunId => _handle.RunId;
|
||||
|
||||
/// <summary>Scenario id.</summary>
|
||||
public string ScenarioId => _handle.ScenarioId;
|
||||
public string ScenarioSlug => _handle.ScenarioSlug;
|
||||
|
||||
/// <summary>Node id.</summary>
|
||||
public string NodeId => _handle.NodeId;
|
||||
|
||||
@@ -15,7 +15,7 @@ public sealed class LeaderboardEffect
|
||||
public string RunId => _handle.RunId;
|
||||
|
||||
/// <summary>Scenario id.</summary>
|
||||
public string ScenarioId => _handle.ScenarioId;
|
||||
public string ScenarioSlug => _handle.ScenarioSlug;
|
||||
|
||||
/// <summary>Node id.</summary>
|
||||
public string NodeId => _handle.NodeId;
|
||||
|
||||
@@ -15,7 +15,7 @@ public sealed class NotificationEffect
|
||||
public string RunId => _handle.RunId;
|
||||
|
||||
/// <summary>Scenario id.</summary>
|
||||
public string ScenarioId => _handle.ScenarioId;
|
||||
public string ScenarioSlug => _handle.ScenarioSlug;
|
||||
|
||||
/// <summary>Node id.</summary>
|
||||
public string NodeId => _handle.NodeId;
|
||||
|
||||
@@ -20,7 +20,7 @@ public sealed class QuestEffect
|
||||
public string RunId => _handle.RunId;
|
||||
|
||||
/// <summary>Scenario id.</summary>
|
||||
public string ScenarioId => _handle.ScenarioId;
|
||||
public string ScenarioSlug => _handle.ScenarioSlug;
|
||||
|
||||
/// <summary>Node id.</summary>
|
||||
public string NodeId => _handle.NodeId;
|
||||
|
||||
@@ -3,15 +3,15 @@ namespace RudderSdk.Core;
|
||||
/// <summary>Payload of <see cref="EffectsService.OnScenarioCompleted"/>.</summary>
|
||||
public sealed class ScenarioCompletedEffect
|
||||
{
|
||||
internal ScenarioCompletedEffect(string runId, string scenarioId)
|
||||
internal ScenarioCompletedEffect(string runId, string scenarioSlug)
|
||||
{
|
||||
RunId = runId;
|
||||
ScenarioId = scenarioId;
|
||||
ScenarioSlug = scenarioSlug;
|
||||
}
|
||||
|
||||
/// <summary>Server-issued run id.</summary>
|
||||
public string RunId { get; }
|
||||
|
||||
/// <summary>Scenario id.</summary>
|
||||
public string ScenarioId { get; }
|
||||
public string ScenarioSlug { get; }
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ namespace RudderSdk.Core;
|
||||
/// <summary>Payload of <see cref="EffectsService.OnScenarioFailed"/>.</summary>
|
||||
public sealed class ScenarioFailedEffect
|
||||
{
|
||||
internal ScenarioFailedEffect(string runId, string scenarioId, string nodeId, Exception exception)
|
||||
internal ScenarioFailedEffect(string runId, string scenarioSlug, string nodeId, Exception exception)
|
||||
{
|
||||
RunId = runId;
|
||||
ScenarioId = scenarioId;
|
||||
ScenarioSlug = scenarioSlug;
|
||||
NodeId = nodeId;
|
||||
Exception = exception;
|
||||
}
|
||||
@@ -17,7 +17,7 @@ public sealed class ScenarioFailedEffect
|
||||
public string RunId { get; }
|
||||
|
||||
/// <summary>Scenario id.</summary>
|
||||
public string ScenarioId { get; }
|
||||
public string ScenarioSlug { get; }
|
||||
|
||||
/// <summary>Node the failure happened at.</summary>
|
||||
public string NodeId { get; }
|
||||
|
||||
@@ -15,7 +15,7 @@ public sealed class StoreOfferEffect
|
||||
public string RunId => _handle.RunId;
|
||||
|
||||
/// <summary>Scenario id.</summary>
|
||||
public string ScenarioId => _handle.ScenarioId;
|
||||
public string ScenarioSlug => _handle.ScenarioSlug;
|
||||
|
||||
/// <summary>Node id.</summary>
|
||||
public string NodeId => _handle.NodeId;
|
||||
|
||||
@@ -18,7 +18,7 @@ public sealed class WaitEffect
|
||||
public string RunId => _handle.RunId;
|
||||
|
||||
/// <summary>Scenario id.</summary>
|
||||
public string ScenarioId => _handle.ScenarioId;
|
||||
public string ScenarioSlug => _handle.ScenarioSlug;
|
||||
|
||||
/// <summary>Node id.</summary>
|
||||
public string NodeId => _handle.NodeId;
|
||||
|
||||
Reference in New Issue
Block a user