GeezerVison is showing github.com — [feature]: Add typed endpoints by deeonwuli · Pull Request #2 · EyeSeeTea/ob-api
Conversation
deeonwuli
commented
Nov 13, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
📌 References
Depends on #1. Merge that PR first; this PR then targets development.
📝 Implementation
The complete low-level layer: typed methods for the OpenBoxes calls of UNICEF-TJK-scripts and the resources that Samaritan's Purse needs. The SDK layer builds on it.
- Resource methods:
products, productPackages, locations, categories, stockMovements (reads and writes), partialReceipts, stockTransfers, purchaseOrders, chooseLocation.
api.generic.*: the resources of the OpenBoxes generic API (products, productPackages, orders, transactionTypes, inventories, transactions, people).
- Typed
request: a wrong method, path, parameter or body field is a compile error. Every answer is checked at runtime; an unexpected answer rejects with an HttpError.
- Rules: 1 request for each method, OpenBoxes names and nesting, only mechanical changes (dotted keys → nested objects,
null/"" → undefined, Date → OpenBoxes format).
- Breaking (no consumers yet):
request → requestUntyped; getChecked/postChecked removed; the 4 generic resources moved to api.generic.
- Docs: README "Typed endpoints", the endpoints wiki, and a project rule that keeps the wiki updated.
- Not included: stock adjustments.
POST /stockAdjustments answers 500 on OpenBoxes 0.9.7 up to develop. Other OpenBoxes issues are on the wiki page "Known OpenBoxes issues".
OpenSpec: typed-endpoints-unicef, low-level-v1, sp-endpoints (archived, specs synced).
📹 Screenshots/Screen capture
N/A (library, no UI).
🔥 Notes to the tester
- Run
yarn install, then yarn check and yarn build-base.
- Live checks on the OpenBoxes test server (0.9.7): the reads as admin with GET only; the writes as the non-admin
obapi-test with the session location. The checks deleted their test data, except the dispatched movement 434AXZ.
#1amt6mz6vf8
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
deeonwuli
changed the title
feat(api): add typed endpoints for the UNICEF calls
feat(api)!: add typed endpoints for the UNICEF calls
Nov 18, 2026
deeonwuli
changed the title
feat(api)!: add typed endpoints for the UNICEF calls
feat(api): add typed endpoints for the UNICEF calls
Nov 18, 2026
deeonwuli
changed the title
feat(api): add typed endpoints for the UNICEF calls
feat(api): Add typed endpoints for the UNICEF calls
Nov 18, 2026
deeonwuli
changed the title
feat(api): Add typed endpoints for the UNICEF calls
[feat]: Add typed endpoints for the UNICEF calls
Nov 18, 2026
deeonwuli
changed the title
[feat]: Add typed endpoints for the UNICEF calls
[feature]: Add typed endpoints for the UNICEF calls
Nov 19, 2026
deeonwuli
changed the title
[feature]: Add typed endpoints for the UNICEF calls
[feature]: Add typed endpoints
Nov 19, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|