@mikle7/litty-api-client
Version:
TypeScript client for Litty API with clean, semantic type definitions
101 lines (100 loc) • 5.95 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* Litty API
* Complete API documentation for the Litty platform. ## Authentication Most endpoints require authentication via Supabase JWT tokens. Include the token in the Authorization header: `Bearer <token>` ## API Structure - **Contests**: Create and manage contests, entries, and settlements - **Markets**: Manage prediction markets within contests - **Transactions**: Handle financial transactions for contest entries and rewards - **Wallet**: Manage user wallet balances (cashable, points, tickets) - **Users**: User management and profiles - **Leaderboards**: Competition rankings and scoring - **Uploads**: File upload management - **Shows**: TV show and episode management (admin only) ## Response Formats All endpoints return JSON responses with consistent error handling. Error responses include `statusCode`, `message`, and `error` fields.
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetContestSession200ResponseToJSONTyped = exports.GetContestSession200ResponseToJSON = exports.GetContestSession200ResponseFromJSONTyped = exports.GetContestSession200ResponseFromJSON = exports.instanceOfGetContestSession200Response = exports.GetContestSession200ResponseDifficultyLevelEnum = exports.GetContestSession200ResponseStatusEnum = exports.GetContestSession200ResponseContestTypeEnum = void 0;
const GetContestEntries200ResponseDirectPredictionsInnerUser_1 = require("./GetContestEntries200ResponseDirectPredictionsInnerUser");
const GetContestSession200ResponseContest_1 = require("./GetContestSession200ResponseContest");
/**
* @export
*/
exports.GetContestSession200ResponseContestTypeEnum = {
PickPack: 'PickPack',
Traditional: 'Traditional'
};
/**
* @export
*/
exports.GetContestSession200ResponseStatusEnum = {
InProgress: 'InProgress',
Completed: 'Completed'
};
/**
* @export
*/
exports.GetContestSession200ResponseDifficultyLevelEnum = {
Easy: 'Easy',
Medium: 'Medium',
Hard: 'Hard',
Expert: 'Expert'
};
/**
* Check if a given object implements the GetContestSession200Response interface.
*/
function instanceOfGetContestSession200Response(value) {
return true;
}
exports.instanceOfGetContestSession200Response = instanceOfGetContestSession200Response;
function GetContestSession200ResponseFromJSON(json) {
return GetContestSession200ResponseFromJSONTyped(json, false);
}
exports.GetContestSession200ResponseFromJSON = GetContestSession200ResponseFromJSON;
function GetContestSession200ResponseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'contestType': json['contestType'] == null ? undefined : json['contestType'],
'sessionId': json['sessionId'] == null ? undefined : json['sessionId'],
'contestEntryId': json['contestEntryId'] == null ? undefined : json['contestEntryId'],
'status': json['status'] == null ? undefined : json['status'],
'difficultyLevel': json['difficultyLevel'] == null ? undefined : json['difficultyLevel'],
'sessionMultiplier': json['sessionMultiplier'] == null ? undefined : json['sessionMultiplier'],
'questionsAnswered': json['questionsAnswered'] == null ? undefined : json['questionsAnswered'],
'totalQuestions': json['totalQuestions'] == null ? undefined : json['totalQuestions'],
'correctAnswers': json['correctAnswers'] == null ? undefined : json['correctAnswers'],
'playCreditsSpent': json['playCreditsSpent'] == null ? undefined : json['playCreditsSpent'],
'prizeCreditsEarned': json['prizeCreditsEarned'] == null ? undefined : json['prizeCreditsEarned'],
'completedAt': json['completedAt'] == null ? undefined : (new Date(json['completedAt'])),
'contest': json['contest'] == null ? undefined : (0, GetContestSession200ResponseContest_1.GetContestSession200ResponseContestFromJSON)(json['contest']),
'user': json['user'] == null ? undefined : (0, GetContestEntries200ResponseDirectPredictionsInnerUser_1.GetContestEntries200ResponseDirectPredictionsInnerUserFromJSON)(json['user']),
};
}
exports.GetContestSession200ResponseFromJSONTyped = GetContestSession200ResponseFromJSONTyped;
function GetContestSession200ResponseToJSON(json) {
return GetContestSession200ResponseToJSONTyped(json, false);
}
exports.GetContestSession200ResponseToJSON = GetContestSession200ResponseToJSON;
function GetContestSession200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'contestType': value['contestType'],
'sessionId': value['sessionId'],
'contestEntryId': value['contestEntryId'],
'status': value['status'],
'difficultyLevel': value['difficultyLevel'],
'sessionMultiplier': value['sessionMultiplier'],
'questionsAnswered': value['questionsAnswered'],
'totalQuestions': value['totalQuestions'],
'correctAnswers': value['correctAnswers'],
'playCreditsSpent': value['playCreditsSpent'],
'prizeCreditsEarned': value['prizeCreditsEarned'],
'completedAt': value['completedAt'] == null ? undefined : (value['completedAt'].toISOString()),
'contest': (0, GetContestSession200ResponseContest_1.GetContestSession200ResponseContestToJSON)(value['contest']),
'user': (0, GetContestEntries200ResponseDirectPredictionsInnerUser_1.GetContestEntries200ResponseDirectPredictionsInnerUserToJSON)(value['user']),
};
}
exports.GetContestSession200ResponseToJSONTyped = GetContestSession200ResponseToJSONTyped;