@mikle7/litty-api-client
Version:
TypeScript client for Litty API with clean, semantic type definitions
83 lines (82 loc) • 4.45 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.GetMe200ResponseToJSONTyped = exports.GetMe200ResponseToJSON = exports.GetMe200ResponseFromJSONTyped = exports.GetMe200ResponseFromJSON = exports.instanceOfGetMe200Response = exports.GetMe200ResponseGenderEnum = void 0;
/**
* @export
*/
exports.GetMe200ResponseGenderEnum = {
Male: 'Male',
Female: 'Female',
NonBinary: 'NonBinary',
PreferNotToSay: 'PreferNotToSay'
};
/**
* Check if a given object implements the GetMe200Response interface.
*/
function instanceOfGetMe200Response(value) {
return true;
}
exports.instanceOfGetMe200Response = instanceOfGetMe200Response;
function GetMe200ResponseFromJSON(json) {
return GetMe200ResponseFromJSONTyped(json, false);
}
exports.GetMe200ResponseFromJSON = GetMe200ResponseFromJSON;
function GetMe200ResponseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'email': json['email'] == null ? undefined : json['email'],
'name': json['name'] == null ? undefined : json['name'],
'nickname': json['nickname'] == null ? undefined : json['nickname'],
'location': json['location'] == null ? undefined : json['location'],
'gender': json['gender'] == null ? undefined : json['gender'],
'dateOfBirth': json['dateOfBirth'] == null ? undefined : (new Date(json['dateOfBirth'])),
'referralCode': json['referralCode'] == null ? undefined : json['referralCode'],
'emailVerified': json['emailVerified'] == null ? undefined : json['emailVerified'],
'hasCompletedOnboarding': json['hasCompletedOnboarding'] == null ? undefined : json['hasCompletedOnboarding'],
'isWaitlisted': json['isWaitlisted'] == null ? undefined : json['isWaitlisted'],
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
};
}
exports.GetMe200ResponseFromJSONTyped = GetMe200ResponseFromJSONTyped;
function GetMe200ResponseToJSON(json) {
return GetMe200ResponseToJSONTyped(json, false);
}
exports.GetMe200ResponseToJSON = GetMe200ResponseToJSON;
function GetMe200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'id': value['id'],
'email': value['email'],
'name': value['name'],
'nickname': value['nickname'],
'location': value['location'],
'gender': value['gender'],
'dateOfBirth': value['dateOfBirth'] == null ? undefined : ((value['dateOfBirth']).toISOString()),
'referralCode': value['referralCode'],
'emailVerified': value['emailVerified'],
'hasCompletedOnboarding': value['hasCompletedOnboarding'],
'isWaitlisted': value['isWaitlisted'],
'createdAt': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
'updatedAt': value['updatedAt'] == null ? undefined : ((value['updatedAt']).toISOString()),
};
}
exports.GetMe200ResponseToJSONTyped = GetMe200ResponseToJSONTyped;