@edgible-team/sdk
    Preparing search index...

    Class CatalogClient

    sdk.catalog — registry reads (public) + publish/verification/curation (admin). See the module doc for the auth split.

    Index

    Constructors

    • Parameters

      • call: Caller

        authed Caller for the admin-gated write endpoints.

      • callPublic: Caller

        auth-less Caller for the public, cacheable read endpoints (index/detail/bundle URL). Defaults to call so existing tests can construct with a single caller.

      Returns CatalogClient

    Methods

    • get, but a WITHDRAWN (or unknown) template/version resolves to null instead of throwing.

      Yank state is not a field on any public response — the backend expresses it ONLY through absence (backend/src/routes/handlers/catalog.ts):

      • toSummary (:156-170) carries no yanked* field, so neither the index nor the detail response ever reports it;
      • getTemplateHandler (:327) 404s an explicit ?version= read of a yanked version, and 404s the latest read when every version is yanked;
      • the repository's public list drops fully-yanked templates and repoints the LATEST row to the newest surviving version on yank (CatalogTemplateRepository.ts:288-290, :475-483).

      So a 404 IS the yank signal, and this method is what a caller uses to confirm a version it learned about elsewhere (a cached index row, an app's templateRef) is still serveable — e.g. the "update available" badge verifying the advertised latest before advertising it.

      Any non-404 failure still throws (a network blip must not read as "yanked").

      Parameters

      Returns Promise<CatalogTemplateDetail | null>