Skip to main content
The package ships ESM JavaScript and TypeScript declarations from the root export and dedicated subpaths (proclubs-sdk/nationalities, proclubs-sdk/regions, and proclubs-sdk/metadata) for standalone label tables.

Input types

Response types

Response object types preserve unknown upstream fields at runtime. Known fields follow the observed FC26 shapes described on the namespace reference pages. PlayoffAchievementDerivedLabels contains the typed resolved labels used when EA already supplies a field with one of the derived label names. ClubInfoDerivedLabels contains the resolved regionLabel when EA already supplies a raw region label. ClubMemberDerivedLabels contains the resolved nationality when EA already supplies a raw member nationality.

Runtime fidelity and normalizations

  • Runtime fidelity: All object schemas use loose object validation, meaning any additional fields sent by EA are preserved and accessible on returned objects.
  • Envelope unwrapping: clubs.get and clubs.overallStats unwrap the upstream envelope to return the requested resource directly (ClubInfo | null and ClubOverallStats | null). Nested field values stay in their upstream representation.
  • Region labels: When public club information contains a regionId, the SDK copies the object and may add a derived regionLabel. If EA already supplies regionLabel, that raw value is preserved and the calculated value is exposed under derivedLabels.regionLabel. The raw regionId is never rewritten. This applies to clubs.get, nested clubInfo on club searches and ranking entries, and match club details. See Regions.
  • Nationalities: When a member contains a known proNationality, members.stats and members.careerStats copy the member and add a derived nationality. If EA already supplies nationality, that raw value is preserved and the calculated value is exposed under derivedLabels.nationality. The raw proNationality is never rewritten. See Nationalities.
  • The other nine endpoints (clubs.search, clubs.playoffAchievements, the four ranking methods, members.stats, members.careerStats, and matches.list) return their full response data directly, aside from region-label, nationality, and playoff-label enrichment.
  • Full leaderboards preserve EA response order and have no server pagination. Numeric strings remain strings.

Constants

REGION_LABELS, KnownRegionId, RegionLabel, and resolveRegionLabel are documented on Regions. NATIONALITY_LABELS, KnownNationalityId, NationalityLabel, NationalityIsoCode, Nationality, and resolveNationality are documented on Nationalities. Platform, match-type, position, reputation, division, playoff, and crest helpers are documented on Metadata labels.

Response schemas

The public Zod schemas let consumers validate stored or forwarded EA payloads against the same envelopes as the SDK.

Drift detection and compatibility

The SDK provides a deterministic structural drift detector that compares EA responses against the observed FC26 contract shape. It categorizes changes into field_added, field_removed, type_changed, envelope_changed, and unknown_value.
Run drift detection on raw EA payloads, not on SDK output. regionLabel and nationality are derived SDK fields and would otherwise appear as field_added. An endpoint with only unknown_value diagnostics remains passed: the raw EA value is usable, while the diagnostic tells maintainers that a label mapping may need to be extended. Structural changes, rejected payloads, and invalid envelopes are drifted. Empty arrays are unverified because their shape cannot be confirmed from an empty response. An unknown regionId does not fail club requests. The same ID can appear in a compatibility report as unknown_value so maintainers can extend REGION_LABELS after confirming the EA label. An unknown proNationality is reported the same way for NATIONALITY_LABELS. That signal is additive (minor) and is separate from the mapping used at runtime. See Regions, Nationalities, and issue #17.

Interpreting compatibility reports

Each report ends with a summary status and a release recommendation: Drift detection never mutates schemas, fixtures, or types automatically. Update the contract manually after confirming each reported change against live data.

Transport types

See Configure the client for the transport contract and a minimal adapter.