UNPKG

@mikle7/litty-api-client

Version:

TypeScript client for Litty API with clean, semantic type definitions

72 lines (71 loc) 4.26 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.AnswerQuestion200ResponseToJSONTyped = exports.AnswerQuestion200ResponseToJSON = exports.AnswerQuestion200ResponseFromJSONTyped = exports.AnswerQuestion200ResponseFromJSON = exports.instanceOfAnswerQuestion200Response = exports.AnswerQuestion200ResponseContestTypeEnum = void 0; const GetContestById200ResponseUserPredictionsInnerMarketOption_1 = require("./GetContestById200ResponseUserPredictionsInnerMarketOption"); /** * @export */ exports.AnswerQuestion200ResponseContestTypeEnum = { PickPack: 'PickPack', Traditional: 'Traditional' }; /** * Check if a given object implements the AnswerQuestion200Response interface. */ function instanceOfAnswerQuestion200Response(value) { return true; } exports.instanceOfAnswerQuestion200Response = instanceOfAnswerQuestion200Response; function AnswerQuestion200ResponseFromJSON(json) { return AnswerQuestion200ResponseFromJSONTyped(json, false); } exports.AnswerQuestion200ResponseFromJSON = AnswerQuestion200ResponseFromJSON; function AnswerQuestion200ResponseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'message': json['message'] == null ? undefined : json['message'], 'contestType': json['contestType'] == null ? undefined : json['contestType'], 'sessionId': json['sessionId'] == null ? undefined : json['sessionId'], 'marketId': json['marketId'] == null ? undefined : json['marketId'], 'selectedOption': json['selectedOption'] == null ? undefined : (0, GetContestById200ResponseUserPredictionsInnerMarketOption_1.GetContestById200ResponseUserPredictionsInnerMarketOptionFromJSON)(json['selectedOption']), 'questionsAnswered': json['questionsAnswered'] == null ? undefined : json['questionsAnswered'], 'sessionCompleted': json['sessionCompleted'] == null ? undefined : json['sessionCompleted'], 'note': json['note'] == null ? undefined : json['note'], }; } exports.AnswerQuestion200ResponseFromJSONTyped = AnswerQuestion200ResponseFromJSONTyped; function AnswerQuestion200ResponseToJSON(json) { return AnswerQuestion200ResponseToJSONTyped(json, false); } exports.AnswerQuestion200ResponseToJSON = AnswerQuestion200ResponseToJSON; function AnswerQuestion200ResponseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'message': value['message'], 'contestType': value['contestType'], 'sessionId': value['sessionId'], 'marketId': value['marketId'], 'selectedOption': (0, GetContestById200ResponseUserPredictionsInnerMarketOption_1.GetContestById200ResponseUserPredictionsInnerMarketOptionToJSON)(value['selectedOption']), 'questionsAnswered': value['questionsAnswered'], 'sessionCompleted': value['sessionCompleted'], 'note': value['note'], }; } exports.AnswerQuestion200ResponseToJSONTyped = AnswerQuestion200ResponseToJSONTyped;