import type { JsonObject } from "type-fest"; import * as z from "zod"; /** Scalar values accepted by Discord query parameters. */ type DiscordQueryValue = boolean | number | string | undefined; export interface DiscordRequestOptions { body?: unknown; method?: "DELETE" | "GET" | "PATCH" | "POST" | "PUT"; query?: Record; reason?: string; responseSchema: TSchema; } interface DiscordApiErrorOptions { code: number | string; global?: boolean; path: string; providerMessage?: string; retryAfter?: number; status: number; } /** Structured Discord REST failure retained by automation runs. */ export declare class DiscordApiError extends Error { readonly code: number | string; readonly details: JsonObject; readonly global: boolean; readonly path: string; readonly providerMessage?: string; readonly retryAfter?: number; readonly status: number; /** * Creates a structured Discord REST failure. * * @param options - Provider response metadata. */ constructor(options: DiscordApiErrorOptions); } /** * Creates an authenticated Discord REST client for packaged actions. * * @param secret - Connected Discord account secret. */ export declare function getDiscordApi(secret: Record): { request: (path: string, options: DiscordRequestOptions) => Promise>; }; export {}; //# sourceMappingURL=api.d.ts.map