import { AuthError, ResolveTokenInput, Tooling, ToolingDoctorReport } from "@theholocron/cli"; import { PostmanClient, PostmanClient as PostmanClient$1, PostmanClientOptions, PostmanCollection, PostmanEnvironment, PostmanPlanLimitError, PostmanSpec, PostmanUser, PostmanWorkspace, createPostmanClient, detectPlanLimit } from "@theholocron/postman-client"; //#region src/auth.d.ts declare const resolveToken: (input?: ResolveTokenInput) => string; //#endregion //#region src/capabilities/tooling.d.ts interface PostmanToolingOptions { workspaceId: string; /** Local OpenAPI JSON path (relative to repoRoot). */ specFile?: string; /** Display name in Postman. Defaults to the OpenAPI spec's `info.title`. */ specName?: string; /** Collection name to import the spec as. Defaults to specName. */ collectionName?: string; /** Local Postman environment JSON files to push (relative to repoRoot). */ envFiles?: string[]; /** Working repo root. Defaults to process.cwd(). */ repoRoot?: string; } declare class PostmanTooling implements Tooling { private readonly client; readonly key: "tooling"; readonly providerName = "postman"; private readonly opts; private readonly repoRoot; constructor(client: () => PostmanClient$1, opts: PostmanToolingOptions); sync(): Promise; doctor(): Promise; getMyself(): Promise; listWorkspaces(): Promise; findCollectionByName(input: { workspaceId: string; name: string; }): Promise; deleteCollection(uid: string): Promise; importOpenApi(input: { workspaceId: string; spec: unknown; }): Promise; listEnvironments(input: { workspaceId: string; }): Promise; findEnvironmentByName(input: { workspaceId: string; name: string; }): Promise; createEnvironment(input: { workspaceId: string; environment: unknown; }): Promise; updateEnvironment(input: { uid: string; environment: unknown; }): Promise; findSpecByName(input: { workspaceId: string; name: string; }): Promise; createSpec(input: { workspaceId: string; name: string; type?: string; filePath?: string; fileContent: string; }): Promise; upsertSpecFile(input: { specId: string; filePath: string; content: string; }): Promise; } //#endregion //#region src/verify-token.d.ts /** * `verifyToken` — plugin-level export used by `holocron auth set` + * `holocron auth check`. Hits Postman's `/me` endpoint (returns the * authenticated user). */ 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 PostmanPluginOptions extends ResolveTokenInput, PostmanToolingOptions { /** Working repo root. Used to resolve relative paths in specFile/envFiles. Defaults to process.cwd(). */ repoRoot?: string; /** Override base URL for tests. */ baseUrl?: string; /** Override `fetch` for tests. */ fetch?: typeof fetch; } interface PluginContext { options: PostmanPluginOptions; client: () => PostmanClient; } declare function createContext(options: PostmanPluginOptions): PluginContext; declare function tooling(ctx: PluginContext): Tooling; declare function createPlugin(options: PostmanPluginOptions): { name: string; capabilities: { tooling: () => Tooling; }; }; /** * One-line hint printed by `holocron auth set postman` when no * token is supplied or the supplied token is rejected. */ declare const AUTH_HINT: string; //#endregion export { AUTH_HINT, AuthError, PluginContext, type PostmanClient, type PostmanClientOptions, PostmanPlanLimitError, PostmanPluginOptions, PostmanTooling, type ResolveTokenInput, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, createContext, createPlugin, createPostmanClient, detectPlanLimit, resolveToken, tooling, verifyToken };