• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ilpanich / axiam-typescript-sdk / 29647189664

18 Jul 2026 02:00PM UTC coverage: 93.95% (+0.03%) from 93.923%
29647189664

push

github

web-flow
Add organization context to client options (login + refresh) (#17)

The TypeScript SDK's client options exposed no organization field, so
callers could not send org context to the server. The server resolves the
workspace from the login body (org + tenant), and `RefreshRequest` requires
both `tenant_id` and `org_id` as UUIDs — so without org support login fails
with "must provide org_id or org_slug" and refresh fails deserialization.
Every other AXIAM SDK already exposes this field; TypeScript was the outlier.

Changes:
- AxiamClientOptions: add optional `orgSlug` / `orgId` (mirrors tenantSlug/
  tenantId), documented as required-for-login org context (CONTRACT.md §5).
- SharedSession: carry configured tenant/org identifiers and expose
  buildLoginBody() (forwards tenant + org, UUID or slug form) and
  buildRefreshBody() (emits resolved tenant_id/org_id UUIDs).
- rest/auth.ts, rest/interceptors.ts, node/session.ts: send the built login
  and refresh bodies instead of empty/credential-only bodies.
- Node persona resolves the authoritative tenant_id/org_id UUIDs from the
  access-token claims after login/refresh (best-effort, unverified — used
  only to populate the refresh body, which the server re-validates), so a
  client built with slugs can still refresh. Browser persona falls back to
  UUID-form construction options.
- Add test/rest/orgContext.test.ts covering login-body forwarding, refresh-
  body construction, and claim resolution.


Claude-Session: https://claude.ai/code/session_0156crGuZKUBcWe2w5bzD9y1

Co-authored-by: Claude <noreply@anthropic.com>

388 of 433 branches covered (89.61%)

Branch coverage included in aggregate %.

45 of 47 new or added lines in 5 files covered. (95.74%)

7 existing lines in 3 files now uncovered.

730 of 757 relevant lines covered (96.43%)

18.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.71
/src/node/tokenManager.ts


Build SHA Not Found

The commit SHA "aa3d6ee212fcbc92e5793d46b34291f7380c19d8" was not found in your repository, so the file cannot be loaded. This may be because you posted from a local development environment, or your CI created an ephemeral commit.

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc