fix(core): define RunEvent schema and update ApiClient validation#3215
fix(core): define RunEvent schema and update ApiClient validation#3215bharathkumar39293 wants to merge 1 commit intotriggerdotdev:mainfrom
Conversation
|
|
Hi @bharathkumar39293, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis pull request introduces a new Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip You can customize the high-level summary generated by CodeRabbit.Configure the |
|
Hi @triggerdotdev maintainers! My PR was auto-closed because I'm not in the vouched list. However, I have previously contributed and had PR #2874 merged in January using my other email account. Could you please vouch for me so I can continue with this SDK improvement? Thank you! |
Resolves the internal TODO in
ApiClient
regarding missing schema validation for task run events.
✅ Checklist
Testing
I added a comprehensive suite of unit tests for the newly defined
RunEvent
schema in
packages/core/src/v3/schemas/api-type.test.ts
.
Steps taken:
RunEvent
schema based on the backend event structures.
ApiClient
to use this schema.
Verification details:
Changelog
@trigger.dev/core: Added
RunEvent
Zod schema and
TaskEventLevel
enum to
packages/core/src/v3/schemas/api.ts
.
@trigger.dev/core: Updated ApiClient.listRunEvents to validate responses against the new schema, replacing the previous z.any() placeholder.
Screenshots
N/A (Logic/SDK changes verified via automated unit tests)