Skip to content

feat: export a generated operation catalog - #110

Merged
betegon merged 1 commit into
mainfrom
bt/api-operation-catalog
Oct 27, 2026
Merged

betegon merged 1 commit into
mainfrom
bt/api-operation-catalog

Conversation

@betegon

@betegon betegon commented Oct 27, 2026

Copy link
Copy Markdown
Member

Adds a data-only @sentry/api/operations export so discovery tools can use the metadata shipped with their installed SDK. Function names come from the generated SDK; original operation IDs, query enums and inherited parameters come from the same release's OpenAPI document. Missing or ambiguous mappings fail the build.

import { operations } from "@sentry/api/operations";

const logQueries = operations.filter(operation =>
  operation.queryParameters.some(parameter =>
    parameter.name === "dataset" && parameter.enum?.includes("logs"),
  ),
);
// Includes listOrganizationEvents without importing the HTTP client.

CLI command relationships and search policy stay in Toolkit #1658. The catalog complements the type-only operation map in #102; it does not change request execution or root exports.

Validated: build, typecheck, 166 Bun tests and 2 Node tests. New coverage exercises real SDK regeneration as endpoints/enums grow, original versus normalized IDs, and packed imports/types without client or validator dependencies.

Closes #109 (subissue of v1.0 #93).

@betegon
betegon marked this pull request as ready for review October 27, 2026 19:31
@betegon
betegon merged commit 978abb7 into main Oct 27, 2026
10 checks passed
@betegon
betegon deleted the bt/api-operation-catalog branch October 27, 2026 19:51
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.

Generate an operation catalog for SDK consumers

1 participant