kurdquiz_lib
Version:
67 lines • 1.77 kB
TypeScript
export declare namespace SocketDataArgs {
type GameId = string | number;
type QuestionId = string | number;
type AnswerId = string | number;
export type OpenGame = {
gameId: GameId;
ingestServer: string;
streamKey: string;
playbackUrl: string;
};
export type IsGameOpen = {
gameId: GameId;
};
export type StopGame = {
gameId: GameId;
};
export type EndGame = {
gameId: GameId;
};
export type StartQuestion = {
gameId: GameId;
questionId: QuestionId;
};
export type EndQuestion = {
gameId: GameId;
questionId: QuestionId;
};
export type ShowStats = {
gameId: GameId;
questionId: QuestionId;
};
export type SubmitAnswer = {
gameId: GameId;
questionId: QuestionId;
answerId: AnswerId;
};
export type UseLive = {
gameId: GameId;
questionId: QuestionId;
};
export type Join = {
gameId: GameId;
};
export type ElapsedQuestions = {
gameId: GameId;
};
export {};
}
export declare namespace SocketCallbackArgs {
type Join = (err: Error, data: {
active: boolean;
playbackUrl: string;
}) => void;
type UseLive = (err: Error, success: boolean) => void;
type SubmitAnswer = (err: Error) => void;
type ShowStats = (err: Error, stats: Stats) => void;
type ElapsedQuestions = (err: Error, questionIds: string[]) => void;
type IsGameOpen = (err: Error, isGameOpen: boolean) => void;
}
export declare type Stats = {
correct_answer_id: string | number;
numbers: Array<{
answer_id: string | number;
choosers: number;
}>;
};
//# sourceMappingURL=types.d.ts.map