Skip to content

feat: sync with the 2026-10-20 API release - #34

Merged
ibadus merged 1 commit into
mainfrom
fix/api-sync-2026-10-26
Oct 27, 2026
Merged

ibadus merged 1 commit into
mainfrom
fix/api-sync-2026-10-26

Conversation

@joisbach

@joisbach joisbach commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Syncs the SDK with the API deployed up to the 2026-10-20 release, from the 2026-10-26 docs/SDK audit (each changed claim checked against the blitz-api code).

  • CascadeTier.location takes the PeopleLocationFilter object (city, country_code, continent, sales_region; at most 10 values per list, a 422 above). The string[] of country codes stays accepted as the legacy form. Release note: code that reads tier.location back must narrow it (Array.isArray).
  • APIStatusError.fair_usage exposes the fair_usage block of a 402 body, like the Python SDK.
  • Docs and JSDoc: the rate limit is per plan and shared by every key of the account; 401 also means "no access to this route"; 422/423 described; search endpoints return only the matched position in experiences; department distribution counts jobs, not people; filters that used to be accepted and ignored now return 422.

revenue_range and people.job_description are not included (merged in the API, not deployed). No conflict with #33.

Checks: pnpm lint, pnpm typecheck, pnpm gen:enums:check, pnpm test (158 pass), pnpm build. No live API calls.

RetriggerView in GreptileConfidence Score: 4/5

The code changes appear sound, but the repository-required waterfall request tests must be added before merging.

Fix All in Claude CodeFindings

  1. P2 Location forms lack tests ▶
  2. P2 Error usage lacks tests ▶
Fix with agent prompt
### Issue 1
src/types/filters.ts:303
`CascadeTier.location` now accepts an object, but neither waterfall request test sends a location. `CLAUDE.md` requires a request/response test when changing an endpoint. Add typed cases for the new object and the retained `string[]` form, and check the sent body. This repository requirement must be satisfied before merging.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

### Issue 2
src/errors.ts:115-118
`APIStatusError.fair_usage` has no test for a populated, missing, or malformed block. The existing `402` tests send only `message`, so they never check the new parsing behavior. Add these cases to `test/errors.test.ts`, including checks that malformed usage data leaves the original error class, status, and body intact. This would protect reset information and keep later parsing changes from hiding the HTTP error.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Updates the SDK for the 2026-10-20 API release.

  • Waterfall tiers accept structured location filters and legacy country-code lists.
  • API status errors expose the fair_usage block when it parses.
  • SDK guidance explains API access errors and rejected requests.
  • Rate-limit guidance reflects plan rates shared across account keys.
  • Person search results are documented as showing the matching experience.
  • Department distribution guidance counts jobs instead of people.
  • Contributor notes match the current SDK and its cross-SDK references.

Reviews (1) · Last reviewed commit: "feat: sync with the 2026-10-20 API relea..." · Reviewed by Greptile

- `CascadeTier.location` accepts the `PeopleLocationFilter` object the API
  takes since 2026-10-20 (at most 10 values per list, a 422 above); the
  `string[]` of country codes stays accepted as the legacy form. Code that
  reads `tier.location` back as an array must now narrow it.
- `APIStatusError.fair_usage` exposes the `fair_usage` block of a 402 body,
  like the Python SDK.
- Docs: rate limit is per plan and shared by every key of the account;
  401 also means "no access to this route", 422/423 described; the
  search endpoints return only the matched position in `experiences`;
  department distribution counts jobs, not people; filters that used to
  be accepted and ignored now return 422.
Comment thread src/types/filters.ts
* A `string[]` of country codes is the legacy form, still accepted: it is read as
* `country_code`, and a list holding `"WORLD"` turns the country filter off.
*/
location?: PeopleLocationFilter | string[];

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Location forms lack tests

CascadeTier.location now accepts an object, but neither waterfall request test sends a location. CLAUDE.md requires a request/response test when changing an endpoint. Add typed cases for the new object and the retained string[] form, and check the sent body. This repository requirement must be satisfied before merging.

Context Used: CLAUDE.md (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/types/filters.ts
Line: 303

Comment:
**Location forms lack tests**

`CascadeTier.location` now accepts an object, but neither waterfall request test sends a location. `CLAUDE.md` requires a request/response test when changing an endpoint. Add typed cases for the new object and the retained `string[]` form, and check the sent body. This repository requirement must be satisfied before merging.

**Context Used:** CLAUDE.md ([source](https://github.com/api-blitz/blitz-api-js/blob/main/CLAUDE.md))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Conductor

Comment thread src/errors.ts
Comment on lines +115 to +118
function parse_fair_usage(body: unknown): FairUsage | null {
if (body === null || typeof body !== "object" || Array.isArray(body)) return null;
const parsed = FairUsage.safeParse((body as Record<string, unknown>).fair_usage);
return parsed.success ? parsed.data : null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Error usage lacks tests

APIStatusError.fair_usage has no test for a populated, missing, or malformed block. The existing 402 tests send only message, so they never check the new parsing behavior. Add these cases to test/errors.test.ts, including checks that malformed usage data leaves the original error class, status, and body intact. This would protect reset information and keep later parsing changes from hiding the HTTP error.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/errors.ts
Line: 115-118

Comment:
**Error usage lacks tests**

`APIStatusError.fair_usage` has no test for a populated, missing, or malformed block. The existing `402` tests send only `message`, so they never check the new parsing behavior. Add these cases to `test/errors.test.ts`, including checks that malformed usage data leaves the original error class, status, and body intact. This would protect reset information and keep later parsing changes from hiding the HTTP error.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Conductor

@ibadus
ibadus merged commit 35e25f4 into main Oct 27, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants