This commit is contained in:
31
G102-sequence/sdk/package/dist/kit/mappers.d.ts
vendored
Normal file
31
G102-sequence/sdk/package/dist/kit/mappers.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Mappers Kit
|
||||
* Helper functions to transform data between Client App and Game Iframe
|
||||
*/
|
||||
export interface GamePayloadOptions {
|
||||
gameId: string | number;
|
||||
userId: string;
|
||||
gameData: any;
|
||||
answeredQuestions?: any[];
|
||||
extraData?: Record<string, any>;
|
||||
endTimeIso?: string;
|
||||
}
|
||||
export interface IframeGamePayload {
|
||||
game_id: string | number;
|
||||
user_id: string;
|
||||
data: any[];
|
||||
completed_question_ids: {
|
||||
id: string;
|
||||
result: number;
|
||||
}[];
|
||||
end_time_iso?: string;
|
||||
[key: string]: any;
|
||||
}
|
||||
export declare function prepareCompletedQuestions(answeredQuestions: any[]): {
|
||||
id: string;
|
||||
result: number;
|
||||
}[];
|
||||
export declare function createGamePayload(options: GamePayloadOptions): IframeGamePayload;
|
||||
export declare function createLeaderboardPayload(apiData: any): any;
|
||||
export declare function normalizeAnswerReport(data: any): any;
|
||||
//# sourceMappingURL=mappers.d.ts.map
|
||||
Reference in New Issue
Block a user