Upgrade Domain API to v23 and sync response schemas with current API fields#21
Merged
Merged
Conversation
|
Lol AI |
Owner
|
@garazy you rock! merged. I'll do a separate review to make sure there aren't any other dependencies. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Zach! 👋 Gary from BuiltWith here.
We recently released Domain API v23 on our side, and this PR brings the client up to date. It's deliberately small:
src/index.ts:domain()now callsv23/api.jsoninstead ofv22. v23 is a superset of v22 — the only structural change is a new numericIdon each technology entry (a stable technology identifier).src/schemas.ts: addedId: z.number()toTechnologySchema, and added the attribute fields the API now returns (Revenue,PageRank,BWRank,Tranco,BWS,AIMaturity,AIOpenness,AIReadiness,AIVisibility, all optional numbers). YourstrictObjectdrift-detection did its job here — these attributes are returned by v22 as well today, so current strict parses fail on domains that have them; this fixes that too.Verified locally:
bun testpasses (145 pass / 0 fail), and the strict schemas parse live v23 responses for builtwith.com, example.com, and shopify.com.If it looks good, we'd love a release/publish to npm when you get a chance — no rush and thanks for maintaining this! Alternatively, if you'd rather hand off npm publishing, adding
garazyas a package maintainer works for us too.🤖 Generated with Claude Code