@mikle7/litty-api-client
Version:
TypeScript client for Litty API with clean, semantic type definitions
109 lines (108 loc) • 6.28 kB
TypeScript
/**
* 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 * as runtime from '../runtime';
import type { CreateWallet201Response, CreditWallet200Response, CreditWalletRequest, DebitWallet200Response, DebitWalletRequest, DebugWallet200Response, FixWalletDiscrepancy200Response, FixWalletEventStreams200Response, GetUserWallet200Response } from '../models/index';
export interface CreateWalletRequest {
userId: string;
}
export interface CreditWalletOperationRequest {
userId: string;
creditWalletRequest: CreditWalletRequest;
}
export interface DebitWalletOperationRequest {
userId: string;
debitWalletRequest: DebitWalletRequest;
}
export interface DebugWalletRequest {
walletId: string;
}
export interface FixWalletDiscrepancyRequest {
walletId: string;
}
export interface GetUserWalletRequest {
userId: string;
}
/**
*
*/
export declare class WalletApi extends runtime.BaseAPI {
/**
* Create a new wallet for a specific user with default currency balances.
* Create a wallet for a user
*/
createWalletRaw(requestParameters: CreateWalletRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateWallet201Response>>;
/**
* Create a new wallet for a specific user with default currency balances.
* Create a wallet for a user
*/
createWallet(requestParameters: CreateWalletRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateWallet201Response>;
/**
* Add funds to a user wallet in the specified currency.
* Credit wallet
*/
creditWalletRaw(requestParameters: CreditWalletOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreditWallet200Response>>;
/**
* Add funds to a user wallet in the specified currency.
* Credit wallet
*/
creditWallet(requestParameters: CreditWalletOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreditWallet200Response>;
/**
* Remove funds from a user wallet in the specified currency.
* Debit wallet
*/
debitWalletRaw(requestParameters: DebitWalletOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DebitWallet200Response>>;
/**
* Remove funds from a user wallet in the specified currency.
* Debit wallet
*/
debitWallet(requestParameters: DebitWalletOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DebitWallet200Response>;
/**
* Debug endpoint to check wallet state and event stream consistency.
* Debug wallet state (Admin)
*/
debugWalletRaw(requestParameters: DebugWalletRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DebugWallet200Response>>;
/**
* Debug endpoint to check wallet state and event stream consistency.
* Debug wallet state (Admin)
*/
debugWallet(requestParameters: DebugWalletRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DebugWallet200Response>;
/**
* Debug endpoint to fix wallet discrepancy by adding missing credit events.
* Fix wallet discrepancy (Admin)
*/
fixWalletDiscrepancyRaw(requestParameters: FixWalletDiscrepancyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FixWalletDiscrepancy200Response>>;
/**
* Debug endpoint to fix wallet discrepancy by adding missing credit events.
* Fix wallet discrepancy (Admin)
*/
fixWalletDiscrepancy(requestParameters: FixWalletDiscrepancyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FixWalletDiscrepancy200Response>;
/**
* TEMPORARY ENDPOINT: Fix missing wallet event streams by creating WalletCreated events for existing wallets. This endpoint should be removed after all wallets are fixed.
* Fix missing wallet event streams (Admin)
*/
fixWalletEventStreamsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FixWalletEventStreams200Response>>;
/**
* TEMPORARY ENDPOINT: Fix missing wallet event streams by creating WalletCreated events for existing wallets. This endpoint should be removed after all wallets are fixed.
* Fix missing wallet event streams (Admin)
*/
fixWalletEventStreams(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FixWalletEventStreams200Response>;
/**
* Retrieve wallet information for a specific user including all currency balances.
* Get user wallet
*/
getUserWalletRaw(requestParameters: GetUserWalletRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetUserWallet200Response>>;
/**
* Retrieve wallet information for a specific user including all currency balances.
* Get user wallet
*/
getUserWallet(requestParameters: GetUserWalletRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUserWallet200Response>;
}