diff --git a/CHANGELOG.md b/CHANGELOG.md index d85a61d..88cf3cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 0.2.0 + +- `PlayerProfile.balances` (`CurrencyBalance[]`: `currency`, `balance`) + replaces `wallets`, and the `Wallet` type is renamed `CurrencyBalance`. +- `PlayerProfile.items` (`InventoryStack[]`: `item`, `quantity`) replaces + `counters`. +- The server's `resources` to `catalogs` rename changes no public type. +- Module clients generated by `rudder client generate` 0.3.0 list the current + kernel error codes in `RudderKernelError`. + ## 0.1.0 First release as `@rudder/sdk`. Not compatible with `@rudder/js-sdk` 2.x. diff --git a/package-lock.json b/package-lock.json index 64fc7d6..76667e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@rudder/sdk", - "version": "0.1.0", + "version": "0.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@rudder/sdk", - "version": "0.1.0", + "version": "0.2.0", "devDependencies": { "@types/node": "^26.1.1", "jsdom": "^29.1.1", diff --git a/package.json b/package.json index 27a2a49..3f9f7a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rudder/sdk", - "version": "0.1.0", + "version": "0.2.0", "publishConfig": { "registry": "https://hub.rudder.build/api/packages/rudder/npm/" }, diff --git a/skills/rudder-web-sdk/SKILL.md b/skills/rudder-web-sdk/SKILL.md index 5130430..384f2ed 100644 --- a/skills/rudder-web-sdk/SKILL.md +++ b/skills/rudder-web-sdk/SKILL.md @@ -9,7 +9,7 @@ Client SDK for web games on the Rudder LiveOps platform. Source of truth: `liveops-web-sdk/src` (wire types in `src/generated` come from `liveops-backend/apigen`; never edit them by hand). -0.1.0 covers only the kernel: auth, player, catalog, storage, module calls and +0.2.0 covers only the kernel: auth, player, catalog, storage, module calls and internal revision sync. Game features are installed modules, reached through a typed client generated from their manifests. There is no `resources(slug)` and no `projectStorage`; game-facing configuration comes from modules such as diff --git a/test/e2e-prod/player.e2e.test.ts b/test/e2e-prod/player.e2e.test.ts index 7538a75..2ab8864 100644 --- a/test/e2e-prod/player.e2e.test.ts +++ b/test/e2e-prod/player.e2e.test.ts @@ -2,11 +2,11 @@ import { describe, it, expect } from 'vitest'; import { freshPlayer } from './_setup/harness.js'; describe('e2e-prod: player', () => { - it('device login yields a profile with a player id wallets array and counters', async () => { + it('device login yields a profile with a player id and balances and items arrays', async () => { const client = await freshPlayer(); const profile = await client.player.reload(); expect(profile.player?.id).toBeTruthy(); - expect(Array.isArray(profile.wallets)).toBe(true); - expect(profile).toHaveProperty('counters'); + expect(Array.isArray(profile.balances)).toBe(true); + expect(Array.isArray(profile.items)).toBe(true); }); }); diff --git a/test/fixtures/rudder.modules.ts b/test/fixtures/rudder.modules.ts index 11f90ee..8170206 100644 --- a/test/fixtures/rudder.modules.ts +++ b/test/fixtures/rudder.modules.ts @@ -11,26 +11,29 @@ export interface RudderModuleCaller { export type RudderKernelError = | "call_depth_exceeded" + | "catalog_invalid_field" + | "catalog_not_found" + | "catalog_ref_invalid" | "conflict" - | "counter_only_increment" + | "counter_above_max" + | "counter_below_min" + | "currency_unknown" | "dependency_not_declared" | "forbidden" | "function_not_callable" | "function_not_found" | "insufficient_funds" + | "insufficient_items" | "internal" | "invalid_parameters" | "module_not_installed" | "player_not_found" | "player_required" + | "primitive_not_declared" + | "regen_insufficient" | "reserved_event" - | "resource_invalid_field" - | "resource_invalid_ref" - | "resource_not_found" - | "row_not_found" - | "row_referenced" + | "sorted_set_order_changed" | "storage_key_limit_exceeded" - | "unique_violation" | "unknown_operation" | "version_conflict"