// This file is auto-generated by @hey-api/openapi-ts import { type Client, formDataBodySerializer, type Options as Options2, type TDataShape } from './client'; import { client } from './client.gen'; import type { AnimationsApiPuzzleResultsData, AnimationsApiPuzzleResultsResponses, AnimationsApiResultsData, AnimationsApiResultsResponses, AnimationsApiTopSubmissionsData, AnimationsApiTopSubmissionsResponses, ClockApiCurrentStateData, ClockApiCurrentStateResponses, ClockApiMyStatsData, ClockApiMyStatsResponses, GamesApiListEventGamesData, GamesApiListEventGamesResponses, GamesApiListEventPlanningData, GamesApiListEventPlanningResponses, GamesApiListEventSteamGamesData, GamesApiListEventSteamGamesResponses, GamesApiListGamesData, GamesApiListGamesResponses, MarketApiBetHistoryData, MarketApiBetHistoryResponses, MarketApiCloseMarketData, MarketApiCloseMarketResponses, MarketApiCreateBetData, MarketApiCreateBetResponses, MarketApiGetUserPointsData, MarketApiGetUserPointsResponses, MarketApiListMarketsData, MarketApiListMarketsResponses, MarketApiListUserBetsData, MarketApiListUserBetsResponses, MarketApiResolveMarketData, MarketApiResolveMarketResponses, NoitaApiGetLeaderboardData, NoitaApiGetLeaderboardResponses, NoitaApiGetResultsData, NoitaApiGetResultsResponses, NoitaApiSubmitLogFileData, NoitaApiSubmitLogFileErrors, NoitaApiSubmitLogFileResponses, OpusMagnumApiCreateSubmissionData, OpusMagnumApiCreateSubmissionErrors, OpusMagnumApiCreateSubmissionResponses, OpusMagnumApiDeleteSubmissionData, OpusMagnumApiDeleteSubmissionErrors, OpusMagnumApiDeleteSubmissionResponses, OpusMagnumApiGetCollectionData, OpusMagnumApiGetCollectionResponses, OpusMagnumApiGetStatsData, OpusMagnumApiGetStatsResponses, OpusMagnumApiGetSubmissionData, OpusMagnumApiGetSubmissionResponses, OpusMagnumApiListPuzzlesData, OpusMagnumApiListPuzzlesResponses, OpusMagnumApiListResponseFilesData, OpusMagnumApiListResponseFilesErrors, OpusMagnumApiListResponseFilesResponses, OpusMagnumApiListResponsesNeedingValidationData, OpusMagnumApiListResponsesNeedingValidationErrors, OpusMagnumApiListResponsesNeedingValidationResponses, OpusMagnumApiListSubmissionsData, OpusMagnumApiListSubmissionsResponses, OpusMagnumApiValidateAutoData, OpusMagnumApiValidateAutoErrors, OpusMagnumApiValidateAutoResponses, OpusMagnumApiValidateResponseData, OpusMagnumApiValidateResponseErrors, OpusMagnumApiValidateResponseResponses, OpusMagnumApiValidateSubmissionData, OpusMagnumApiValidateSubmissionErrors, OpusMagnumApiValidateSubmissionResponses, PlaceApiCanvasData, PlaceApiCanvasResponses, PlaceApiEvolutionGifData, PlaceApiEvolutionGifResponses, PlaceApiHeatmapDecayGifData, PlaceApiHeatmapDecayGifResponses, PlaceApiHeatmapEvolutionGifData, PlaceApiHeatmapEvolutionGifResponses, PlaceApiHeatmapPngData, PlaceApiHeatmapPngResponses, PlaceApiPlacementsCsvData, PlaceApiPlacementsCsvResponses, PolylanSubmitterApiClearCacheData, PolylanSubmitterApiClearCacheErrors, PolylanSubmitterApiClearCacheResponses, PolylanSubmitterApiGetUserInfoData, PolylanSubmitterApiGetUserInfoResponses, PolylanSubmitterApiHealthCheckData, PolylanSubmitterApiHealthCheckResponses, SubmissionsApiCreateImageCropData, SubmissionsApiCreateImageCropErrors, SubmissionsApiCreateImageCropResponses, SubmissionsApiCreateSubmissionData, SubmissionsApiCreateSubmissionErrors, SubmissionsApiCreateSubmissionResponses, SubmissionsApiDeleteImageCropData, SubmissionsApiDeleteImageCropErrors, SubmissionsApiDeleteImageCropResponses, SubmissionsApiGetSubmissionData, SubmissionsApiGetSubmissionErrors, SubmissionsApiGetSubmissionResponses, SubmissionsApiListAvailableScopesData, SubmissionsApiListAvailableScopesErrors, SubmissionsApiListAvailableScopesResponses, SubmissionsApiListMyScopesData, SubmissionsApiListMyScopesErrors, SubmissionsApiListMyScopesResponses, SubmissionsApiListSubmissionsByGameData, SubmissionsApiListSubmissionsByGameErrors, SubmissionsApiListSubmissionsByGameResponses, SubmissionsApiListUserSubmissionsData, SubmissionsApiListUserSubmissionsErrors, SubmissionsApiListUserSubmissionsResponses, SubmissionsApiProcessCropOcrData, SubmissionsApiProcessCropOcrErrors, SubmissionsApiProcessCropOcrResponses, SubmissionsApiProcessFileOcrData, SubmissionsApiProcessFileOcrErrors, SubmissionsApiProcessFileOcrResponses, SubmissionsApiStopSyncScopesData, SubmissionsApiStopSyncScopesErrors, SubmissionsApiStopSyncScopesResponses, SubmissionsApiSyncScopesData, SubmissionsApiSyncScopesErrors, SubmissionsApiSyncScopesResponses, SubmissionsApiSyncScopesStatusData, SubmissionsApiSyncScopesStatusErrors, SubmissionsApiSyncScopesStatusResponses } from './types.gen'; export type Options = Options2 & { /** * You can provide a client instance returned by `createClient()` instead of * individual options. This might be also useful if you want to implement a * custom client. */ client?: Client; /** * You can pass arbitrary values through the `meta` object. This can be * used to access values that aren't defined as part of the SDK function. */ meta?: Record; }; /** * Health Check * * Health check endpoint */ export const polylanSubmitterApiHealthCheck = (options?: Options) => (options?.client ?? client).get({ url: '/api/health', ...options }); /** * Clear Cache * * Clear API caches (admin only). Pass event_path to clear just that event's keys. */ export const polylanSubmitterApiClearCache = (options?: Options) => (options?.client ?? client).post({ url: '/api/cache/clear', ...options }); /** * Get User Info * * Get current user information */ export const polylanSubmitterApiGetUserInfo = (options?: Options) => (options?.client ?? client).get({ url: '/api/user', ...options }); /** * List Games */ export const gamesApiListGames = (options?: Options) => (options?.client ?? client).get({ url: '/api/games/', ...options }); /** * List Puzzles * * Get list of available puzzles */ export const opusMagnumApiListPuzzles = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/opus-magnum/puzzles', ...options }); /** * Get Collection * * Get the active collection details */ export const opusMagnumApiGetCollection = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/opus-magnum/collection', ...options }); /** * List Submissions * * Get paginated list of submissions */ export const opusMagnumApiListSubmissions = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/opus-magnum/submissions', ...options }); /** * Create Submission * * Create a new submission with multiple puzzle responses */ export const opusMagnumApiCreateSubmission = (options: Options) => (options.client ?? client).post({ ...formDataBodySerializer, url: '/api/events/{event_path}/opus-magnum/submissions', ...options, headers: { 'Content-Type': null, ...options.headers } }); /** * Delete Submission * * Delete a submission (admin only) */ export const opusMagnumApiDeleteSubmission = (options: Options) => (options.client ?? client).delete({ url: '/api/events/{event_path}/opus-magnum/submissions/{submission_id}', ...options }); /** * Get Submission * * Get detailed submission by ID */ export const opusMagnumApiGetSubmission = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/opus-magnum/submissions/{submission_id}', ...options }); /** * Validate Response * * Manually validate a puzzle response */ export const opusMagnumApiValidateResponse = (options: Options) => (options.client ?? client).put({ url: '/api/events/{event_path}/opus-magnum/responses/{response_id}/validate', ...options, headers: { 'Content-Type': 'application/json', ...options.headers } }); /** * Validate Auto * * Try to auto validate a puzzle response */ export const opusMagnumApiValidateAuto = (options: Options) => (options.client ?? client).put({ url: '/api/events/{event_path}/opus-magnum/responses/{response_id}/validate/auto', ...options }); /** * List Responses Needing Validation * * Get all responses that need manual validation */ export const opusMagnumApiListResponsesNeedingValidation = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/opus-magnum/responses/needs-validation', ...options }); /** * List Response Files * * Get the solution files of any player's response (admin only) */ export const opusMagnumApiListResponseFiles = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/opus-magnum/responses/{response_id}/files', ...options }); /** * Validate Submission * * Mark entire submission as validated */ export const opusMagnumApiValidateSubmission = (options: Options) => (options.client ?? client).post({ url: '/api/events/{event_path}/opus-magnum/submissions/{submission_id}/validate', ...options }); /** * Get Stats * * Get submission statistics */ export const opusMagnumApiGetStats = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/opus-magnum/stats', ...options }); /** * Results */ export const animationsApiResults = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/results/results', ...options }); /** * Top Submissions * * Get tournament top submissions for each puzzle. Only available when tournament is closed. */ export const animationsApiTopSubmissions = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/results/top-submissions', ...options }); /** * Puzzle Results * * Get tournament results organized by puzzle with coefficients. Only available when tournament is closed. */ export const animationsApiPuzzleResults = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/results/puzzle-results', ...options }); /** * Get Results */ export const noitaApiGetResults = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/noita/results', ...options }); /** * Get Leaderboard * * Get the global leaderboard for all users ranked by total score. * * Uses Window functions to rank users by their total score in descending order. */ export const noitaApiGetLeaderboard = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/noita/leaderboard', ...options }); /** * Submit Log File * * Submit a Noita run file (log file, screenshot, or video). * * Accepts: * - Text files (.txt) for polylan_mod_log.txt * - Images (.png, .jpg, .gif) * - Videos (.mp4, .webm) * * Max file size: 256 MB */ export const noitaApiSubmitLogFile = (options: Options) => (options.client ?? client).post({ ...formDataBodySerializer, url: '/api/events/{event_path}/noita/submit', ...options, headers: { 'Content-Type': null, ...options.headers } }); /** * List Event Games */ export const gamesApiListEventGames = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/games', ...options }); /** * List Event Steam Games * * The event's Steam games with their store info (price, discount, blurb). */ export const gamesApiListEventSteamGames = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/games/steam', ...options }); /** * List Event Planning * * The event planning, with the covers of the games we know. */ export const gamesApiListEventPlanning = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/planning', ...options }); /** * List My Scopes */ export const submissionsApiListMyScopes = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/submissions/scopes/mine', ...options }); /** * List Available Scopes * * Scopes the current user may submit to for this game - superusers see * every active scope, everyone else only the ones assigned to them. Used * by the submissions-select and submissions-detail pages, both to list * scopes and (for the detail page) to confirm the requested scope_id is * one the current user is actually allowed to see. */ export const submissionsApiListAvailableScopes = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/submissions/{game_path}/available-scopes', ...options }); /** * Stop Sync Scopes * * Stop the AAndT scope sync loop of a (non custom path) game, superusers * only. Cancels its scheduled job, scopes are left as they are. */ export const submissionsApiStopSyncScopes = (options: Options) => (options.client ?? client).delete({ url: '/api/events/{event_path}/submissions/{game_path}/sync-scopes', ...options }); /** * Sync Scopes Status * * State of the AAndT scope sync loop of a (non custom path) game, * superusers only. */ export const submissionsApiSyncScopesStatus = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/submissions/{game_path}/sync-scopes', ...options }); /** * Sync Scopes * * Start the AAndT scope sync loop for a (non custom path) game, superusers * only. Stores `apibot_token` first when given; without one and none stored * yet, answers 400 with `token_required` so the frontend asks for it. */ export const submissionsApiSyncScopes = (options: Options) => (options.client ?? client).post({ url: '/api/events/{event_path}/submissions/{game_path}/sync-scopes', ...options, headers: { 'Content-Type': 'application/json', ...options.headers } }); /** * Create Submission */ export const submissionsApiCreateSubmission = (options: Options) => (options.client ?? client).post({ ...formDataBodySerializer, url: '/api/events/{event_path}/submissions/submission/create', ...options, headers: { 'Content-Type': null, ...options.headers } }); /** * List User Submissions */ export const submissionsApiListUserSubmissions = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/submissions/submission/by/user', ...options }); /** * List Submissions By Game */ export const submissionsApiListSubmissionsByGame = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/submissions/submission/by/game', ...options }); /** * Get Submission */ export const submissionsApiGetSubmission = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/submissions/submission/{submission_id}', ...options }); /** * Create Image Crop */ export const submissionsApiCreateImageCrop = (options: Options) => (options.client ?? client).post({ url: '/api/events/{event_path}/submissions/crops/s/{submission_file_id}', ...options, headers: { 'Content-Type': 'application/json', ...options.headers } }); /** * Delete Image Crop */ export const submissionsApiDeleteImageCrop = (options: Options) => (options.client ?? client).delete({ url: '/api/events/{event_path}/submissions/crops/{crop_id}', ...options }); /** * Process File Ocr */ export const submissionsApiProcessFileOcr = (options: Options) => (options.client ?? client).post({ url: '/api/events/{event_path}/submissions/files/{file_id}/process-ocr', ...options }); /** * Process Crop Ocr */ export const submissionsApiProcessCropOcr = (options: Options) => (options.client ?? client).post({ url: '/api/events/{event_path}/submissions/crops/{crop_id}/process-ocr', ...options }); /** * Current State */ export const clockApiCurrentState = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/clock/current', ...options }); /** * My Stats */ export const clockApiMyStats = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/clock/me', ...options }); /** * Canvas * * The one-time full-grid load. Every placement after that arrives as a * single websocket message, never a re-fetch. */ export const placeApiCanvas = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/place/canvas', ...options }); /** * Evolution Gif * * Admin-only: replays the full placement history as an animated GIF. * * `players` is an optional comma-separated list of usernames to only * replay those players' placements (combined). */ export const placeApiEvolutionGif = (options: Options) => (options.client ?? client).get({ security: [{ in: 'cookie', name: 'sessionid', type: 'apiKey' }], url: '/api/events/{event_path}/place/evolution.gif', ...options }); /** * Heatmap Png * * Admin-only: how many times each pixel was placed, as a heatmap PNG. * * `players` is an optional comma-separated list of usernames to only * count those players' placements (combined). */ export const placeApiHeatmapPng = (options: Options) => (options.client ?? client).get({ security: [{ in: 'cookie', name: 'sessionid', type: 'apiKey' }], url: '/api/events/{event_path}/place/heatmap.png', ...options }); /** * Heatmap Evolution Gif * * Admin-only: the heatmap building up over time, as an animated GIF. * * `players` is an optional comma-separated list of usernames to only * count those players' placements (combined). */ export const placeApiHeatmapEvolutionGif = (options: Options) => (options.client ?? client).get({ security: [{ in: 'cookie', name: 'sessionid', type: 'apiKey' }], url: '/api/events/{event_path}/place/heatmap-evolution.gif', ...options }); /** * Heatmap Decay Gif * * Admin-only: the heatmap over time, but heat decays so pixels nobody * touches anymore fade back to white. * * `players` is an optional comma-separated list of usernames to only * count those players' placements (combined). `mode` is "placements" * (decay per placement, `half_life` in placements, defaults to 10 frames' * worth) or "time" (decay over time, `half_life` in minutes, defaults * to 60). */ export const placeApiHeatmapDecayGif = (options: Options) => (options.client ?? client).get({ security: [{ in: 'cookie', name: 'sessionid', type: 'apiKey' }], url: '/api/events/{event_path}/place/heatmap-decay.gif', ...options }); /** * Placements Csv * * Admin-only: pixel placement count per player, most active first. */ export const placeApiPlacementsCsv = (options: Options) => (options.client ?? client).get({ security: [{ in: 'cookie', name: 'sessionid', type: 'apiKey' }], url: '/api/events/{event_path}/place/placements.csv', ...options }); /** * List Markets * * List all markets (excludes draft markets). */ export const marketApiListMarkets = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/market/', ...options }); /** * List User Bets * * List all bets placed by the current user. */ export const marketApiListUserBets = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/market/user/bets', ...options }); /** * Get User Points * * Get the current user's points balance for this event. */ export const marketApiGetUserPoints = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/market/user/points', ...options }); /** * Bet History * * Points added to each option over time (anonymous, one entry per bet placed/increased). */ export const marketApiBetHistory = (options: Options) => (options.client ?? client).get({ url: '/api/events/{event_path}/market/{market_uuid}/history', ...options }); /** * Close Market * * Close a market. Admin only. */ export const marketApiCloseMarket = (options: Options) => (options.client ?? client).post({ url: '/api/events/{event_path}/market/{market_uuid}/actions/close', ...options }); /** * Resolve Market * * Resolve a market with a winning option. Admin only. */ export const marketApiResolveMarket = (options: Options) => (options.client ?? client).post({ url: '/api/events/{event_path}/market/{market_uuid}/actions/resolve', ...options, headers: { 'Content-Type': 'application/json', ...options.headers } }); /** * Create Bet * * Place a bet on a market option. */ export const marketApiCreateBet = (options: Options) => (options.client ?? client).post({ url: '/api/events/{event_path}/market/{market_uuid}/bets', ...options, headers: { 'Content-Type': 'application/json', ...options.headers } });