export type SentryOptions = {
  /**
   * Auth token override. When omitted, falls back to stored credentials from
   * `sentry auth login`, then the `SENTRY_AUTH_TOKEN` or `SENTRY_TOKEN`
   * environment variables (set `SENTRY_FORCE_ENV_TOKEN=1` to prefer them).
   */
  token?: string;

  /**
   * Sentry instance URL for self-hosted installations.
   * Defaults to `sentry.io`. Accepts with or without protocol
   * (e.g., `"sentry.example.com"` or `"https://sentry.example.com"`).
   */
  url?: string;

  /**
   * Default organization slug. When set, commands that need an org
   * will use this instead of requiring it on every call.
   */
  org?: string;

  /**
   * Default project slug. When set, commands that need a project
   * will use this instead of requiring it on every call.
   */
  project?: string;

  /**
   * Return human-readable text instead of parsed JSON.
   * When `true`, the `run()` function returns a `string` instead of a parsed object.
   */
  text?: boolean;

  /**
   * Working directory for this invocation.
   * Affects DSN auto-detection and project root resolution.
   * Defaults to `process.cwd()`.
   */
  cwd?: string;

  /**
   * Extra HTTP headers to send with every request to a self-hosted Sentry
   * instance, for reverse proxies that require them (e.g., Google IAP,
   * Cloudflare Access). Same rules as `SENTRY_CUSTOM_HEADERS`, which this
   * option replaces when set (even when empty); ignored when targeting sentry.io.
   */
  headers?: Record<string, string>;

  /**
   * Environment variables each invocation starts from, before the options
   * above are applied. Defaults to `process.env`. Pass `{}` on a server whose
   * `process.env` holds its own settings (such as a `SENTRY_DSN`) that must not
   * change how commands resolve their target.
   */
  env?: Readonly<Record<string, string | undefined>>;

  /**
   * Write local state, as the CLI does (default `false`). When off, calls
   * still read what the CLI stored in `cli.db` (logins, defaults, cached
   * lookups) and `.sentryclirc` files, but write nothing: no `cli.db` writes
   * (and no `cli.db` is created), no response cache, and no version check.
   * List commands then reject `cursor: "next"` and `"prev"`; pass the
   * `nextCursor` of the previous result instead.
   */
  persist?: boolean;

  /**
   * Abort signal for cancelling streaming commands.
   * When aborted, streaming iterables stop on the next poll cycle.
   * Consumer `break` in `for await...of` also triggers abort automatically.
   * Has no effect on non-streaming (Promise-based) commands.
   */
  signal?: AbortSignal;
};

export type AsyncChannel<T> = AsyncIterable<T> & {
  push(value: T): void;
  close(): void;
  error(err: Error): void;
};

export declare class SentryError extends Error {
  readonly exitCode: number;
  readonly stderr: string;
  constructor(message: string, exitCode: number, stderr: string);
}

export declare function createSentrySDK(options?: SentryOptions): SentrySDK & {
  /** Run an arbitrary CLI command (escape hatch). Streaming flags return AsyncIterable. */
  run(...args: string[]): Promise<unknown> | AsyncIterable<unknown>;
};

/** The version of this `sentry` package. */
export declare function getVersion(): string;

/** Absolute path to this package's `sentry` executable (a Node.js script). */
export declare function getPath(): string;

/** v3's static `SentryCli.getVersion()` / `SentryCli.getPath()`. */
export declare namespace createSentrySDK {
  export function getVersion(): string;
  export function getPath(): string;
}

export default createSentrySDK;

// Auto-generated by script/generate-sdk.ts — DO NOT EDIT
// Run `pnpm run generate:sdk` to regenerate.

// --- Return types (derived from __jsonFields) ---

export type AlertIssuesCreateResult = {
    /** Organization slug */
    org: string;
    /** Alert rule ID */
    id?: string;
    /** Alert rule name */
    name: string;
    /** Rule status (active, disabled) */
    status?: string;
    /** True when --dry-run made no change */
    dryRun?: boolean;
    /** Request body that would be sent (--dry-run) */
    body?: Record<string, unknown>;
    /** Project slug */
    project: string;
};

export type AlertIssuesDeleteResult = {
    /** True when --dry-run made no change */
    dryRun?: boolean;
    /** True when the rule was deleted */
    deleted?: boolean;
    /** Organization slug */
    org: string;
    /** Alert rule ID */
    id: string;
    /** Alert rule name */
    name: string;
    /** Project slug */
    project: string;
};

export type AlertIssuesEditResult = {
    /** Alert rule ID */
    id: string;
    /** Alert rule name */
    name: string;
    /** ID of the organization the alert belongs to */
    organizationId: string;
    /** ID of the user who created the alert */
    createdBy: string | null;
    /** When the alert was created (ISO 8601) */
    dateCreated: string;
    /** When the alert was last updated (ISO 8601) */
    dateUpdated: string;
    /** Conditions on which the alert triggers */
    triggers: Record<string, unknown> | null;
    /** Filters to run before actions fire, each with the actions to fire */
    actionFilters: unknown[] | null;
    /** Name of the environment the alert is limited to. Null for all environments */
    environment: string | null;
    /** Configuration of the alert, such as frequency in minutes */
    config: Record<string, unknown>;
    /** IDs of the monitors connected to the alert */
    detectorIds: unknown[] | null;
    /** Whether the alert is enabled */
    enabled: boolean;
    /** When the alert last fired (ISO 8601) */
    lastTriggered: string | null;
    /** Team or user that owns the alert, such as user:123 or team:456 */
    owner: string | null;
    /** Organization slug */
    org: string;
    /** Project slug */
    project: string;
    /** Rule status (active, disabled) */
    status: string;
};

export type AlertMetricsCreateResult = {
    /** Organization slug */
    org: string;
    /** Alert rule ID */
    id?: string;
    /** Alert rule name */
    name: string;
    /** Rule status (active, disabled) */
    status?: string;
    /** True when --dry-run made no change */
    dryRun?: boolean;
    /** Request body that would be sent (--dry-run) */
    body?: Record<string, unknown>;
};

export type AlertMetricsDeleteResult = {
    /** True when --dry-run made no change */
    dryRun?: boolean;
    /** True when the rule was deleted */
    deleted?: boolean;
    /** Organization slug */
    org: string;
    /** Alert rule ID */
    id: string;
    /** Alert rule name */
    name: string;
};

export type AlertMetricsEditResult = {
    /** Team or user that owns the monitor */
    owner?: Record<string, unknown> | null;
    /** ID of the user who created the monitor */
    createdBy?: string | null;
    /** Latest issue the monitor created */
    latestGroup?: Record<string, unknown> | null;
    /** Description of the monitor */
    description?: string | null;
    /** Alert rule ID */
    id: string;
    /** ID of the project the monitor belongs to */
    projectId: string | null;
    /** Alert rule name */
    name: string;
    /** Type of the monitor, such as metric_issue or error */
    type: string;
    /** IDs of the alerts connected to the monitor */
    workflowIds: unknown[] | null;
    /** When the monitor was created (ISO 8601) */
    dateCreated: string;
    /** When the monitor was last updated (ISO 8601) */
    dateUpdated: string;
    /** Data sources the monitor evaluates, such as a query subscription */
    dataSources: unknown[] | null;
    /** Conditions that decide the monitor's status */
    conditionGroup: Record<string, unknown> | null;
    /** Configuration of the monitor, which depends on its type */
    config: Record<string, unknown>;
    /** Whether the monitor is enabled */
    enabled: boolean;
    /** Organization slug */
    org: string;
    /** Rule status (active, disabled) */
    status: string;
};

export type AuthListResult = {
    /** Account ID */
    id: string;
    /** Whether commands use this account */
    active: boolean;
    /** Sentry server URL */
    host?: string;
    /** User ID */
    userId?: string;
    /** User email */
    email?: string;
    /** Username */
    username?: string;
    /** User display name */
    name?: string;
    /** Whether the credential can still be used or refreshed */
    usable: boolean;
    /** Token expiry (Unix milliseconds) */
    expiresAt?: number;
    /** Env var providing the token, if not stored */
    envVar?: string;
};

export type AuthBootstrapResult = {
    method: string;
    /** Path to the stored CLI credentials */
    configPath: string;
    user?: Record<string, unknown>;
    expiresIn?: number;
    refreshEnabled: boolean;
};

export type AgentConversationListResult = {
    conversationId: string;
    webUrl?: string;
    title?: string | null;
    flow: unknown[];
    errors: number;
    llmCalls: number;
    toolCalls: number;
    totalTokens: number;
    totalCost: number;
    startTimestamp: number;
    endTimestamp: number;
    traceCount: number;
    traceIds: unknown[];
    firstInput: string | null;
    lastOutput: string | null;
    user?: Record<string, unknown> | null;
    toolNames: unknown[];
    toolErrors: number;
};

export type DashboardListResult = {
    id: string;
    title: string;
    dateCreated?: string;
    createdBy?: Record<string, unknown>;
    widgetDisplay?: unknown[];
};

export type DashboardViewResult = {
    /** Dashboard ID */
    id: string;
    /** Dashboard title */
    title: string;
    /** Time range of the widget data */
    period: string;
    /** When the data was fetched (ISO 8601) */
    fetchedAt: string;
    /** Dashboard URL */
    url: string;
    /** Creation date (ISO 8601) */
    dateCreated?: string;
    /** Environment filter */
    environment?: unknown[];
    /** Widgets with their query results */
    widgets: unknown[];
};

export type DashboardCreateResult = {
    id: string;
    title: string;
    widgets?: unknown[];
    dateCreated?: string;
    createdBy?: Record<string, unknown>;
    projects?: unknown[];
    environment?: unknown[];
    period?: string | null;
    /** Dashboard URL */
    url: string;
};

export type DashboardWidgetAddResult = {
    /** The saved dashboard */
    dashboard: Record<string, unknown>;
    /** The added or edited widget */
    widget: Record<string, unknown>;
    /** Dashboard URL */
    url: string;
};

export type DashboardWidgetEditResult = {
    /** The saved dashboard */
    dashboard: Record<string, unknown>;
    /** The added or edited widget */
    widget: Record<string, unknown>;
    /** Dashboard URL */
    url: string;
};

export type DashboardWidgetDeleteResult = {
    /** True when --dry-run made no change */
    dryRun?: boolean;
    /** True when the widget was deleted */
    deleted?: boolean;
    /** Title of the deleted widget */
    widgetTitle: string;
    /** Dashboard widget count after the delete (before it, with --dry-run) */
    widgetCount: number;
    /** Dashboard URL */
    url: string;
};

export type DashboardRevisionsResult = {
    id: string;
    title: string;
    dateCreated: string;
    createdBy: Record<string, unknown> | null;
    source: string;
};

export type DashboardRestoreResult = {
    /** Restored dashboard */
    dashboard: Record<string, unknown>;
    /** Organization slug */
    orgSlug: string;
    /** Restored revision ID */
    revisionId: string;
};

export type OrgListResult = {
    /** Organization ID */
    id: string;
    /** Organization slug */
    slug: string;
    /** Organization name */
    name: string;
    /** When the organization was created (ISO 8601) */
    dateCreated?: string;
    /** Organization status */
    status?: Record<string, unknown>;
    /** Whether the organization is an early adopter */
    isEarlyAdopter?: boolean;
    /** Whether members must use two-factor authentication */
    require2FA?: boolean;
    /** Features enabled for the organization */
    features?: unknown[];
    /** Organization avatar */
    avatar?: Record<string, unknown>;
    /** Organization and region URLs */
    links?: Record<string, unknown>;
    /** Whether SSO is configured for the organization */
    hasAuthProvider?: boolean;
    /** Whether members can invite other members */
    allowMemberInvite?: boolean;
    /** Whether members can create projects */
    allowMemberProjectCreation?: boolean;
    /** Your role in the organization */
    orgRole?: string;
    /** Region, when orgs span several (e.g. US, EU) */
    region?: string;
    /** Account the org was listed under, across accounts */
    account?: Record<string, unknown>;
};

export type OrgViewResult = {
    /** Organization ID */
    id: string;
    /** Organization slug */
    slug: string;
    /** Organization name */
    name: string;
    /** When the organization was created (ISO 8601) */
    dateCreated?: string;
    /** Organization status */
    status?: Record<string, unknown>;
    /** Whether the organization is an early adopter */
    isEarlyAdopter?: boolean;
    /** Whether members must use two-factor authentication */
    require2FA?: boolean;
    /** Features enabled for the organization */
    features?: unknown[];
    /** Organization avatar */
    avatar?: Record<string, unknown>;
    /** Organization and region URLs */
    links?: Record<string, unknown>;
    /** Whether SSO is configured for the organization */
    hasAuthProvider?: boolean;
    /** Whether members can invite other members */
    allowMemberInvite?: boolean;
    /** Whether members can create projects */
    allowMemberProjectCreation?: boolean;
    /** Your role in the organization */
    orgRole?: string;
};

export type ProjectListResult = {
    /** Project ID */
    id: string;
    /** Project slug */
    slug: string;
    /** Project name */
    name: string;
    /** Platform of the project */
    platform?: string | null;
    /** Platforms seen in the project's events */
    platforms?: unknown[];
    /** When the project was created (ISO 8601) */
    dateCreated?: string;
    /** When the project received its first event (ISO 8601) */
    firstEvent?: string | null;
    /** Project status */
    status?: string;
    /** Whether the requesting user bookmarked the project */
    isBookmarked?: boolean;
    /** Whether the requesting user is a member of a team with access to the project */
    isMember?: boolean;
    /** Whether the requesting user has access to the project */
    hasAccess?: boolean;
    /** Features enabled for the project */
    features?: unknown[];
    /** First team with access to the project; use teams instead */
    team?: Record<string, unknown> | null;
    /** Teams with access to the project */
    teams?: unknown[];
    /** Environments seen in the project's events */
    environments?: unknown[];
    /** Latest release of the project */
    latestRelease?: Record<string, unknown> | null;
    /** Organization (detail responses only) */
    organization?: Record<string, unknown>;
    /** Organization slug */
    orgSlug?: string;
};

