feat(inventory): add Inventory endpoint family - #460
Conversation
Implements the new agentic:inventory OAuth-scoped endpoints: stock adjustments, atomic multi-variant reservations (create/get/commit/release), stock levels (get/set), and beta product knowledge (get/set/delete). Includes hand-written TypeScript declarations under types/dist, matching every other domain's loose Promise<Object> typing.
🔴 Risk Classification: MAJORApproval route: AI Review + Human Approval Required Classification reasons
Operational gates
Files analysed: 8 wall-e 2026.06.19-02 · policy |
🔬 Debug — why this classification?Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.
Kinds:
See issue #3 for the proposal to formalise this map as Appendix A of the standards doc. wall-e 2026.06.19-02 · debug |
🔵 Advisory review: Sound, but needs your judgementThis PR needs a human approval. The code itself reads as correct; whether it should land depends on context I don't have. Adds a new Inventory endpoint family with 10 methods, tests, TypeScript declarations, and OAuth scope constant — the implementation looks structurally consistent with the rest of the SDK, but the diff is truncated so the full inventory.js source and part of the test file cannot be fully verified. For you to decide
This is not an approval. wall-e cannot auto-approve this PR — it is an opinion to help whoever does. Advisory review · us.anthropic.claude-sonnet-4-6 · wall-e 2026.06.19-02 |
|



Summary
Implements the new Inventory product added to the API on 2026-09-10: stock adjustments,
atomic multi-variant reservations (create/get/commit/release), stock levels (get/set), and
beta product knowledge (get/set/delete). All 10 endpoints require the OAuth scope
agentic:inventory, no secret/public key support, reusing this SDK's existing OAuthclient-credentials pattern (already used by Issuing, NetworkTokens, etc).
Also verified the same swagger diff's
PaymentSessionCaptureFlag/PaymentSessionCaptureOnand
PaymentInterfacesPanPreference/PaymentInterfacesProvisionNetworkTokenschemaextraction: confirmed no-op for this SDK (this SDK has no
PaymentInterfacesdomain at all,and
capture/capture_onare already untyped pass-through body fields).Changes
src/api/inventory/inventory.js— newInventoryclass, all 10 methods, documented viaJSDoc (this SDK has no hand-maintained typed request/response classes)
src/oauth-scopes.js— addedAGENTIC_INVENTORYscope constantsrc/index.js/src/endpoints-factory.js— wired the new client intypes/dist/api/inventory/inventory.d.ts,types/dist/index.d.ts,types/dist/Checkout.d.ts— hand-written TypeScript declarations matching every other domain's loose
Promise<Object>typingtest/inventory/inventory-unit.js— 10 unit tests (Mocha/Chai/nock), 949 passing overallAPI Reference
POST /inventory/adjustmentsPOST /inventory/reservationsGET /inventory/reservations/{id}POST /inventory/reservations/{id}/commitPOST /inventory/reservations/{id}/releaseGET /inventory/{variant_id}PUT /inventory/{variant_id}GET /inventory/{variant_id}/product(Beta)PUT /inventory/{variant_id}/product(Beta)DELETE /inventory/{variant_id}/product(Beta)Breaking changes
None. Purely additive.
README
No README changes needed.