Skip to content

Sync developer-approval and transfer-accept calls with api's v2 hardening - #286

Merged
admdly merged 2 commits into
mainfrom
sync-v2-review-workflow-hardening
Jul 26, 2026
Merged

Sync developer-approval and transfer-accept calls with api's v2 hardening#286
admdly merged 2 commits into
mainfrom
sync-v2-review-workflow-hardening

Conversation

@admdly

@admdly admdly commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The fossbilling/api repo's "Harden extensions v2 review workflows" change made POST /developers/{id}/approve require an expected_revision body (matching the profile's content_revision) as an optimistic-concurrency guard, and moved transfer acceptance from POST /developers/transfers/{token}/accept to POST /developers/transfers/accept with token in the JSON body — both were silent breaks for this site's API client.
  • Updated apiClient.ts (approveDeveloper, acceptTransfer), added content_revision to the DeveloperProfile type (and excluded it from DeveloperProfileInput/PublicDeveloperProfile), and threaded expected_revision through the developer-approval form and route handler.
  • Other recent api changes (DELETE /developers/me, new public read endpoints, submission-list pagination) were checked and need no changes here — the delete endpoint was already wired up, the public read endpoints aren't used since this site reads D1 directly, and pagination is additive.

… v2 review workflow

The api repo's "Harden extensions v2 review workflows" change added
optimistic-concurrency protection to developer approval and moved
transfer acceptance off a path param, both breaking this site's client:

- POST /developers/{id}/approve now requires an expected_revision body
  matching the profile's content_revision, so an approval can't silently
  apply to a profile edited after it was reviewed.
- Accepting a transfer moved from POST /developers/transfers/{token}/accept
  to POST /developers/transfers/accept with token in the JSON body.

Claude-Session: https://claude.ai/code/session_01TqhETgC1HU7JBgSbsiWAh1
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 26, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
extensions 9359dfd Commit Preview URL

Branch Preview URL
Jul 26 2026, 11:49 PM

@admdly admdly self-assigned this Jul 26, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 4 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/types/index.ts
getDeveloperByOwner is typed to return DeveloperProfile, which now
requires content_revision: number, but its D1 query never selected the
column — parseDeveloperProfileRow's `as DeveloperProfile` cast papered
over the gap, so the field would silently be undefined at runtime for
any owner-read profile. Select the column (added to `developers` by the
api repo's 0011 migration, NOT NULL DEFAULT 1) so the value is real.
getDeveloperById's public read still doesn't select it, since its
PublicDeveloperProfile return type omits the field entirely.

Claude-Session: https://claude.ai/code/session_01TqhETgC1HU7JBgSbsiWAh1

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Auto-approved: Syncs API client with backend's optimism-concurrency guard and endpoint change; bounded adaptation to already-deployed API hardening.

Re-trigger cubic

@admdly
admdly merged commit c89d2fc into main Jul 26, 2026
9 checks passed
@admdly
admdly deleted the sync-v2-review-workflow-hardening branch July 26, 2026 23:52
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.

1 participant