export type ProjectViewResult = {
    /** Project ID */
    id: string;
    /** Project slug */
    slug: string;
    /** Project name */
    name: string;
    /** Platform of the project */
    platform?: string | null;
    /** Platforms seen in the project's events */
    platforms?: unknown[];
    /** When the project was created (ISO 8601) */
    dateCreated?: string;
    /** When the project received its first event (ISO 8601) */
    firstEvent?: string | null;
    /** Project status */
    status?: string;
    /** Whether the requesting user bookmarked the project */
    isBookmarked?: boolean;
    /** Whether the requesting user is a member of a team with access to the project */
    isMember?: boolean;
    /** Whether the requesting user has access to the project */
    hasAccess?: boolean;
    /** Features enabled for the project */
    features?: unknown[];
    /** First team with access to the project; use teams instead */
    team?: Record<string, unknown> | null;
    /** Teams with access to the project */
    teams?: unknown[];
    /** Environments seen in the project's events */
    environments?: unknown[];
    /** Latest release of the project */
    latestRelease?: Record<string, unknown> | null;
    /** Organization (detail responses only) */
    organization?: Record<string, unknown>;
    /** Primary DSN */
    dsn: string | null;
};

export type ReplayListResult = {
    /** Replay activity score */
    activity?: number | null;
    /** Browser metadata */
    browser?: Record<string, unknown> | null;
    /** Dead click count */
    count_dead_clicks?: number | null;
    /** Associated error count */
    count_errors?: number | null;
    /** Info event count */
    count_infos?: number | null;
    /** Rage click count */
    count_rage_clicks?: number | null;
    /** Recording segment count */
    count_segments?: number | null;
    /** Visited URL count */
    count_urls?: number | null;
    /** Warning event count */
    count_warnings?: number | null;
    /** Device metadata */
    device?: Record<string, unknown> | null;
    /** Distribution */
    dist?: string | null;
    /** Replay duration in seconds */
    duration?: number | null;
    /** Environment */
    environment?: string | null;
    /** Linked error IDs */
    error_ids: unknown[];
    /** Replay finish timestamp */
    finished_at?: string | null;
    /** Whether the current user has viewed the replay */
    has_viewed?: boolean | null;
    /** Replay ID */
    id: string;
    /** Linked info event IDs */
    info_ids: unknown[];
    /** Archived flag */
    is_archived?: boolean | null;
    /** Operating system metadata */
    os?: Record<string, unknown> | null;
    /** OTA update metadata */
    ota_updates?: Record<string, unknown> | null;
    /** Platform */
    platform?: string | null;
    /** Numeric project ID */
    project_id?: string | null;
    /** Associated releases */
    releases: unknown[];
    /** SDK metadata */
    sdk?: Record<string, unknown> | null;
    /** Replay start timestamp */
    started_at?: string | null;
    /** Replay tags */
    tags: Record<string, unknown>;
    /** Linked trace IDs */
    trace_ids: unknown[];
    /** Visited URLs */
    urls: unknown[];
    /** User metadata */
    user?: Record<string, unknown> | null;
    /** Linked warning event IDs */
    warning_ids: unknown[];
};

export type ReplayViewResult = {
    /** Summarized replay activity */
    activity: unknown[];
    /** Browser metadata */
    browser?: Record<string, unknown> | null;
    /** Dead click count */
    count_dead_clicks?: number | null;
    /** Associated error count */
    count_errors?: number | null;
    /** Info event count */
    count_infos?: number | null;
    /** Rage click count */
    count_rage_clicks?: number | null;
    /** Recording segment count */
    count_segments?: number | null;
    /** Visited URL count */
    count_urls?: number | null;
    /** Warning event count */
    count_warnings?: number | null;
    /** Device metadata */
    device?: Record<string, unknown> | null;
    /** Distribution */
    dist?: string | null;
    /** Replay duration in seconds */
    duration?: number | null;
    /** Environment */
    environment?: string | null;
    /** Linked error IDs */
    error_ids: unknown[];
    /** Replay finish timestamp */
    finished_at?: string | null;
    /** Whether the current user has viewed the replay */
    has_viewed?: boolean | null;
    /** Replay ID */
    id: string;
    /** Linked info event IDs */
    info_ids: unknown[];
    /** Archived flag */
    is_archived?: boolean | null;
    /** Operating system metadata */
    os?: Record<string, unknown> | null;
    /** OTA update metadata */
    ota_updates?: Record<string, unknown> | null;
    /** Platform */
    platform?: string | null;
    /** Numeric project ID */
    project_id?: string | null;
    /** Associated releases */
    releases: unknown[];
    /** SDK metadata */
    sdk?: Record<string, unknown> | null;
    /** Replay start timestamp */
    started_at?: string | null;
    /** Replay tags */
    tags: Record<string, unknown>;
    /** Linked trace IDs */
    trace_ids: unknown[];
    /** Visited URLs */
    urls: unknown[];
    /** User metadata */
    user?: Record<string, unknown> | null;
    /** Linked warning event IDs */
    warning_ids: unknown[];
    /** Replay click summaries */
    clicks?: unknown[];
    /** Replay type */
    replay_type?: string | null;
    /** Organization slug */
    org: string;
    /** Replay-related issues */
    relatedIssues: unknown[];
    /** Replay-related traces */
    relatedTraces: unknown[];
};

export type ReleaseListResult = {
    /** Release ID */
    id?: number;
    /** Release version */
    version: string;
    /** Shortened release version */
    shortVersion?: string;
    /** Parsed version information */
    versionInfo?: Record<string, unknown> | null;
    /** Release status (open or archived) */
    status?: string;
    /** Version control reference, such as a commit SHA or tag */
    ref?: string | null;
    /** Release URL */
    url?: string | null;
    /** When the release was created (ISO 8601) */
    dateCreated?: string | null;
    /** When the release went live (ISO 8601) */
    dateReleased?: string | null;
    /** When the release received its first event (ISO 8601) */
    firstEvent?: string | null;
    /** When the release received its most recent event (ISO 8601) */
    lastEvent?: string | null;
    /** Number of new issues first seen in the release */
    newGroups?: number;
    /** Number of commits in the release */
    commitCount?: number;
    /** Number of deploys of the release */
    deployCount?: number;
    /** Most recent commit in the release */
    lastCommit?: Record<string, unknown> | null;
    /** Most recent deploy of the release */
    lastDeploy?: Record<string, unknown> | null;
    /** Authors of the release's commits */
    authors?: unknown[];
    /** Release owner */
    owner?: Record<string, unknown> | null;
    /** Projects in the release */
    projects?: unknown[];
    /** Adoption stage of the release in each project */
    adoptionStages?: Record<string, unknown> | null;
    /** Organization slug */
    orgSlug?: string;
    /** Project slug, when listing several */
    targetProject?: string;
};

export type ReleaseViewResult = {
    /** Release ID */
    id?: number;
    /** Release version */
    version: string;
    /** Shortened release version */
    shortVersion?: string;
    /** Parsed version information */
    versionInfo?: Record<string, unknown> | null;
    /** Release status (open or archived) */
    status?: string;
    /** Version control reference, such as a commit SHA or tag */
    ref?: string | null;
    /** Release URL */
    url?: string | null;
    /** When the release was created (ISO 8601) */
    dateCreated?: string | null;
    /** When the release went live (ISO 8601) */
    dateReleased?: string | null;
    /** When the release received its first event (ISO 8601) */
    firstEvent?: string | null;
    /** When the release received its most recent event (ISO 8601) */
    lastEvent?: string | null;
    /** Number of new issues first seen in the release */
    newGroups?: number;
    /** Number of commits in the release */
    commitCount?: number;
    /** Number of deploys of the release */
    deployCount?: number;
    /** Most recent commit in the release */
    lastCommit?: Record<string, unknown> | null;
    /** Most recent deploy of the release */
    lastDeploy?: Record<string, unknown> | null;
    /** Authors of the release's commits */
    authors?: unknown[];
    /** Release owner */
    owner?: Record<string, unknown> | null;
    /** Projects in the release */
    projects?: unknown[];
    /** Adoption stage of the release in each project */
    adoptionStages?: Record<string, unknown> | null;
};

export type ReleaseCreateResult = {
    /** Release ID */
    id?: number;
    /** Release version */
    version: string;
    /** Shortened release version */
    shortVersion?: string;
    /** Parsed version information */
    versionInfo?: Record<string, unknown> | null;
    /** Release status (open or archived) */
    status?: string;
    /** Version control reference, such as a commit SHA or tag */
    ref?: string | null;
    /** Release URL */
    url?: string | null;
    /** When the release was created (ISO 8601) */
    dateCreated?: string | null;
    /** When the release went live (ISO 8601) */
    dateReleased?: string | null;
    /** When the release received its first event (ISO 8601) */
    firstEvent?: string | null;
    /** When the release received its most recent event (ISO 8601) */
    lastEvent?: string | null;
    /** Number of new issues first seen in the release */
    newGroups?: number;
    /** Number of commits in the release */
    commitCount?: number;
    /** Number of deploys of the release */
    deployCount?: number;
    /** Most recent commit in the release */
    lastCommit?: Record<string, unknown> | null;
    /** Most recent deploy of the release */
    lastDeploy?: Record<string, unknown> | null;
    /** Authors of the release's commits */
    authors?: unknown[];
    /** Release owner */
    owner?: Record<string, unknown> | null;
    /** Projects in the release (only slug with --dry-run) */
    projects?: unknown[];
    /** Adoption stage of the release in each project */
    adoptionStages?: Record<string, unknown> | null;
    /** True when --dry-run made no change */
    dryRun?: boolean;
};

export type ReleaseFinalizeResult = {
    /** Release ID */
    id?: number;
    /** Release version */
    version: string;
    /** Shortened release version */
    shortVersion?: string;
    /** Parsed version information */
    versionInfo?: Record<string, unknown> | null;
    /** Release status (open or archived) */
    status?: string;
    /** Version control reference, such as a commit SHA or tag */
    ref?: string | null;
    /** Release URL */
    url?: string | null;
    /** When the release was created (ISO 8601) */
    dateCreated?: string | null;
    /** When the release went live (ISO 8601) */
    dateReleased?: string | null;
    /** When the release received its first event (ISO 8601) */
    firstEvent?: string | null;
    /** When the release received its most recent event (ISO 8601) */
    lastEvent?: string | null;
    /** Number of new issues first seen in the release */
    newGroups?: number;
    /** Number of commits in the release */
    commitCount?: number;
    /** Number of deploys of the release */
    deployCount?: number;
    /** Most recent commit in the release */
    lastCommit?: Record<string, unknown> | null;
    /** Most recent deploy of the release */
    lastDeploy?: Record<string, unknown> | null;
    /** Authors of the release's commits */
    authors?: unknown[];
    /** Release owner */
    owner?: Record<string, unknown> | null;
    /** Projects in the release */
    projects?: unknown[];
    /** Adoption stage of the release in each project */
    adoptionStages?: Record<string, unknown> | null;
    /** True when --dry-run made no change */
    dryRun?: boolean;
    /** Organization slug (--dry-run) */
    org?: string;
    /** Release date to set (--dry-run) */
    released?: string;
};

export type ReleaseDeleteResult = {
    /** Whether the release was deleted */
    deleted: boolean;
    /** Organization slug */
    org: string;
    /** Release version */
    version: string;
    /** True when --dry-run made no change */
    dryRun?: boolean;
};

export type ReleaseArchiveResult = {
    /** Release ID */
    id?: number;
    /** Release version */
    version: string;
    /** Shortened release version */
    shortVersion?: string;
    /** Parsed version information */
    versionInfo?: Record<string, unknown> | null;
    /** Release status (open or archived) */
    status?: string;
    /** Version control reference, such as a commit SHA or tag */
    ref?: string | null;
    /** Release URL */
    url?: string | null;
    /** When the release was created (ISO 8601) */
    dateCreated?: string | null;
    /** When the release went live (ISO 8601) */
    dateReleased?: string | null;
    /** When the release received its first event (ISO 8601) */
    firstEvent?: string | null;
    /** When the release received its most recent event (ISO 8601) */
    lastEvent?: string | null;
    /** Number of new issues first seen in the release */
    newGroups?: number;
    /** Number of commits in the release */
    commitCount?: number;
    /** Number of deploys of the release */
    deployCount?: number;
    /** Most recent commit in the release */
    lastCommit?: Record<string, unknown> | null;
    /** Most recent deploy of the release */
    lastDeploy?: Record<string, unknown> | null;
    /** Authors of the release's commits */
    authors?: unknown[];
    /** Release owner */
    owner?: Record<string, unknown> | null;
    /** Projects in the release */
    projects?: unknown[];
    /** Adoption stage of the release in each project */
    adoptionStages?: Record<string, unknown> | null;
    /** True when --dry-run made no change */
    dryRun?: boolean;
    /** Organization slug (--dry-run) */
    org?: string;
};

export type ReleaseRestoreResult = {
    /** Release ID */
    id?: number;
    /** Release version */
    version: string;
    /** Shortened release version */
    shortVersion?: string;
    /** Parsed version information */
    versionInfo?: Record<string, unknown> | null;
    /** Release status (open or archived) */
    status?: string;
    /** Version control reference, such as a commit SHA or tag */
    ref?: string | null;
    /** Release URL */
    url?: string | null;
    /** When the release was created (ISO 8601) */
    dateCreated?: string | null;
    /** When the release went live (ISO 8601) */
    dateReleased?: string | null;
    /** When the release received its first event (ISO 8601) */
    firstEvent?: string | null;
    /** When the release received its most recent event (ISO 8601) */
    lastEvent?: string | null;
    /** Number of new issues first seen in the release */
    newGroups?: number;
    /** Number of commits in the release */
    commitCount?: number;
    /** Number of deploys of the release */
    deployCount?: number;
    /** Most recent commit in the release */
    lastCommit?: Record<string, unknown> | null;
    /** Most recent deploy of the release */
    lastDeploy?: Record<string, unknown> | null;
    /** Authors of the release's commits */
    authors?: unknown[];
    /** Release owner */
    owner?: Record<string, unknown> | null;
    /** Projects in the release */
    projects?: unknown[];
    /** Adoption stage of the release in each project */
    adoptionStages?: Record<string, unknown> | null;
    /** True when --dry-run made no change */
    dryRun?: boolean;
    /** Organization slug (--dry-run) */
    org?: string;
};

export type ReleaseDeployResult = {
    /** The ID of the deploy */
    id?: string;
    /** The environment name */
    environment: string;
    /** The optional name of the deploy */
    name?: string | null;
    /** The optional URL that points to the deploy */
    url?: string | null;
    /** Start date (ISO 8601) */
    dateStarted?: string | null;
    /** Finish date (ISO 8601) */
    dateFinished?: string;
    /** True when --dry-run made no change */
    dryRun?: boolean;
    /** Release version (--dry-run) */
    version?: string;
};

