Skip to content

docs: document the time-off API contract used by manager flows - #1908

Draft
jordividaller wants to merge 2 commits into
mainfrom
docs/time-off-api-contract
Draft

jordividaller wants to merge 2 commits into
mainfrom
docs/time-off-api-contract

Conversation

@jordividaller

Copy link
Copy Markdown
Collaborator

Summary

Adds a reference page that records what the generated API client says about the time-off endpoints a manager uses to read, approve and decline time-off requests.

Why

The manager time-off work relies on a few contract points that are easy to assume wrongly: whether approver_id and decline_reason can be null, which statuses exist, which errors are declared, how the list pages. Writing down what the client actually states, and what it does not, keeps those assumptions visible. It also lists the questions only the live API can answer.

What changed

Toggle details
  • New file docs/TIME_OFF_API_CONTRACT.md. No code change, no public API change.
  • Covers show, list, types, approve, decline, and the leave policy summary and details routes: method and route, generated function and type names, parameters, the Timeoff record fields, the status enum, declared errors, authentication and scopes.
  • Every fact is labelled with its source: generated types, generated JSDoc, SDK code, or an assumption not found in the repo.
  • A "Discrepancies" section compares the assumed contract with the client. Main points: 403 and 409 are not declared on any of these routes; approver_id and decline_reason are required keys with nullable values; no default or maximum is stated for page_size; one approver_id per record and no approval chain.
  • A "Not verified" section lists open questions that need runtime confirmation.
  • Cancellation, employee-side, balances, create and update routes are out of scope, with one line saying so.
  • One thing to look at separately: the pageSize JSDoc on UseTimeOffListOptions says the API documents 1 to 100 with 20 by default. The generated type for the time-off list does not state this (other list endpoints do).

Screenshots

N/A

Related Resources

N/A

Testing

Docs-only change. The page was checked by reading the generated client (src/client/sdk.gen.ts, src/client/types.gen.ts) and the TimeOff flow code. pnpm run check-format passes on the repo with the new file. No build, lint, type check or example app run, since no code changed.

  • Tested against the example/ app in a browser
  • Feature flag: N/A

🤖 Generated with Claude Code

Record what the generated client says about the manager-side time-off
routes (show, list, types, approve, decline, leave policy summary and
details): routes, generated names, parameters, response fields, statuses,
declared errors, authentication and scopes. List where it differs from the
assumed contract and the questions only the live API can answer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for adp-cost-calculator ready!

Project:adp-cost-calculator
Status: ✅  Deploy successful!
Preview URL:https://adp-cost-calculator-f68v4vcrg-remotecom.vercel.app
Latest Commit:4112825

Deployed with vercel-action

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for remote-flows ready!

Project:remote-flows
Status: ✅  Deploy successful!
Preview URL:https://remote-flows-8ez1i0nb2-remotecom.vercel.app
Latest Commit:4112825

Deployed with vercel-action

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage Report

✅ Coverage increased! 🎉

Metric Current Previous Change Status
Lines 90.30% 90.29% +0.02% 🟢
Statements 90.19% 90.17% +0.02% 🟢
Functions 89.19% 89.19% 0% ⚪
Branches 81.91% 81.91% 0% ⚪

Detailed Breakdown

Lines Coverage
  • Covered: 5877 / 6508
  • Coverage: 90.30%
  • Change: +0.02% (1 lines)
Statements Coverage
  • Covered: 5946 / 6593
  • Coverage: 90.19%
  • Change: +0.02% (1 statements)
Functions Coverage
  • Covered: 1560 / 1749
  • Coverage: 89.19%
  • Change: 0% (0 functions)
Branches Coverage
  • Covered: 3645 / 4450
  • Coverage: 81.91%
  • Change: 0% (0 branches)

✅ Coverage check passed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant