Skip to content

feat(purl): expose response mode options - #695

Open
John-David Dalton (jdalton) wants to merge 3 commits into
jdalton/public-malware-filter-sdkfrom
jdalton/socket-sdk-purl-query-options-v2
Open

John-David Dalton (jdalton) wants to merge 3 commits into
jdalton/public-malware-filter-sdkfrom
jdalton/socket-sdk-purl-query-options-v2

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

JavaScript callers cannot use API v0 response modes or request synthetic not-found artifacts through SocketPurlClient because the SDK rejects these options. This adds typed, validated support and documents each option.

@cursor

cursor Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Adds optional query parameters and stricter validation only; no changes to auth, defaults, or response parsing logic.

Overview
Exposes two new SocketPurlClient proxy query options aligned with API v0 PURL: mode and notFoundAlerts.

mode is typed as PurlResponseMode (default, compact, firewall-check, registry-firewall) and selects the response shape. notFoundAlerts is a boolean that requests synthetic not-found artifacts when used with alerts=true and purlErrors=true.

Both fields are added to PublicPurlQuery, validated in assertPublicPurlQueryValue (mode against an allowlist, notFoundAlerts with the other boolean keys), and documented in docs/api.md and docs/api/api-clients.md. Existing validatePublicPurlQuery usage in the public PURL client passes these through without further client changes.

Reviewed by Cursor Bugbot for commit 84ee338. Configure here.

@jdalton
John-David Dalton (jdalton) force-pushed the jdalton/socket-sdk-purl-query-options-v2 branch from 84ee338 to 54754a5 Compare November 21, 2026 04:07
@jdalton
John-David Dalton (jdalton) changed the base branch from main to jdalton/public-malware-filter-sdk November 21, 2026 04:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant