Repository navigation
feat: add isLive search query to create batch - #35
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds optional ChangesisLive query parameter for Order and Batch APIs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/models/Batch.ts`:
- Line 31: The isLive field in the CreateBatchOrder type definition is
misleading because it is never used in the Batch.createOrder method (around
lines 155-159), which ignores the passed isLive value and instead derives the
query parameter from this.isBillable. Remove the isLive field from the
CreateBatchOrder type to eliminate this unused parameter and prevent callers
from believing they can control the order's live status. If orders within a
batch should be able to override the batch's billing status, alternatively
update the createOrder method to use the isLive parameter with the batch's
isBillable as a fallback (order.isLive ?? this.isBillable) instead of always
using this.isBillable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1c55d7f5-8cc3-410c-beaa-2588c9b2098a
📒 Files selected for processing (3)
src/PrintOne.tssrc/models/Batch.tssrc/models/Order.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/PrintOne.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/PrintOne.ts`:
- Line 63: The RequestHandler type in PrintOne.ts is too narrow because params
are typed as Record<string, string> even though callers pass boolean query
values like isLive from Batch and PrintOne. Update the RequestHandler params
signature to accept the actual query value shape used across the codebase, and
make sure any related handler implementations and usages of params in PrintOne
align with the broader type.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 86bd55a5-dc9b-41f0-a259-c83719b1a077
📒 Files selected for processing (2)
src/PrintOne.tssrc/models/Batch.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/models/Batch.ts
When not using an API key (OAuth), it was not possible to create a live batch.
Adding the
isLivesearch query allows for this.Summary by CodeRabbit
Summary by CodeRabbit
isLivesupport when creating orders and batches, allowing control of live mode status for newly created items.isLivedefaults tofalse.