export type ReleaseDeploysResult = {
    /** The ID of the deploy */
    id: string;
    /** The environment name */
    environment: string;
    /** The optional name of the deploy */
    name?: string | null;
    /** The optional URL that points to the deploy */
    url?: string | null;
    /** Start date (ISO 8601) */
    dateStarted?: string | null;
    /** Finish date (ISO 8601) */
    dateFinished?: string;
};

export type ReleaseSetCommitsResult = {
    /** Release ID */
    id?: number;
    /** Release version */
    version: string;
    /** Shortened release version */
    shortVersion?: string;
    /** Parsed version information */
    versionInfo?: Record<string, unknown> | null;
    /** Release status (open or archived) */
    status?: string;
    /** Version control reference, such as a commit SHA or tag */
    ref?: string | null;
    /** Release URL */
    url?: string | null;
    /** When the release was created (ISO 8601) */
    dateCreated?: string | null;
    /** When the release went live (ISO 8601) */
    dateReleased?: string | null;
    /** When the release received its first event (ISO 8601) */
    firstEvent?: string | null;
    /** When the release received its most recent event (ISO 8601) */
    lastEvent?: string | null;
    /** Number of new issues first seen in the release */
    newGroups?: number;
    /** Number of commits in the release */
    commitCount?: number;
    /** Number of deploys of the release */
    deployCount?: number;
    /** Most recent commit in the release */
    lastCommit?: Record<string, unknown> | null;
    /** Most recent deploy of the release */
    lastDeploy?: Record<string, unknown> | null;
    /** Authors of the release's commits */
    authors?: unknown[];
    /** Release owner */
    owner?: Record<string, unknown> | null;
    /** Projects in the release */
    projects?: unknown[];
    /** Adoption stage of the release in each project */
    adoptionStages?: Record<string, unknown> | null;
};

export type RepoListResult = {
    /** Repository ID */
    id: string;
    /** Repository name */
    name: string;
    /** Repository URL */
    url: string | null;
    /** Version control provider */
    provider: Record<string, unknown>;
    /** Integration status */
    status: string;
    /** Creation date (ISO 8601) */
    dateCreated?: string;
    /** Integration ID */
    integrationId?: string;
    /** External slug (e.g. org/repo) */
    externalSlug?: string | null;
    /** External ID */
    externalId?: string | null;
    /** Organization slug */
    orgSlug?: string;
};

export type TeamListResult = {
    /** Team ID */
    id: string;
    /** Team slug */
    slug: string;
    /** Team name */
    name: string;
    /** When the team was created (ISO 8601) */
    dateCreated?: string | null;
    /** Whether the requesting user is a member of the team */
    isMember?: boolean;
    /** The requesting user's role in the team */
    teamRole?: string | null;
    /** Number of members in the team */
    memberCount?: number;
    /** Organization slug */
    orgSlug?: string;
};

export type TokenListResult = {
    /** Token ID */
    id: string;
    /** Token name */
    name: string;
    /** Scopes granted to the token */
    scopes: unknown[];
    /** Last 4 characters of the token */
    tokenLastCharacters: string | null;
    /** Creation timestamp */
    dateCreated: string;
    /** Last time the token was used, if ever */
    dateLastUsed: string | null;
    /** ID of the project the token was last used for */
    projectLastUsedId?: string | null;
    /** Full token value (create response only) */
    token?: string;
};

export type IntegrationListResult = {
    /** Integration ID */
    id: string;
    /** Integration name (e.g. GitHub org) */
    name: string;
    /** External domain (e.g. github.com/getsentry) */
    domainName: string | null;
    /** Provider */
    provider: Record<string, unknown>;
    /** Integration status */
    status: string;
    /** Status of the install in this organization */
    organizationIntegrationStatus: string;
    /** Provider-side installation ID */
    externalId?: string;
    /** Organization slug */
    orgSlug?: string;
};

export type IssueListResult = {
    /** Numeric issue ID */
    id: string;
    /** Human-readable short ID (e.g. PROJ-ABC) */
    shortId: string;
    /** Issue title */
    title: string;
    /** Function or module where the issue occurs */
    culprit?: string | null;
    /** Total number of events in the issue */
    count?: string;
    /** Number of users affected by the issue */
    userCount?: number;
    /** When the issue was first seen (ISO 8601) */
    firstSeen?: string | null;
    /** When the issue was last seen (ISO 8601) */
    lastSeen?: string | null;
    /** Severity level of the issue */
    level?: string;
    /** Issue status */
    status?: string;
    /** URL of the issue in Sentry */
    permalink?: string;
    /** Project the issue belongs to */
    project?: Record<string, unknown>;
    /** Issue metadata */
    metadata?: Record<string, unknown>;
    /** User or team the issue is assigned to */
    assignedTo?: Record<string, unknown> | null;
    /** Triage priority */
    priority?: string;
    /** Platform */
    platform?: string;
    /** Issue substatus */
    substatus?: string | null;
    /** Whether the issue is unhandled */
    isUnhandled?: boolean;
    /** Seer AI fixability score (0-1) */
    seerFixabilityScore?: number | null;
};

export type IssueEventsResult = {
    /** Internal event ID */
    id: string;
    /** Event type (error, default, transaction) */
    "event.type": string;
    /** ID of the issue the event belongs to */
    groupID?: string | null;
    /** UUID-format event ID */
    eventID: string;
    /** ID of the project the event belongs to */
    projectID?: string;
    /** Event message */
    message?: string;
    /** Event title */
    title?: string;
    /** Source location of the event, such as a file and line */
    location?: string | null;
    /** Function or module that caused the event */
    culprit?: string | null;
    /** User context of the event */
    user?: Record<string, unknown> | null;
    /** Tags attached to the event */
    tags?: unknown[];
    /** Platform of the event, such as python or javascript */
    platform?: string | null;
    /** When the event occurred (ISO 8601) */
    dateCreated?: string;
    /** Crash report attachment of the event, if any */
    crashFile?: string | null;
    /** Event metadata */
    metadata?: Record<string, unknown>;
};

export type IssueTagsResult = {
    /** Number of distinct values seen for the tag key */
    uniqueValues?: number | null;
    /** Total retained events, including missing tag values; not a lifetime count */
    totalValues?: number | null;
    /** Up to 9 values ordered by count, with nullable counts and first/last seen timestamps */
    topValues?: unknown[] | null;
    /** Tag key, with the `sentry:` prefix removed from built-in keys */
    key: string;
    /** Display label of the tag key */
    name: string;
};

export type IssueViewResult = {
    /** Numeric issue ID */
    id: string;
    /** Human-readable short ID (e.g. PROJ-ABC) */
    shortId: string;
    /** Issue title */
    title: string;
    /** Function or module where the issue occurs */
    culprit?: string | null;
    /** Total number of events in the issue */
    count?: string;
    /** Number of users affected by the issue */
    userCount?: number;
    /** When the issue was first seen (ISO 8601) */
    firstSeen?: string | null;
    /** When the issue was last seen (ISO 8601) */
    lastSeen?: string | null;
    /** Severity level of the issue */
    level?: string;
    /** Issue status */
    status?: string;
    /** URL of the issue in Sentry */
    permalink?: string;
    /** Project the issue belongs to */
    project?: Record<string, unknown>;
    /** Issue metadata */
    metadata?: Record<string, unknown>;
    /** User or team the issue is assigned to */
    assignedTo?: Record<string, unknown> | null;
    /** Triage priority */
    priority?: string;
    /** Platform */
    platform?: string;
    /** Issue substatus */
    substatus?: string | null;
    /** Whether the issue is unhandled */
    isUnhandled?: boolean;
    /** Seer AI fixability score (0-1) */
    seerFixabilityScore?: number | null;
    /** Latest event for the issue (full detail). Select named fields with `--fields event.id,event.title` to avoid pulling the whole payload; the `request` entry may include live session data. */
    event: unknown | null;
    /** Organization slug */
    org: string | null;
    /** Related Session Replay IDs */
    replayIds: unknown[];
    /** Trace context from the latest event's span tree */
    trace: Record<string, unknown> | null;
};

export type EventViewResult = {
    /** ID of the event */
    id?: string;
    /** ID of the issue the event belongs to */
    groupID?: string | null;
    /** UUID-format event ID */
    eventID: string;
    /** ID of the project the event belongs to */
    projectID?: string;
    /** Event message */
    message?: string | null;
    /** Event title */
    title?: string;
    /** Source location of the event, such as a file and line */
    location?: string | null;
    /** User context of the event */
    user?: Record<string, unknown> | null;
    /** Tags attached to the event */
    tags?: unknown[];
    /** Platform of the event, such as python or javascript */
    platform?: string | null;
    /** When Sentry received the event (ISO 8601) */
    dateReceived?: string | null;
    /** Contexts of the event, such as device, os, browser and runtime */
    contexts?: Record<string, unknown> | null;
    /** Size of the event payload in bytes */
    size?: number | null;
    /** Event interfaces, such as exception, breadcrumbs and request, each with a type and data */
    entries?: unknown[];
    /** Distribution of the release the event was sent with */
    dist?: string | null;
    /** SDK that sent the event */
    sdk?: Record<string, unknown> | null;
    /** Additional data sent with the event in its extra field */
    context?: Record<string, unknown> | null;
    /** Modules loaded when the event occurred, keyed by module name with their versions */
    packages?: Record<string, unknown>;
    /** Event type, such as error, default or transaction */
    type?: string;
    /** Event metadata */
    metadata?: Record<string, unknown>;
    /** Errors Sentry found while processing the event */
    errors?: unknown[];
    occurrence?: Record<string, unknown> | null;
    /** Metadata about changes Sentry made to the event's fields, such as data scrubbing or trimming */
    _meta?: Record<string, unknown>;
    /** Crash report attachment of the event, if any */
    crashFile?: string | null;
    /** Function or module that caused the event */
    culprit?: string | null;
    /** When the event occurred (ISO 8601) */
    dateCreated?: string;
    /** Grouping hashes calculated for the event */
    fingerprints?: unknown[];
    /** Grouping configuration used to group the event */
    groupingConfig?: Record<string, unknown>;
    /** When the transaction started, as a Unix timestamp in seconds */
    startTimestamp?: number;
    /** When the transaction ended, as a Unix timestamp in seconds */
    endTimestamp?: number;
    /** Measurements recorded for the transaction, such as web vitals, keyed by name */
    measurements?: Record<string, unknown> | null;
    /** Span operation breakdowns for the transaction, keyed by breakdown name */
    breakdowns?: Record<string, unknown> | null;
    /** Release the event was sent with. Null when the event has no release */
    release?: Record<string, unknown> | null;
    /** User feedback submitted for the event. Null when there's none */
    userReport?: Record<string, unknown> | null;
    /** Suggested updates for the SDK that sent the event */
    sdkUpdates?: unknown[];
    /** How the event's stack frames were resolved during processing, such as which source map lookup method was used */
    resolvedWith?: unknown[];
    /** ID of the next event in the issue. Null for the latest event or when adjacentEvents is collapsed */
    nextEventID?: string | null;
    /** ID of the previous event in the issue. Null for the first event or when adjacentEvents is collapsed */
    previousEventID?: string | null;
    /** Event rendered as Markdown, XML, or JSON; only returned for API requests with llmFormat */
    formatted?: Record<string, unknown>;
    /** Trace context, or null when unavailable */
    trace: Record<string, unknown> | null;
    /** Event attachments; each includes metadata and an absolute authenticated download URL */
    attachments: unknown[];
};

export type EventListResult = {
    /** Internal event ID */
    id: string;
    /** Event type (error, default, transaction) */
    "event.type": string;
    /** ID of the issue the event belongs to */
    groupID?: string | null;
    /** UUID-format event ID */
    eventID: string;
    /** ID of the project the event belongs to */
    projectID?: string;
    /** Event message */
    message?: string;
    /** Event title */
    title?: string;
    /** Source location of the event, such as a file and line */
    location?: string | null;
    /** Function or module that caused the event */
    culprit?: string | null;
    /** User context of the event */
    user?: Record<string, unknown> | null;
    /** Tags attached to the event */
    tags?: unknown[];
    /** Platform of the event, such as python or javascript */
    platform?: string | null;
    /** When the event occurred (ISO 8601) */
    dateCreated?: string;
    /** Crash report attachment of the event, if any */
    crashFile?: string | null;
    /** Event metadata */
    metadata?: Record<string, unknown>;
};

export type EventAnalyticsResult = {
    /** Outcome code: accepted, or a drop such as rate_limited or filtered */
    outcome: string;
    /** Human-readable outcome label */
    label: string;
    /** Reason within the outcome (e.g. spike_protection); accepted for accepted volume */
    reason: string;
    /** Data category (e.g. error, span) */
    category: string;
    /** Events in this slice */
    events: number;
    /** Fraction of total volume (0-1), not a percentage string */
    share: number;
    /** Drop classification: intentional or unintentional; empty for accepted */
    tags: unknown[];
};

export type FeedbackListResult = {
    /** Numeric issue ID */
    id: string;
    /** Human-readable short ID (e.g. PROJ-ABC) */
    shortId: string;
    /** Issue title */
    title: string;
    /** Function or module where the issue occurs */
    culprit?: string | null;
    /** Total number of events in the issue */
    count?: string;
    /** Number of users affected by the issue */
    userCount?: number;
    /** When the issue was first seen (ISO 8601) */
    firstSeen?: string | null;
    /** When the issue was last seen (ISO 8601) */
    lastSeen?: string | null;
    /** Severity level of the issue */
    level?: string;
    /** Issue status */
    status?: string;
    /** URL of the issue in Sentry */
    permalink?: string;
    /** Project the issue belongs to */
    project?: Record<string, unknown>;
    /** Feedback metadata */
    metadata: Record<string, unknown>;
    /** User or team the issue is assigned to */
    assignedTo?: Record<string, unknown> | null;
    /** Triage priority */
    priority?: string;
    /** Platform */
    platform?: string;
    /** Issue substatus */
    substatus?: string | null;
    /** Whether the issue is unhandled */
    isUnhandled?: boolean;
    /** Seer AI fixability score (0-1) */
    seerFixabilityScore?: number | null;
    /** Issue category discriminator */
    issueCategory: string;
    /** Issue type discriminator */
    issueType: string;
    /** Whether the feedback has been read */
    hasSeen?: boolean;
    /** Whether the latest event has attachments */
    latestEventHasAttachments?: boolean;
};

