@tekkna/public-api-contracts
v3.0.0
Published
Allowlisted HYROX public API contracts and runtime schemas
Readme
@tekkna/public-api-contracts
Public ESM runtime schemas and inferred TypeScript DTOs. Initial version: 0.1.0.
First stable release candidate 1.0.0 documents all24 implemented user operations
in the generated OpenAPI3.1 bundle, plus public health. Users paths override the
server to consumer sandbox only. Definitions include exact JSON schemas,
ID/query formats, ETag and Idempotency-Key requirements,200/202 polling semantics
and safe rejection reasons. Use an OAuth access token from the existing Code+S256
PKCE flow; ID tokens/API keys do not authorize users. Swagger has no separately
registered OAuth callback. Documentation does not establish live alias activation,
authenticated acceptance QA or production users availability. Publication is a separate release step.
The older entries below describe their respective source increments.
Development candidate 0.25.0 adds strict own Academy continuation schemas and
examples. GET /v2/users/me/academy-continuation returns { url }: the exact
existing Academy login URL after current provider enrollment qualification, or null
when all three courses are proven unenrolled. Provider failure is an error. There
is no tokenized redirect, SSO, credential exposure or access assertion. New schemas
are OpenAPI components; hosted paths stay health-only pending qualification.
1.0.0 remains reserved for the first actual release.
Development candidate 0.24.0 adds own Academy completion schemas and examples.
GET /v2/users/me/academy-progress returns exactly three canonical course keys,
each { completed: boolean | null }. Missing native evidence is null; explicit
flags are booleans. Provider failure is an error, never inferred false. No numerical
progress, qualification, certificate, account ID or sign-in link is exposed. New
schemas are OpenAPI components; actual runtime/provider qualification is still
required and published paths remain health-only. 1.0.0 stays reserved for the
first actual release.
Development candidate 0.23.0 adds strict own registration progress/response unions
and actionable registration errors. Local POST/GET /v2/users/me/registration use
the current human access token and accept no body or caller identity. Status, retry
permission, error code and live ONE FIIT ID agree by schema; GET never provisions or
retries work. Only completed progress exposes the associated live ID. Native current
identity/policy and canonical subject mapping remain server-owned. New schemas are
OpenAPI components; published paths remain health-only until real runtime/auth
bindings are qualified. 1.0.0 remains reserved for Monday.
Development candidate 0.22.0 adds strict own Academy provider-membership schemas.
The three canonical course keys each contain one enrollment boolean. Provider
failures return errors, never an inferred false; no provider identity, purchase,
progress/completion/certification or sign-in link is disclosed. Hosted routes
remain health-only; 1.0.0 stays reserved for Monday.
Development candidate 0.21.0 adds strict own directly held product-right query,
license/subscription union, page and response schemas. Product codes and permanent
assignment are type-specific; source status and validity do not compute access.
Fulfillment remains unknown. No provider IDs, prices or inherited coverage are
disclosed. New components do not activate hosted routes. 1.0.0 stays reserved
for Monday. See the contract guide.
Development candidate 0.18.0 adds strict intended-recipient invitation offer
schemas and invitation_offer_unavailable errors. Offers show independent proposed
roles with current canonical organisation UUID/name/type and requested Performance
Hub/Foundation work. They grant no rights and claim no enrollment or product
fulfillment. Current recipient/client/source/target checks and explicit server
bindings are required. Existing invitation-state output is unchanged; hosted
availability remains health-only.1.0.0 stays reserved for Monday.
Development candidate 0.17.0 adds409 subscription_prevents_deletion and rejects
active/unresolved subscriptions before consuming proof or removing roles. Upgrade
consumers for the added development error enum. Existing accepted work rechecks
subscriptions before further cleanup. Deletion never cancels subscriptions or
changes invoices, payments, credits or refunds. Subscriptions must end independently;
permanent user licenses remain retained. Hosted/provider qualification stays open.
Development candidate 0.16.0 documents configured identity-provider disable and atomic
retained tombstone/terminal receipt using the existing shapes and status/error enums.
Durable claims and read-only provider reconciliation prevent blind repeat effects.
Exact receipt recovery needs explicit server binding, a still-valid access token
and current client/identity checks. Ordinary deleted-user access stays denied;
returning users contact support. Hosted/provider qualification remains open; deletion billing cancellation is prohibited. This package does not activate routes or providers.
Development candidate 0.15.0 documents durable native Academy deactivation in
the existing deletion progress contract. Existing fields, methods and enums are
unchanged. Running claims, definite failures and unknown outcomes are visible;
provider proof stays private. Missing bindings remain pending. Identity disable
and tombstone were subsequently implemented locally in candidate0.16.0.
Development candidate 0.14.0 adds last_legal_representative and
commercial_cleanup_required to deletion step errors. It documents atomic native
connection cleanup and canonical commercial qualification with version-bound
progress and explicit same-key recovery. Consumers must support the added enum
values. Permanent licenses remain retained; live commercial rights must end independently. Later candidates add local Academy and identity/tombstone execution.
Development candidate 0.13.0 adds strict confirmed own deletion requests and
owned pending operations, distinct proof/representative errors, and consumed/
exhausted challenge states. Upgrade consumers for the added development enum
values. Acceptance consumes proof once.
Development candidate 0.12.0 reorganizes internal build/publication tooling; public methods and schemas are unchanged.
Development candidate 0.11.0 adds strict own deletion-code issuance and safe
owned status schemas. This is proof delivery only, with no destructive deletion
or standalone verification endpoint. No code, email or verifier is public.
Development candidate 0.10.0 clarifies invitation notification success as
confirmed provider acceptance rather than inbox delivery. Methods, strict DTO
shapes and safe status/error enums are unchanged. The server can now execute the
native mail/callback work with durable semantic receipts; unknown sends are never
blindly repeated. Real environment/provider qualification remains required.
Development candidate 0.9.0 adds strict empty decline input,
ownInvitationDeclineSchema, ownInvitationDeclineResponseSchema and inferred
OwnInvitationDecline progress. Accepted shared decline and pending notification
work are distinct from delivered notifications; private payloads remain server-side.
New safe errors distinguish invitation_expired / invitation_not_open. No grant,
enrollment, acceptance or notification-delivery success is implied.
Development candidate 0.8.0 adds invitationIdSchema,
ownInvitationSchema, ownInvitationResponseSchema and inferred OwnInvitation
types for intended-recipient state. Only lifecycle metadata is public; no recipient
address, offers, source-private records or fulfillment-success assertion. The
read requires current canonical/client authority and provider-verified login email.
Development candidate 0.7.0 adds coachImageUploadSchema,
ownCoachImageUpdateSchema, ownCoachImageUpdateResponseSchema and inferred
CoachImageUpload / OwnCoachImageUpdate types. JPEG/PNG only, 2 MiB raw maximum,
square up to 4096×4096. Upload is canonical padded base64; null unlinks while
retaining old objects. Full file decoding and ownership checks are server-side.
No caller-controlled storage locations or trusted metadata. Hosted bindings remain
pending; see the image contract in the repository's docs/contracts.md.
Development candidate 0.6.0 adds ownConnectionSchema,
ownConnectionsQuerySchema, ownConnectionsSchema,
ownConnectionsResponseSchema and inferred connection/query/response types.
Connections contain only UUID/name/type and independent active roles; they do not
establish product access. Lists are paginated, with bounded query input and an
opaque current-user/client/revision-bound cursor. Query validation details use
location query. OpenAPI contains strict schemas and a safe connection example.
Hosted runtime/client/store/cursor-key bindings remain required.
Version 0.5.0 introduced ownProfileReferencesSchema,
ownProfileReferencesResponseSchema, country/language/address-type reference
schemas and OwnProfileReferences / OwnProfileReferencesResponse types.
The reference response contains configured country codes/nullable labels, the
existing accepted language catalogue and address form metadata. Country/state
duplicates are collapsed; finance and provider configuration values are excluded.
Required nullable field paths and per-type completeness rules describe native
addresses without rejecting unknown historical values or introducing address
mutation routes. Labels are display text; use codes as identifiers. OpenAPI
includes the strict schemas and examples, with hosted user bindings still pending.
import {
healthResponseSchema,
type HealthResponse,
} from '@tekkna/public-api-contracts'
const response: HealthResponse = healthResponseSchema.parse({ status: 'ok' })Exports also include the approved own-profile read/projector and bounded own
coach-profile replacement input/accepted-version response schemas. Coach profiles
use one complete shape: every key and all seven social keys are required, scalar
absence is null, list absence is [], and certification abbreviation is
explicitly present even when null. Non-null text must arrive trimmed/non-empty;
language and country codes use lowercase/uppercase respectively. The latter
covers coach contact/details and self-declared external certifications, excluding
identity, role, image and commercial mutations. Whole coach-profile replacement
uses a numeric baseline version with a matching If-Match and Idempotency-Key;
null clears it. These user compositions still need real client/runtime bindings.
The stricter public schemas/types are recorded in development version 0.3.0;
1.0.0 is the first stable version prepared for Monday, 16 November 2026. Compatibility
is assessed against this package's own previous release, independently of the
separate v1 package. Package versions do not announce the full HTTP API v2
production release.
Public apiErrorResponseSchema, validationDetailSchema and ValidationDetail
also document safe, bounded field errors. coachProfileValidationDetails converts
public input issues to JSON Pointer paths, stable reason codes and expected-rule
messages without echoing values or unknown keys. The API and React preflight
share this adapter. Only explicit caller validation/missing-header errors expose
details; auth and internal errors remain general.
Development version 0.4.0 adds ownPersonalProfileUpdateSchema,
ownUserOperationSchema and ownUserOperationResponseSchema for the R05/R12
slice. Complete first/last-name and language replacement returns owned durable
progress with safe per-step states. Canonical profile acceptance is distinct from
confirmed required identity/integration synchronization. path validation details
and operation_in_progress identify invalid operation IDs and blocked concurrent
personal edits. These schemas do not announce hosted routes or a completed bundle.
Only the existing GET /health route is currently registered. The packaged
OpenAPI 3.1 document is available through @tekkna/public-api-contracts/openapi.json.
No business routes or MCP tools are advertised. HTTP /v2, npm semver, MCP protocol
revisions and HYROX tool versions are independent. Review release classification
and pin reviewed versions. This package
has no private registry dependencies. Reviewed version bumps publish from main after build, archive and consumer
checks using npm trusted publishing. No stored npm token is used; an npm owner
must configure the repository/workflow trust before automatic publication.
Development version 0.19.0 adds strict ownInvitationAcceptanceInputSchema
({confirmation:true}), ownInvitationAcceptanceSchema and its response/types.
Accept the reviewed offer with its strong If-Match and Idempotency-Key; retain the
exact original intent for deliberate recovery. The owned progress distinguishes
invitationDecision from qualification, roles and requested fulfillment/notifications.
Only the decision completes at initial admission. Pending work is not access,
enrollment or completed onboarding. Actual execution and hosted route bindings
remain pending; generated OpenAPI publishes these schemas without advertising
unbound user paths. 1.0.0 remains reserved for the Monday release.
Development version 0.20.0 documents trusted existing-invitation role execution.
Qualification/roles complete only with atomic canonical grant/progress proof; a
role-only instruction can succeed. Required provider fulfillment/notifications stay
pending. Progress describes issuance history: completed retry/GET never repairs
later revoked roles. A deliberate original-key POST can resume uncommitted work.
Safe409 reasons invitation_changed and invitation_role_unavailable distinguish
changed instructions from conflicting existing role states. No product catalogue
or hosted user bindings are introduced; 1.0.0 stays reserved for Monday.
The shared immutable productCatalogue (version1) defines academyFoundation, academyLevel1, academyLevel2, academyBundleL1L2, gymAffiliation and performanceCoachAffiliation. Use productKindSchema/ProductKind for sale offers; licenseProductKindSchema, subscriptionProductKindSchema and commercialProductKindSchema distinguish actual course/subscription rights. productComponents('academyBundleL1L2') returns the existing L1/L2 kinds; it grants nothing. The bundle is not a third independent license. Labels are display text; codes are stable identity across provider price/currency/discount variants. No provider IDs, prices, availability, purchase authority or new HTTP endpoint are exposed. The React package reexports these helpers/types for component use.
The same unreleased 0.25.0 candidate also adds OwnEffectiveAccess / response
schemas for current canonical eligibility and gym-coach coverage. Each assignable
catalogue kind has { eligible: boolean | null }; unknown status/subscription end
stays null. Stock/manager/ancestor roles do not grant coach/course access. Canonical
eligibility is separate from provider enrollment and purchasing permission. See
effective access.
