import { AuthError, Errors, ResolveTokenInput } from "@theholocron/cli"; import { SentryClient, SentryClientOptions, createSentryClient } from "@theholocron/sentry-client"; //#region src/auth.d.ts declare const resolveToken: (input?: ResolveTokenInput) => string; //#endregion //#region src/capabilities/errors.d.ts interface SentryErrorsOptions { /** Sentry organization slug. Required for `whoami` and `ensureProject`. */ org?: string; /** Default team slug for project creation. Defaults to org slug. */ team?: string; } declare class SentryErrors implements Errors { private readonly client; private readonly opts; readonly key: "errors"; readonly providerName = "sentry"; constructor(client: () => SentryClient, opts: SentryErrorsOptions); describe(): Promise<{ provider: string; envKeys: string[]; }>; whoami(): Promise<{ org: string; }>; ensureProject(input: { name: string; platform?: string; }): Promise<{ dsn: string; alreadyExists: boolean; }>; /** * `org` is optional at construction (the `errors` capability activates from * env vars alone), but the management-API calls need it. Validate here so * the runtime is never blocked at plugin-load time. */ private requireOrg; } //#endregion //#region src/verify-token.d.ts interface VerifyTokenSuccess { ok: true; subject: string; } interface VerifyTokenFailure { ok: false; message: string; } type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure; interface VerifyTokenOptions { baseUrl?: string; fetch?: typeof fetch; } declare function verifyToken(token: string, opts?: VerifyTokenOptions): Promise; //#endregion //#region src/index.d.ts interface SentryPluginOptions extends ResolveTokenInput, SentryErrorsOptions { /** * Sentry organization slug. Optional at load time — the `errors` capability * activates from env vars alone — but required for `whoami` / `ensureProject` * (validated at call time, not construction). */ org?: string; /** Override base URL for tests. */ baseUrl?: string; fetch?: typeof fetch; } interface PluginContext { options: SentryPluginOptions; client: () => SentryClient; } declare function createContext(options: SentryPluginOptions): PluginContext; declare function errors(ctx: PluginContext): Errors; declare function createPlugin(options: SentryPluginOptions): { name: string; capabilities: { errors: () => Errors; }; }; declare const AUTH_HINT: string; //#endregion export { AUTH_HINT, AuthError, PluginContext, type ResolveTokenInput, type SentryClient, type SentryClientOptions, SentryErrors, type SentryErrorsOptions, SentryPluginOptions, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, createContext, createPlugin, createSentryClient, errors, resolveToken, verifyToken };