@mikle7/litty-api-client
Version:
TypeScript client for Litty API with clean, semantic type definitions
69 lines (68 loc) • 3.62 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.CreateContestRequestToJSONTyped = exports.CreateContestRequestToJSON = exports.CreateContestRequestFromJSONTyped = exports.CreateContestRequestFromJSON = exports.instanceOfCreateContestRequest = void 0;
const CreateContestRequestMarketsInner_1 = require("./CreateContestRequestMarketsInner");
/**
* Check if a given object implements the CreateContestRequest interface.
*/
function instanceOfCreateContestRequest(value) {
if (!('name' in value) || value['name'] === undefined)
return false;
if (!('type' in value) || value['type'] === undefined)
return false;
if (!('startDate' in value) || value['startDate'] === undefined)
return false;
if (!('endDate' in value) || value['endDate'] === undefined)
return false;
if (!('markets' in value) || value['markets'] === undefined)
return false;
return true;
}
exports.instanceOfCreateContestRequest = instanceOfCreateContestRequest;
function CreateContestRequestFromJSON(json) {
return CreateContestRequestFromJSONTyped(json, false);
}
exports.CreateContestRequestFromJSON = CreateContestRequestFromJSON;
function CreateContestRequestFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'name': json['name'],
'type': json['type'],
'startDate': (new Date(json['startDate'])),
'endDate': (new Date(json['endDate'])),
'markets': (json['markets'].map(CreateContestRequestMarketsInner_1.CreateContestRequestMarketsInnerFromJSON)),
};
}
exports.CreateContestRequestFromJSONTyped = CreateContestRequestFromJSONTyped;
function CreateContestRequestToJSON(json) {
return CreateContestRequestToJSONTyped(json, false);
}
exports.CreateContestRequestToJSON = CreateContestRequestToJSON;
function CreateContestRequestToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'name': value['name'],
'type': value['type'],
'startDate': ((value['startDate']).toISOString()),
'endDate': ((value['endDate']).toISOString()),
'markets': (value['markets'].map(CreateContestRequestMarketsInner_1.CreateContestRequestMarketsInnerToJSON)),
};
}
exports.CreateContestRequestToJSONTyped = CreateContestRequestToJSONTyped;