Repository navigation
refactor: make endpoints stable or public - #5227
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openmeterio/openmeter/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (35)
💤 Files with no reviewable changes (15)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe pull request changes API operation annotations and expands the JavaScript SDK with clients and methods for app, billing, entitlement, grant, notification, and subscription operations. It also updates SDK exports, internal accessors, and route tests. ChangesSDK and API operation updates
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The SDK exposure changes and revised tests are consistent with the intended public surface. No merge-blocking issue was identified; complete the normal package checks with dependencies available before merging. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to The change makes sensitive administrative operations available through public API contracts. Existing server-side namespace and lifecycle checks provide important controls, but deployed authorization and failure-recovery guarantees have not been established. No authentication bypass or cross-tenant vulnerability was verified. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| } | ||
|
|
||
| private _currencies?: Currencies | ||
| get currencies(): Currencies { | ||
| return (this._currencies ??= new Currencies(this)) |
There was a problem hiding this comment.
Moving these operations to public getters removes the old client.internal.* paths, but the checked-in tests and their generator templates still use internal.customers.* and internal.currencies.*. They also assert that currencies is not public. The SDK typecheck fails with three TS2339 errors, blocking the generated-package check. Update both sets of tests to use and verify the new public paths.
Prompt To Fix With AI
This is a comment left during a code review.
Path: api/spec/packages/aip-client-javascript/src/sdk/sdk.ts
Line: 80-84
Comment:
**SDK tests no longer compile**
Moving these operations to public getters removes the old `client.internal.*` paths, but the checked-in tests and their generator templates still use `internal.customers.*` and `internal.currencies.*`. They also assert that `currencies` is not public. The SDK typecheck fails with three `TS2339` errors, blocking the generated-package check. Update both sets of tests to use and verify the new public paths.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Credit grant void, currencies and customer charges are public now; only subscription add-on create/update remain x-internal.
Ticket: OM-550
Overview
Fixes #(issue)
Notes for reviewer
Summary by CodeRabbit
The PR appears safe to merge; no new actionable issue or outstanding previous finding was identified.
Fix with agent prompt
Summary
The PR changes endpoint visibility in TypeSpec and OpenAPI, moves the corresponding JavaScript SDK operations from internal to public clients, and updates the generated documentation and tests. The changes since the previous review update both the checked-in tests and their generator templates for the new client paths.
Reviews (2) · Last reviewed commit: "test(api): align SDK conformance tests w..."