Skip to content

feat(client): close the approvals (6) + record-shares (3) REST gaps (#3587 batch 3/5) - #3629

Merged
os-zhuang merged 1 commit into
mainfrom
claude/screen-flow-submit-resume-v9dqjx
Jul 27, 2026
Merged

feat(client): close the approvals (6) + record-shares (3) REST gaps (#3587 batch 3/5)#3629
os-zhuang merged 1 commit into
mainfrom
claude/screen-flow-submit-resume-v9dqjx

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Third of five batches closing the 43 REST↔client gaps the #3587 ledger carries. Batches 1–2 (metadata #3625, reports #3626) are merged; this batch: approvals 6 + record-shares 3 → 0. Ratchet 26 → 17.

client.approvals — the lifecycle beyond approve/reject

Six new methods, matching the decision-route body convention ({ actorId?, comment? }, actor defaulting server-side to the authenticated user):

Method Route Semantics
recall(id, opts?) POST /approvals/requests/:id/recall submitter withdraws; flow finalizes
revise(id, opts?) POST /approvals/requests/:id/revise ADR-0044 send-back — request returned, run parks
resubmit(id, opts?) POST /approvals/requests/:id/resubmit re-enters the approval node; returns resumed/autoRejected verbatim
remind(id, opts?) POST /approvals/requests/:id/remind thread interaction, flow does not move
requestInfo(id, opts?) POST /approvals/requests/:id/request-info thread interaction
comment(id, {comment, attachments?}) POST /approvals/requests/:id/comment thread comment with attachments

New client.shares — per-record sharing grants

list(object, recordId) / grant(object, recordId, {recipientType, recipientId, accessLevel, …}) / revoke(object, recordId, shareId) on /data/:object/:id/shares, resolved via the discovered data route. revoke is 204-safe (same empty-body guard the reports batch established). 501 [NOT_IMPLEMENTED] without the sharing service.

Ledger & docs

  • 9 rows gapsdk; ratchet comment updated (remaining: data-actions 2, search 1, email 1, analytics 1, security-explain 2, sharing-rules 5, external-datasource 5).
  • client-sdk.mdx: shares row added, and the previously missing approvals row documented (12 methods).

Verification

  • @objectstack/client: 153/153 (+9 URL-pinning tests, incl. a parameterized five-route pin), bare tsc clean.
  • @objectstack/rest: 394/394 (guard green at ratchet 17).
  • Changeset: client minor, rest patch.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LX9ut3MK3KykE11S9bJmv5


Generated by Claude Code

…3587 batch 3/5)

client.approvals gains the full request lifecycle beyond approve/reject:
recall (submitter withdraw), revise / resubmit (the ADR-0044 send-back
round-trip, both flow-moving), and the thread interactions remind /
requestInfo / comment (comment carries attachments). Bodies follow the
decision-route convention ({ actorId?, comment? }; the server defaults
actor to the authenticated user).

New client.shares namespace for per-record sharing grants under the data
surface: list / grant / revoke on /data/:object/:id/shares (revoke is
204-safe). 501s cleanly without the sharing service.

Each method URL-pinned in client.test.ts. Ledger: 9 rows gap→sdk;
ratchet 26→17. client-sdk.mdx: shares row added and the previously
missing approvals row documented (12 methods).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LX9ut3MK3KykE11S9bJmv5
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectstack Ignored Ignored Jul 27, 2026 11:11am

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling labels Jul 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/client, @objectstack/rest.

18 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/ai/skills-reference.mdx (via packages/client)
  • content/docs/api/client-sdk.mdx (via @objectstack/client)
  • content/docs/api/data-flow.mdx (via @objectstack/client)
  • content/docs/api/environment-routing.mdx (via @objectstack/client)
  • content/docs/api/error-catalog.mdx (via @objectstack/client, @objectstack/rest)
  • content/docs/api/error-handling-server.mdx (via @objectstack/rest)
  • content/docs/api/index.mdx (via @objectstack/rest)
  • content/docs/getting-started/your-first-project.mdx (via @objectstack/client)
  • content/docs/kernel/runtime-services/data-service.mdx (via packages/client)
  • content/docs/kernel/runtime-services/index.mdx (via packages/client)
  • content/docs/permissions/authentication.mdx (via @objectstack/client)
  • content/docs/plugins/index.mdx (via @objectstack/rest)
  • content/docs/plugins/packages.mdx (via @objectstack/client, @objectstack/rest)
  • content/docs/protocol/kernel/i18n-standard.mdx (via packages/rest)
  • content/docs/protocol/kernel/realtime-protocol.mdx (via @objectstack/client)
  • content/docs/releases/implementation-status.mdx (via @objectstack/client, @objectstack/rest)
  • content/docs/releases/v12.mdx (via @objectstack/rest)
  • content/docs/releases/v16.mdx (via @objectstack/client)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

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

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants