JSPM

@aethex.os/game

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 33
  • Score
    100M100P100Q66929F
  • License MIT

AeThex game platform types — Zod schemas and TypeScript types for Minecraft, Roblox, Steam, Meta, and more

Package Exports

  • @aethex.os/game
  • @aethex.os/game/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@aethex.os/game) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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/game

Usage

Validate incoming data

import { GameAccountSchema, MatchmakingTicketSchema } from '@aethex.os/game';

const account = GameAccountSchema.parse(req.body);
// throws ZodError if invalid, returns typed GameAccount if valid

Type 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.