@playcademy/sdk 0.1.18 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,6 +14,54 @@ The SDK serves as the primary interface between your game and the Playcademy pla
14
14
  - **Event System**: Real-time notifications for inventory changes, level ups, and more
15
15
  - **Developer Tools**: Built-in support for game development and testing workflows
16
16
 
17
+ ### Public vs Internal SDK
18
+
19
+ The Playcademy SDK is split into two entry points:
20
+
21
+ #### Public SDK (`@playcademy/sdk`)
22
+
23
+ For game developers building games on the Playcademy platform. Includes 8 essential namespaces:
24
+
25
+ - **Core**: `identity`, `runtime`, `backend`, `users`
26
+ - **Economy**: `credits`
27
+ - **Gameplay**: `scores`
28
+ - **Multiplayer**: `realtime`
29
+ - **Integrations**: `timeback`
30
+
31
+ ```typescript
32
+ import { PlaycademyClient } from '@playcademy/sdk'
33
+
34
+ const client = await PlaycademyClient.init()
35
+ await client.timeback.endActivity({
36
+ /* ... */
37
+ })
38
+ await client.users.inventory.add('gold-coin', 100)
39
+ ```
40
+
41
+ #### Internal SDK (`@playcademy/sdk/internal`)
42
+
43
+ For CLI, platform, and admin tools. Includes all 21 namespaces (8 public + 13 internal):
44
+
45
+ **Additional internal namespaces:**
46
+
47
+ - **Platform Auth**: `auth` (email/password login, API keys)
48
+ - **Administration**: `admin` (game management, items, currencies)
49
+ - **Developer Tools**: `dev` (publish games, uploads)
50
+ - **Game Directory**: `games` (fetch, list, sessions)
51
+ - **Overworld Features**: `character`, `achievements`, `leaderboard`, `levels`, `shop`, `maps`, `sprites`, `notifications`
52
+ - **Analytics**: `telemetry`
53
+
54
+ ```typescript
55
+ import { PlaycademyClient } from '@playcademy/sdk/internal'
56
+
57
+ const client = new PlaycademyClient({ baseUrl: 'https://hub.playcademy.net' })
58
+ await client.auth.login({ email: 'dev@example.com', password: '***' })
59
+ const games = await client.games.list()
60
+ await client.admin.games.pauseGame('game-123')
61
+ ```
62
+
63
+ **Note**: The internal SDK is for trusted code only (CLI, platform internals). Game developers should use the public SDK.
64
+
17
65
  ### Key Benefits
18
66
 
19
67
  - **Zero Configuration**: Automatic initialization with environment detection