You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ugcDiscovery.getMap/getUgcGameVariant typed AuthoringAsset but discovery returns AssetBase shape #33
UgcDiscoveryModule.getMap, getMapWithoutVersion, getUgcGameVariant, getUgcGameVariantWithoutVersion are all typed Promise<HaloApiResult<AuthoringAsset>>, but the discovery endpoint (https://discovery-infiniteugc.svc.halowaypoint.com/hi/{kind}/{id}[/versions/{ver}]) returns the AssetBase shape — PublicName, Files.{Prefix, FileRelativePaths}, AssetId, VersionId, etc.
AuthoringAsset is the authoring API response (https://authoring-infiniteugc.svc.halowaypoint.com/...) — different fields (CustomData, AssetHome, IsCurrentlyBeingEdited, ...) and no PublicName/Files.
Repro:
constc=newHaloInfiniteClient({ spartanToken });constr=awaitc.ugcDiscovery.getMapWithoutVersion('e859cf75-9b8a-429a-91be-2376681c8537');r.result.PublicName;// TS2339 — but the runtime object has itr.result.Files;// TS2339 — same
Fix: change the return types to HaloApiResult<MapAsset> / HaloApiResult<GameVariantAsset> (or AssetBase).
Found while wiring grunt into filmshell's worker — the cast is contained there for now.
Activity