UNPKG

@mikle7/litty-api-client

Version:

TypeScript client for Litty API with clean, semantic type definitions

108 lines (107 loc) 4.24 kB
/** * 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. */ /** * * @export * @interface CreateTransactionDto */ export interface CreateTransactionDto { /** * The unique identifier of the wallet * @type {string} * @memberof CreateTransactionDto */ walletId: string; /** * The unique identifier of the user * @type {string} * @memberof CreateTransactionDto */ userId: string; /** * The type of transaction (credit or debit) * @type {string} * @memberof CreateTransactionDto */ type: CreateTransactionDtoTypeEnum; /** * The currency/type of wallet balance affected * @type {string} * @memberof CreateTransactionDto */ currency: CreateTransactionDtoCurrencyEnum; /** * The amount of the transaction (must be positive) * @type {number} * @memberof CreateTransactionDto */ amount: number; /** * The source that initiated this transaction * @type {string} * @memberof CreateTransactionDto */ source: CreateTransactionDtoSourceEnum; /** * Optional identifier for the source (e.g., contest ID, reward ID) * @type {string} * @memberof CreateTransactionDto */ sourceId?: string; /** * Human-readable reason for the transaction * @type {string} * @memberof CreateTransactionDto */ reason: string; /** * Additional metadata for the transaction * @type {object} * @memberof CreateTransactionDto */ metadata?: object; } /** * @export */ export declare const CreateTransactionDtoTypeEnum: { readonly Credit: "credit"; readonly Debit: "debit"; }; export type CreateTransactionDtoTypeEnum = typeof CreateTransactionDtoTypeEnum[keyof typeof CreateTransactionDtoTypeEnum]; /** * @export */ export declare const CreateTransactionDtoCurrencyEnum: { readonly Points: "points"; readonly Tickets: "tickets"; readonly Cashable: "cashable"; }; export type CreateTransactionDtoCurrencyEnum = typeof CreateTransactionDtoCurrencyEnum[keyof typeof CreateTransactionDtoCurrencyEnum]; /** * @export */ export declare const CreateTransactionDtoSourceEnum: { readonly ContestEntry: "contest_entry"; readonly ContestWinning: "contest_winning"; readonly AdminAdjustment: "admin_adjustment"; readonly Promotion: "promotion"; }; export type CreateTransactionDtoSourceEnum = typeof CreateTransactionDtoSourceEnum[keyof typeof CreateTransactionDtoSourceEnum]; /** * Check if a given object implements the CreateTransactionDto interface. */ export declare function instanceOfCreateTransactionDto(value: object): value is CreateTransactionDto; export declare function CreateTransactionDtoFromJSON(json: any): CreateTransactionDto; export declare function CreateTransactionDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateTransactionDto; export declare function CreateTransactionDtoToJSON(json: any): CreateTransactionDto; export declare function CreateTransactionDtoToJSONTyped(value?: CreateTransactionDto | null, ignoreDiscriminator?: boolean): any;