fix(artifacts): align binding docs with workerd types#30030
Merged
mattzcarey merged 1 commit intoproductionfrom Apr 17, 2026
Merged
fix(artifacts): align binding docs with workerd types#30030mattzcarey merged 1 commit intoproductionfrom
mattzcarey merged 1 commit intoproductionfrom
Conversation
Contributor
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
ac8e943 to
19dd426
Compare
64d8d71 to
5653b33
Compare
dmmulroy
approved these changes
Apr 17, 2026
whoiskatrin
approved these changes
Apr 17, 2026
- create() returns ArtifactsCreateRepoResult (not & { repo })
- get() returns ArtifactsRepo (throws on not found, no null)
- Remove info() — repo metadata is on the handle directly
(ArtifactsRepo extends ArtifactsRepoInfo)
- Remove validateToken() — not in workerd types or binding
- Add import() — was missing from docs entirely
- Fix expiresAt → tokenExpiresAt in get-started example
- Add namespace note (any name works, not just 'default')
- Remove null checks on get() — it throws, not returns null
Aligned with: cloudflare/workerd#6508
5653b33 to
00dae68
Compare
Contributor
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.
Aligns Artifacts docs with the canonical types from cloudflare/workerd#6508 and the actual API surface.
Binding docs (
workers-binding.mdx)create()return typeArtifactsCreateRepoResult & { repo: ArtifactsRepo }ArtifactsCreateRepoResultget()return typeArtifactsRepo | null(null checks everywhere)ArtifactsRepo(throws on not found)info()methodrepo.info()ArtifactsRepoextendsArtifactsRepoInfo, metadata is directly on the handlevalidateToken()import()get()if (!repo)get()throwsREST API base URL (all docs)
The REST API examples used
artifacts.cloudflare.net/v1/api/...which is not the public API endpoint. Fixed toapi.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/artifacts/....Git remote URLs (
<account_id>.artifacts.cloudflare.net/git/...) are unchanged — those are correct.Files fixed:
rest-api.mdx,get-started/rest-api.mdx,guides/authentication.mdx,guides/import-repositories.mdx,examples/git-client.mdxResponse field names
Create repo / fork / import responses used
expires_atbut the actual API returnstoken_expires_at(verified inresponse-schemas.ts). Token endpoints correctly useexpires_at.Files fixed:
rest-api.mdx(3 responses),get-started/rest-api.mdx,get-started/workers.mdx