Version: 1.0.14
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:
const c = new HaloInfiniteClient({ spartanToken });
const r = await c.ugcDiscovery.getMapWithoutVersion('e859cf75-9b8a-429a-91be-2376681c8537');
r.result.PublicName; // TS2339 — but the runtime object has it
r.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.
Version: 1.0.14
UgcDiscoveryModule.getMap,getMapWithoutVersion,getUgcGameVariant,getUgcGameVariantWithoutVersionare all typedPromise<HaloApiResult<AuthoringAsset>>, but the discovery endpoint (https://discovery-infiniteugc.svc.halowaypoint.com/hi/{kind}/{id}[/versions/{ver}]) returns theAssetBaseshape —PublicName,Files.{Prefix, FileRelativePaths},AssetId,VersionId, etc.AuthoringAssetis the authoring API response (https://authoring-infiniteugc.svc.halowaypoint.com/...) — different fields (CustomData,AssetHome,IsCurrentlyBeingEdited, ...) and noPublicName/Files.Repro:
Fix: change the return types to
HaloApiResult<MapAsset>/HaloApiResult<GameVariantAsset>(orAssetBase).Found while wiring grunt into filmshell's worker — the cast is contained there for now.