UNPKG

@mikle7/litty-api-client

Version:

TypeScript client for Litty API with clean, semantic type definitions

69 lines (68 loc) 5.46 kB
"use strict"; /* 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.GetContestEntries200ResponseDirectPredictionsInnerToJSONTyped = exports.GetContestEntries200ResponseDirectPredictionsInnerToJSON = exports.GetContestEntries200ResponseDirectPredictionsInnerFromJSONTyped = exports.GetContestEntries200ResponseDirectPredictionsInnerFromJSON = exports.instanceOfGetContestEntries200ResponseDirectPredictionsInner = void 0; const GetContestById200ResponseUserPredictionsInnerMarket_1 = require("./GetContestById200ResponseUserPredictionsInnerMarket"); const GetContestEntries200ResponseDirectPredictionsInnerUser_1 = require("./GetContestEntries200ResponseDirectPredictionsInnerUser"); const GetContestById200ResponseUserPredictionsInnerMarketOption_1 = require("./GetContestById200ResponseUserPredictionsInnerMarketOption"); /** * Check if a given object implements the GetContestEntries200ResponseDirectPredictionsInner interface. */ function instanceOfGetContestEntries200ResponseDirectPredictionsInner(value) { return true; } exports.instanceOfGetContestEntries200ResponseDirectPredictionsInner = instanceOfGetContestEntries200ResponseDirectPredictionsInner; function GetContestEntries200ResponseDirectPredictionsInnerFromJSON(json) { return GetContestEntries200ResponseDirectPredictionsInnerFromJSONTyped(json, false); } exports.GetContestEntries200ResponseDirectPredictionsInnerFromJSON = GetContestEntries200ResponseDirectPredictionsInnerFromJSON; function GetContestEntries200ResponseDirectPredictionsInnerFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'id': json['id'] == null ? undefined : json['id'], 'userId': json['userId'] == null ? undefined : json['userId'], 'marketOptionId': json['marketOptionId'] == null ? undefined : json['marketOptionId'], 'marketId': json['marketId'] == null ? undefined : json['marketId'], 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])), 'teamId': json['teamId'] == null ? undefined : json['teamId'], 'user': json['user'] == null ? undefined : (0, GetContestEntries200ResponseDirectPredictionsInnerUser_1.GetContestEntries200ResponseDirectPredictionsInnerUserFromJSON)(json['user']), 'marketOption': json['marketOption'] == null ? undefined : (0, GetContestById200ResponseUserPredictionsInnerMarketOption_1.GetContestById200ResponseUserPredictionsInnerMarketOptionFromJSON)(json['marketOption']), 'market': json['market'] == null ? undefined : (0, GetContestById200ResponseUserPredictionsInnerMarket_1.GetContestById200ResponseUserPredictionsInnerMarketFromJSON)(json['market']), }; } exports.GetContestEntries200ResponseDirectPredictionsInnerFromJSONTyped = GetContestEntries200ResponseDirectPredictionsInnerFromJSONTyped; function GetContestEntries200ResponseDirectPredictionsInnerToJSON(json) { return GetContestEntries200ResponseDirectPredictionsInnerToJSONTyped(json, false); } exports.GetContestEntries200ResponseDirectPredictionsInnerToJSON = GetContestEntries200ResponseDirectPredictionsInnerToJSON; function GetContestEntries200ResponseDirectPredictionsInnerToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'id': value['id'], 'userId': value['userId'], 'marketOptionId': value['marketOptionId'], 'marketId': value['marketId'], 'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()), 'teamId': value['teamId'], 'user': (0, GetContestEntries200ResponseDirectPredictionsInnerUser_1.GetContestEntries200ResponseDirectPredictionsInnerUserToJSON)(value['user']), 'marketOption': (0, GetContestById200ResponseUserPredictionsInnerMarketOption_1.GetContestById200ResponseUserPredictionsInnerMarketOptionToJSON)(value['marketOption']), 'market': (0, GetContestById200ResponseUserPredictionsInnerMarket_1.GetContestById200ResponseUserPredictionsInnerMarketToJSON)(value['market']), }; } exports.GetContestEntries200ResponseDirectPredictionsInnerToJSONTyped = GetContestEntries200ResponseDirectPredictionsInnerToJSONTyped;