support for 202507 endpoints (#37)

* [auth][api] accept the 20250424.01 client

* [2025] unstable

* 20250718.0

* correct one this time

* stubs

* more stubs

* more stubs

* [lists] add worker

* [ai] route stubs

* [api] player photo setting

* [econ] add roomEconConfig route

* [infra] update worker generators

* [worker] add cards/moderation/platformnotification workers

* [lists] updates to some endpoints

* [clubs] stub out announcement endpoint, for now

* [econ] stub out season endpoints for now

* [chat] apps/chat stub out party endpoint not sure the shape yet

* [api] stub out statsig and lockeditems

* [doc] new services

* [lists] stub the bulk endpoint

* [datacollection] add placeholder service until we can kill it

* [api] set gifting to lvl5

* update lock

* [cdn] enable cache

* [match] matchmake v2

* [lists] stub some lists

* [ai] stubs

* [rooms] new subroom save endpoint

* [econ] add bulk purchase endpoint

* [discovery] update featured creator to 1 for fun

* [api] add photo settings flag

* [chat] fixup chat permissions (sorta)

* [auth] restrictions endpoint

* [rooms] contributed endpoint

* [api] fix outfit endpoint

* [discovery] attempt to fix store

* [chat] privacy endpoints

* [api] cheered images

* [rooms] add xp endpoint (disbaled)

* [rooms] add xp endpoint (disabled)

* update images-db for cheers

* [rooms] add autocomplete endpoint

* [cdn/img] increase cache ttl for statics

* [api] bulk route for images

* [accounts] add banner image

* [api] add misc missing endpoints

* [discovery] remove AI tab

* [platformnotifications] stub some endpoints

* [lists] add some more lists

* [rooms] additional endpoints

* [chat] stub a few privacy endpoints

* [econ] stub some endpoints

* misc db fixes

* [api] tweak shape for images v6

* [rooms] dont show trending RROs
This commit is contained in:
devin
2026-08-18 23:07:24 -04:00
committed by Devin Zuczek
parent 66c09806f9
commit 178d3b5b0e
162 changed files with 114930 additions and 469 deletions
+41 -4
View File
@@ -1,7 +1,7 @@
import { Hono } from 'hono'
import { describeRoute } from 'hono-openapi'
import { GAME_VERSION } from '@repo/domain'
import { isSupportedGameVersion } from '@repo/domain'
import apiConfigV2 from '../../static/api-config-v2.json'
import gameConfigsV1All from '../../static/gameconfigs-v1-all.json'
@@ -10,8 +10,10 @@ import {
ApiConfigV2,
AzureSpeechConfig,
BacktraceConfig,
IslandedVersions,
json,
JsonObject,
StatsigUserProperties,
VersionCheck,
} from '../openapi'
@@ -100,18 +102,33 @@ export const configRoutes = new Hono<App>({ strict: false })
summary: 'Client version check',
description:
'Whether the client build is current. Compares the clients `?v=` build against ' +
'our target `GAME_VERSION`: `VersionStatus` is 0 when they match, 1 when the ' +
'client is on a different build.',
'the builds we serve (`SUPPORTED_GAME_VERSIONS`): `VersionStatus` is 0 when the ' +
'client is on one of them, 1 when it is on some other build.',
responses: { 200: json(VersionCheck, 'Version status') },
}),
(c) =>
c.json({
VersionStatus: c.req.query('v') === GAME_VERSION ? 0 : 1,
VersionStatus: isSupportedGameVersion(c.req.query('v')) ? 0 : 1,
UpdateNotificationStage: 0,
IsVersionIslanded: false,
IsCrossPlayDisabled: false,
})
)
// Islanding splits players onto version-specific matchmaking pools. We serve every
// supported build from one pool, so the list is empty — the client reads it as
// "nobody is islanded" and matchmakes normally.
.get(
'/api/versioncheck/islandedversions',
describeRoute({
tags: ['Config'],
summary: 'Islanded client builds',
description:
'The builds that are islanded off into their own matchmaking pool. This server ' +
'never islands a build, so the list is always empty.',
responses: { 200: json(IslandedVersions, 'Always an empty list') },
}),
(c) => c.json([])
)
.get(
'/api/gameconfigs/v1/all',
describeRoute({
@@ -123,6 +140,26 @@ export const configRoutes = new Hono<App>({ strict: false })
(c) => c.json(gameConfigsV1All)
)
// The property bag the client would attach to its Statsig user. The reference server
// doesn't send properties at all here — it answers a lone `success` carrying its
// `StatsigEnabled` config value, as a bool — so that is what this mirrors. This server
// runs no experiments and collects no analytics (see the placeholder keys
// `/api/config/v1/amplitude` serves), so the value is fixed and the same for everyone.
.post(
'/statsigUserProperties',
describeRoute({
tags: ['Config'],
summary: 'Statsig user properties',
description:
'Despite the name, the reference server returns no properties here — just ' +
'`success`, its `StatsigEnabled` config value as a bool. This server mirrors that ' +
'with a fixed `true`; it runs no experiments and collects no analytics, so nothing ' +
'here is per-account and it is not auth-gated.',
responses: { 200: json(StatsigUserProperties, 'The fixed `StatsigEnabled` flag') },
}),
(c) => c.json({ success: true })
)
// Voice chat config. The client fetches it to set up voice.
// No reference shape, so return an empty object until the client needs fields.
.get(