up
All checks were successful
Deploy to Production / deploy (push) Successful in 8s

This commit is contained in:
lubukhu
2026-01-24 13:35:11 +07:00
parent 6c3e93636e
commit 65fd0158a3
145 changed files with 10262 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
import React from 'react';
import { GameApiConfig } from '../api';
export interface SessionStatus {
type: 'new' | 'resumed' | 'timeout' | 'completed' | 'assignment_ended' | 'not_started';
message: string;
data?: {
answered?: number;
total?: number;
score?: number;
remainingTime?: number;
startedAt?: string;
};
}
export interface GamePlayerError {
type: 'network' | 'api' | 'timeout' | 'session' | 'not_started' | 'unknown';
code?: number;
message: string;
details?: any;
canRetry?: boolean;
}
export declare const SessionErrorCodes: {
readonly SESSION_NOT_STARTED: -60;
readonly SESSION_ENDED: -61;
readonly SESSION_COMPLETED: -62;
readonly SESSION_TIMEOUT: -63;
readonly SESSION_NOT_FOUND: -64;
readonly SESSION_ALREADY_ANSWERED: -65;
};
export interface GamePlayerProps {
apiConfig: GameApiConfig;
assignmentId: number;
studentId: string;
className?: string;
style?: React.CSSProperties;
debug?: boolean;
onComplete?: (result: any) => void;
onError?: (error: GamePlayerError) => void;
onGameLoaded?: (gameInfo: any) => void;
extraGameData?: Record<string, any>;
onLog?: (message: string, type?: 'info' | 'success' | 'error' | 'warning') => void;
onSessionStatus?: (status: SessionStatus) => void;
renderLoading?: () => React.ReactNode;
renderError?: (error: GamePlayerError, retry: () => void) => React.ReactNode;
loadingTimeout?: number;
}
export declare const GamePlayer: React.FC<GamePlayerProps>;
//# sourceMappingURL=GamePlayer.d.ts.map