export type FeedbackViewResult = {
    /** Numeric issue ID */
    id: string;
    /** Human-readable short ID (e.g. PROJ-ABC) */
    shortId: string;
    /** Issue title */
    title: string;
    /** Function or module where the issue occurs */
    culprit?: string | null;
    /** Total number of events in the issue */
    count?: string;
    /** Number of users affected by the issue */
    userCount?: number;
    /** When the issue was first seen (ISO 8601) */
    firstSeen?: string | null;
    /** When the issue was last seen (ISO 8601) */
    lastSeen?: string | null;
    /** Severity level of the issue */
    level?: string;
    /** Issue status */
    status?: string;
    /** URL of the issue in Sentry */
    permalink?: string;
    /** Project the issue belongs to */
    project?: Record<string, unknown>;
    /** Feedback metadata */
    metadata: Record<string, unknown>;
    /** User or team the issue is assigned to */
    assignedTo?: Record<string, unknown> | null;
    /** Triage priority */
    priority?: string;
    /** Platform */
    platform?: string;
    /** Issue substatus */
    substatus?: string | null;
    /** Whether the issue is unhandled */
    isUnhandled?: boolean;
    /** Seer AI fixability score (0-1) */
    seerFixabilityScore?: number | null;
    /** Issue category discriminator */
    issueCategory: string;
    /** Issue type discriminator */
    issueType: string;
    /** Whether the feedback has been read */
    hasSeen?: boolean;
    /** Whether the latest event has attachments */
    latestEventHasAttachments?: boolean;
    /** Organization slug */
    org: string | null;
    /** Latest feedback event */
    event: unknown | null;
    /** Related Session Replay IDs */
    replayIds: unknown[];
    /** Attachments on the latest feedback event */
    attachments: unknown[];
};

export type FeedbackResolveResult = {
    /** Numeric issue ID */
    id: string;
    /** Human-readable short ID (e.g. PROJ-ABC) */
    shortId: string;
    /** Issue title */
    title: string;
    /** Function or module where the issue occurs */
    culprit?: string | null;
    /** Total number of events in the issue */
    count?: string;
    /** Number of users affected by the issue */
    userCount?: number;
    /** When the issue was first seen (ISO 8601) */
    firstSeen?: string | null;
    /** When the issue was last seen (ISO 8601) */
    lastSeen?: string | null;
    /** Severity level of the issue */
    level?: string;
    /** Issue status */
    status?: string;
    /** URL of the issue in Sentry */
    permalink?: string;
    /** Project the issue belongs to */
    project?: Record<string, unknown>;
    /** Feedback metadata */
    metadata: Record<string, unknown>;
    /** User or team the issue is assigned to */
    assignedTo?: Record<string, unknown> | null;
    /** Triage priority */
    priority?: string;
    /** Platform */
    platform?: string;
    /** Issue substatus */
    substatus?: string | null;
    /** Whether the issue is unhandled */
    isUnhandled?: boolean;
    /** Seer AI fixability score (0-1) */
    seerFixabilityScore?: number | null;
    /** Issue category discriminator */
    issueCategory: string;
    /** Issue type discriminator */
    issueType: string;
    /** Whether the feedback has been read */
    hasSeen?: boolean;
    /** Whether the latest event has attachments */
    latestEventHasAttachments?: boolean;
};

export type FeedbackUnresolveResult = {
    /** Numeric issue ID */
    id: string;
    /** Human-readable short ID (e.g. PROJ-ABC) */
    shortId: string;
    /** Issue title */
    title: string;
    /** Function or module where the issue occurs */
    culprit?: string | null;
    /** Total number of events in the issue */
    count?: string;
    /** Number of users affected by the issue */
    userCount?: number;
    /** When the issue was first seen (ISO 8601) */
    firstSeen?: string | null;
    /** When the issue was last seen (ISO 8601) */
    lastSeen?: string | null;
    /** Severity level of the issue */
    level?: string;
    /** Issue status */
    status?: string;
    /** URL of the issue in Sentry */
    permalink?: string;
    /** Project the issue belongs to */
    project?: Record<string, unknown>;
    /** Feedback metadata */
    metadata: Record<string, unknown>;
    /** User or team the issue is assigned to */
    assignedTo?: Record<string, unknown> | null;
    /** Triage priority */
    priority?: string;
    /** Platform */
    platform?: string;
    /** Issue substatus */
    substatus?: string | null;
    /** Whether the issue is unhandled */
    isUnhandled?: boolean;
    /** Seer AI fixability score (0-1) */
    seerFixabilityScore?: number | null;
    /** Issue category discriminator */
    issueCategory: string;
    /** Issue type discriminator */
    issueType: string;
    /** Whether the feedback has been read */
    hasSeen?: boolean;
    /** Whether the latest event has attachments */
    latestEventHasAttachments?: boolean;
};

export type FeedbackSpamResult = {
    /** Numeric issue ID */
    id: string;
    /** Human-readable short ID (e.g. PROJ-ABC) */
    shortId: string;
    /** Issue title */
    title: string;
    /** Function or module where the issue occurs */
    culprit?: string | null;
    /** Total number of events in the issue */
    count?: string;
    /** Number of users affected by the issue */
    userCount?: number;
    /** When the issue was first seen (ISO 8601) */
    firstSeen?: string | null;
    /** When the issue was last seen (ISO 8601) */
    lastSeen?: string | null;
    /** Severity level of the issue */
    level?: string;
    /** Issue status */
    status?: string;
    /** URL of the issue in Sentry */
    permalink?: string;
    /** Project the issue belongs to */
    project?: Record<string, unknown>;
    /** Feedback metadata */
    metadata: Record<string, unknown>;
    /** User or team the issue is assigned to */
    assignedTo?: Record<string, unknown> | null;
    /** Triage priority */
    priority?: string;
    /** Platform */
    platform?: string;
    /** Issue substatus */
    substatus?: string | null;
    /** Whether the issue is unhandled */
    isUnhandled?: boolean;
    /** Seer AI fixability score (0-1) */
    seerFixabilityScore?: number | null;
    /** Issue category discriminator */
    issueCategory: string;
    /** Issue type discriminator */
    issueType: string;
    /** Whether the feedback has been read */
    hasSeen?: boolean;
    /** Whether the latest event has attachments */
    latestEventHasAttachments?: boolean;
};

export type LogListResult = {
    /** Unique log entry ID */
    "sentry.item_id": string;
    /** Log timestamp (ISO 8601) */
    timestamp: string;
    /** Nanosecond-precision timestamp */
    timestamp_precise: number;
    /** Log message */
    message?: string | null;
    /** Severity level (error, warning, info, debug) */
    severity?: string | null;
    /** Trace ID for correlation */
    trace?: string | null;
};

export type MonitorListResult = {
    /** Monitor ID */
    id: string;
    /** Monitor slug */
    slug: string;
    /** Monitor name */
    name: string;
    /** Monitor status (e.g. active, disabled) */
    status: string;
    /** Whether the monitor is muted */
    isMuted?: boolean;
    /** Schedule configuration */
    config?: Record<string, unknown>;
    /** Creation date (ISO 8601) */
    dateCreated?: string;
    /** Owning project */
    project?: Record<string, unknown>;
    /** Organization slug */
    orgSlug?: string;
};

export type SpanListResult = {
    /** Span ID */
    span_id: string;
    /** Trace ID */
    trace_id?: string;
    /** Parent span ID */
    parent_span_id?: string | null;
    /** Span operation (e.g. http.client, db) */
    op?: string;
    /** Span description */
    description?: string | null;
    /** Duration (ms) */
    duration_ms?: number;
    /** Start time (Unix seconds) */
    start_timestamp: number;
    /** Project slug */
    project_slug?: string;
    /** Transaction name */
    transaction?: string;
};

export type TraceListResult = {
    /** Trace ID */
    trace: string;
    /** Span ID of the root span */
    id: string;
    /** Transaction name */
    transaction: string;
    /** Timestamp (ISO 8601) */
    timestamp: string;
    /** Duration (ms) */
    "span.duration": number;
    /** Project slug */
    project: string;
};

export type TrialListResult = {
    /** CLI trial name (e.g. seer), or "plan" for the plan trial */
    name: string;
    /** Trial category (e.g. seerUsers, seerAutofix) */
    category: string;
    /** Trial status */
    status: string;
    /** Days left on an active trial */
    daysRemaining: number | null;
    /** Whether the trial has started */
    isStarted: boolean;
    /** Trial duration in days */
    lengthDays: number | null;
    /** Start date (ISO 8601) */
    startDate: string | null;
    /** End date (ISO 8601) */
    endDate: string | null;
};

export type InitResult = {
    /** The setup guide's Markdown source */
    guide: string;
};

// --- Parameter types ---

export type AlertIssuesListParams = {
    /** <org>/ (all projects), <org>/<project>, or <project> (search) */
    orgProject?: string;
    /** Maximum number of issue alert rules to list */
    limit?: number;
    /** Filter rules by name */
    query?: string;
    /** Pagination cursor (use "next" for next page, "prev" for previous) */
    cursor?: string;
};

export type AlertIssuesViewParams = {
    /** Issue alert rule ID or name */
    orgProjectRuleIdOrName?: string;
};

