Skip to content

chore: update @sentry/api to ^0.141.0#924

Draft
MathurAditya724 wants to merge 4 commits intomainfrom
bump-sentry-api
Draft

chore: update @sentry/api to ^0.141.0#924
MathurAditya724 wants to merge 4 commits intomainfrom
bump-sentry-api

Conversation

@MathurAditya724
Copy link
Copy Markdown
Member

Bumps @sentry/api from ^0.133.0 to ^0.141.0, picking up v0.141.0 which adds auto-generated Zod v3 schemas via a new @sentry/api/zod subpath export (getsentry/sentry-api-schema#70).

This makes auto-generated Zod schemas available for the CLI to use instead of the hand-written ones in src/types/. The schemas stay in sync with the OpenAPI spec automatically on every @sentry/api release.

Usage

import { zOrganization, zAlertRule } from "@sentry/api/zod";

Testing

bun run generate:schema && bun run generate:sdk && npx tsc --noEmit — typecheck passes. bun test test/lib/api-schema.test.ts — 19 tests pass.

Picks up v0.141.0 which adds auto-generated Zod schemas via a new
'@sentry/api/zod' subpath export (getsentry/sentry-api-schema#70).
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Codecov Results 📊

6686 passed | Total: 6686 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 13589 uncovered lines.
❌ Project coverage is 76.61%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    76.66%    76.61%    -0.05%
==========================================
  Files          303       303         —
  Lines        57997     58109      +112
  Branches         0         0         —
==========================================
+ Hits         44463     44520       +57
- Misses       13534     13589       +55
- Partials         0         0         —

Generated by Codecov Action

MathurAditya724 and others added 2 commits May 6, 2026 00:48
Replace hand-written Zod schemas with auto-generated ones from
@sentry/api/zod where the generated schemas cover the same response
shapes. Keep custom schemas for internal/undocumented endpoints.

Replaced:
- SentryIssueSchema: derived from zRetrieveAnIssueResponse
- IssueEventSchema: derived from zGroupEventsResponseDict element
- SentryTeamSchema: derived from zBaseTeam

Kept custom (with reasons):
- Dashboard schemas: generated uses snake_case for input types
  (display_type, widget_type) while API responses use camelCase;
  DashboardDetailsModel widget layout is untyped Record<string,unknown>
- Replay schemas: generated missing info_ids/warning_ids fields,
  custom .catch() fallback behavior for archived replays
- Seer/Autofix schemas: generated autofix field is untyped
  Record<string,unknown> | null
- Repository/Provider schemas: generated repo schema has only 3 fields
  vs CLI's 9; no provider sub-schema available
- Internal schemas (regions, auth, logs, traces, spans, OAuth, config,
  DSN, sourcemaps, billing/trials): not in OpenAPI spec
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-924/

Built to branch gh-pages at 2026-05-06 16:10 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

| `id` | string | Internal event ID |
| `event.type` | string | Event type (error, default, transaction) |
| `groupID` | string \| null | Group (issue) ID |
| `groupID` | unknown | |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to fix all these unknown changes in references

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 73bbd09zodTypeToString didn't handle ZodUnion (which @sentry/api/zod uses for nullable fields instead of ZodNullable). Added union resolution + ZodRecord support, and re-added .describe() calls on all fields that lost descriptions when switching from hand-written to SDK schemas.

zodTypeToString now handles ZodUnion (used by @sentry/api/zod for
nullable fields) and ZodRecord. Re-added .describe() calls on fields
that lost descriptions when switching from hand-written to SDK schemas.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants