Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 16 Sep 13:03
· 2 commits to main since this release
537b1b0

Added

A client for the v2 API, under client.v2 — 407 operations across 90
resources. Everything you use today is untouched: v2 is a new namespace beside
the existing surface, not a replacement for it.

There are two ways in, and they compose:

// Flat path — each segment consumes exactly one URL path id
await client.v2.workspaces.projects.states.list("acme", "ENG");

// Loaded rows — a fetched row carries its ids, so nothing repeats
const project = await client.v2.workspaces.projects.retrieve("acme", "ENG");
await project.cycles.list();
await project.workItems.create({ name: "Ship it" });

Path ids are named after the resource they identify, singular, with no Id
suffix: retrieve(slug, project, state).

  • Navigable rows — 19 Loaded* types. A fetched workspace reaches 25
    children, a project 19, a work item its comments, links, attachments and
    worklogs.
  • Compile-time field projection — fields narrows the return type through
    Pick<T, F | "id">, so reading a field you did not request is a type error
    caught before you run, not undefined at runtime. expand is exposed wherever
    the API declares it.
  • Typed filters and ordering — every query filter the API declares is
    reachable and typed; order_by likewise, as generated unions.
  • Pagination — both envelopes: offset (per_page, offset) and cursor
    (cursor). iterate() follows pages on either, so the difference stays out of
    your code.
  • Lookup by name — findByName(...), and findByDisplayName(...) on
    property resources, so scripts can use the names people see in the UI instead
    of ids.
  • Bridges — add / remove on relationship collections, e.g.
    cycle.workItems.add([...]), up to 100 ids per call.
  • Bulk writes — bulkCreate / bulkUpdate / bulkDelete where the API
    offers them, up to 50 items per call.

v2 types are exported from the package root, including the Loaded* row types.

Full Changelog: v0.2.14...v0.3.0