@aethex.os/game
v1.0.1
Published
AeThex game platform types — Zod schemas and TypeScript types for Minecraft, Roblox, Steam, Meta, and more
Maintainers
Readme
@aethex.os/game
Zod schemas and TypeScript types for game platform integrations — accounts, profiles, achievements, servers, matchmaking, sessions, assets, and marketplace items across Minecraft, Roblox, Steam, Meta, and more.
Install
npm install @aethex.os/gameUsage
Validate incoming data
import { GameAccountSchema, MatchmakingTicketSchema } from '@aethex.os/game';
const account = GameAccountSchema.parse(req.body);
// throws ZodError if invalid, returns typed GameAccount if validType your functions
import type { GameAccount, GameAchievement, GameServer } from '@aethex.os/game';
function grantAchievement(userId: string, achievement: GameAchievement) {
// ...
}Schemas
| Schema | What it validates |
|---|---|
| GameAccountSchema | Platform account link (Minecraft, Roblox, Steam, Meta, Twitch, etc.) |
| GameProfileSchema | Platform-specific profile stats |
| GameAchievementSchema | Achievement with rarity, points, unlock time |
| GameServerSchema | Game server with location, capacity, status |
| GameAssetSchema | 3D assets, textures, audio with license info |
| MatchmakingTicketSchema | Matchmaking request with skill rating and regions |
| GameSessionSchema | Active game session state |
| GameEventSchema | Analytics event (player_died, objective_completed, etc.) |
| GameItemSchema | Marketplace item with rarity and trading info |
Supported platforms
import { GamePlatform } from '@aethex.os/game';
// 'minecraft' | 'roblox' | 'steam' | 'meta' | 'twitch' | 'youtube' | 'eos' | 'epic'Rarity enum
import { Rarity } from '@aethex.os/game';
// 'common' | 'uncommon' | 'rare' | 'epic' | 'legendary'Safe parsing
const result = GameAccountSchema.safeParse(data);
if (!result.success) {
console.log(result.error.issues);
} else {
const account = result.data; // fully typed
}Part of the @aethex.os ecosystem
See @aethex.os/core for the full package list.