export type AlertIssuesCreateParams = {
    /** <org>/<project>, auto-detected project, or <project> (search) */
    target?: string;
    /** Rule name */
    name: string;
    /** Trigger condition JSON or name such as first-seen (repeatable, or pass one JSON array) */
    condition?: Array<string>;
    /** Action object JSON (repeatable, or pass one JSON array) */
    action?: Array<string>;
    /** Frequency in minutes */
    frequency?: number;
    /** Environment filter */
    environment?: string;
    /** Filter object JSON (repeatable, or pass one JSON array) */
    filter?: Array<string>;
    /** Filter match mode: all or any */
    filterMatch?: string;
    /** Owner (team:user style value accepted by Sentry API) */
    owner?: string;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type AlertIssuesDeleteParams = {
    /** Rule id or name (same as view) */
    orgProjectRuleIdOrName?: string;
    /** Skip confirmation prompt */
    yes?: boolean;
    /** Force the operation without confirmation */
    force?: boolean;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type AlertIssuesEditParams = {
    /** Rule id or name (same as view) */
    orgProjectRuleIdOrName?: string;
    /** New rule name */
    name?: string;
    /** Rule status: active or disabled */
    status?: string;
    /** Trigger condition JSON or name such as first-seen (repeatable, or pass one JSON array) */
    condition?: Array<string>;
    /** Action object JSON (repeatable, or pass one JSON array) */
    action?: Array<string>;
    /** Frequency in minutes */
    frequency?: string;
    /** Environment value (pass empty string to clear) */
    environment?: string;
    /** Filter object JSON (repeatable, or pass one JSON array) */
    filter?: Array<string>;
    /** Filter match mode: all or any */
    filterMatch?: string;
    /** Owner value (pass empty string to clear) */
    owner?: string;
};

export type AlertMetricsListParams = {
    /** <org>/, <org>/<project> (project ignored), or <project> (search) */
    target?: string;
    /** Maximum number of metric alert rules to list */
    limit?: number;
    /** Filter rules by name */
    query?: string;
    /** Pagination cursor (use "next" for next page, "prev" for previous) */
    cursor?: string;
};

export type AlertMetricsViewParams = {
    /** Metric alert rule ID or name */
    orgRuleIdOrName?: string;
};

export type AlertMetricsCreateParams = {
    /** Target project or organization */
    target?: string;
    /** Rule name */
    name: string;
    /** Metric query filter string */
    query: string;
    /** Aggregate expression (for example count(), p95(span.duration)) */
    aggregate: string;
    /** Dataset: errors, events, spans, logs, metrics, sessions (error-events is errors; transaction(s) routes to spans) */
    dataset: string;
    /** Evaluation window in minutes */
    timeWindow: string;
    /** Trigger object JSON (repeatable, or pass one JSON array) */
    trigger?: Array<string>;
    /** Project slug filter (repeatable or comma-separated) */
    project?: Array<string>;
    /** Environment filter */
    environment?: string;
    /** Owner value accepted by Sentry API */
    owner?: string;
    /** Alert (workflow) id to notify (repeatable or comma-separated) */
    workflow?: Array<string>;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type AlertMetricsDeleteParams = {
    /** Rule id or name (same as view) */
    orgRuleIdOrName?: string;
    /** Skip confirmation prompt */
    yes?: boolean;
    /** Force the operation without confirmation */
    force?: boolean;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type AlertMetricsEditParams = {
    /** Rule id or name (same as view) */
    orgRuleIdOrName?: string;
    /** New rule name */
    name?: string;
    /** active or disabled */
    status?: string;
    /** Metric query filter */
    query?: string;
    /** Aggregate expression */
    aggregate?: string;
    /** Dataset: errors, events, spans, logs, metrics, sessions (error-events is errors; transaction(s) routes to spans) */
    dataset?: string;
    /** Evaluation window in minutes */
    timeWindow?: string;
    /** Trigger object JSON (repeatable, or pass one JSON array) */
    trigger?: Array<string>;
    /** Project slug filter (repeatable or comma-separated) */
    project?: Array<string>;
    /** Environment value (pass empty string to clear) */
    environment?: string;
    /** Owner value (pass empty string to clear) */
    owner?: string;
    /** Replace connected alert (workflow) ids (repeatable or comma-separated; empty string disconnects all) */
    workflow?: Array<string>;
};

export type AttributeListParams = {
    /** <org>/ (all projects), <org>/<project>, or <project> (search) */
    target?: string;
    /** Text in attribute names and/or has:<key> terms, e.g. 'gen_ai has:http.method' */
    filter?: string;
    /** Dataset to list attributes for (spans, logs, metrics) */
    dataset?: string;
    /** Only show attributes of these types: string, number, boolean, array. Repeat the flag for each type or pass a comma-separated list (e.g. --type string,number) */
    type?: Array<string>;
    /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */
    period?: string;
    /** Maximum number of attributes to list */
    limit?: number;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type AuthLoginParams = {
    /** Email of the account to add or log in to again (<email>:<server> also sets --url); the login is refused if you approve it as someone else */
    email?: string;
    /** Authenticate using an API token instead of OAuth */
    token?: string;
    /** Timeout for OAuth flow in seconds */
    timeout?: number;
    /** Replace the stored login for this server without prompting, instead of adding another account */
    force?: boolean;
    /** Sentry instance URL to authenticate against (e.g. https://sentry.example.com). Required for self-hosted; defaults to SaaS (https://sentry.io). */
    url?: string;
    /** Request only read-only OAuth scopes (project:read, org:read, event:read, member:read, team:read). Useful for handing tokens to AI agents or CI jobs that should not be able to mutate Sentry state. */
    readOnly?: boolean;
    /** Request specific OAuth scopes (repeatable, comma-separated). E.g. --scope project:read --scope org:read. Overrides the default scope set. */
    scope?: Array<string>;
};

export type AuthBootstrapParams = {
    /** Replace the stored login */
    force?: boolean;
    /** Explicit issuing Sentry instance URL */
    url?: string;
};

export type AuthLogoutParams = {
    /** Only match accounts on this server (disambiguates the same email on several servers) */
    url?: string;
};

export type AuthRefreshParams = {
    /** Force refresh even if the access token is still valid */
    force?: boolean;
    /** Re-authenticate with read-only OAuth scopes (project:read, org:read, event:read, member:read, team:read) */
    readOnly?: boolean;
    /** Re-authenticate with specific OAuth scopes (repeatable, comma-separated). E.g. --scope project:read --scope org:read */
    scope?: Array<string>;
};

export type AuthStatusParams = {
    /** Show the stored token (masked by default) */
    showToken?: boolean;
};

export type AuthSwitchParams = {
    /** Email, username, user ID, or account ID to switch to */
    account?: string;
    /** Only consider accounts on this server (disambiguates the same email on several servers) */
    url?: string;
};

export type BuildUploadParams = {
    /** Build configuration for the upload (defaults to the current version) */
    buildConfiguration?: string;
    /** Release notes for the build */
    releaseNotes?: string;
    /** Install group(s) for this build (repeatable); builds sharing a group show updates for each other */
    installGroup?: Array<string>;
    /** dSYM bundle, directory of bundles, or ZIP for a single IPA (repeatable) */
    dsym?: Array<string>;
    /** VCS commit SHA (defaults to the current commit) */
    headSha?: string;
    /** VCS base commit SHA (defaults to the merge-base with the base ref) */
    baseSha?: string;
    /** VCS provider (defaults to the current remote's provider) */
    vcsProvider?: string;
    /** Head repository name, e.g. owner/repo (defaults to the current) */
    headRepoName?: string;
    /** Base repository name, e.g. owner/repo (for forks) */
    baseRepoName?: string;
    /** Head branch/reference (defaults to the current branch) */
    headRef?: string;
    /** Base branch/reference (defaults to the merge-base tracking ref) */
    baseRef?: string;
    /** Pull request number (auto-detected in pull_request GitHub Actions runs) */
    prNumber?: string;
    /** Force collecting git metadata even outside CI (conflicts with --no-git-metadata) */
    forceGitMetadata?: boolean;
    /** Disable automatic git metadata collection */
    noGitMetadata?: boolean;
};

export type BuildDownloadParams = {
    /** ID of the build to download */
    buildId?: string;
    /** Output path (default: preprod_artifact_<build-id>.<ext> in the current directory) */
    output?: string;
};

export type CliCompletionParams = {
    /** Shell to generate completions for (bash, zsh, or fish) */
    shell?: string;
};

export type CliDefaultsParams = {
    /** Clear the specified default, or all defaults if no key is given */
    clear?: boolean;
    /** Skip confirmation prompt */
    yes?: boolean;
    /** Force the operation without confirmation */
    force?: boolean;
};

export type CliFixParams = {
    /** Show what would be fixed without making changes */
    dryRun?: boolean;
};

export type CliImportParams = {
    /** Skip confirmation prompt */
    yes?: boolean;
    /** Show what would happen without making changes */
    dryRun?: boolean;
    /** Explicitly trust this URL (bypasses same-file trust check) */
    url?: string;
    /** Skip token validation against the Sentry API */
    skipValidation?: boolean;
};

export type CliSetupParams = {
    /** Install the binary from a temp location to the system path */
    install?: boolean;
    /** Installation method (curl, brew, npm, pnpm, bun, yarn) */
    method?: string;
    /** Release channel to persist (stable or nightly) */
    channel?: string;
    /** Skip PATH modification */
    noModifyPath?: boolean;
    /** Skip shell completion installation */
    noCompletions?: boolean;
    /** Skip agent skill installation for AI coding assistants */
    noAgentSkills?: boolean;
    /** Suppress output (for scripted usage) */
    quiet?: boolean;
};

export type CliUninstallParams = {
    /** Keep the config directory (default ~/.config/sentry) and auth tokens */
    keepConfig?: boolean;
    /** Skip confirmation prompt */
    yes?: boolean;
    /** Force the operation without confirmation */
    force?: boolean;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type CliUpgradeParams = {
    /** Specific version (e.g. 0.5.0), "nightly"/"stable" to switch channel, or "undo" to return to the previous version; omit to update within current channel */
    version?: string;
    /** Check for updates without installing */
    check?: boolean;
    /** Force upgrade even if already on the latest version */
    force?: boolean;
    /** Upgrade using only cached version info and patches (no network) */
    offline?: boolean;
    /** Skip agent skill installation for AI coding assistants */
    noAgentSkills?: boolean;
    /** Installation method to use (curl, brew, npm, pnpm, bun, yarn) */
    method?: string;
};

export type CodeMappingsUploadParams = {
    /** Path to the code mappings JSON file */
    path?: string;
    /** Repository name (e.g., owner/repo). Auto-detected from git remote if omitted. */
    repo?: string;
    /** Default branch name. Auto-detected from git remote HEAD if omitted. */
    defaultBranch?: string;
};

export type AgentConversationListParams = {
    /** <org>/ (all projects), <org>/<project>, or <project> (search) */
    orgProject?: string;
    /** Number of conversations (1-1000) */
    limit?: number;
    /** Any matching span selects its conversation; totals include all spans in selected projects and time range */
    query?: string;
    /** One conversation field; prefix - for descending (default: -conversation.age; ID breaks ties) */
    sort?: "conversation.age" | "-conversation.age" | "conversation.timeSpan" | "-conversation.timeSpan" | "conversation.generationDuration" | "-conversation.generationDuration" | "conversation.errors" | "-conversation.errors" | "conversation.llmCalls" | "-conversation.llmCalls" | "conversation.toolCalls" | "-conversation.toolCalls" | "conversation.toolErrors" | "-conversation.toolErrors" | "conversation.inputTokens" | "-conversation.inputTokens" | "conversation.outputTokens" | "-conversation.outputTokens" | "conversation.totalTokens" | "-conversation.totalTokens" | "conversation.totalCost" | "-conversation.totalCost";
    /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */
    period?: string;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type DartSymbolMapUploadParams = {
    /** Path to the dart symbol map JSON file */
    path?: string;
    /** Debug ID (UUID) from the companion native debug file */
    debugId: string;
    /** Validate the file without uploading (dry-run) */
    noUpload?: boolean;
};

export type DebugFilesCheckParams = {
    /** Path to the debug information file */
    path?: string;
};

export type DebugFilesFindParams = {
    /** Only consider debug files of the given type (repeatable). Default: all */
    type?: Array<string>;
    /** Do not look for debug files in well-known locations */
    noWellKnown?: boolean;
    /** Do not look for debug files in the current directory */
    noCwd?: boolean;
    /** Add a directory to search recursively (repeatable) */
    path?: Array<string>;
};

export type DebugFilesUploadParams = {
    /** Only upload files of this type (repeatable): dsym, elf, pe, pdb, portablepdb, wasm, breakpad, sourcebundle, jvm, dxil */
    type?: Array<string>;
    /** Only upload the object with this debug id (repeatable) */
    id?: Array<string>;
    /** Fail if any --id value was not found among scanned files */
    requireAll?: boolean;
    /** Do not upload files whose only feature is debug/symbol info */
    noDebug?: boolean;
    /** Do not upload files whose only feature is unwind info */
    noUnwind?: boolean;
    /** Do not upload files whose only feature is source info */
    noSources?: boolean;
    /** Build and upload a source bundle for each file with debug info */
    includeSources?: boolean;
    /** Compute and upload Unity IL2CPP line mappings for each scanned file */
    il2cppMapping?: boolean;
    /** Also scan Xcode's DerivedData folder (macOS only) */
    derivedData?: boolean;
    /** Do not scan inside .zip archives */
    noZips?: boolean;
    /** Scan and print what would be uploaded without uploading */
    noUpload?: boolean;
    /** Wait for server-side processing and report any errors */
    wait?: boolean;
    /** Wait up to this many seconds for server-side processing */
    waitFor?: string;
};

export type DebugFilesPrintSourcesParams = {
    /** Path to the debug information file */
    path?: string;
};

export type DebugFilesBundleSourcesParams = {
    /** Path to the debug information file */
    path?: string;
    /** Output path for the source bundle ZIP (default: <path>.src.zip) */
    output?: string;
};

export type DebugFilesBundleJvmParams = {
    /** Directory containing JVM source files */
    path?: string;
    /** Output directory for the bundle ZIP */
    output: string;
    /** Debug ID (UUID) to stamp on the bundle */
    debugId: string;
    /** Additional directory names to exclude (repeatable) */
    exclude?: Array<string>;
};

export type DashboardListParams = {
    /** Maximum number of dashboards to list */
    limit?: number;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type DashboardViewParams = {
    /** Auto-refresh interval in seconds (default: 60, min: 10) */
    refresh?: string;
    /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */
    period?: string;
    /** Graphics renderer (falls back to auto when unavailable) */
    renderer?: "auto" | "kitty" | "sixel";
    /** Use the terminal-native graphics width (may fall back to ASCII for very large dashboards) */
    noGraphicsCap?: boolean;
};

export type DashboardWidgetAddParams = {
    /** Display type (big_number, line, area, bar, table, stacked_area, top_n, text, categorical_bar, details, wheel, rage_and_dead_clicks, server_tree, agents_traces_table) */
    display: string;
    /** Widget dataset (default: spans). Accepts canonical names and API synonyms: spans, error-events/errors, tracemetrics/metrics, logs, issue */
    dataset?: string;
    /** Aggregate expression (e.g. count, p95:span.duration) */
    query?: Array<string>;
    /** Search conditions filter (e.g. is:unresolved) */
    where?: string;
    /** Group-by column (repeatable) */
    groupBy?: Array<string>;
    /** Order by (prefix - for desc, e.g. -count) */
    sort?: string;
    /** Result limit */
    limit?: string;
    /** Grid column position (0-based, 0–5) */
    col?: string;
    /** Grid row position (0-based) */
    row?: string;
    /** Widget width in grid columns (1–6) */
    width?: string;
    /** Widget height in grid rows (min 1) */
    height?: string;
    /** Layout mode: sequential (append in order) or dense (fill gaps) */
    layout?: string;
};

export type DashboardWidgetEditParams = {
    /** Widget index (0-based) */
    index?: string;
    /** Widget title to match */
    title?: string;
    /** New widget title */
    newTitle?: string;
    /** Display type (big_number, line, area, bar, table, stacked_area, top_n, text, categorical_bar, details, wheel, rage_and_dead_clicks, server_tree, agents_traces_table) */
    display?: string;
    /** Widget dataset (default: spans). Accepts canonical names and API synonyms: spans, error-events/errors, tracemetrics/metrics, logs, issue */
    dataset?: string;
    /** Aggregate expression (e.g. count, p95:span.duration) */
    query?: Array<string>;
    /** Search conditions filter (e.g. is:unresolved) */
    where?: string;
    /** Group-by column (repeatable) */
    groupBy?: Array<string>;
    /** Order by (prefix - for desc, e.g. -count) */
    sort?: string;
    /** Result limit */
    limit?: string;
    /** Grid column position (0-based, 0–5) */
    col?: string;
    /** Grid row position (0-based) */
    row?: string;
    /** Widget width in grid columns (1–6) */
    width?: string;
    /** Widget height in grid rows (min 1) */
    height?: string;
};

export type DashboardWidgetDeleteParams = {
    /** Widget index (0-based) */
    index?: string;
    /** Widget title to match */
    title?: string;
    /** Skip confirmation prompt */
    yes?: boolean;
    /** Force the operation without confirmation */
    force?: boolean;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type DashboardRevisionsParams = {
    /** Maximum number of revisions to list */
    limit?: number;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type DashboardRestoreParams = {
    /** Revision ID to restore */
    revision: string;
};

export type DocsListParams = {
    /** Maximum matches to return (1-20) */
    limit?: number;
};

export type DsnListParams = {
    /** <org>/ (all projects), <org>/<project>, or <project> (search) */
    orgProject?: string;
    /** Maximum number of DSNs to list */
    limit?: number;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type OrgListParams = {
    /** Only list organizations whose slug or name fuzzy-matches this text or matches this glob */
    filter?: string;
    /** Maximum number of organizations to list */
    limit?: number;
    /** Only list organizations of this account (email, username, or account id; <who>:<server> for one server; env:SENTRY_AUTH_TOKEN) */
    account?: string;
};

export type OrgViewParams = {
    /** Organization slug (optional if auto-detected) */
    org?: string;
};

export type PlatformListParams = {
    /** Filter platforms by substring */
    search?: string;
};

export type ProjectCreateParams = {
    /** Team to create the project under */
    team?: string;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type ProjectDeleteParams = {
    /** <org>/<project> or <project> (search across orgs) */
    orgProject?: string;
    /** Skip confirmation prompt */
    yes?: boolean;
    /** Force the operation without confirmation */
    force?: boolean;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type ProjectListParams = {
    /** <org>/ (all), <org>/<name> or <name> (a project, else matching names), or a name glob (<org>/web-*) */
    orgProject?: string;
    /** Maximum number of projects to list */
    limit?: number;
    /** Filter by platform (e.g., javascript, python) */
    platform?: string;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type ProjectViewParams = {
    /** <org>/<project> or <project> (search) */
    orgProject?: string;
};

export type ProguardUploadParams = {
    /** Force a specific UUID instead of computing from file content (only valid with a single file) */
    uuid?: string;
    /** Compute and print UUIDs without uploading (dry-run) */
    noUpload?: boolean;
    /** Require at least one mapping file (error if none provided) */
    requireOne?: boolean;
};

export type ProguardUuidParams = {
    /** Path to the ProGuard mapping file */
    path?: string;
};

export type ReactNativeGradleParams = {
    /** Path to the sourcemap to upload */
    sourcemap: string;
    /** Path to the bundle to upload */
    bundle: string;
    /** Release version to publish to */
    release?: string;
    /** Distribution(s) to publish (repeatable; requires --release) */
    dist?: Array<string>;
    /** Wait for the server to fully process the uploaded files */
    wait?: boolean;
    /** Wait for processing, but at most this many seconds */
    waitFor?: string;
};

export type ReactNativeXcodeParams = {
    /** Run even in a debug configuration */
    force?: boolean;
    /** Fetch sourcemaps from the packager on simulator builds */
    allowFetch?: boolean;
    /** Packager URL to fetch from (default: http://127.0.0.1:8081/) */
    fetchFrom?: string;
    /** Path to the react-native-xcode.sh build script */
    buildScript?: string;
    /** Distribution(s) to publish (repeatable) */
    dist?: Array<string>;
    /** Wait for the server to fully process the uploaded files */
    wait?: boolean;
    /** Wait for processing, but at most this many seconds */
    waitFor?: string;
    /** Don't read the release from Xcode project files */
    noAutoRelease?: boolean;
    /** Run the C preprocessor over Info.plist (INFOPLIST_PREPROCESS) */
    allowXcodeInfoplistPreprocessing?: boolean;
};

export type ReplayListParams = {
    /** <org>/ (all projects), <org>/<project>, or <project> (search) */
    orgProject?: string;
    /** Number of replays (1-1000) */
    limit?: number;
    /** Search query (Sentry replay search syntax) */
    query?: string;
    /** Filter by environment (repeatable, comma-separated) */
    environment?: Array<string>;
    /** Sort by: date, oldest, duration, errors, activity, or a raw replay sort field */
    sort?: string;
    /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */
    period?: string;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type ReplayDownloadParams = {
    /** Output path (default: <replay-id>.rrweb.json in the current directory) */
    output?: string;
};

export type ReleaseListParams = {
    /** <org>/ (all projects), <org>/<project>, or <project> (search) */
    orgProject?: string;
    /** Maximum number of releases to list */
    limit?: number;
    /** Sort: date, sessions, users, crash_free_sessions (cfs), crash_free_users (cfu) */
    sort?: string;
    /** Filter by environment (repeatable, comma-separated) */
    environment?: Array<string>;
    /** Health stats period (e.g., 24h, 7d, 14d, 90d) */
    period?: string;
    /** Filter by status: open (default) or archived */
    status?: string;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type ReleaseViewParams = {
    /** [<org>/]<version> - Release version to view */
    orgVersion?: string;
};

export type ReleaseCreateParams = {
    /** [<org>/]<version> - Release version to create */
    orgVersion?: string;
    /** Associate with project(s), comma-separated */
    project?: string;
    /** Immediately finalize the release (set dateReleased) */
    finalize?: boolean;
    /** Git ref (branch or tag name) */
    ref?: string;
    /** URL to the release source */
    url?: string;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type ReleaseFinalizeParams = {
    /** [<org>/]<version> - Release version to finalize */
    orgVersion?: string;
    /** Custom release timestamp (ISO 8601). Defaults to now. */
    released?: string;
    /** URL for the release */
    url?: string;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type ReleaseDeleteParams = {
    /** [<org>/]<version> - Release version to delete */
    orgVersion?: string;
    /** Skip confirmation prompt */
    yes?: boolean;
    /** Force the operation without confirmation */
    force?: boolean;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type ReleaseArchiveParams = {
    /** [<org>/]<version> - Release version to archive */
    orgVersion?: string;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type ReleaseRestoreParams = {
    /** [<org>/]<version> - Release version to restore */
    orgVersion?: string;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type ReleaseDeployParams = {
    /** [<org>/]<version> - Release version */
    orgVersion?: string;
    /** Deploy environment (e.g. production) */
    environment?: string;
    /** Optional deploy name (quote multi-word names, e.g. "Deploy #42") */
    name?: string;
    /** URL for the deploy */
    url?: string;
    /** Deploy start time (ISO 8601) */
    started?: string;
    /** Deploy finish time (ISO 8601) */
    finished?: string;
    /** Deploy duration in seconds (sets started = now - time, finished = now) */
    time?: string;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type ReleaseDeploysParams = {
    /** [<org>/]<version> - Release version */
    orgVersion?: string;
};

export type ReleaseSetCommitsParams = {
    /** [<org>/]<version> - Release version */
    orgVersion?: string;
    /** Auto-discover commits via repository integration (needs a git checkout or CI repository variables) */
    auto?: boolean;
    /** Read commits from local git history */
    local?: boolean;
    /** Clear all commits from the release */
    clear?: boolean;
    /** Explicit commit as REPO@SHA or REPO@PREV..SHA (comma-separated) */
    commit?: string;
    /** Filter commits to these paths (comma-separated). Implies --local. */
    path?: string;
    /** Read the local range <ref>..HEAD (e.g. previous release tag). Implies --local. */
    from?: string;
    /** Number of commits to read with --local */
    initialDepth?: number;
};

export type RepoListParams = {
    /** <org>/ (all), <org>/<name> or <name> (a project, else matching names), or a name glob (<org>/web-*) */
    orgProject?: string;
    /** Maximum number of repositories to list */
    limit?: number;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type TeamListParams = {
    /** <org>/ (all), <org>/<name> or <name> (a project, else matching names), or a name glob (<org>/web-*) */
    orgProject?: string;
    /** Maximum number of teams to list */
    limit?: number;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type TokenListParams = {
    /** Organization slug (auto-detected if omitted) */
    org?: string;
};

export type TokenCreateParams = {
    /** [<org>/]<name> - Name of the new token */
    orgName?: string;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type TokenDeleteParams = {
    /** Skip confirmation prompt */
    yes?: boolean;
    /** Force the operation without confirmation */
    force?: boolean;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type IntegrationListParams = {
    /** <org>/ (all), <org>/<name> or <name> (a project, else matching names), or a name glob (<org>/web-*) */
    orgProject?: string;
    /** Maximum number of integrations to list */
    limit?: number;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type IntegrationDeleteParams = {
    /** Skip confirmation prompt */
    yes?: boolean;
    /** Force the operation without confirmation */
    force?: boolean;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type IssueListParams = {
    /** <org>/ (all projects), <org>/<project>, or <project> (search) */
    orgProject?: string;
    /** Search query (Sentry syntax, implicit AND; same-key OR becomes an in-list) */
    query?: string;
    /** Maximum number of issues to list */
    limit?: number;
    /** Sort by: recommended, date, new, freq, user (default: recommended on sentry.io, else date) */
    sort?: string;
    /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */
    period?: string;
    /** Pagination cursor (use "next" for next page, "prev" for previous) */
    cursor?: string;
};

export type IssueEventsParams = {
    /** Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix */
    issue?: string;
    /** Number of events (1-1000) */
    limit?: number;
    /** Search query (Sentry search syntax) */
    query?: string;
    /** Include full event body (stacktraces) */
    full?: boolean;
    /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */
    period?: string;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type IssueTagsParams = {
    /** Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix */
    issue?: string;
    /** Tag key, e.g. release, server_name, browser.name */
    key?: string;
    /** Filter to one environment (default: all environments) */
    environment?: string;
};

export type IssueExplainParams = {
    /** Force new analysis even if one exists */
    force?: boolean;
};

export type IssuePlanParams = {
    /** Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix */
    issue?: string;
    /** Force new plan even if one exists */
    force?: boolean;
};

export type IssueViewParams = {
    /** Allow --web to open more than 5 issues */
    force?: boolean;
    /** Span tree depth limit (number, "all" for unlimited, "no" to disable) */
    spans?: number;
};

export type IssueResolveParams = {
    /** Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix */
    issue?: string;
    /** Resolve in a release, next release, or commit ('<version>' | '@next' | '@commit' | '@commit:<repo>@<sha>') */
    in?: string;
};

export type IssueUnresolveParams = {
    /** Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix */
    issue?: string;
};

export type IssueArchiveParams = {
    /** Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix */
    issue?: string;
    /** Condition for unarchival: forever, auto, 30m, 10x, 10u, 10x/5m, etc. */
    until?: string;
};

export type IssueMergeParams = {
    /** Prefer this issue as the canonical parent (included in the merge if not already listed) */
    into?: string;
};

export type IssueLinkParams = {
    /** Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix */
    issue?: string;
    /** URL of an existing tracker issue or GitHub pull request */
    url?: string;
    /** Native integration ID, when multiple installations match */
    integration?: string;
    /** Sentry App slug (automatically detected for Linear URLs) */
    app?: string;
    /** Show what would happen without making changes */
    dryRun?: boolean;
    /** Additional Sentry App link form field (name=value, repeatable) */
    field?: Array<string>;
};

export type IssueUnlinkParams = {
    /** Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix */
    issue?: string;
    /** URL of an existing tracker issue or GitHub pull request */
    url?: string;
    /** Native integration ID, when multiple installations match */
    integration?: string;
    /** Sentry App slug (automatically detected for Linear URLs) */
    app?: string;
    /** Skip confirmation prompt */
    yes?: boolean;
    /** Force the operation without confirmation */
    force?: boolean;
    /** Show what would happen without making changes */
    dryRun?: boolean;
};

export type EventViewParams = {
    /** Span tree depth limit (number, "all" for unlimited, "no" to disable) */
    spans?: number;
};

export type EventListParams = {
    /** Issue: @latest, @most_frequent, <org>/ID, <org>/<project>#ID, <project>-suffix, ID, or suffix */
    issue?: string;
    /** Number of events (1-1000) */
    limit?: number;
    /** Search query (Sentry search syntax) */
    query?: string;
    /** Include full event body (stacktraces) */
    full?: boolean;
    /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */
    period?: string;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type EventSendParams = {
    /** Event message (repeat for multi-line) */
    message?: Array<string>;
    /** Arguments for message template (repeat for multiple) */
    messageArg?: Array<string>;
    /** Event severity level */
    level?: "debug" | "info" | "warning" | "error" | "fatal";
    /** Release version */
    release?: string;
    /** Distribution identifier */
    dist?: string;
    /** Environment name (e.g. production, staging) */
    env?: string;
    /** Platform identifier (default: other) */
    platform?: string;
    /** Tag as KEY:VALUE (repeat for multiple) */
    tag?: Array<string>;
    /** Extra data as KEY:VALUE (repeat for multiple) */
    extra?: Array<string>;
    /** User info as KEY:VALUE — id, email, username, ip_address, or custom */
    user?: Array<string>;
    /** Custom fingerprint part (repeat for multiple) */
    fingerprint?: Array<string>;
    /** Event timestamp (Unix epoch, ISO 8601, or RFC 2822) */
    timestamp?: string;
    /** Do not include environment variables in the event */
    noEnviron?: boolean;
    /** Path to a log file — last 100 lines are attached as breadcrumbs */
    logfile?: string;
    /** Parse 'CATEGORY: message' prefixes from logfile breadcrumbs */
    withCategories?: boolean;
    /** Send file contents as-is without parsing */
    raw?: boolean;
};

export type EventAnalyticsParams = {
    /** <org>/<project> or <project> (search) */
    orgProject?: string;
    /** Dropped-data type: errors, spans, logs, metrics */
    dataset?: string;
    /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */
    period?: string;
};

export type ExploreParams = {
    /** <org>/ (all projects), <org>/<project>, or <project> (search) */
    target?: string;
    /** API field or aggregate (repeatable). E.g., title, "count()", "p50(span.duration)" */
    field?: Array<string>;
    /** Metric name for --dataset metrics. Auto-resolves type/unit via API. */
    metric?: string;
    /** Aggregation for --metric (sum, avg, count, p50, p95, etc.) */
    agg?: string;
    /** Dataset to query (errors, spans, metrics, logs, replays; transaction(s) routes to spans) */
    dataset?: string;
    /** Search query (Sentry search syntax) */
    query?: string;
    /** Sort field (prefix with - for desc, e.g., "-count()") */
    sort?: string;
    /** Environment filter (repeatable, comma-separated) */
    environment?: Array<string>;
    /** Number of table rows (1-1000, default: 25) */
    limit?: number;
    /** Query time series (default: auto; optional bucket duration, e.g., 15m) */
    timeSeries?: string;
    /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */
    period?: string;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type FeedbackListParams = {
    /** <org>/ (all projects), <org>/<project>, or <project> (search) */
    orgProject?: string;
    /** Mailbox: unresolved, resolved, spam, or all */
    status?: "unresolved" | "resolved" | "spam" | "all";
    /** Number of feedback items (1-1000) */
    limit?: number;
    /** Search query (Sentry issue search syntax) */
    query?: string;
    /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */
    period?: string;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type FeedbackViewParams = {
    /** Feedback: @latest, numeric ID, short ID, <org>/SHORT-ID, or <org>/<project>/<suffix> */
    feedback?: string;
};

export type FeedbackResolveParams = {
    /** Feedback: @latest, numeric ID, short ID, <org>/SHORT-ID, or <org>/<project>/<suffix> */
    feedback?: string;
};

export type FeedbackUnresolveParams = {
    /** Feedback: @latest, numeric ID, short ID, <org>/SHORT-ID, or <org>/<project>/<suffix> */
    feedback?: string;
};

export type FeedbackSpamParams = {
    /** Feedback: @latest, numeric ID, short ID, <org>/SHORT-ID, or <org>/<project>/<suffix> */
    feedback?: string;
};

export type LogListParams = {
    /** Number of log entries (1-1000) */
    limit?: number;
    /** Filter query (e.g., "severity:error", "project:backend", "project:[a,b]") */
    query?: string;
    /** Stream logs (optionally specify poll interval in seconds) */
    follow?: string;
    /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */
    period?: string;
    /** Sort order: "newest" (default) or "oldest" */
    sort?: string;
};

export type McpParams = {
    /** <org>/ (an organization) or <org>/<project> to limit calls to */
    orgProject?: string;
    /** Limit every call to this organization */
    org?: string;
    /** Limit calls to this project */
    project?: string;
    /** Skills to grant, comma-separated (default: active skills; seer is left out on self-hosted) */
    skills?: string;
    /** Grant every active skill, including seer on self-hosted */
    allSkills?: boolean;
    /** Skills to remove, comma-separated */
    disableSkills?: string;
    /** Enable forward-looking tool variants and experimental features */
    experimental?: boolean;
    /** LLM provider for AI-powered search: openai, azure-openai, anthropic, or openrouter */
    agentProvider?: string;
    /** OpenAI API base URL */
    openaiBaseUrl?: string;
    /** OpenAI model (default: gpt-5) */
    openaiModel?: string;
    /** Anthropic API base URL */
    anthropicBaseUrl?: string;
    /** Anthropic model (default: claude-sonnet-4-5) */
    anthropicModel?: string;
    /** MCP server URL reported in telemetry */
    mcpUrl?: string;
};

export type MonitorRunParams = {
    /** DSN to send check-ins to (overrides SENTRY_DSN env var) */
    dsn?: string;
    /** Environment of the monitor */
    environment?: string;
    /** Upsert the monitor with this crontab schedule (e.g. '0 * * * *') */
    schedule?: string;
    /** Minutes after the expected check-in before it is missed (requires --schedule) */
    checkInMargin?: string;
    /** Minutes a check-in may run before timing out (requires --schedule) */
    maxRuntime?: string;
    /** Timezone of the schedule, tz database string (requires --schedule) */
    timezone?: string;
    /** Consecutive failures before an issue is created (requires --schedule) */
    failureIssueThreshold?: string;
    /** Consecutive successes before an issue is resolved (requires --schedule) */
    recoveryThreshold?: string;
};

export type MonitorListParams = {
    /** <org>/ (all), <org>/<name> or <name> (a project, else matching names), or a name glob (<org>/web-*) */
    orgProject?: string;
    /** Maximum number of monitors to list */
    limit?: number;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type SnapshotsDiffParams = {
    /** Path to the baseline image directory */
    baseDir?: string;
    /** Path to the head image directory */
    headDir?: string;
    /** Directory for diff mask images (default: ./diff-output/) */
    output?: string;
    /** Pixel color difference threshold (0.0-1.0) */
    threshold?: number;
    /** Disable antialiasing detection */
    noAntialiasing?: boolean;
    /** Exit non-zero if any diffs (changed/added/removed/errored) are found */
    failOnDiff?: boolean;
    /** Treat images missing from head as skipped instead of removed */
    selective?: boolean;
};

export type SnapshotsDownloadParams = {
    /** App identifier (e.g. my-app) to resolve the latest baseline; mutually exclusive with --snapshot-id */
    appId?: string;
    /** Direct snapshot artifact ID; mutually exclusive with --app-id */
    snapshotId?: string;
    /** Git branch filter (only with --app-id) */
    branch?: string;
    /** Directory for extracted images (default: ./snapshots-base/) */
    output?: string;
};

export type SnapshotsUploadParams = {
    /** Path to the folder containing images to upload */
    path?: string;
    /** The application identifier */
    appId: string;
    /** Only report an image as changed when its difference exceeds this fraction (0.0–1.0, e.g. 0.01 = 1%) */
    diffThreshold?: string;
    /** This upload contains only a subset of images (removals/renames won't be detected on PRs) */
    selective?: boolean;
    /** Comma-separated list of all image names in the full suite (for selective uploads; implies --selective) */
    allImageFileNames?: string;
    /** Path to a file listing all image names, one per line (for selective uploads; implies --selective) */
    allImageFileNamesFile?: string;
    /** VCS commit SHA (defaults to the current commit) */
    headSha?: string;
    /** VCS base commit SHA (defaults to the merge-base with the base ref) */
    baseSha?: string;
    /** VCS provider (defaults to the current remote's provider) */
    vcsProvider?: string;
    /** Head repository name, e.g. owner/repo (defaults to the current) */
    headRepoName?: string;
    /** Base repository name, e.g. owner/repo (for forks) */
    baseRepoName?: string;
    /** Head branch/reference (defaults to the current branch) */
    headRef?: string;
    /** Base branch/reference (defaults to the merge-base tracking ref) */
    baseRef?: string;
    /** Pull request number (auto-detected in pull_request GitHub Actions runs) */
    prNumber?: string;
    /** Force collecting git metadata even outside CI (conflicts with --no-git-metadata) */
    forceGitMetadata?: boolean;
    /** Disable automatic git metadata collection */
    noGitMetadata?: boolean;
};

export type SourcemapInjectParams = {
    /** Directory to scan for JS + sourcemap pairs */
    directory?: string;
    /** Comma-separated file extensions to process (default: .js,.cjs,.mjs) */
    ext?: string;
    /** Comma-separated glob patterns to exclude (gitignore-style) */
    ignore?: string;
    /** Path to a file with gitignore-style patterns to exclude */
    ignoreFile?: string;
    /** Show what would be modified without writing */
    dryRun?: boolean;
    /** Exit successfully when no JS + sourcemap pairs are found (default: error out to catch silent build misconfigurations) */
    allowEmpty?: boolean;
};

export type SourcemapUploadParams = {
    /** Directory containing sourcemaps, or a glob like 'dist/**' */
    directory?: string;
    /** Release version to associate with the upload */
    release?: string;
    /** Distribution identifier to disambiguate builds within a release */
    dist?: string;
    /** URL prefix for uploaded files */
    urlPrefix?: string;
    /** Comma-separated file extensions to process (default: .js,.cjs,.mjs) */
    ext?: string;
    /** Comma-separated glob patterns to exclude (gitignore-style) */
    ignore?: string;
    /** Path to a file with gitignore-style patterns to exclude */
    ignoreFile?: string;
    /** Strip a prefix from uploaded file paths (e.g. 'build/') */
    stripPrefix?: string;
    /** Automatically strip the longest common path prefix from all files */
    stripCommonPrefix?: boolean;
    /** Upload files as-is without injecting debug IDs */
    noRewrite?: boolean;
    /** Exit successfully when no JS + sourcemap pairs are found (default: error out to catch silent build misconfigurations) */
    allowEmpty?: boolean;
};

export type SourcemapResolveParams = {
    /** Directory to scan for JS files */
    directory?: string;
    /** Comma-separated file extensions to process (default: .js,.cjs,.mjs) */
    ext?: string;
    /** Comma-separated glob patterns to exclude (gitignore-style) */
    ignore?: string;
    /** Path to a file with gitignore-style patterns to exclude */
    ignoreFile?: string;
};

export type SpanListParams = {
    /** Number of spans (<=1000) */
    limit?: number;
    /** Filter spans (e.g., "op:db", "project:backend", "project:[cli,api]") */
    query?: string;
    /** Sort order: date, duration */
    sort?: string;
    /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */
    period?: string;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type SpanViewParams = {
    /** Span tree depth limit (number, "all" for unlimited, "no" to disable) */
    spans?: number;
};

export type StatusShowParams = {
    /** Status page base URL to query */
    url?: string;
};

export type TraceListParams = {
    /** <org>/<project> or <project> (search) */
    orgProject?: string;
    /** Number of traces (1-1000) */
    limit?: number;
    /** Search query (Sentry search syntax) */
    query?: string;
    /** Sort by: date, duration */
    sort?: string;
    /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */
    period?: string;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
};

export type TraceViewParams = {
    /** Fetch full span attributes (auto-enabled with --json) */
    full?: boolean;
    /** Span tree depth limit (number, "all" for unlimited, "no" to disable) */
    spans?: number;
};

export type TraceLogsParams = {
    /** Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" */
    period?: string;
    /** Number of log entries (<=1000) */
    limit?: number;
    /** Filter query (e.g., "severity:error", "project:backend", "project:[a,b]") */
    query?: string;
    /** Sort order: "newest" (default) or "oldest" */
    sort?: string;
};

export type TrialListParams = {
    /** Organization slug (auto-detected if omitted) */
    org?: string;
};

export type InfoParams = {
    /** Emit configuration + auth status as JSON (for external tooling); always exits 0 */
    configStatusJson?: boolean;
    /** Verify only authentication, without requiring a default org/project */
    noDefaults?: boolean;
};

export type LocalDaemonStartParams = {
    /** Run in the foreground */
    foreground?: boolean;
    /** Loopback host */
    host?: string;
    /** Control-plane port */
    port?: number;
};

export type LocalServeParams = {
    /** Port to listen on */
    port?: number;
    /** Hostname to bind to */
    host?: string;
    /** Suppress per-envelope tail output */
    quiet?: boolean;
    /** Only show items of this type (repeatable: error, transaction, log, ai) */
    filter?: Array<string>;
    /** Output format: human (default) or json (NDJSON on stdout) */
    format?: string;
    /** Show a grouped attribute table (user vs SDK) under each transaction */
    attributes?: boolean;
    /** Open Sentry Local UI in the browser */
    open?: boolean;
    /** Maximum envelopes retained by this receiver or session */
    maxEnvelopes?: string;
    /** Create a daemon-owned telemetry session with this label */
    session?: string;
};

export type LocalSessionCreateParams = {
    /** Idempotency key for retried agent session creation */
    clientId?: string;
    /** Loopback host */
    host?: string;
    /** Control-plane port */
    port?: number;
    /** Maximum envelopes retained by this receiver or session */
    maxEnvelopes?: number;
};

export type LocalSessionRetentionParams = {
    /** Maximum envelopes retained by this receiver or session */
    maxEnvelopes?: string;
};

export type LocalRunParams = {
    /** Port for the local server */
    port?: number;
    /** Hostname for the local server */
    host?: string;
    /** Only show items of this type (repeatable: error, transaction, log, ai) */
    filter?: Array<string>;
    /** Verify SDK sends events, then exit */
    verify?: boolean;
    /** Kill the child after N seconds (0 = no timeout; defaults to 30 s in --verify mode) */
    timeout?: number;
    /** Output format: human (default) or json (NDJSON on stdout) */
    format?: string;
    /** Include selected event attributes in output */
    attributes?: boolean;
    /** Open Sentry Local UI in the browser */
    open?: boolean;
    /** Maximum envelopes retained by this receiver or session */
    maxEnvelopes?: string;
    /** Create a daemon-owned telemetry session with this label */
    session?: string;
};

export type ApiParams = {
    /** API endpoint relative to /api/0/, or an absolute HTTP(S) URL */
    endpoint?: string;
    /** The HTTP method for the request */
    method?: string;
    /** Navigate pages: "next", "prev", "first" (or raw cursor string) */
    cursor?: string;
    /** Inline JSON body for the request (like curl -d) */
    data?: string;
    /** Add a typed parameter (key=value, key[sub]=value, key[]=value) */
    field?: Array<string>;
    /** Add a string parameter without JSON parsing */
    rawField?: Array<string>;
    /** Add a HTTP request header in key:value format */
    header?: Array<string>;
    /** The file to use as body for the HTTP request (use "-" to read from standard input) */
    input?: string;
    /** Do not print the response body */
    silent?: boolean;
    /** Show the resolved request without sending it */
    dryRun?: boolean;
};

export type SchemaParams = {
    /** Show all endpoints in a flat list */
    all?: boolean;
    /** Search endpoints by keyword */
    search?: string;
};

export type WasmSplitParams = {
    /** Path to the wasm file */
    input?: string;
    /** Path to the output wasm file (default: modify input in place) */
    out?: string;
    /** Path to the output debug wasm file (default: debug data stays in the input) */
    debugOut?: string;
    /** Strip the file of debug info */
    strip?: boolean;
    /** Strip the file of symbol names (only with --strip) */
    stripNames?: boolean;
    /** Do not print the build id */
    quiet?: boolean;
    /** Explicit build id to use, as a UUID */
    buildId?: string;
    /** URL for browsers to fetch the separate DWARF debug symbol file */
    externalDwarfUrl?: string;
};

// --- SDK type ---

export type SentrySDK = {
    /** Display help for a command */
    help(...positional: string[]): Promise<unknown>;
    /** Query aggregate event data (Explore) */
    explore(params?: ExploreParams): Promise<unknown>;
    /** Start a local Sentry MCP server */
    mcp(params?: McpParams): Promise<unknown>;
    /** Print instructions for a coding agent to set up Sentry */
    init(): Promise<InitResult>;
    /** Print configuration and verify authentication */
    info(params?: InfoParams): Promise<unknown>;
    /** Make an authenticated API request */
    api(params?: ApiParams): Promise<unknown>;
    /** Browse the Sentry API schema */
    schema(params?: SchemaParams, ...positional: string[]): Promise<unknown>;
    /** Add build ids to WebAssembly modules and split out debug data */
    "wasm-split"(params?: WasmSplitParams): Promise<unknown>;
    alert: {
        issues: {
            /** List issue alert rules */
            list(params?: AlertIssuesListParams): Promise<unknown>;
            /** View an issue alert rule */
            view(params?: AlertIssuesViewParams): Promise<unknown>;
            /** Create an issue alert rule */
            create(params: AlertIssuesCreateParams): Promise<AlertIssuesCreateResult>;
            /** Delete an issue alert rule */
            delete(params?: AlertIssuesDeleteParams): Promise<AlertIssuesDeleteResult>;
            /** Edit an issue alert rule */
            edit(params?: AlertIssuesEditParams): Promise<AlertIssuesEditResult>;
        };
        metrics: {
            /** List metric alert rules */
            list(params?: AlertMetricsListParams): Promise<unknown>;
            /** View a metric alert rule */
            view(params?: AlertMetricsViewParams): Promise<unknown>;
            /** Create a metric alert rule */
            create(params: AlertMetricsCreateParams): Promise<AlertMetricsCreateResult>;
            /** Delete a metric alert rule */
            delete(params?: AlertMetricsDeleteParams): Promise<AlertMetricsDeleteResult>;
            /** Edit a metric alert rule */
            edit(params?: AlertMetricsEditParams): Promise<AlertMetricsEditResult>;
        };
    };
    attribute: {
        /** List attribute keys for spans, logs, or metrics */
        list(params?: AttributeListParams): Promise<unknown>;
    };
    auth: {
        /** List stored accounts */
        list(): Promise<AuthListResult>;
        /** Authenticate with Sentry */
        login(params?: AuthLoginParams): Promise<unknown>;
        /** Authenticate using a one-time setup code */
        bootstrap(params?: AuthBootstrapParams): Promise<AuthBootstrapResult>;
        /** Log out of Sentry */
        logout(params?: AuthLogoutParams, ...positional: string[]): Promise<unknown>;
        /** Refresh your OAuth access token */
        refresh(params?: AuthRefreshParams): Promise<unknown>;
        /** View authentication status */
        status(params?: AuthStatusParams): Promise<unknown>;
        /** Switch the active account */
        switch(params?: AuthSwitchParams): Promise<unknown>;
        /** Print the stored authentication token */
        token(): Promise<unknown>;
        /** Show the currently authenticated identity */
        whoami(): Promise<unknown>;
    };
    build: {
        /** Upload builds to a project */
        upload(params?: BuildUploadParams, ...positional: string[]): Promise<unknown>;
        /** Download a build artifact */
        download(params?: BuildDownloadParams): Promise<unknown>;
    };
    cli: {
        /** Print the shell completion script */
        completion(params?: CliCompletionParams): Promise<unknown>;
        /** View and manage default settings */
        defaults(params?: CliDefaultsParams, ...positional: string[]): Promise<unknown>;
        /** Send feedback about the CLI */
        feedback(...positional: string[]): Promise<unknown>;
        /** Diagnose and repair CLI database issues */
        fix(params?: CliFixParams): Promise<unknown>;
        /** Import settings from legacy .sentryclirc files */
        import(params?: CliImportParams): Promise<unknown>;
        /** Configure shell integration */
        setup(params?: CliSetupParams): Promise<unknown>;
        /** Uninstall Sentry CLI */
        uninstall(params?: CliUninstallParams): Promise<unknown>;
        /** Update the Sentry CLI to the latest version */
        upgrade(params?: CliUpgradeParams): Promise<unknown>;
    };
    "code-mappings": {
        /** Upload code mappings for stack trace linking */
        upload(params?: CodeMappingsUploadParams): Promise<unknown>;
    };
    "agent-conversation": {
        /** List recent agent conversations */
        list(params?: AgentConversationListParams): Promise<AgentConversationListResult>;
        /** View an agent conversation transcript */
        view(...positional: string[]): Promise<unknown>;
    };
    "dart-symbol-map": {
        /** Upload a Dart/Flutter symbol map to Sentry */
        upload(params: DartSymbolMapUploadParams): Promise<unknown>;
    };
    "debug-files": {
        /** Inspect a debug information file */
        check(params?: DebugFilesCheckParams): Promise<unknown>;
        /** Locate debug files for given debug identifiers */
        find(params?: DebugFilesFindParams, ...positional: string[]): Promise<unknown>;
        /** Upload debug information files to Sentry */
        upload(params?: DebugFilesUploadParams, ...positional: string[]): Promise<unknown>;
        /** List the source files a debug file references */
        "print-sources"(params?: DebugFilesPrintSourcesParams): Promise<unknown>;
        /** Bundle a debug file's source files for source context */
        "bundle-sources"(params?: DebugFilesBundleSourcesParams): Promise<unknown>;
        /** Create a JVM source bundle for source context */
        "bundle-jvm"(params: DebugFilesBundleJvmParams): Promise<unknown>;
    };
    dashboard: {
        /** List dashboards */
        list(params?: DashboardListParams, ...positional: string[]): Promise<DashboardListResult>;
        /** View a dashboard */
        view: {
            (params: DashboardViewParams & { refresh: string; }, ...positional: string[]): AsyncIterable<unknown>;
            (params?: DashboardViewParams, ...positional: string[]): Promise<DashboardViewResult>;
        };
        /** Create a dashboard */
        create(...positional: string[]): Promise<DashboardCreateResult>;
        /** List dashboard revisions */
        revisions(params?: DashboardRevisionsParams, ...positional: string[]): Promise<DashboardRevisionsResult>;
        /** Restore a dashboard revision */
        restore(params: DashboardRestoreParams, ...positional: string[]): Promise<DashboardRestoreResult>;
        widget: {
            /** Add a widget to a dashboard */
            add(params: DashboardWidgetAddParams, ...positional: string[]): Promise<DashboardWidgetAddResult>;
            /** Edit a widget in a dashboard */
            edit(params?: DashboardWidgetEditParams, ...positional: string[]): Promise<DashboardWidgetEditResult>;
            /** Delete a widget from a dashboard */
            delete(params?: DashboardWidgetDeleteParams, ...positional: string[]): Promise<DashboardWidgetDeleteResult>;
        };
    };
    docs: {
        /** Find Sentry documentation pages by keyword */
        list(params?: DocsListParams, ...positional: string[]): Promise<unknown>;
        /** Ask a cited question about Sentry documentation */
        query(...positional: string[]): Promise<unknown>;
    };
    dsn: {
        /** List DSNs */
        list(params?: DsnListParams): Promise<unknown>;
    };
    org: {
        /** List organizations */
        list(params?: OrgListParams): Promise<OrgListResult>;
        /** View details of an organization */
        view(params?: OrgViewParams): Promise<OrgViewResult>;
    };
    platform: {
        /** List all valid Sentry platform identifiers */
        list(params?: PlatformListParams): Promise<unknown>;
    };
    project: {
        /** Create one or more projects */
        create(params?: ProjectCreateParams, ...positional: string[]): Promise<unknown>;
        /** Delete a project */
        delete(params?: ProjectDeleteParams): Promise<unknown>;
        /** List projects */
        list(params?: ProjectListParams): Promise<ProjectListResult>;
        /** View details of a project */
        view(params?: ProjectViewParams): Promise<ProjectViewResult>;
    };
    proguard: {
        /** Upload ProGuard/R8 mapping files to Sentry */
        upload(params?: ProguardUploadParams, ...positional: string[]): Promise<unknown>;
        /** Compute the UUID for a ProGuard mapping file */
        uuid(params?: ProguardUuidParams): Promise<unknown>;
    };
    "react-native": {
        /** Upload a React Native bundle + sourcemap (Gradle build step) */
        gradle(params: ReactNativeGradleParams): Promise<unknown>;
        /** Upload React Native sourcemaps (Xcode build step) */
        xcode(params?: ReactNativeXcodeParams, ...positional: string[]): Promise<unknown>;
    };
    replay: {
        /** List recent Session Replays */
        list(params?: ReplayListParams): Promise<ReplayListResult>;
        /** View a Session Replay */
        view(...positional: string[]): Promise<ReplayViewResult>;
        /** Download a Session Replay as rrweb JSON */
        download(params?: ReplayDownloadParams, ...positional: string[]): Promise<unknown>;
    };
    release: {
        /** List releases with adoption and health metrics */
        list(params?: ReleaseListParams): Promise<ReleaseListResult>;
        /** View release details with health metrics */
        view(params?: ReleaseViewParams): Promise<ReleaseViewResult>;
        /** Create a release */
        create(params?: ReleaseCreateParams): Promise<ReleaseCreateResult>;
        /** Finalize a release */
        finalize(params?: ReleaseFinalizeParams): Promise<ReleaseFinalizeResult>;
        /** Delete a release */
        delete(params?: ReleaseDeleteParams): Promise<ReleaseDeleteResult>;
        /** Archive a release */
        archive(params?: ReleaseArchiveParams): Promise<ReleaseArchiveResult>;
        /** Restore an archived release */
        restore(params?: ReleaseRestoreParams): Promise<ReleaseRestoreResult>;
        /** Create a deploy for a release */
        deploy(params?: ReleaseDeployParams): Promise<ReleaseDeployResult>;
        /** List deploys for a release */
        deploys(params?: ReleaseDeploysParams): Promise<ReleaseDeploysResult>;
        /** Set commits for a release */
        "set-commits"(params?: ReleaseSetCommitsParams): Promise<ReleaseSetCommitsResult>;
        /** Propose a release version */
        "propose-version"(): Promise<unknown>;
    };
    repo: {
        /** List repositories */
        list(params?: RepoListParams): Promise<RepoListResult>;
    };
    team: {
        /** List teams */
        list(params?: TeamListParams): Promise<TeamListResult>;
    };
    token: {
        /** List org auth tokens */
        list(params?: TokenListParams): Promise<TokenListResult>;
        /** Create an org auth token */
        create(params?: TokenCreateParams): Promise<unknown>;
        /** Revoke an org auth token */
        delete(params?: TokenDeleteParams, ...positional: string[]): Promise<unknown>;
    };
    integration: {
        /** List installed integrations */
        list(params?: IntegrationListParams): Promise<IntegrationListResult>;
        /** Remove an installed integration */
        delete(params?: IntegrationDeleteParams, ...positional: string[]): Promise<unknown>;
    };
    issue: {
        /** List issues in a project */
        list(params?: IssueListParams): Promise<IssueListResult>;
        /** List events for a specific issue */
        events(params?: IssueEventsParams): Promise<IssueEventsResult>;
        /** Show the top values of an issue tag */
        tags(params?: IssueTagsParams): Promise<IssueTagsResult>;
        /** Analyze one or more issues using Seer AI */
        explain(params?: IssueExplainParams, ...positional: string[]): Promise<unknown>;
        /** Generate a solution plan using Seer AI */
        plan(params?: IssuePlanParams): Promise<unknown>;
        /** View details of one or more issues */
        view(params?: IssueViewParams, ...positional: string[]): Promise<IssueViewResult>;
        /** Mark an issue as resolved */
        resolve(params?: IssueResolveParams): Promise<unknown>;
        /** Reopen a resolved issue */
        unresolve(params?: IssueUnresolveParams): Promise<unknown>;
        /** Archive (ignore) an issue */
        archive(params?: IssueArchiveParams): Promise<unknown>;
        /** Merge 2+ issues into a single canonical group */
        merge(params?: IssueMergeParams, ...positional: string[]): Promise<unknown>;
        /** Link an existing external issue */
        link(params?: IssueLinkParams): Promise<unknown>;
        /** Unlink an external issue */
        unlink(params?: IssueUnlinkParams): Promise<unknown>;
    };
    event: {
        /** View details of one or more events */
        view(params?: EventViewParams, ...positional: string[]): Promise<EventViewResult>;
        /** List events for an issue */
        list(params?: EventListParams): Promise<EventListResult>;
        /** Send a Sentry event */
        send(params?: EventSendParams, ...positional: string[]): Promise<unknown>;
        /** Analytics for events Sentry accepted and dropped */
        analytics(params?: EventAnalyticsParams): Promise<EventAnalyticsResult>;
    };
    feedback: {
        /** List and search User Feedback */
        list(params?: FeedbackListParams): Promise<FeedbackListResult>;
        /** View a User Feedback item */
        view(params?: FeedbackViewParams): Promise<FeedbackViewResult>;
        /** Mark User Feedback as resolved */
        resolve(params?: FeedbackResolveParams): Promise<FeedbackResolveResult>;
        /** Return User Feedback to the inbox */
        unresolve(params?: FeedbackUnresolveParams): Promise<FeedbackUnresolveResult>;
        /** Mark User Feedback as spam */
        spam(params?: FeedbackSpamParams): Promise<FeedbackSpamResult>;
    };
    log: {
        /** List logs from a project */
        list: {
            (params: LogListParams & { follow: string; }, ...positional: string[]): AsyncIterable<unknown>;
            (params?: LogListParams, ...positional: string[]): Promise<LogListResult>;
        };
        /** View details of one or more log entries */
        view(...positional: string[]): Promise<unknown>;
    };
    monitor: {
        /** Wrap a command with cron monitor check-ins */
        run(params?: MonitorRunParams, ...positional: string[]): Promise<unknown>;
        /** List cron monitors */
        list(params?: MonitorListParams): Promise<MonitorListResult>;
    };
    snapshots: {
        /** Compare two directories of snapshot images */
        diff(params?: SnapshotsDiffParams): Promise<unknown>;
        /** Download baseline snapshot images */
        download(params?: SnapshotsDownloadParams): Promise<unknown>;
        /** Upload snapshots to a project */
        upload(params: SnapshotsUploadParams): Promise<unknown>;
    };
    sourcemap: {
        /** Inject debug IDs into JavaScript files and sourcemaps */
        inject(params?: SourcemapInjectParams): Promise<unknown>;
        /** Upload sourcemaps to Sentry */
        upload(params?: SourcemapUploadParams): Promise<unknown>;
        /** Resolve and report sourcemap linkage for JavaScript files */
        resolve(params?: SourcemapResolveParams): Promise<unknown>;
    };
    span: {
        /** List spans in a project or trace */
        list(params?: SpanListParams, ...positional: string[]): Promise<SpanListResult>;
        /** View details of specific spans */
        view(params?: SpanViewParams, ...positional: string[]): Promise<unknown>;
    };
    status: {
        /** Show Sentry service status */
        show(params?: StatusShowParams): Promise<unknown>;
    };
    trace: {
        /** List recent traces in a project */
        list(params?: TraceListParams): Promise<TraceListResult>;
        /** View details of a specific trace */
        view(params?: TraceViewParams, ...positional: string[]): Promise<unknown>;
        /** View logs associated with a trace */
        logs(params?: TraceLogsParams, ...positional: string[]): Promise<unknown>;
    };
    trial: {
        /** List product trials */
        list(params?: TrialListParams): Promise<TrialListResult>;
        /** Start a product trial */
        start(...positional: string[]): Promise<unknown>;
    };
    local: {
        /** Start the local dev server and tail events */
        serve(params?: LocalServeParams): Promise<unknown>;
        /** Run a command with the local dev server enabled */
        run(params?: LocalRunParams, ...positional: string[]): Promise<unknown>;
        daemon: {
            /** Start the Local control-plane daemon */
            start(params?: LocalDaemonStartParams): Promise<unknown>;
            /** Show Local control-plane status */
            status(): Promise<unknown>;
            /** Stop the Local control-plane daemon */
            stop(): Promise<unknown>;
            /** Restart the Local control-plane daemon */
            restart(): Promise<unknown>;
        };
        envelope: {
            /** List retained envelopes for a Local session */
            list(...positional: string[]): Promise<unknown>;
            /** View a raw Local envelope */
            view(...positional: string[]): Promise<unknown>;
        };
        event: {
            /** List decoded events for a Local session */
            list(...positional: string[]): Promise<unknown>;
            /** View a decoded Local event */
            view(...positional: string[]): Promise<unknown>;
        };
        session: {
            /** Create a Local telemetry session */
            create(params?: LocalSessionCreateParams, ...positional: string[]): Promise<unknown>;
            /** View or change session envelope retention */
            retention(params?: LocalSessionRetentionParams, ...positional: string[]): Promise<unknown>;
            /** List Local telemetry sessions */
            list(): Promise<unknown>;
            /** View a Local telemetry session */
            view(...positional: string[]): Promise<unknown>;
            /** Close a Local telemetry session */
            close(...positional: string[]): Promise<unknown>;
            /** Clear a Local telemetry session */
            reset(...positional: string[]): Promise<unknown>;
        };
    };
};

