Skip to content

v3.1.0

Choose a tag to compare

@github-actions github-actions released this 31 Jul 20:22
· 0 commits to 2674c4fb1471b70d964cc29fcc29547766767337 since this release

Minor Changes

  • 2674c4f: getRestrictionsByOperation returns a typed result instead of unknown.

    The v1 endpoint generated as Promise<unknown>, so its payload reached callers untyped and unvalidated. It now
    resolves to a GetRestrictionsByOperation and is validated like every other endpoint's response.

    The published spec describes this endpoint incorrectly — an open map whose values wrap a restriction in an
    operationType/_links envelope. No such envelope exists: Confluence answers with the restriction itself under each
    operation name it restricts, read and update, alongside a sibling _links for the response as a whole. The model
    describes what the endpoint actually returns, so read and update are typed ContentRestriction and nothing is
    left undescribed.

    Callers that treated the result as unknown and narrowed it themselves keep working. Code that relied on the absence
    of validation may now surface a SchemaMismatchError where the response does not match the model.

Patch Changes

  • 2674c4f: currentActiveAlias is nullable, as the API returns it.

    The v2 spec declares the field as a plain string on both the space entity and its collection representation, but
    Confluence answers with null for any space that has no alias. Strict response validation rejected that, so
    getSpaces threw a SchemaMismatchError on the first aliasless space in the page, and getSpaceById would have
    done the same. The field is now string | null | undefined on Space and SpaceSummary.

    Existing code is unaffected: the field was already optional, so any narrowing that handled undefined handles
    null too.