@mikle7/litty-api-client
Version:
TypeScript client for Litty API with clean, semantic type definitions
141 lines (140 loc) • 5.17 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.
*/
/**
*
* @export
* @interface TransactionResponseDto
*/
export interface TransactionResponseDto {
/**
* The unique identifier of the transaction
* @type {string}
* @memberof TransactionResponseDto
*/
id: string;
/**
* The unique identifier of the wallet
* @type {string}
* @memberof TransactionResponseDto
*/
walletId: string;
/**
* The unique identifier of the user
* @type {string}
* @memberof TransactionResponseDto
*/
userId: string;
/**
* The type of transaction
* @type {string}
* @memberof TransactionResponseDto
*/
type: TransactionResponseDtoTypeEnum;
/**
* The currency/type of wallet balance affected
* @type {string}
* @memberof TransactionResponseDto
*/
currency: TransactionResponseDtoCurrencyEnum;
/**
* The amount of the transaction
* @type {number}
* @memberof TransactionResponseDto
*/
amount: number;
/**
* The source that initiated this transaction
* @type {string}
* @memberof TransactionResponseDto
*/
source: TransactionResponseDtoSourceEnum;
/**
* Optional identifier for the source
* @type {string}
* @memberof TransactionResponseDto
*/
sourceId?: string;
/**
* Human-readable reason for the transaction
* @type {string}
* @memberof TransactionResponseDto
*/
reason: string;
/**
* Current status of the transaction
* @type {string}
* @memberof TransactionResponseDto
*/
status: TransactionResponseDtoStatusEnum;
/**
* Additional metadata for the transaction
* @type {object}
* @memberof TransactionResponseDto
*/
metadata?: object;
/**
* Timestamp when the transaction was created
* @type {Date}
* @memberof TransactionResponseDto
*/
createdAt: Date;
/**
* Timestamp when the transaction was last updated
* @type {Date}
* @memberof TransactionResponseDto
*/
updatedAt: Date;
}
/**
* @export
*/
export declare const TransactionResponseDtoTypeEnum: {
readonly Credit: "credit";
readonly Debit: "debit";
};
export type TransactionResponseDtoTypeEnum = typeof TransactionResponseDtoTypeEnum[keyof typeof TransactionResponseDtoTypeEnum];
/**
* @export
*/
export declare const TransactionResponseDtoCurrencyEnum: {
readonly Points: "points";
readonly Tickets: "tickets";
readonly Cashable: "cashable";
};
export type TransactionResponseDtoCurrencyEnum = typeof TransactionResponseDtoCurrencyEnum[keyof typeof TransactionResponseDtoCurrencyEnum];
/**
* @export
*/
export declare const TransactionResponseDtoSourceEnum: {
readonly ContestEntry: "contest_entry";
readonly ContestWinning: "contest_winning";
readonly AdminAdjustment: "admin_adjustment";
readonly Promotion: "promotion";
};
export type TransactionResponseDtoSourceEnum = typeof TransactionResponseDtoSourceEnum[keyof typeof TransactionResponseDtoSourceEnum];
/**
* @export
*/
export declare const TransactionResponseDtoStatusEnum: {
readonly Pending: "pending";
readonly Completed: "completed";
readonly Failed: "failed";
};
export type TransactionResponseDtoStatusEnum = typeof TransactionResponseDtoStatusEnum[keyof typeof TransactionResponseDtoStatusEnum];
/**
* Check if a given object implements the TransactionResponseDto interface.
*/
export declare function instanceOfTransactionResponseDto(value: object): value is TransactionResponseDto;
export declare function TransactionResponseDtoFromJSON(json: any): TransactionResponseDto;
export declare function TransactionResponseDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionResponseDto;
export declare function TransactionResponseDtoToJSON(json: any): TransactionResponseDto;
export declare function TransactionResponseDtoToJSONTyped(value?: TransactionResponseDto | null, ignoreDiscriminator?: boolean): any;