Skip to content

feat(sdk): adopt standard API vocabulary - #47

Open
necolas wants to merge 2 commits into
mainfrom
necolas/sdk-standard-fields-and-params
Open

feat(sdk): adopt standard API vocabulary#47
necolas wants to merge 2 commits into
mainfrom
necolas/sdk-standard-fields-and-params

Conversation

@necolas

@necolas necolas commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • expose the standard API names in TypeScript, Python, and Go
  • send only standard HTTP fields and read both response generations
  • keep deprecated public aliases for compatibility
  • keep TypeScript targetRef and Go TargetRef supported without a deprecation

The commit target-ref options remain limited to fully qualified refs/heads/* values. They normalize to the current target_branch HTTP field. targetBranch or TargetBranch wins when both forms reach the request.

A future generic ref-write change can broaden these options and make them preferred without asking callers to migrate away from them first.

Compatibility gate

This PR adds fields to exported Go structs. Documented keyed literals remain valid. External unkeyed composite literals can stop compiling. The release owner must resolve this compatibility decision before publication.

Verification

  • pnpm exec vitest --run — 217 tests passed
  • pnpm build — passed
  • pnpm exec tsc --project tsconfig.type-tests.json — passed
  • ./venv/bin/pytest -v — 192 tests passed
  • Ruff and mypy — passed
  • go test ./... — passed
  • git diff --check and the added-line secret scan — passed

Callers can use the standard API names in each SDK while existing code
continues to use the deprecated public aliases.

Expose the preferred request and result names across TypeScript, Python,
and Go. Send only standard HTTP fields. Read both response generations,
and prefer the standard field when both forms exist.
Callers can keep the TypeScript targetRef and Go TargetRef options without
a deprecation warning. Both forms still accept fully qualified branch refs
and send the current target_branch HTTP field.

Add a neutral TypeScript option type while keeping the published legacy
name as a compatibility type.
necolas added a commit that referenced this pull request Aug 29, 2026
Keep the route migration on the latest PR #47 contract. Preserve commit
target-ref options without a deprecation and combine both TypeScript
compatibility checks.
@notion-workspace

Copy link
Copy Markdown

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