# Changelog ## 0.2.0 ### Added - `QuestsService` (`client.Quests`) with `ListAsync` / `ClaimAsync`. - `AuthService.LoginWithDeviceAsync(region, language, nickname?)` and `AuthService.RefreshAsync()`; `AuthStateChanged` event (`RudderAuthState.SignedIn` / `SignedOut`). - Session pipeline: single-flight token refresh plus one transparent retry-on-401 for every API call; failed refresh clears tokens and reports `SignedOut`. - `HttpClientTransport` — default `System.Net.Http.HttpClient`-based transport. `RudderClientOptions.Transport` is now optional, as are `TokenStore` (`InMemoryTokenStore`) and `DeviceIdProvider` (`GuidDeviceIdProvider`). - Typed exceptions: `RudderAuthException` (401), `RudderNotFoundException` (404), `RudderRateLimitException` (429), `RudderNetworkException` (network/timeout). All carry `RequestId` from the server error payload. - `StorageService.ListAllAsync` and `UgcService.ListAllAsync` (`IAsyncEnumerable` cursor pagination helpers). - `RudderLogLevel` enum; `IRudderLogger.Log` now takes a level. - Package metadata (`Rudder.Core`, MIT) and XML documentation. ### Changed (breaking) - Generated models moved to domain folders/namespaces (`RudderSdk.Core.Models.`); the flat `RudderSdk.Core.DTO` namespace is gone. `Battlepass*` → `BattlePass*`, `SdkQuest` → `Quest`. - `BattlepassService` → `BattlePassService`, `client.Battlepass` → `client.BattlePass`. - `client.Scenarios` → `client.Scenario`. - `ScenarioService.SendAsync` → `TriggerAsync`, now returning the started `PlanRun`s. - Scenario events reduced to the canonical set: `OnNotification`, `OnStoreOffer`, `OnLeaderboard`, `OnConfigChanged`, `OnWait`, `OnQuest`, `OnBattlePass`, `OnBattlePassLevel`, `OnScenarioCompleted`, `OnScenarioFailed`. Legacy events (`OnShowNotification`, `OnShowStore`, `OnQuestEvent`, `OnBattlepassEvent`, `OnLeaderboardEvent`, `OnNodeEvent`, `OnNode`, `OnCompleted`, `OnStore`, `OnRemoteConfigOverride`, `OnRunCompleted`, `OnRunFailed`) are removed, along with the `Services/Scenarios/Legacy` folder. - Session types renamed: `StoreSession` → `StoreOfferSession` (`BuyAsync`/`Buy` → `PurchaseAsync`/`Purchase`), `RemoteConfigOverrideSession` → `ConfigChangedSession`, `BattlepassSession` → `BattlePassSession`, `BattlepassLevelSession` → `BattlePassLevelSession`, `ScenarioRunFailedEvent` → `ScenarioFailedEvent`. - `StoresService.BuyAsync` → `PurchaseAsync(storeSlug, offerId, idempotencyKey = null)`; a null key is replaced with a generated GUID. - `InventoryService.GetAsync` returns `IReadOnlyList`. - `StoresService.ListAsync` returns `IReadOnlyList`. - `QuestsService.ListAsync` returns `IReadOnlyList`. - `UgcService.GetDownloadUrlAsync` returns non-null `string` and throws `InvalidOperationException` when the server returns no URL. - `BattlePassService` simple overloads (`AddXpAsync(long amount)`, `ClaimRewardAsync(level, track)`, `GetProgressAsync()`, `PurchasePremiumAsync(idempotencyKey?)`); the request-DTO overloads are internal for the scenario runtime. - `LeaderboardsService.GetRankingAsync`/`SubmitScoreAsync` are internal; use the `FindBySlug(slug)` handle (`SubmitAsync`, `ListAsync`). - `AuthService.LoginViaDeviceAsync` removed; use `LoginWithDeviceAsync`. - `ScenarioService.Restore()` (sync-over-async) removed; use `RestoreAsync`. - `RealtimeService.ConnectAsync` and `IRealtimeTransport.ConnectAsync` take `TimeSpan` timeouts instead of `int timeoutSeconds`. - `IRudderTransport.SendAsync` takes a `string? accessToken` instead of `RequestOptions`; `RequestOptions` is removed and `EmptyResponse` is internal. - `RudderClient` getters `Options`, `Transport`, `TokenStore`, `DeviceIdProvider` are internal. - `RudderApiException.StatusCode` is `int` (was `long`). - `IRudderLogger.Log(string)` → `Log(RudderLogLevel level, string message)`. - Nullable reference types enabled (`enable`). - Remote config cache now includes every config except an explicit `"active": false` (a missing flag means active).