@voxary/valorant-client 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +119 -3
- package/dist/index.cjs +1495 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +6308 -0
- package/dist/index.d.ts +6308 -0
- package/dist/index.js +1439 -0
- package/dist/index.js.map +1 -0
- package/package.json +69 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/client.ts","../src/api/registry.ts","../src/extra/catalog.ts","../src/envelope.ts","../src/extra/riot.ts","../src/extra/store.ts","../src/auth.ts","../src/errors.ts","../src/context.ts","../src/http.ts","../src/local.ts","../src/request.ts","../src/types.ts"],"sourcesContent":["export {ValorantClient} from './client'\nexport type {Logger, RetryOptions, ValorantApi, ValorantClientOptions} from './client'\n\nexport {ValorantContext, isRegion, shardForRegion} from './context'\nexport type {ContextListener, Region, Shard, ValorantState, ValorantStateKey} from './context'\n\nexport {\n MissingContextError,\n MissingParameterError,\n ValorantApiError,\n ValorantAuthError,\n ValorantError,\n ValorantNetworkError,\n ValorantRateLimitError,\n ValorantValidationError\n} from './errors'\n\nexport {parseAuthRedirect} from './auth'\nexport type {AuthFlows, AuthTokens, EstablishSessionOptions, LoginOptions, LoginResult} from './auth'\n\nexport {parseLockfile, readLockfile} from './local'\nexport type {LocalConnectOptions, LocalEvent, LocalEventStream, LocalFlows, Lockfile} from './local'\n\nexport {fetchTransport, localTransport} from './http'\nexport type {HttpRequest, HttpResponse, Transport} from './http'\n\nexport {registry} from './api/registry'\nexport type {\n CallOptions,\n EndpointCallOptions,\n EndpointMethod,\n EndpointResult,\n QueryInput,\n ValidationMode,\n ValorantResponse\n} from './types'\n\n// Schemas and response types of every endpoint, from the documentation project.\nexport * from 'valorant-api-types'\n","import type {ValorantEndpoint} from 'valorant-api-types'\r\nimport {ZodError, type SafeParseReturnType, type ZodType} from 'zod'\r\nimport {registry} from './api/registry'\r\nimport {createAuthFlows, type AuthFlows} from './auth'\r\nimport {ValorantContext, type ValorantState} from './context'\r\nimport {unwrapEnvelope} from './envelope'\r\nimport {\r\n ValorantApiError,\r\n ValorantAuthError,\r\n ValorantNetworkError,\r\n ValorantRateLimitError,\r\n ValorantValidationError\r\n} from './errors'\r\nimport {fetchTransport, localTransport, type HttpRequest, type HttpResponse, type Transport} from './http'\r\nimport {createLocalFlows, type LocalFlows} from './local'\r\nimport {buildRequest, isAuthHost, type RequestInput} from './request'\r\nimport type {EndpointCallOptions, EndpointMethod, EndpointResult, ValidationMode, ValorantResponse} from './types'\r\n\r\nexport interface RetryOptions {\r\n /** Extra attempts after the first one. Default 2. */\r\n retries?: number\r\n baseDelayMs?: number\r\n maxDelayMs?: number\r\n}\r\n\r\nexport interface Logger {\r\n warn(message: string, meta?: unknown): void\r\n debug?(message: string, meta?: unknown): void\r\n}\r\n\r\nexport interface ValorantClientOptions {\r\n /** An existing context to share, or initial values for a new one. */\r\n context?: ValorantContext | Partial<ValorantState>\r\n /** Default validation mode. Default `loose`. */\r\n validation?: ValidationMode\r\n /** Per-attempt timeout. Default 15000. */\r\n timeoutMs?: number\r\n /** Set to `false` to disable retries. */\r\n retry?: RetryOptions | false\r\n /**\r\n * Called once (single-flight) when a request fails because the tokens are no longer valid.\r\n * Update the context inside, the request is then retried. Example: `client => client.auth.reauthenticate()`.\r\n */\r\n refreshTokens?: (client: ValorantClient) => Promise<unknown>\r\n /** Transport for remote hosts. Defaults to `fetch`. */\r\n transport?: Transport\r\n /** Transport for the local Riot Client API. Defaults to a node:https transport that accepts its self-signed certificate. */\r\n localTransport?: Transport\r\n logger?: Logger\r\n}\r\n\r\ntype ApiOf<G> = {\r\n [N in keyof G]: G[N] extends ValorantEndpoint ? EndpointMethod<G[N]> : never\r\n}\r\n\r\ntype RegistryApi = {[Group in keyof typeof registry]: ApiOf<(typeof registry)[Group]>}\r\n\r\nexport type ValorantApi = Omit<RegistryApi, 'auth' | 'local'> & {\r\n auth: RegistryApi['auth'] & AuthFlows\r\n local: RegistryApi['local'] & LocalFlows\r\n}\r\n\r\nconst RETRYABLE_STATUS = new Set([429, 500, 502, 503, 504])\r\nconst IDEMPOTENT = new Set(['GET', 'HEAD', 'PUT', 'DELETE'])\r\n\r\nexport class ValorantClient {\r\n readonly context: ValorantContext\r\n readonly #options: ValorantClientOptions\r\n readonly #warned = new Set<string>()\r\n #refreshing: Promise<unknown> | undefined\r\n\r\n constructor(options: ValorantClientOptions = {}) {\r\n this.#options = options\r\n this.context = options.context instanceof ValorantContext ? options.context : new ValorantContext(options.context)\r\n Object.assign(this, this.#createApi())\r\n }\r\n\r\n /** Sends a request and returns status, headers and the parsed body. */\r\n async send<E extends ValorantEndpoint>(\r\n endpoint: E,\r\n options: EndpointCallOptions<E> = {} as EndpointCallOptions<E>\r\n ): Promise<ValorantResponse<EndpointResult<E>>> {\r\n const input = options as RequestInput\r\n const validation = input.validation ?? this.#options.validation ?? 'loose'\r\n\r\n if(validation === 'strict' && endpoint.body !== undefined && input.body !== undefined) {\r\n const parsed = endpoint.body.safeParse(input.body)\r\n if(!parsed.success) throw new ValorantValidationError('request', endpoint.name, parsed.error, input.body)\r\n }\r\n\r\n const retry = this.#options.retry === false ? undefined : (this.#options.retry ?? {})\r\n const maxRetries = retry ? (retry.retries ?? 2) : 0\r\n let refreshed = false\r\n\r\n for(let attempt = 0; ; attempt++) {\r\n const request = buildRequest(endpoint, input, this.context)\r\n const canRetry = attempt < maxRetries && input.signal?.aborted !== true\r\n let response: HttpResponse\r\n\r\n try {\r\n response = await this.#transportFor(endpoint)({...request, signal: this.#signal(input)})\r\n } catch(cause) {\r\n if(canRetry && IDEMPOTENT.has(request.method) && input.signal?.aborted !== true) {\r\n await sleep(backoff(attempt, retry), input.signal)\r\n continue\r\n }\r\n throw new ValorantNetworkError(`${endpoint.name} could not reach ${new URL(request.url).host}`, request.url, {cause})\r\n }\r\n\r\n if(isAuthHost(request.url)) this.#storeCookies(response.setCookies)\r\n this.#options.logger?.debug?.(`${request.method} ${request.url} -> ${response.status}`)\r\n\r\n if(response.status < 400) {\r\n return {\r\n status: response.status,\r\n headers: response.headers,\r\n data: this.#parseResponse(endpoint, response, validation) as EndpointResult<E>\r\n }\r\n }\r\n\r\n const error = this.#toError(endpoint, request, response)\r\n\r\n if(error instanceof ValorantAuthError && this.#options.refreshTokens && !refreshed) {\r\n refreshed = true\r\n await this.#refreshOnce()\r\n continue\r\n }\r\n\r\n if(canRetry && RETRYABLE_STATUS.has(response.status) && (response.status === 429 || IDEMPOTENT.has(request.method))) {\r\n const retryAfter = error instanceof ValorantRateLimitError ? error.retryAfterMs : undefined\r\n await sleep(retryAfter ?? backoff(attempt, retry), input.signal)\r\n continue\r\n }\r\n\r\n throw error\r\n }\r\n }\r\n\r\n #createApi(): Record<string, Record<string, unknown>> {\r\n const api: Record<string, Record<string, unknown>> = {}\r\n for(const [group, endpoints] of Object.entries(registry)) {\r\n api[group] = Object.fromEntries(Object.entries(endpoints).map(([name, endpoint]) => [\r\n name,\r\n async (options?: unknown) => (await this.send(endpoint as ValorantEndpoint, options as never)).data\r\n ]))\r\n }\r\n Object.assign(api['auth']!, createAuthFlows(this))\r\n Object.assign(api['local']!, createLocalFlows(this))\r\n return api\r\n }\r\n\r\n #transportFor(endpoint: ValorantEndpoint): Transport {\r\n if(endpoint.type === 'local') return this.#options.localTransport ?? localTransport\r\n return this.#options.transport ?? fetchTransport\r\n }\r\n\r\n /** Transport used for requests to arbitrary remote hosts. */\r\n get transport(): Transport {\r\n return this.#options.transport ?? fetchTransport\r\n }\r\n\r\n #signal(input: RequestInput): AbortSignal {\r\n const timeout = AbortSignal.timeout(input.timeoutMs ?? this.#options.timeoutMs ?? 15_000)\r\n return input.signal ? AbortSignal.any([input.signal, timeout]) : timeout\r\n }\r\n\r\n #storeCookies(setCookies: string[]): void {\r\n for(const line of setCookies) {\r\n const [pair = '', ...attributes] = line.split(';').map(part => part.trim())\r\n const separator = pair.indexOf('=')\r\n if(separator <= 0) continue\r\n const name = pair.slice(0, separator)\r\n const value = pair.slice(separator + 1)\r\n const expired = value === '' || attributes.some(a => a.toLowerCase() === 'max-age=0')\r\n this.context.setCookie(name, expired ? undefined : value)\r\n }\r\n }\r\n\r\n #parseResponse(endpoint: ValorantEndpoint, response: HttpResponse, validation: ValidationMode): unknown {\r\n const data = unwrapEnvelope(endpoint, parseBody(response.text))\r\n const schema = endpoint.responses?.[String(response.status)]\r\n if(schema === undefined || validation === 'off') return data\r\n\r\n const parsed = safeParse(schema, data)\r\n if(parsed.success) return parsed.data\r\n if(validation === 'strict') throw new ValorantValidationError('response', endpoint.name, parsed.error, data)\r\n\r\n if(!this.#warned.has(endpoint.name)) {\r\n this.#warned.add(endpoint.name)\r\n this.#options.logger?.warn(`Response of \"${endpoint.name}\" does not match its schema, returning raw data`, parsed.error.issues.slice(0, 5))\r\n }\r\n return data\r\n }\r\n\r\n #toError(endpoint: ValorantEndpoint, request: HttpRequest, response: HttpResponse): ValorantApiError {\r\n const body = parseBody(response.text)\r\n const args = [response.status, endpoint.name, request.url, body, response.headers] as const\r\n\r\n if(response.status === 429) return new ValorantRateLimitError(...args, parseRetryAfter(response.headers.get('retry-after')))\r\n\r\n const needsToken = endpoint.riotRequirements?.token === true\r\n const badClaims = typeof body === 'object' && body !== null && (body as {errorCode?: unknown}).errorCode === 'BAD_CLAIMS'\r\n if(needsToken && (response.status === 401 || (response.status === 400 && badClaims))) return new ValorantAuthError(...args)\r\n\r\n return new ValorantApiError(...args)\r\n }\r\n\r\n #refreshOnce(): Promise<unknown> {\r\n this.#refreshing ??= Promise.resolve(this.#options.refreshTokens!(this)).finally(() => {\r\n this.#refreshing = undefined\r\n })\r\n return this.#refreshing\r\n }\r\n}\r\n\r\nexport interface ValorantClient extends ValorantApi {}\r\n\r\n/** `safeParse` that also catches errors thrown by schema transforms. */\r\nfunction safeParse(schema: ZodType, data: unknown): SafeParseReturnType<unknown, unknown> {\r\n try {\r\n return schema.safeParse(data)\r\n } catch(thrown) {\r\n if(thrown instanceof ZodError) return {success: false, error: thrown}\r\n const message = thrown instanceof Error ? thrown.message : String(thrown)\r\n return {success: false, error: new ZodError([{code: 'custom', path: [], message: `Schema transform threw: ${message}`}])}\r\n }\r\n}\r\n\r\nfunction parseBody(text: string): unknown {\r\n if(text === '') return undefined\r\n try {\r\n return JSON.parse(text)\r\n } catch {\r\n return text\r\n }\r\n}\r\n\r\nfunction parseRetryAfter(value: string | null): number | undefined {\r\n if(value === null) return undefined\r\n const seconds = Number(value)\r\n if(Number.isFinite(seconds)) return seconds * 1000\r\n const date = Date.parse(value)\r\n return Number.isNaN(date) ? undefined : Math.max(0, date - Date.now())\r\n}\r\n\r\nfunction backoff(attempt: number, retry: RetryOptions | undefined): number {\r\n const base = retry?.baseDelayMs ?? 500\r\n const max = retry?.maxDelayMs ?? 8000\r\n return Math.min(max, base * 2 ** attempt) * (0.5 + Math.random() / 2)\r\n}\r\n\r\nfunction sleep(ms: number, signal?: AbortSignal): Promise<void> {\r\n return new Promise(resolve => {\r\n const timer = setTimeout(done, ms)\r\n signal?.addEventListener('abort', done, {once: true})\r\n\r\n function done() {\r\n clearTimeout(timer)\r\n signal?.removeEventListener('abort', done)\r\n resolve()\r\n }\r\n })\r\n}\r\n","import {endpoints as e} from 'valorant-api-types'\r\nimport {catalogEndpoints} from '../extra/catalog'\r\nimport * as x from '../extra/riot'\r\nimport {storefrontV3Endpoint} from '../extra/store'\r\n\r\n/**\r\n * Every documented HTTP endpoint, grouped and named for the public API.\r\n * `client.<group>.<name>(options)` is generated from this table.\r\n */\r\n/**\r\n * Shape of the registry, written out so that declaration files can reference each endpoint with a type query\r\n * instead of expanding every schema. The compiler checks that it matches the value below.\r\n */\r\nexport interface Registry {\r\n readonly pvp: {\r\n readonly content: typeof e.fetchContentEndpoint\r\n readonly accountXp: typeof e.accountXPEndpoint\r\n readonly playerLoadout: typeof e.playerLoadoutEndpoint\r\n readonly setPlayerLoadout: typeof e.setPlayerLoadoutEndpoint\r\n readonly playerMmr: typeof e.playerMMREndpoint\r\n readonly matchHistory: typeof e.matchHistoryEndpoint\r\n readonly matchDetails: typeof e.matchDetailsEndpoint\r\n readonly competitiveUpdates: typeof e.competitiveUpdatesEndpoint\r\n readonly leaderboard: typeof e.leaderboardEndpoint\r\n readonly penalties: typeof e.penaltiesEndpoint\r\n readonly config: typeof e.configEndpoint\r\n readonly nameService: typeof e.nameServiceEndpoint\r\n }\r\n readonly party: {\r\n readonly get: typeof e.partyEndpoint\r\n readonly player: typeof e.partyPlayerEndpoint\r\n readonly removePlayer: typeof e.partyRemovePlayerEndpoint\r\n readonly setMemberReady: typeof e.partySetMemberReadyEndpoint\r\n readonly refreshCompetitiveTier: typeof e.refreshCompetitiveTierEndpoint\r\n readonly refreshPlayerIdentity: typeof e.refreshPlayerIdentityEndpoint\r\n readonly refreshPings: typeof e.refreshPingsEndpoint\r\n readonly changeQueue: typeof e.changeQueueEndpoint\r\n readonly startCustomGame: typeof e.startCustomGameEndpoint\r\n readonly enterMatchmakingQueue: typeof e.enterMatchmakingQueueEndpoint\r\n readonly leaveMatchmakingQueue: typeof e.leaveMatchmakingQueueEndpoint\r\n readonly setAccessibility: typeof e.setPartyAccessibilityEndpoint\r\n readonly setCustomGameSettings: typeof e.setCustomGameSettingsEndpoint\r\n readonly invite: typeof e.partyInviteEndpoint\r\n readonly requestToJoin: typeof e.partyRequestEndpoint\r\n readonly declineRequest: typeof e.partyDeclineEndpoint\r\n readonly customGameConfigs: typeof e.customGameConfigsEndpoint\r\n readonly chatToken: typeof e.partyChatTokenEndpoint\r\n readonly voiceToken: typeof e.partyVoiceTokenEndpoint\r\n readonly disableCode: typeof e.partyDisableCodeEndpoint\r\n readonly generateCode: typeof e.partyGenerateCodeEndpoint\r\n readonly joinByCode: typeof e.partyJoinByCodeEndpoint\r\n }\r\n readonly store: {\r\n readonly prices: typeof e.pricesEndpoint\r\n readonly storefront: typeof e.storefrontEndpoint\r\n readonly wallet: typeof e.walletEndpoint\r\n readonly ownedItems: typeof e.ownedItemsEndpoint\r\n readonly storefrontV3: typeof storefrontV3Endpoint\r\n readonly order: typeof x.storeOrderEndpoint\r\n }\r\n readonly pregame: {\r\n readonly player: typeof e.pregamePlayerEndpoint\r\n readonly match: typeof e.pregameMatchEndpoint\r\n readonly loadouts: typeof e.pregameLoadoutsEndpoint\r\n readonly selectCharacter: typeof e.selectCharacterEndpoint\r\n readonly lockCharacter: typeof e.lockCharacterEndpoint\r\n readonly quit: typeof e.pregameQuitEndpoint\r\n readonly chatToken: typeof x.pregameChatTokenEndpoint\r\n readonly voiceToken: typeof x.pregameVoiceTokenEndpoint\r\n }\r\n readonly currentGame: {\r\n readonly player: typeof e.currentGamePlayerEndpoint\r\n readonly match: typeof e.currentGameMatchEndpoint\r\n readonly loadouts: typeof e.currentGameLoadoutsEndpoint\r\n readonly quit: typeof e.currentGameQuitEndpoint\r\n readonly allChatToken: typeof x.currentGameAllChatTokenEndpoint\r\n readonly teamChatToken: typeof x.currentGameTeamChatTokenEndpoint\r\n }\r\n readonly contracts: {\r\n readonly itemUpgrades: typeof e.itemUpgradesEndpoint\r\n readonly list: typeof e.contractsEndpoint\r\n readonly activate: typeof e.activateContractEndpoint\r\n readonly activeStory: typeof x.contractsActiveStoryEndpoint\r\n }\r\n readonly local: {\r\n readonly help: typeof e.localHelpEndpoint\r\n readonly sessions: typeof e.sessionsEndpoint\r\n readonly rsoUserInfo: typeof e.rsoUserInfoEndpoint\r\n readonly clientRegion: typeof e.clientRegionEndpoint\r\n readonly accountAlias: typeof e.accountAliasEndpoint\r\n readonly entitlementsToken: typeof e.entitlementsTokenEndpoint\r\n readonly chatSession: typeof e.chatSessionEndpoint\r\n readonly friends: typeof e.friendsEndpoint\r\n readonly sendFriendRequest: typeof e.sendFriendRequestEndpoint\r\n readonly removeFriendRequest: typeof e.removeFriendRequestEndpoint\r\n readonly presence: typeof e.presenceEndpoint\r\n readonly friendRequests: typeof e.friendRequestsEndpoint\r\n readonly swaggerDocs: typeof e.localSwaggerDocsEndpoint\r\n readonly antiAddictionShutdown: typeof x.localAntiAddictionShutdownEndpoint\r\n readonly antiAddictionWarning: typeof x.localAntiAddictionWarningEndpoint\r\n readonly clientConfig: typeof x.localClientConfigEndpoint\r\n readonly eula: typeof x.localEulaEndpoint\r\n readonly privacyPolicy: typeof x.localPrivacyPolicyEndpoint\r\n readonly availableLocales: typeof x.localAvailableLocalesEndpoint\r\n readonly locale: typeof x.localLocaleEndpoint\r\n readonly reporterFeedback: typeof x.localReporterFeedbackEndpoint\r\n readonly commandLineArgs: typeof x.localCommandLineArgsEndpoint\r\n readonly riotStatus: typeof x.localRiotStatusEndpoint\r\n readonly riotWarning: typeof x.localRiotWarningEndpoint\r\n readonly clientAuthorizations: typeof x.localClientAuthorizationsEndpoint\r\n readonly accessToken: typeof x.localAccessTokenEndpoint\r\n readonly userInfoToken: typeof x.localUserInfoTokenEndpoint\r\n readonly pluginStatus: typeof x.localPluginStatusEndpoint\r\n readonly rmsSession: typeof x.localRmsSessionEndpoint\r\n readonly processInfo: typeof x.localProcessInfoEndpoint\r\n readonly logPath: typeof x.localLogPathEndpoint\r\n readonly playerSettings: typeof x.localPlayerSettingsEndpoint\r\n }\r\n readonly chat: {\r\n readonly partyInfo: typeof e.partyChatInfoEndpoint\r\n readonly pregameInfo: typeof e.pregameChatInfoEndpoint\r\n readonly currentGameInfo: typeof e.currentGameChatInfoEndpoint\r\n readonly allInfo: typeof e.allChatInfoEndpoint\r\n readonly participants: typeof e.chatParticipantsEndpoint\r\n readonly send: typeof e.sendChatEndpoint\r\n readonly history: typeof e.chatHistoryEndpoint\r\n readonly settings: typeof x.chatSettingsEndpoint\r\n readonly tournamentInfo: typeof x.chatTournamentInfoEndpoint\r\n }\r\n readonly session: {\r\n readonly get: typeof x.sessionGetEndpoint\r\n readonly reconnect: typeof x.sessionReconnectEndpoint\r\n }\r\n readonly voice: {\r\n readonly audioProperties: typeof x.voiceAudioPropertiesEndpoint\r\n readonly captureDevices: typeof x.voiceCaptureDevicesEndpoint\r\n readonly renderDevices: typeof x.voiceRenderDevicesEndpoint\r\n readonly pushToTalk: typeof x.voicePushToTalkEndpoint\r\n readonly sessions: typeof x.voiceSessionsEndpoint\r\n readonly settings: typeof x.voiceSettingsEndpoint\r\n }\r\n readonly auth: {\r\n readonly cookies: typeof e.authCookiesEndpoint\r\n readonly request: typeof e.authRequestEndpoint\r\n readonly multiFactor: typeof e.multiFactorAuthenticationEndpoint\r\n readonly cookieReauth: typeof e.cookieReauthEndpoint\r\n readonly entitlement: typeof e.entitlementEndpoint\r\n readonly playerInfo: typeof e.playerInfoEndpoint\r\n readonly riotGeo: typeof e.riotGeoEndpoint\r\n readonly pasToken: typeof e.pasTokenEndpoint\r\n readonly riotClientConfig: typeof e.riotClientConfigEndpoint\r\n }\r\n readonly catalog: typeof catalogEndpoints\r\n}\r\n\r\nexport const registry: Registry = {\r\n pvp: {\r\n content: e.fetchContentEndpoint,\r\n accountXp: e.accountXPEndpoint,\r\n playerLoadout: e.playerLoadoutEndpoint,\r\n setPlayerLoadout: e.setPlayerLoadoutEndpoint,\r\n playerMmr: e.playerMMREndpoint,\r\n matchHistory: e.matchHistoryEndpoint,\r\n matchDetails: e.matchDetailsEndpoint,\r\n competitiveUpdates: e.competitiveUpdatesEndpoint,\r\n leaderboard: e.leaderboardEndpoint,\r\n penalties: e.penaltiesEndpoint,\r\n config: e.configEndpoint,\r\n nameService: e.nameServiceEndpoint\r\n },\r\n party: {\r\n get: e.partyEndpoint,\r\n player: e.partyPlayerEndpoint,\r\n removePlayer: e.partyRemovePlayerEndpoint,\r\n setMemberReady: e.partySetMemberReadyEndpoint,\r\n refreshCompetitiveTier: e.refreshCompetitiveTierEndpoint,\r\n refreshPlayerIdentity: e.refreshPlayerIdentityEndpoint,\r\n refreshPings: e.refreshPingsEndpoint,\r\n changeQueue: e.changeQueueEndpoint,\r\n startCustomGame: e.startCustomGameEndpoint,\r\n enterMatchmakingQueue: e.enterMatchmakingQueueEndpoint,\r\n leaveMatchmakingQueue: e.leaveMatchmakingQueueEndpoint,\r\n setAccessibility: e.setPartyAccessibilityEndpoint,\r\n setCustomGameSettings: e.setCustomGameSettingsEndpoint,\r\n invite: e.partyInviteEndpoint,\r\n requestToJoin: e.partyRequestEndpoint,\r\n declineRequest: e.partyDeclineEndpoint,\r\n customGameConfigs: e.customGameConfigsEndpoint,\r\n chatToken: e.partyChatTokenEndpoint,\r\n voiceToken: e.partyVoiceTokenEndpoint,\r\n disableCode: e.partyDisableCodeEndpoint,\r\n generateCode: e.partyGenerateCodeEndpoint,\r\n joinByCode: e.partyJoinByCodeEndpoint\r\n },\r\n store: {\r\n prices: e.pricesEndpoint,\r\n storefront: e.storefrontEndpoint,\r\n wallet: e.walletEndpoint,\r\n ownedItems: e.ownedItemsEndpoint,\r\n storefrontV3: storefrontV3Endpoint,\r\n order: x.storeOrderEndpoint\r\n },\r\n pregame: {\r\n player: e.pregamePlayerEndpoint,\r\n match: e.pregameMatchEndpoint,\r\n loadouts: e.pregameLoadoutsEndpoint,\r\n selectCharacter: e.selectCharacterEndpoint,\r\n lockCharacter: e.lockCharacterEndpoint,\r\n quit: e.pregameQuitEndpoint,\r\n chatToken: x.pregameChatTokenEndpoint,\r\n voiceToken: x.pregameVoiceTokenEndpoint\r\n },\r\n currentGame: {\r\n player: e.currentGamePlayerEndpoint,\r\n match: e.currentGameMatchEndpoint,\r\n loadouts: e.currentGameLoadoutsEndpoint,\r\n quit: e.currentGameQuitEndpoint,\r\n allChatToken: x.currentGameAllChatTokenEndpoint,\r\n teamChatToken: x.currentGameTeamChatTokenEndpoint\r\n },\r\n contracts: {\r\n itemUpgrades: e.itemUpgradesEndpoint,\r\n list: e.contractsEndpoint,\r\n activate: e.activateContractEndpoint,\r\n activeStory: x.contractsActiveStoryEndpoint\r\n },\r\n local: {\r\n help: e.localHelpEndpoint,\r\n sessions: e.sessionsEndpoint,\r\n rsoUserInfo: e.rsoUserInfoEndpoint,\r\n clientRegion: e.clientRegionEndpoint,\r\n accountAlias: e.accountAliasEndpoint,\r\n entitlementsToken: e.entitlementsTokenEndpoint,\r\n chatSession: e.chatSessionEndpoint,\r\n friends: e.friendsEndpoint,\r\n sendFriendRequest: e.sendFriendRequestEndpoint,\r\n removeFriendRequest: e.removeFriendRequestEndpoint,\r\n presence: e.presenceEndpoint,\r\n friendRequests: e.friendRequestsEndpoint,\r\n swaggerDocs: e.localSwaggerDocsEndpoint,\r\n antiAddictionShutdown: x.localAntiAddictionShutdownEndpoint,\r\n antiAddictionWarning: x.localAntiAddictionWarningEndpoint,\r\n clientConfig: x.localClientConfigEndpoint,\r\n eula: x.localEulaEndpoint,\r\n privacyPolicy: x.localPrivacyPolicyEndpoint,\r\n availableLocales: x.localAvailableLocalesEndpoint,\r\n locale: x.localLocaleEndpoint,\r\n reporterFeedback: x.localReporterFeedbackEndpoint,\r\n commandLineArgs: x.localCommandLineArgsEndpoint,\r\n riotStatus: x.localRiotStatusEndpoint,\r\n riotWarning: x.localRiotWarningEndpoint,\r\n clientAuthorizations: x.localClientAuthorizationsEndpoint,\r\n accessToken: x.localAccessTokenEndpoint,\r\n userInfoToken: x.localUserInfoTokenEndpoint,\r\n pluginStatus: x.localPluginStatusEndpoint,\r\n rmsSession: x.localRmsSessionEndpoint,\r\n processInfo: x.localProcessInfoEndpoint,\r\n logPath: x.localLogPathEndpoint,\r\n playerSettings: x.localPlayerSettingsEndpoint\r\n },\r\n chat: {\r\n partyInfo: e.partyChatInfoEndpoint,\r\n pregameInfo: e.pregameChatInfoEndpoint,\r\n currentGameInfo: e.currentGameChatInfoEndpoint,\r\n allInfo: e.allChatInfoEndpoint,\r\n participants: e.chatParticipantsEndpoint,\r\n send: e.sendChatEndpoint,\r\n history: e.chatHistoryEndpoint,\r\n settings: x.chatSettingsEndpoint,\r\n tournamentInfo: x.chatTournamentInfoEndpoint\r\n },\r\n session: {\r\n get: x.sessionGetEndpoint,\r\n reconnect: x.sessionReconnectEndpoint\r\n },\r\n voice: {\r\n audioProperties: x.voiceAudioPropertiesEndpoint,\r\n captureDevices: x.voiceCaptureDevicesEndpoint,\r\n renderDevices: x.voiceRenderDevicesEndpoint,\r\n pushToTalk: x.voicePushToTalkEndpoint,\r\n sessions: x.voiceSessionsEndpoint,\r\n settings: x.voiceSettingsEndpoint\r\n },\r\n auth: {\r\n cookies: e.authCookiesEndpoint,\r\n request: e.authRequestEndpoint,\r\n multiFactor: e.multiFactorAuthenticationEndpoint,\r\n cookieReauth: e.cookieReauthEndpoint,\r\n entitlement: e.entitlementEndpoint,\r\n playerInfo: e.playerInfoEndpoint,\r\n riotGeo: e.riotGeoEndpoint,\r\n pasToken: e.pasTokenEndpoint,\r\n riotClientConfig: e.riotClientConfigEndpoint\r\n },\r\n catalog: catalogEndpoints\r\n}\r\n","import type {ValorantEndpoint} from 'valorant-api-types'\r\nimport {z, type ZodType} from 'zod'\r\nimport {markEnveloped} from '../envelope'\r\n\r\n/**\r\n * Static game data from the community API https://valorant-api.com (skins, agents, maps, ...).\r\n * No authentication. Item schemas only describe the common fields and keep everything else.\r\n */\r\n\r\nconst BASE = 'https://valorant-api.com/v1/'\r\n\r\nconst text = z.string().nullish()\r\n\r\nconst asset = z.object({\r\n uuid: z.string(),\r\n displayName: text,\r\n displayIcon: text,\r\n assetPath: text\r\n}).passthrough()\r\n\r\nconst agentSchema = asset.extend({\r\n description: text,\r\n developerName: text,\r\n characterTags: z.array(z.string()).nullish(),\r\n displayIconSmall: text,\r\n bustPortrait: text,\r\n fullPortrait: text,\r\n killfeedPortrait: text,\r\n background: text,\r\n isPlayableCharacter: z.boolean(),\r\n role: z.object({uuid: z.string(), displayName: text, description: text, displayIcon: text}).passthrough().nullish(),\r\n abilities: z.array(z.object({slot: z.string(), displayName: text, description: text, displayIcon: text}).passthrough()).nullish()\r\n})\r\n\r\nconst mapSchema = asset.extend({\r\n coordinates: text,\r\n listViewIcon: text,\r\n splash: text,\r\n mapUrl: text,\r\n xMultiplier: z.number(),\r\n yMultiplier: z.number(),\r\n xScalarToAdd: z.number(),\r\n yScalarToAdd: z.number(),\r\n callouts: z.array(z.object({regionName: z.string(), superRegionName: z.string(), location: z.object({x: z.number(), y: z.number()})}).passthrough()).nullish()\r\n})\r\n\r\nconst weaponSchema = asset.extend({\r\n category: z.string(),\r\n defaultSkinUuid: z.string(),\r\n killStreamIcon: text,\r\n weaponStats: z.object({}).passthrough().nullish(),\r\n shopData: z.object({}).passthrough().nullish(),\r\n skins: z.array(z.object({}).passthrough())\r\n})\r\n\r\nconst skinSchema = asset.extend({\r\n themeUuid: z.string(),\r\n contentTierUuid: text,\r\n wallpaper: text,\r\n chromas: z.array(asset.passthrough()),\r\n levels: z.array(asset.passthrough())\r\n})\r\n\r\nconst seasonSchema = z.object({\r\n uuid: z.string(),\r\n displayName: text,\r\n type: text,\r\n startTime: z.string(),\r\n endTime: z.string(),\r\n parentUuid: text,\r\n assetPath: text\r\n}).passthrough()\r\n\r\nconst versionSchema = z.object({\r\n manifestId: z.string(),\r\n branch: z.string(),\r\n version: z.string(),\r\n buildVersion: z.string(),\r\n engineVersion: z.string(),\r\n riotClientVersion: z.string().describe('Value of the X-Riot-ClientVersion header'),\r\n riotClientBuild: z.string(),\r\n buildDate: z.string()\r\n}).passthrough()\r\n\r\nfunction query(extra: readonly (readonly [string, ZodType])[] = []): Map<string, ZodType> {\r\n return new Map<string, ZodType>([\r\n ['language', z.string().optional().describe('Language code such as `fr-FR`. Defaults to `en-US`.')],\r\n ...extra\r\n ])\r\n}\r\n\r\nfunction endpoint<const P extends string, S extends ZodType>(name: string, description: string, path: P, schema: S, extra: readonly (readonly [string, ZodType])[] = []) {\r\n return markEnveloped({\r\n name,\r\n description,\r\n category: 'Valorant-API.com',\r\n type: 'other',\r\n suffix: `${BASE}${path}` as `${typeof BASE}${P}`,\r\n query: query(extra),\r\n responses: {'200': schema}\r\n } as const satisfies ValorantEndpoint)\r\n}\r\n\r\n/** A list endpoint and its `/{uuid}` twin. */\r\nfunction collection<const P extends string, S extends ZodType>(title: string, singular: string, path: P, schema: S, extra: readonly (readonly [string, ZodType])[] = []) {\r\n return {\r\n list: endpoint(title, `List of ${title.toLowerCase()}`, path, z.array(schema), extra),\r\n one: endpoint(singular, `One ${singular.toLowerCase()} by UUID`, `${path}/{uuid}` as `${P}/{uuid}`, schema)\r\n }\r\n}\r\n\r\nconst playable = [['isPlayableCharacter', z.boolean().optional().describe('Only return playable agents. Skips the duplicate Sova.')]] as const\r\n\r\nconst agents = collection('Agents', 'Agent', 'agents', agentSchema, playable)\r\nconst buddies = collection('Buddies', 'Buddy', 'buddies', asset)\r\nconst buddyLevels = collection('Buddy Levels', 'Buddy Level', 'buddies/levels', asset)\r\nconst bundles = collection('Bundles', 'Bundle', 'bundles', asset)\r\nconst ceremonies = collection('Ceremonies', 'Ceremony', 'ceremonies', asset)\r\nconst competitiveTiers = collection('Competitive Tiers', 'Competitive Tier Set', 'competitivetiers', z.object({uuid: z.string(), tiers: z.array(z.object({tier: z.number(), tierName: text, division: text, color: text}).passthrough())}).passthrough())\r\nconst contentTiers = collection('Content Tiers', 'Content Tier', 'contenttiers', asset)\r\nconst contracts = collection('Contracts', 'Contract', 'contracts', asset)\r\nconst currencies = collection('Currencies', 'Currency', 'currencies', asset)\r\nconst events = collection('Events', 'Event', 'events', asset)\r\nconst flex = collection('Flex', 'Flex Item', 'flex', asset)\r\nconst gamemodes = collection('Gamemodes', 'Gamemode', 'gamemodes', asset)\r\nconst gamemodeEquippables = collection('Gamemode Equippables', 'Gamemode Equippable', 'gamemodes/equippables', asset)\r\nconst gear = collection('Gear', 'Gear Item', 'gear', asset)\r\nconst levelBorders = collection('Level Borders', 'Level Border', 'levelborders', asset)\r\nconst maps = collection('Maps', 'Map', 'maps', mapSchema)\r\nconst missions = collection('Missions', 'Mission', 'missions', z.object({uuid: z.string(), displayName: text}).passthrough())\r\nconst playerCards = collection('Player Cards', 'Player Card', 'playercards', asset)\r\nconst playerTitles = collection('Player Titles', 'Player Title', 'playertitles', z.object({uuid: z.string(), displayName: text, titleText: text}).passthrough())\r\nconst seasons = collection('Seasons', 'Season', 'seasons', seasonSchema)\r\nconst competitiveSeasons = collection('Competitive Seasons', 'Competitive Season', 'seasons/competitive', z.object({uuid: z.string(), seasonUuid: z.string(), startTime: z.string(), endTime: z.string()}).passthrough())\r\nconst sprays = collection('Sprays', 'Spray', 'sprays', asset)\r\nconst sprayLevels = collection('Spray Levels', 'Spray Level', 'sprays/levels', asset)\r\nconst themes = collection('Themes', 'Theme', 'themes', asset)\r\nconst weapons = collection('Weapons', 'Weapon', 'weapons', weaponSchema)\r\nconst weaponSkins = collection('Weapon Skins', 'Weapon Skin', 'weapons/skins', skinSchema)\r\nconst weaponSkinChromas = collection('Weapon Skin Chromas', 'Weapon Skin Chroma', 'weapons/skinchromas', asset)\r\nconst weaponSkinLevels = collection('Weapon Skin Levels', 'Weapon Skin Level', 'weapons/skinlevels', asset)\r\n\r\nexport const catalogEndpoints = {\r\n agents: agents.list, agent: agents.one,\r\n buddies: buddies.list, buddy: buddies.one,\r\n buddyLevels: buddyLevels.list, buddyLevel: buddyLevels.one,\r\n bundles: bundles.list, bundle: bundles.one,\r\n ceremonies: ceremonies.list, ceremony: ceremonies.one,\r\n competitiveTiers: competitiveTiers.list, competitiveTier: competitiveTiers.one,\r\n contentTiers: contentTiers.list, contentTier: contentTiers.one,\r\n contracts: contracts.list, contract: contracts.one,\r\n currencies: currencies.list, currency: currencies.one,\r\n events: events.list, event: events.one,\r\n flex: flex.list, flexItem: flex.one,\r\n gamemodes: gamemodes.list, gamemode: gamemodes.one,\r\n gamemodeEquippables: gamemodeEquippables.list, gamemodeEquippable: gamemodeEquippables.one,\r\n gear: gear.list, gearItem: gear.one,\r\n levelBorders: levelBorders.list, levelBorder: levelBorders.one,\r\n maps: maps.list, map: maps.one,\r\n missions: missions.list, mission: missions.one,\r\n playerCards: playerCards.list, playerCard: playerCards.one,\r\n playerTitles: playerTitles.list, playerTitle: playerTitles.one,\r\n seasons: seasons.list, season: seasons.one,\r\n competitiveSeasons: competitiveSeasons.list, competitiveSeason: competitiveSeasons.one,\r\n sprays: sprays.list, spray: sprays.one,\r\n sprayLevels: sprayLevels.list, sprayLevel: sprayLevels.one,\r\n themes: themes.list, theme: themes.one,\r\n version: endpoint('Version', 'Current game version and the matching client version', 'version', versionSchema),\r\n weapons: weapons.list, weapon: weapons.one,\r\n weaponSkins: weaponSkins.list, weaponSkin: weaponSkins.one,\r\n weaponSkinChromas: weaponSkinChromas.list, weaponSkinChroma: weaponSkinChromas.one,\r\n weaponSkinLevels: weaponSkinLevels.list, weaponSkinLevel: weaponSkinLevels.one\r\n} as const\r\n","const enveloped = new WeakSet<object>()\n\n/** Marks an endpoint whose body is `{status, data}` and whose schema describes `data` only. */\nexport function markEnveloped<T extends object>(endpoint: T): T {\n enveloped.add(endpoint)\n return endpoint\n}\n\n/** Unwraps `data` for enveloped endpoints, whatever the validation mode. */\nexport function unwrapEnvelope(endpoint: object, body: unknown): unknown {\n if(enveloped.has(endpoint) && typeof body === 'object' && body !== null && 'data' in body) {\n return (body as {data: unknown}).data\n }\n return body\n}\n","// Generated from the archived markdown docs of techchrism/valorant-api-docs (MIT).\n// Endpoints that the `valorant-api-types` package does not describe. Responses are untyped.\nimport type {ValorantEndpoint} from 'valorant-api-types'\nimport {z} from 'zod'\n\nexport const contractsActiveStoryEndpoint = {\n name: 'Active Story',\n description: 'Get the battlepass contracts',\n queryName: 'ContractDefinitions_FetchActiveStory',\n category: 'Contract Endpoints',\n type: 'pd',\n suffix: 'contract-definitions/v2/definitions/story',\n riotRequirements: {entitlement: true, token: true, clientPlatform: true, clientVersion: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const currentGameAllChatTokenEndpoint = {\n name: 'All Chat Token',\n description: 'Get a token for all chat',\n queryName: 'CoreGame_FetchAllChatMUCToken',\n category: 'Current Game Endpoints',\n type: 'glz',\n suffix: 'core-game/v1/matches/{in-progress match id}/allchatmuctoken',\n riotRequirements: {entitlement: true, token: true, clientPlatform: true, clientVersion: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const currentGameTeamChatTokenEndpoint = {\n name: 'Team Chat Token',\n description: 'Get a token for team chat',\n queryName: 'CoreGame_FetchTeamChatMUCToken',\n category: 'Current Game Endpoints',\n type: 'glz',\n suffix: 'core-game/v1/matches/{in-progress match id}/teamchatmuctoken',\n riotRequirements: {entitlement: true, token: true, clientPlatform: true, clientVersion: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localAntiAddictionShutdownEndpoint = {\n name: 'Anti Addiction Shutdown',\n description: 'GET ANTI_ADDICTION_RNet_FetchShutdownPolicyState',\n queryName: 'ANTI_ADDICTION_RNet_FetchShutdownPolicyState',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'anti-addiction/v1/products/valorant/policies/shutdown/anti-addiction-state',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localAntiAddictionWarningEndpoint = {\n name: 'Anti Addiction Warning',\n description: 'GET ANTI_ADDICTION_RNet_FetchWarningMessagePolicyState',\n queryName: 'ANTI_ADDICTION_RNet_FetchWarningMessagePolicyState',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'anti-addiction/v1/products/valorant/policies/warningMessage/anti-addiction-state',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localClientConfigEndpoint = {\n name: 'Client Config',\n description: 'GET CLIENTCONFIG_RNET_GET_ValorantClientConfig',\n queryName: 'CLIENTCONFIG_RNET_GET_ValorantClientConfig',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'client-config/v2/namespace/valorant.client/player',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localEulaEndpoint = {\n name: 'Eula',\n description: 'Get the EULA',\n queryName: 'LEGAL_INFO_RNet_EULA',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'eula/v1/agreement/content',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localPrivacyPolicyEndpoint = {\n name: 'Privacy Policy',\n description: 'Get privacy policy',\n queryName: 'LEGAL_INFO_RNet_Privacy',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'eula/v1/privacy-policy/content',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localAvailableLocalesEndpoint = {\n name: 'Available Locales',\n description: 'Get available locales',\n queryName: 'LOCALE_RNet_FetchAvailableLocales',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'rnet-product-registry/v4/available-product-locales/products/valorant/patchlines/live',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localLocaleEndpoint = {\n name: 'Locale',\n description: 'Get the current locale',\n queryName: 'LOCALE_RNet_FetchLocale',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'riotclient/product-locales/products/valorant/patchlines/live',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localReporterFeedbackEndpoint = {\n name: 'Reporter Feedback',\n description: 'GET REPORTER_FEEDBACK_RNet_GetReporterFeedback',\n queryName: 'REPORTER_FEEDBACK_RNet_GetReporterFeedback',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'player-reporting/v1/reporter-feedback',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localCommandLineArgsEndpoint = {\n name: 'Command Line Args',\n description: 'Gets the command-line args provided to the Riot client',\n queryName: 'Riot Client Command-Line Args',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'riotclient/command-line-args',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localRiotStatusEndpoint = {\n name: 'Riot Status',\n description: 'Get game status information such as maintenances and incidents Response is an escaped JSON string.',\n queryName: 'RiotStatus_RNet_FetchStatus',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'riot-status/v1/products/valorant/patchlines/live/deployments/{region}',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localRiotWarningEndpoint = {\n name: 'Riot Warning',\n description: 'GET RIOT_WARNING_RNet_GetRiotWarning',\n queryName: 'RIOT_WARNING_RNet_GetRiotWarning',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'ga-warning/v1/warnings',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localClientAuthorizationsEndpoint = {\n name: 'Client Authorizations',\n description: 'Gets tokens in use by the client',\n queryName: 'RSO_RNet_FetchClientAuthorizations',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'rso-auth/v2/authorizations/valorant-client',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localAccessTokenEndpoint = {\n name: 'Access Token',\n description: 'Gets a Riot access token',\n queryName: 'RSO_RNet_GetAccessToken',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'rso-auth/v1/authorization/access-token',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localUserInfoTokenEndpoint = {\n name: 'User Info Token',\n description: 'GET RSO_RNet_GetUserInfoToken',\n queryName: 'RSO_RNet_GetUserInfoToken',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'rso-auth/v1/userinfo/valorant-client',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const chatSettingsEndpoint = {\n name: 'Settings',\n description: 'Get chat settings',\n queryName: 'TEXT_CHAT_RNet_FetchSettings',\n category: 'Local Endpoints - Chat',\n type: 'local',\n suffix: 'chat/v1/settings',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const chatTournamentInfoEndpoint = {\n name: 'Tournament Info',\n description: 'Get in-tournament conversations',\n queryName: 'TEXT_CHAT_RNet_GetMUCInfos - tournaments',\n category: 'Local Endpoints - Chat',\n type: 'local',\n suffix: 'chat/v6/conversations/ares-tournaments',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localPluginStatusEndpoint = {\n name: 'Plugin Status',\n description: 'Gets plugin status',\n queryName: 'URNetClient_CheckPluginStatus',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'plugin-manager/v1/status',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localRmsSessionEndpoint = {\n name: 'Rms Session',\n description: 'Gets the token for Riot Messaging Service',\n queryName: 'URNetClient_CheckRMSSession',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'riot-messaging-service/v1/session',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localProcessInfoEndpoint = {\n name: 'Process Info',\n description: 'Gets the Valorant process ID',\n queryName: 'URNetClient_GetProcessInfo',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'process-control/v1/process',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localLogPathEndpoint = {\n name: 'Log Path',\n description: 'Gets the Valorant log path',\n queryName: 'Valorant Log Path',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'product-session/v1/logs/path/VALORANT',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const voiceAudioPropertiesEndpoint = {\n name: 'Audio Properties',\n description: 'Get audio properties such as if the microphone is in use',\n queryName: 'VOICE_CHAT_RNet_FetchAudioProperties',\n category: 'Local Endpoints - Voice',\n type: 'local',\n suffix: 'voice-chat/v1/audio-properties',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const voiceCaptureDevicesEndpoint = {\n name: 'Capture Devices',\n description: 'Get microphone input device info',\n queryName: 'VOICE_CHAT_RNet_FetchCaptureDevices',\n category: 'Local Endpoints - Voice',\n type: 'local',\n suffix: 'voice-chat/v2/devices/capture',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const voicePushToTalkEndpoint = {\n name: 'Push To Talk',\n description: 'GET VOICE_CHAT_RNet_FetchPTTSettings',\n queryName: 'VOICE_CHAT_RNet_FetchPTTSettings',\n category: 'Local Endpoints - Voice',\n type: 'local',\n suffix: 'voice-chat/v2/push-to-talk/valorant',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const voiceRenderDevicesEndpoint = {\n name: 'Render Devices',\n description: 'Get audio output devices',\n queryName: 'VOICE_CHAT_RNet_FetchRenderDevices',\n category: 'Local Endpoints - Voice',\n type: 'local',\n suffix: 'voice-chat/v2/devices/render',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const voiceSessionsEndpoint = {\n name: 'Sessions',\n description: 'GET VOICE_CHAT_RNet_FetchSessions',\n queryName: 'VOICE_CHAT_RNet_FetchSessions',\n category: 'Local Endpoints - Voice',\n type: 'local',\n suffix: 'voice-chat/v3/sessions/valorant',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const voiceSettingsEndpoint = {\n name: 'Settings',\n description: 'GET VOICE_CHAT_RNet_FetchSettings',\n queryName: 'VOICE_CHAT_RNet_FetchSettings',\n category: 'Local Endpoints - Voice',\n type: 'local',\n suffix: 'voice-chat/v3/settings/valorant',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const pregameChatTokenEndpoint = {\n name: 'Chat Token',\n description: 'Get a chat token',\n queryName: 'Pregame_FetchChatToken',\n category: 'Pre-Game Endpoints',\n type: 'glz',\n suffix: 'pregame/v1/matches/{pre-game match id}/chattoken',\n riotRequirements: {entitlement: true, token: true, clientPlatform: true, clientVersion: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const pregameVoiceTokenEndpoint = {\n name: 'Voice Token',\n description: 'Get a voice token',\n queryName: 'Pregame_FetchVoiceToken',\n category: 'Pre-Game Endpoints',\n type: 'glz',\n suffix: 'pregame/v1/matches/{pre-game match id}/voicetoken',\n riotRequirements: {entitlement: true, token: true, clientPlatform: true, clientVersion: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const sessionGetEndpoint = {\n name: 'Get',\n description: 'Get information about the current game session',\n queryName: 'Session_Get',\n category: 'Session Endpoints',\n type: 'glz',\n suffix: 'session/v1/sessions/{puuid}',\n riotRequirements: {entitlement: true, token: true, clientPlatform: true, clientVersion: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const sessionReconnectEndpoint = {\n name: 'Reconnect',\n description: 'GET Session_ReConnect',\n queryName: 'Session_ReConnect',\n category: 'Session Endpoints',\n type: 'glz',\n suffix: 'session/v1/sessions/{puuid}/reconnect',\n riotRequirements: {entitlement: true, token: true, clientPlatform: true, clientVersion: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const storeOrderEndpoint = {\n name: 'Order',\n description: 'GET Store_GetOrder',\n queryName: 'Store_GetOrder',\n category: 'Store Endpoints',\n type: 'pd',\n suffix: 'store/v1/order/{order id}',\n riotRequirements: {entitlement: true, token: true, clientPlatform: true, clientVersion: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n\nexport const localPlayerSettingsEndpoint = {\n name: 'Player Settings',\n description: 'Get client settings',\n queryName: 'RiotKV_RNet_GetSettings',\n category: 'Local Endpoints',\n type: 'local',\n suffix: 'player-preferences/v1/data-json/Ares.PlayerSettings',\n riotRequirements: {localAuth: true},\n responses: {'200': z.unknown()}\n} as const satisfies ValorantEndpoint\n","import type {ValorantEndpoint} from 'valorant-api-types'\nimport {z} from 'zod'\n\nconst offerSchema = z.object({\n OfferID: z.string(),\n IsDirectPurchase: z.boolean(),\n StartDate: z.string(),\n Cost: z.record(z.string(), z.number()),\n Rewards: z.array(z.object({\n ItemTypeID: z.string(),\n ItemID: z.string(),\n Quantity: z.number()\n }).passthrough())\n}).passthrough()\n\nconst bundleSchema = z.object({\n ID: z.string(),\n DataAssetID: z.string(),\n CurrencyID: z.string(),\n Items: z.array(z.unknown()),\n ItemOffers: z.array(z.unknown()).nullish(),\n TotalBaseCost: z.record(z.string(), z.number()).nullish(),\n TotalDiscountedCost: z.record(z.string(), z.number()).nullish(),\n TotalDiscountPercent: z.number(),\n DurationRemainingInSeconds: z.number(),\n WholesaleOnly: z.boolean()\n}).passthrough()\n\n/** Replacement of the removed `store/v2/storefront` endpoint. */\nexport const storefrontV3Endpoint = {\n name: 'Storefront V3',\n description: 'Get the current storefront of the player: featured bundles, the daily skin offers, accessories and night market plugins. ' +\n 'Replaces the v2 storefront endpoint, which now answers 404.',\n queryName: 'Store_GetStorefrontV3',\n category: 'Store Endpoints',\n type: 'pd',\n method: 'POST',\n suffix: 'store/v3/storefront/{puuid}',\n headers: new Map([['Content-Type', 'application/json']]),\n riotRequirements: {\n token: true,\n entitlement: true,\n clientPlatform: true,\n clientVersion: true\n },\n responses: {\n '200': z.object({\n FeaturedBundle: z.object({\n Bundle: bundleSchema,\n Bundles: z.array(bundleSchema),\n BundleRemainingDurationInSeconds: z.number()\n }).passthrough(),\n SkinsPanelLayout: z.object({\n SingleItemOffers: z.array(z.string()),\n SingleItemStoreOffers: z.array(offerSchema),\n SingleItemOffersRemainingDurationInSeconds: z.number()\n }).passthrough(),\n UpgradeCurrencyStore: z.object({\n UpgradeCurrencyOffers: z.array(z.object({OfferID: z.string(), StorefrontItemID: z.string()}).passthrough())\n }).passthrough(),\n AccessoryStore: z.object({\n AccessoryStoreOffers: z.array(z.object({Offer: offerSchema, ContractID: z.string()}).passthrough()),\n AccessoryStoreRemainingDurationInSeconds: z.number(),\n StorefrontID: z.string()\n }).passthrough(),\n BonusStore: z.object({\n BonusStoreOffers: z.array(z.unknown()),\n BonusStoreRemainingDurationInSeconds: z.number()\n }).passthrough().optional().describe('Only present while the night market is active'),\n PluginStores: z.array(z.object({PluginID: z.string(), PluginOffers: z.unknown(), StartDate: z.string()}).passthrough()).optional()\n }).passthrough()\n }\n} as const satisfies ValorantEndpoint\n\nexport type StorefrontV3Response = z.output<typeof storefrontV3Endpoint.responses['200']>\n","import {endpoints as e} from 'valorant-api-types'\nimport type {ValorantClient} from './client'\nimport {ValorantError} from './errors'\n\nexport interface AuthTokens {\n accessToken: string\n idToken: string\n /** Lifetime in seconds. */\n expiresIn: number | undefined\n}\n\nexport type LoginResult =\n | {status: 'success', tokens: AuthTokens | undefined}\n | {status: 'multifactor', email: string}\n\nexport interface LoginOptions {\n username: string\n password: string\n /** hCaptcha token from the Riot login page. */\n captcha: string\n remember?: boolean\n}\n\nexport interface EstablishSessionOptions {\n /** Also look up the client version from valorant-api.com. Default false. */\n fetchClientVersion?: boolean\n}\n\n/** High-level flows that chain several auth endpoints and write their results into the context. */\nexport interface AuthFlows {\n /** Starts a login with credentials. Fragile: Riot requires a captcha. Prefer {@link reauthenticate} or `local.connect()`. */\n login(options: LoginOptions): Promise<LoginResult>\n submitMfa(code: string, rememberDevice?: boolean): Promise<LoginResult>\n /** Gets fresh tokens from the saved `ssid` cookie, then runs {@link establishSession}. */\n reauthenticate(options?: EstablishSessionOptions): Promise<AuthTokens>\n /** From the tokens in the context: entitlement token, puuid, region and shard. */\n establishSession(options?: EstablishSessionOptions): Promise<void>\n /** Reads the current client version from valorant-api.com and stores it. */\n fetchClientVersion(): Promise<string>\n}\n\n/** Extracts tokens from a `...#access_token=...&id_token=...` URL. */\nexport function parseAuthRedirect(location: string): AuthTokens | undefined {\n const fragment = location.split('#')[1]\n if(fragment === undefined) return undefined\n const params = new URLSearchParams(fragment)\n const accessToken = params.get('access_token')\n const idToken = params.get('id_token')\n if(accessToken === null || idToken === null) return undefined\n const expiresIn = Number(params.get('expires_in'))\n return {accessToken, idToken, expiresIn: Number.isFinite(expiresIn) && expiresIn > 0 ? expiresIn : undefined}\n}\n\nconst AUTH_COOKIES_BODY = {\n client_id: 'play-valorant-web-prod',\n nonce: '1',\n redirect_uri: 'https://playvalorant.com/opt_in',\n response_type: 'token id_token',\n scope: 'account openid'\n} as const\n\nexport function createAuthFlows(client: ValorantClient): AuthFlows {\n const ctx = client.context\n\n function applyTokens(tokens: AuthTokens | undefined): void {\n if(tokens) ctx.update({accessToken: tokens.accessToken, idToken: tokens.idToken})\n }\n\n function toLoginResult(data: unknown): LoginResult {\n const body = (data ?? {}) as {type?: string, success?: {redirect_url?: string}, multifactor?: {email?: string}}\n if(body.type === 'multifactor') return {status: 'multifactor', email: body.multifactor?.email ?? ''}\n const redirect = body.success?.redirect_url ?? JSON.stringify(data)\n const tokens = parseAuthRedirect(redirect.replaceAll('\\\\u0026', '&'))\n applyTokens(tokens)\n return {status: 'success', tokens}\n }\n\n return {\n async login(options) {\n await client.auth.cookies({body: AUTH_COOKIES_BODY})\n const data = await client.auth.request({\n body: {\n type: 'auth',\n language: 'en_US',\n remember: options.remember ?? true,\n riot_identity: {captcha: options.captcha, username: options.username, password: options.password}\n }\n })\n return toLoginResult(data)\n },\n\n async submitMfa(code, rememberDevice = true) {\n const data = await client.auth.multiFactor({body: {type: 'multifactor', multifactor: {otp: code, rememberDevice}}})\n return toLoginResult(data)\n },\n\n async reauthenticate(options) {\n const response = await client.send(e.cookieReauthEndpoint)\n const tokens = parseAuthRedirect(response.headers.get('location') ?? '')\n if(tokens === undefined) throw new ValorantError('Cookie reauthentication failed: the session cookies are missing or expired, log in again')\n applyTokens(tokens)\n await this.establishSession(options)\n return tokens\n },\n\n async establishSession(options) {\n const {entitlements_token} = await client.auth.entitlement()\n ctx.set('entitlementToken', entitlements_token)\n\n const info = await client.auth.playerInfo()\n ctx.set('puuid', info.sub)\n\n const geo = await client.auth.riotGeo({body: {id_token: ctx.require('idToken')}})\n ctx.applyAffinity(geo.affinities.live)\n\n if(options?.fetchClientVersion) await this.fetchClientVersion()\n },\n\n async fetchClientVersion() {\n const response = await client.transport({\n method: 'GET',\n url: 'https://valorant-api.com/v1/version',\n headers: {Accept: 'application/json'},\n signal: AbortSignal.timeout(15_000)\n })\n const version = (JSON.parse(response.text) as {data?: {riotClientVersion?: string}}).data?.riotClientVersion\n if(!version) throw new ValorantError('valorant-api.com did not return a client version')\n ctx.set('clientVersion', version)\n return version\n }\n }\n}\n","import type {ZodError} from 'zod'\n\n/** Base class of every error thrown by this library. */\nexport class ValorantError extends Error {\n constructor(message: string, options?: {cause?: unknown}) {\n super(message, options)\n this.name = new.target.name\n }\n}\n\n/** A required context value (token, shard, ...) was not set. */\nexport class MissingContextError extends ValorantError {\n constructor(readonly key: string) {\n super(`Context value \"${key}\" is required for this request but is not set`)\n }\n}\n\n/** A path parameter of the endpoint URL was not provided. */\nexport class MissingParameterError extends ValorantError {\n constructor(readonly parameter: string, readonly endpoint: string) {\n super(`Path parameter \"${parameter}\" is required for \"${endpoint}\"`)\n }\n}\n\n/** The request never produced an HTTP response (network failure, timeout, abort). */\nexport class ValorantNetworkError extends ValorantError {\n constructor(message: string, readonly url: string, options?: {cause?: unknown}) {\n super(message, options)\n }\n}\n\n/** A request body or response body did not match its schema. */\nexport class ValorantValidationError extends ValorantError {\n constructor(\n readonly target: 'request' | 'response',\n readonly endpoint: string,\n readonly issues: ZodError,\n readonly data: unknown\n ) {\n super(`Invalid ${target} for \"${endpoint}\": ${issues.issues.map(i => `${i.path.join('.') || '(root)'}: ${i.message}`).slice(0, 5).join('; ')}`)\n }\n}\n\n/** The server answered with a non-success status code. */\nexport class ValorantApiError extends ValorantError {\n readonly errorCode: string | undefined\n\n constructor(\n readonly status: number,\n readonly endpoint: string,\n readonly url: string,\n readonly body: unknown,\n readonly headers: Headers\n ) {\n const code = extractErrorCode(body)\n super(`${endpoint} failed with HTTP ${status}${code ? ` (${code})` : ''}`)\n this.errorCode = code\n }\n}\n\n/** HTTP 401, or HTTP 400 with BAD_CLAIMS: the access or entitlement token is no longer valid. */\nexport class ValorantAuthError extends ValorantApiError {}\n\n/** HTTP 429. */\nexport class ValorantRateLimitError extends ValorantApiError {\n constructor(status: number, endpoint: string, url: string, body: unknown, headers: Headers, readonly retryAfterMs: number | undefined) {\n super(status, endpoint, url, body, headers)\n }\n}\n\nfunction extractErrorCode(body: unknown): string | undefined {\n if(typeof body === 'object' && body !== null && 'errorCode' in body) {\n const code = (body as {errorCode: unknown}).errorCode\n return typeof code === 'string' ? code : undefined\n }\n return undefined\n}\n","import {MissingContextError} from './errors'\n\n/** Game shard, used in `pd`, `glz` and `shared` hosts. */\nexport type Shard = 'na' | 'eu' | 'ap' | 'kr'\n\n/** Game region (affinity), used in `glz` hosts. */\nexport type Region = 'na' | 'latam' | 'br' | 'eu' | 'ap' | 'kr'\n\n/** Everything the client needs that changes rarely: where to talk, and who we are. */\nexport interface ValorantState {\n shard: Shard\n region: Region\n puuid: string\n accessToken: string\n entitlementToken: string\n idToken: string\n pasToken: string\n /** Value of the `X-Riot-ClientVersion` header, e.g. `release-09.05-shipping-8-2570500`. */\n clientVersion: string\n /** Value of the `X-Riot-ClientPlatform` header (base64 JSON). */\n clientPlatform: string\n userAgent: string\n /** Cookies of `auth.riotgames.com`, name -> value. The `ssid` cookie enables re-authentication. */\n cookies: Record<string, string>\n /** Local Riot Client API, from the lockfile. */\n localPort: number\n localPassword: string\n}\n\nexport type ValorantStateKey = keyof ValorantState\n\nexport type ContextListener = (state: Readonly<ValorantState>, changed: readonly ValorantStateKey[]) => void\n\nconst DEFAULT_PLATFORM = btoa(JSON.stringify({\n platformType: 'PC',\n platformOS: 'Windows',\n platformOSVersion: '10.0.19042.1.256.64bit',\n platformChipset: 'Unknown'\n}))\n\nconst SECRET_KEYS: readonly ValorantStateKey[] = ['accessToken', 'entitlementToken', 'idToken', 'pasToken', 'cookies', 'localPassword']\n\nconst REGION_TO_SHARD: Record<Region, Shard> = {na: 'na', latam: 'na', br: 'na', eu: 'eu', ap: 'ap', kr: 'kr'}\n\nexport function isRegion(value: string): value is Region {\n return Object.hasOwn(REGION_TO_SHARD, value)\n}\n\nexport function shardForRegion(region: Region): Shard {\n return REGION_TO_SHARD[region]\n}\n\n/**\n * Mutable, observable store for the long-lived values shared by every request.\n * Share one instance between clients, or swap its content at any time with {@link replace} / {@link update}.\n */\nexport class ValorantContext {\n #state: Readonly<Partial<ValorantState>>\n readonly #listeners = new Set<ContextListener>()\n\n constructor(initial: Partial<ValorantState> = {}) {\n this.#state = Object.freeze({clientPlatform: DEFAULT_PLATFORM, ...stripUndefined(initial)})\n }\n\n get<K extends ValorantStateKey>(key: K): ValorantState[K] | undefined {\n return this.#state[key]\n }\n\n /** Like {@link get}, but throws {@link MissingContextError} when the value is not set. */\n require<K extends ValorantStateKey>(key: K): ValorantState[K] {\n const value = this.#state[key]\n if(value === undefined) throw new MissingContextError(key)\n return value\n }\n\n has(key: ValorantStateKey): boolean {\n return this.#state[key] !== undefined\n }\n\n /** Sets one value. `undefined` removes it. */\n set<K extends ValorantStateKey>(key: K, value: ValorantState[K] | undefined): void {\n this.update({[key]: value} as Partial<ValorantState>)\n }\n\n /** Merges a patch into the state. Keys set to `undefined` are removed. */\n update(patch: {[K in ValorantStateKey]?: ValorantState[K] | undefined}): void {\n this.#commit({...this.#state, ...patch})\n }\n\n /** Replaces the whole state. The default client platform is kept unless provided. */\n replace(next: Partial<ValorantState>): void {\n this.#commit({clientPlatform: DEFAULT_PLATFORM, ...next})\n }\n\n /** Removes everything except the default client platform. */\n clear(): void {\n this.replace({})\n }\n\n /** Sets region and the matching shard from a Riot affinity (`eu`, `latam`, ...). Unknown values are ignored. */\n applyAffinity(affinity: string): boolean {\n if(!isRegion(affinity)) return false\n this.update({region: affinity, shard: shardForRegion(affinity)})\n return true\n }\n\n setCookie(name: string, value: string | undefined): void {\n const cookies = {...this.#state.cookies}\n if(value === undefined) delete cookies[name]\n else cookies[name] = value\n this.update({cookies})\n }\n\n cookieHeader(): string | undefined {\n const entries = Object.entries(this.#state.cookies ?? {})\n return entries.length === 0 ? undefined : entries.map(([name, value]) => `${name}=${value}`).join('; ')\n }\n\n /** Immutable copy of the current state. Contains secrets. */\n snapshot(): Readonly<Partial<ValorantState>> {\n return this.#state\n }\n\n /** Calls `listener` after every change. Returns an unsubscribe function. */\n subscribe(listener: ContextListener): () => void {\n this.#listeners.add(listener)\n return () => void this.#listeners.delete(listener)\n }\n\n /** State with secrets masked, safe to log. */\n redacted(): Record<string, unknown> {\n const out: Record<string, unknown> = {...this.#state}\n for(const key of SECRET_KEYS) {\n if(out[key] !== undefined) out[key] = '[redacted]'\n }\n return out\n }\n\n toJSON(): Record<string, unknown> {\n return this.redacted()\n }\n\n [Symbol.for('nodejs.util.inspect.custom')](): Record<string, unknown> {\n return this.redacted()\n }\n\n #commit(next: Partial<ValorantState>): void {\n const previous = this.#state\n const clean = Object.freeze(stripUndefined(next))\n const keys = new Set([...Object.keys(previous), ...Object.keys(clean)]) as Set<ValorantStateKey>\n const changed = [...keys].filter(key => !sameValue(previous[key], clean[key]))\n if(changed.length === 0) return\n\n this.#state = clean\n for(const listener of [...this.#listeners]) listener(clean as Readonly<ValorantState>, changed)\n }\n}\n\nfunction stripUndefined<T extends object>(value: T): T {\n return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== undefined)) as T\n}\n\nfunction sameValue(a: unknown, b: unknown): boolean {\n if(Object.is(a, b)) return true\n if(typeof a !== 'object' || typeof b !== 'object' || a === null || b === null) return false\n const aEntries = Object.entries(a)\n const bEntries = Object.entries(b)\n return aEntries.length === bEntries.length && aEntries.every(([key, value]) => Object.is((b as Record<string, unknown>)[key], value))\n}\n","export interface HttpRequest {\n method: string\n url: string\n headers: Record<string, string>\n body?: string\n signal?: AbortSignal\n}\n\nexport interface HttpResponse {\n status: number\n headers: Headers\n /** Every `Set-Cookie` header, unfolded. */\n setCookies: string[]\n text: string\n}\n\n/** Sends one HTTP request. Must not follow redirects. */\nexport type Transport = (request: HttpRequest) => Promise<HttpResponse>\n\nexport const fetchTransport: Transport = async request => {\n const response = await fetch(request.url, {\n method: request.method,\n headers: request.headers,\n body: request.body,\n signal: request.signal,\n redirect: 'manual'\n })\n return {\n status: response.status,\n headers: response.headers,\n setCookies: response.headers.getSetCookie(),\n text: await response.text()\n }\n}\n\n/**\n * Transport for the local Riot Client API, which serves a self-signed certificate.\n * Certificate checks are disabled for this transport only, and it refuses any host but loopback.\n */\nexport const localTransport: Transport = async request => {\n const {request: httpsRequest} = await import('node:https')\n const url = new URL(request.url)\n if(url.hostname !== '127.0.0.1' && url.hostname !== 'localhost') {\n throw new Error(`localTransport only talks to loopback hosts, got ${url.hostname}`)\n }\n\n return new Promise<HttpResponse>((resolve, reject) => {\n const req = httpsRequest(url, {\n method: request.method,\n headers: request.headers,\n rejectUnauthorized: false,\n signal: request.signal\n }, res => {\n const chunks: Buffer[] = []\n res.on('data', (chunk: Buffer) => chunks.push(chunk))\n res.on('error', reject)\n res.on('end', () => {\n const headers = new Headers()\n for(const [name, value] of Object.entries(res.headers)) {\n if(Array.isArray(value)) value.forEach(v => headers.append(name, v))\n else if(value !== undefined) headers.set(name, value)\n }\n resolve({\n status: res.statusCode ?? 0,\n headers,\n setCookies: res.headers['set-cookie'] ?? [],\n text: Buffer.concat(chunks).toString('utf8')\n })\n })\n })\n req.on('error', reject)\n req.end(request.body)\n })\n}\n","import type {ValorantClient} from './client'\nimport type {ValorantContext} from './context'\nimport {isRegion, shardForRegion} from './context'\nimport {ValorantError} from './errors'\n\nexport interface Lockfile {\n name: string\n pid: number\n port: number\n password: string\n protocol: string\n}\n\nexport interface LocalConnectOptions {\n /** Defaults to `%LOCALAPPDATA%\\Riot Games\\Riot Client\\Config\\lockfile`. */\n lockfilePath?: string\n /** When VALORANT is not running, look the client version up on valorant-api.com. Default true. */\n fetchClientVersion?: boolean\n}\n\nexport interface LocalEvent {\n eventType: 'Create' | 'Update' | 'Delete'\n uri: string\n data: unknown\n}\n\n/** Live event stream of the local Riot Client (`wss://127.0.0.1:{port}`). Needs the optional `ws` package. */\nexport interface LocalEventStream {\n /** Receives every event of the subscribed names. Returns an unsubscribe function. */\n onEvent(listener: (name: string, event: LocalEvent) => void): () => void\n subscribe(eventName: string): void\n unsubscribe(eventName: string): void\n close(): void\n}\n\nexport interface LocalFlows {\n /** Reads the lockfile and fills the context: local port/password, tokens, puuid, region, shard and client version. */\n connect(options?: LocalConnectOptions): Promise<void>\n /** Opens the local websocket. Subscribe to `OnJsonApiEvent` for everything. */\n events(): Promise<LocalEventStream>\n}\n\nexport function parseLockfile(content: string): Lockfile {\n const [name, pid, port, password, protocol] = content.trim().split(':')\n if(!name || !pid || !port || !password || !protocol) throw new ValorantError('Malformed lockfile')\n return {name, pid: Number(pid), port: Number(port), password, protocol}\n}\n\nexport async function readLockfile(path?: string): Promise<Lockfile> {\n const {readFile} = await import('node:fs/promises')\n const {join} = await import('node:path')\n const file = path ?? join(process.env['LOCALAPPDATA'] ?? '', 'Riot Games', 'Riot Client', 'Config', 'lockfile')\n try {\n return parseLockfile(await readFile(file, 'utf8'))\n } catch(cause) {\n throw new ValorantError(`Could not read the Riot Client lockfile at \"${file}\". Is the Riot Client running?`, {cause})\n }\n}\n\nexport function createLocalFlows(client: ValorantClient): LocalFlows {\n const ctx = client.context\n\n return {\n async connect(options) {\n const lockfile = await readLockfile(options?.lockfilePath)\n ctx.update({localPort: lockfile.port, localPassword: lockfile.password})\n\n const tokens = await client.local.entitlementsToken()\n ctx.update({accessToken: tokens.accessToken, entitlementToken: tokens.token, puuid: tokens.subject})\n\n const sessions = await client.local.sessions()\n const valorant = Object.values(sessions).find(session => session.productId === 'valorant')\n if(valorant) {\n ctx.set('clientVersion', valorant.version)\n const region = launchArgument(valorant.launchConfiguration.arguments, 'ares-deployment')\n if(region !== undefined && isRegion(region)) ctx.update({region, shard: shardForRegion(region)})\n }\n\n // VALORANT is not running: fall back to the account affinity and the public version API.\n if(!ctx.has('region')) {\n const info = await client.auth.playerInfo()\n const affinity = Object.values(info.affinity ?? {}).find(isRegion)\n if(affinity !== undefined) ctx.applyAffinity(affinity)\n }\n if(!ctx.has('clientVersion') && options?.fetchClientVersion !== false) {\n await client.auth.fetchClientVersion().catch(() => undefined)\n }\n },\n\n async events() {\n return openEventStream(ctx)\n }\n }\n}\n\nfunction launchArgument(args: readonly string[], name: string): string | undefined {\n const prefix = `-${name}=`\n return args.find(arg => arg.startsWith(prefix))?.slice(prefix.length)\n}\n\nasync function openEventStream(ctx: ValorantContext): Promise<LocalEventStream> {\n let WebSocket: typeof import('ws').WebSocket\n try {\n WebSocket = (await import('ws')).WebSocket\n } catch(cause) {\n throw new ValorantError('The local event stream needs the optional \"ws\" package: npm install ws', {cause})\n }\n\n const socket = new WebSocket(`wss://127.0.0.1:${ctx.require('localPort')}`, {\n headers: {Authorization: `Basic ${btoa(`riot:${ctx.require('localPassword')}`)}`},\n rejectUnauthorized: false\n })\n const listeners = new Set<(name: string, event: LocalEvent) => void>()\n\n socket.on('message', raw => {\n const text = raw.toString()\n if(text === '') return\n const message = JSON.parse(text) as unknown\n if(!Array.isArray(message) || message[0] !== 8) return\n for(const listener of [...listeners]) listener(String(message[1]), message[2] as LocalEvent)\n })\n\n await new Promise<void>((resolve, reject) => {\n socket.once('open', resolve)\n socket.once('error', reject)\n })\n\n return {\n onEvent(listener) {\n listeners.add(listener)\n return () => void listeners.delete(listener)\n },\n subscribe: eventName => socket.send(JSON.stringify([5, eventName])),\n unsubscribe: eventName => socket.send(JSON.stringify([6, eventName])),\n close: () => socket.close()\n }\n}\n","import {typeToPrefix, type ValorantEndpoint} from 'valorant-api-types'\nimport type {ValorantContext} from './context'\nimport type {HttpRequest} from './http'\nimport {MissingParameterError} from './errors'\nimport {paramName, type CallOptions, type QueryInput} from './types'\n\nexport interface RequestInput extends CallOptions {\n params?: Record<string, string | undefined>\n query?: QueryInput\n body?: unknown\n}\n\nconst AUTH_HOST = 'auth.riotgames.com'\n\n/** Endpoints whose documented URL hardcodes a value that belongs to the context. */\nfunction applyQuirks(path: string, ctx: ValorantContext): string {\n const hardcoded = '/leaderboards/affinity/na/'\n return path.includes(hardcoded) ? path.replace(hardcoded, `/leaderboards/affinity/${ctx.require('shard')}/`) : path\n}\n\nfunction resolvePath(endpoint: ValorantEndpoint, input: RequestInput, ctx: ValorantContext): string {\n const suffix = applyQuirks(endpoint.suffix, ctx)\n return suffix.replace(/\\{([^}]+)\\}/g, (_, variable: string) => {\n const name = paramName(variable)\n const value = input.params?.[name] ?? (name === 'puuid' || name === 'region' ? ctx.require(name) : undefined)\n if(value === undefined) throw new MissingParameterError(name, endpoint.name)\n return encodeURIComponent(value)\n })\n}\n\nfunction resolveBase(endpoint: ValorantEndpoint, ctx: ValorantContext): string {\n switch(endpoint.type) {\n case 'pd':\n case 'shared':\n return typeToPrefix({type: endpoint.type, shard: ctx.require('shard')})\n case 'glz':\n return typeToPrefix({type: 'glz', shard: ctx.require('shard'), region: ctx.require('region')})\n case 'local':\n return typeToPrefix({type: 'local', port: ctx.require('localPort')})\n case 'other':\n return ''\n }\n}\n\nfunction appendQuery(url: string, query: QueryInput | undefined): string {\n if(!query) return url\n const params = new URLSearchParams()\n for(const [key, value] of Object.entries(query)) {\n if(value !== undefined && value !== null) params.append(key, String(value))\n }\n const encoded = params.toString()\n if(encoded === '') return url\n return url + (url.includes('?') ? '&' : '?') + encoded\n}\n\nfunction resolveHeaders(endpoint: ValorantEndpoint, input: RequestInput, ctx: ValorantContext, url: string): Record<string, string> {\n const headers: Record<string, string> = {Accept: 'application/json'}\n const need = endpoint.riotRequirements ?? {}\n\n const userAgent = ctx.get('userAgent')\n if(userAgent) headers['User-Agent'] = userAgent\n if(need.token) headers['Authorization'] = `Bearer ${ctx.require('accessToken')}`\n if(need.localAuth) headers['Authorization'] = `Basic ${btoa(`riot:${ctx.require('localPassword')}`)}`\n if(need.entitlement) headers['X-Riot-Entitlements-JWT'] = ctx.require('entitlementToken')\n if(need.clientVersion) headers['X-Riot-ClientVersion'] = ctx.require('clientVersion')\n if(need.clientPlatform) headers['X-Riot-ClientPlatform'] = ctx.require('clientPlatform')\n\n for(const [name, value] of endpoint.headers ?? []) headers[name] = value\n if(input.body !== undefined && !Object.keys(headers).some(h => h.toLowerCase() === 'content-type')) {\n headers['Content-Type'] = 'application/json'\n }\n\n if(new URL(url).hostname === AUTH_HOST) {\n const cookie = ctx.cookieHeader()\n if(cookie) headers['Cookie'] = cookie\n }\n\n return {...headers, ...input.headers}\n}\n\nexport function isAuthHost(url: string): boolean {\n return new URL(url).hostname === AUTH_HOST\n}\n\nexport function buildRequest(endpoint: ValorantEndpoint, input: RequestInput, ctx: ValorantContext): HttpRequest {\n const path = resolvePath(endpoint, input, ctx)\n const base = resolveBase(endpoint, ctx)\n const url = appendQuery(base + (base === '' ? path : path.replace(/^\\/+/, '')), input.query)\n\n const method = endpoint.method ?? 'GET'\n const headers = resolveHeaders(endpoint, input, ctx, url)\n const declaresJson = [...(endpoint.headers?.keys() ?? [])].some(h => h.toLowerCase() === 'content-type')\n const body = input.body !== undefined ? JSON.stringify(input.body) : (method !== 'GET' && declaresJson ? '{}' : undefined)\n\n return {method, url, headers, body}\n}\n","import type {z, ZodType} from 'zod'\nimport type {ValorantEndpoint} from 'valorant-api-types'\n\nexport type ValidationMode =\n /** Validate request bodies and responses, throw on mismatch. */\n | 'strict'\n /** Validate responses, report mismatches to the logger and return the raw data. */\n | 'loose'\n /** Return raw data untouched. */\n | 'off'\n\n/** Path parameters that fall back to the context when omitted. */\ntype ContextParam = 'puuid' | 'region'\n\ntype Replace<S extends string, From extends string, To extends string> =\n S extends `${infer A}${From}${infer B}` ? `${A}${To}${Replace<B, From, To>}` : S\n\ntype CamelWords<S extends string> = S extends `${infer H} ${infer T}` ? `${H}${Capitalize<CamelWords<T>>}` : S\n\n/** `pre-game match id` -> `preGameMatchId` */\nexport type ParamName<V extends string> = Uncapitalize<CamelWords<Replace<V, '-', ' '>>>\n\ntype PathVars<S extends string> = S extends `${string}{${infer V}}${infer R}` ? V | PathVars<R> : never\n\ntype ParamNames<E extends ValorantEndpoint> = ParamName<PathVars<E['suffix']>>\n\ntype RequiredParams<E extends ValorantEndpoint> = Exclude<ParamNames<E>, ContextParam>\n\ntype ParamsOption<E extends ValorantEndpoint> = [RequiredParams<E>] extends [never]\n ? {params?: {[K in ParamNames<E>]?: string}}\n : {params: {[K in RequiredParams<E>]: string} & {[K in Extract<ParamNames<E>, ContextParam>]?: string}}\n\ntype BodyOption<E extends ValorantEndpoint> = E extends {body: infer B extends ZodType}\n ? {body: z.input<B>}\n : {body?: undefined}\n\nexport type QueryValue = string | number | boolean | null | undefined\nexport type QueryInput = Record<string, QueryValue>\n\nexport interface CallOptions {\n signal?: AbortSignal\n timeoutMs?: number\n /** Extra headers, applied last. */\n headers?: Record<string, string>\n validation?: ValidationMode\n}\n\nexport type EndpointCallOptions<E extends ValorantEndpoint> =\n CallOptions & {query?: QueryInput} & ParamsOption<E> & BodyOption<E>\n\ntype SuccessCode = '200' | '201' | '202' | '204'\n\n/** Parsed (schema output) type of the success response. `unknown` when the endpoint has no documented response. */\nexport type EndpointResult<E extends ValorantEndpoint> = E extends {responses: infer R extends Record<string, ZodType>}\n ? [keyof R & SuccessCode] extends [never]\n ? unknown\n : {[K in keyof R & SuccessCode]: z.output<R[K]>}[keyof R & SuccessCode]\n : unknown\n\ntype HasRequiredInput<E extends ValorantEndpoint> =\n [RequiredParams<E>] extends [never] ? (E extends {body: ZodType} ? true : false) : true\n\nexport type EndpointMethod<E extends ValorantEndpoint> = HasRequiredInput<E> extends true\n ? (options: EndpointCallOptions<E>) => Promise<EndpointResult<E>>\n : (options?: EndpointCallOptions<E>) => Promise<EndpointResult<E>>\n\nexport interface ValorantResponse<T> {\n status: number\n headers: Headers\n data: T\n}\n\n/** Runtime twin of {@link ParamName}. */\nexport function paramName(variable: string): string {\n const [first = '', ...rest] = variable.replaceAll('-', ' ').split(' ')\n return first.charAt(0).toLowerCase() + first.slice(1) + rest.map(w => w.charAt(0).toUpperCase() + w.slice(1)).join('')\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,IAAAA,cAA+D;;;ACD/D,gCAA6B;;;ACC7B,iBAA8B;;;ACD9B,IAAM,YAAY,oBAAI,QAAgB;AAG/B,SAAS,cAAgCC,WAAgB;AAC5D,YAAU,IAAIA,SAAQ;AACtB,SAAOA;AACX;AAGO,SAAS,eAAeA,WAAkB,MAAwB;AACrE,MAAG,UAAU,IAAIA,SAAQ,KAAK,OAAO,SAAS,YAAY,SAAS,QAAQ,UAAU,MAAM;AACvF,WAAQ,KAAyB;AAAA,EACrC;AACA,SAAO;AACX;;;ADLA,IAAM,OAAO;AAEb,IAAM,OAAO,aAAE,OAAO,EAAE,QAAQ;AAEhC,IAAM,QAAQ,aAAE,OAAO;AAAA,EACnB,MAAM,aAAE,OAAO;AAAA,EACf,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AACf,CAAC,EAAE,YAAY;AAEf,IAAM,cAAc,MAAM,OAAO;AAAA,EAC7B,aAAa;AAAA,EACb,eAAe;AAAA,EACf,eAAe,aAAE,MAAM,aAAE,OAAO,CAAC,EAAE,QAAQ;AAAA,EAC3C,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,YAAY;AAAA,EACZ,qBAAqB,aAAE,QAAQ;AAAA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M;AACpE,UAAM,UAAU,kBAAkB,QAAQ,OAAO,UAAU,OAAO,MAAM;AACxE,WAAO,EAAC,SAAS,OAAO,OAAO,IAAI,qBAAS,CAAC,EAAC,MAAM,UAAU,MAAM,CAAC,GAAG,SAAS,2BAA2B,OAAO,GAAE,CAAC,CAAC,EAAC;AAAA,EAC5H;AACJ;AAEA,SAAS,UAAUC,OAAuB;AACtC,MAAGA,UAAS,GAAI,QAAO;AACvB,MAAI;AACA,WAAO,KAAK,MAAMA,KAAI;AAAA,EAC1B,QAAQ;AACJ,WAAOA;AAAA,EACX;AACJ;AAEA,SAAS,gBAAgB,OAA0C;AAC/D,MAAG,UAAU,KAAM,QAAO;AAC1B,QAAM,UAAU,OAAO,KAAK;AAC5B,MAAG,OAAO,SAAS,OAAO,EAAG,QAAO,UAAU;AAC9C,QAAM,OAAO,KAAK,MAAM,KAAK;AAC7B,SAAO,OAAO,MAAM,IAAI,IAAI,SAAY,KAAK,IAAI,GAAG,OAAO,KAAK,IAAI,CAAC;AACzE;AAEA,SAAS,QAAQ,SAAiB,OAAyC;AACvE,QAAM,OAAO,OAAO,eAAe;AACnC,QAAM,MAAM,OAAO,cAAc;AACjC,SAAO,KAAK,IAAI,KAAK,OAAO,KAAK,OAAO,KAAK,MAAM,KAAK,OAAO,IAAI;AACvE;AAEA,SAAS,MAAM,IAAY,QAAqC;AAC5D,SAAO,IAAI,QAAQ,aAAW;AAC1B,UAAM,QAAQ,WAAW,MAAM,EAAE;AACjC,YAAQ,iBAAiB,SAAS,MAAM,EAAC,MAAM,KAAI,CAAC;AAEpD,aAAS,OAAO;AACZ,mBAAa,KAAK;AAClB,cAAQ,oBAAoB,SAAS,IAAI;AACzC,cAAQ;AAAA,IACZ;AAAA,EACJ,CAAC;AACL;;;ADhOA,0BAAc,+BAtCd;","names":["import_zod","endpoint","import_zod","import_zod","e","import_valorant_api_types","endpoint","e","text","import_valorant_api_types","endpoint","query","endpoint","text"]}
|