@mikle7/litty-api-client
Version:
TypeScript client for Litty API with clean, semantic type definitions
61 lines (60 loc) • 4.23 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.
*/
import { GetContestById200ResponseUserPredictionsInnerMarketFromJSON, GetContestById200ResponseUserPredictionsInnerMarketToJSON, } from './GetContestById200ResponseUserPredictionsInnerMarket';
import { GetContestEntries200ResponseDirectPredictionsInnerUserFromJSON, GetContestEntries200ResponseDirectPredictionsInnerUserToJSON, } from './GetContestEntries200ResponseDirectPredictionsInnerUser';
import { GetContestById200ResponseUserPredictionsInnerMarketOptionFromJSON, GetContestById200ResponseUserPredictionsInnerMarketOptionToJSON, } from './GetContestById200ResponseUserPredictionsInnerMarketOption';
/**
* Check if a given object implements the GetContestEntries200ResponseDirectPredictionsInner interface.
*/
export function instanceOfGetContestEntries200ResponseDirectPredictionsInner(value) {
return true;
}
export function GetContestEntries200ResponseDirectPredictionsInnerFromJSON(json) {
return GetContestEntries200ResponseDirectPredictionsInnerFromJSONTyped(json, false);
}
export 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 : GetContestEntries200ResponseDirectPredictionsInnerUserFromJSON(json['user']),
'marketOption': json['marketOption'] == null ? undefined : GetContestById200ResponseUserPredictionsInnerMarketOptionFromJSON(json['marketOption']),
'market': json['market'] == null ? undefined : GetContestById200ResponseUserPredictionsInnerMarketFromJSON(json['market']),
};
}
export function GetContestEntries200ResponseDirectPredictionsInnerToJSON(json) {
return GetContestEntries200ResponseDirectPredictionsInnerToJSONTyped(json, false);
}
export 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': GetContestEntries200ResponseDirectPredictionsInnerUserToJSON(value['user']),
'marketOption': GetContestById200ResponseUserPredictionsInnerMarketOptionToJSON(value['marketOption']),
'market': GetContestById200ResponseUserPredictionsInnerMarketToJSON(value['market']),
};
}