openvibe-sdk/levels

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

From types/levels.d.ts (both). Declarations are shown verbatim.

interface Level

export interface Level { level: number; xp: number; into: number; span: number; next_at: number; rank: number | null; recent: Array<{ name: string; at: string; amount: number }>; }

interface Entry

export interface Entry { subject: string; username: string; level: number; xp: number; rank: number; }

interface Period

export interface Period { top: Entry[]; me: Entry | null; around: Entry[]; }

interface Award

export interface Award { subject: string; reason: 'quest.completed' | 'coins.earned' | 'video.published' | 'stream.watched'; amount: number; idempotency_key: string; }

export export function createLevelsClient(client: OpenVibeClient, o

export function createLevelsClient(client: OpenVibeClient, options?: { baseUrl?: string }): {
 get(username: string, options?: { signal?: AbortSignal }): Promise<Level>;
 batch(subjects: string[], options?: { signal?: AbortSignal }): Promise<{ levels: Record<string, number> }>;
 board(options?: { signal?: AbortSignal }): Promise<{ all_time: Period; week: Period }>;
 award(body: Award, options?: { signal?: AbortSignal }): Promise<Level>;
};