UNPKG

@mikle7/litty-api-client

Version:

TypeScript client for Litty API with clean, semantic type definitions

93 lines (92 loc) 4.98 kB
/* 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. */ import { GetContestEntries200ResponseDirectPredictionsInnerUserFromJSON, GetContestEntries200ResponseDirectPredictionsInnerUserToJSON, } from './GetContestEntries200ResponseDirectPredictionsInnerUser'; import { GetContestSession200ResponseContestFromJSON, GetContestSession200ResponseContestToJSON, } from './GetContestSession200ResponseContest'; /** * @export */ export const GetContestSession200ResponseContestTypeEnum = { PickPack: 'PickPack', Traditional: 'Traditional' }; /** * @export */ export const GetContestSession200ResponseStatusEnum = { InProgress: 'InProgress', Completed: 'Completed' }; /** * @export */ export const GetContestSession200ResponseDifficultyLevelEnum = { Easy: 'Easy', Medium: 'Medium', Hard: 'Hard', Expert: 'Expert' }; /** * Check if a given object implements the GetContestSession200Response interface. */ export function instanceOfGetContestSession200Response(value) { return true; } export function GetContestSession200ResponseFromJSON(json) { return GetContestSession200ResponseFromJSONTyped(json, false); } export 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 : GetContestSession200ResponseContestFromJSON(json['contest']), 'user': json['user'] == null ? undefined : GetContestEntries200ResponseDirectPredictionsInnerUserFromJSON(json['user']), }; } export function GetContestSession200ResponseToJSON(json) { return GetContestSession200ResponseToJSONTyped(json, false); } export 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': GetContestSession200ResponseContestToJSON(value['contest']), 'user': GetContestEntries200ResponseDirectPredictionsInnerUserToJSON(value['user']), }; }