import type { Payments } from '@nevermined-io/payments'; export interface ResolvedOrgIdResult { orgId: string; /** Human-readable org name (for logging). May be empty if the API returned none. */ orgName: string; } interface ResolveOrgIdOptions { payments: Payments; /** Value of `--org ` if the user passed one. */ flagOrgId?: string; /** Print routine — typically the oclif command's `this.log` bound. */ log: (msg: string) => void; /** Whether the calling terminal is interactive. Defaults to `process.stdin.isTTY`. */ isTTY?: boolean; } /** * Resolve which organisation a top-level CLI widget flow should be * scoped to. * * Rules (mirror the acceptance criteria in issue #1671): * - `--org ` wins outright (we don't double-check membership — the * backend's `POST /widgets/session/self` will reject if the user * isn't a member). * - Otherwise call `payments.organizations.getMyMemberships()`: * - 0 → exit with the "card setup is only available to org members" * message. * - 1 → use it silently. * - 2+ → if the terminal is interactive, prompt the user to pick; * otherwise exit non-zero with "Pass --org ". * * Errors thrown by this helper are formatted to be safe to print * directly with `BaseCommand.handleError`. */ export declare function resolveOrgIdInteractive(opts: ResolveOrgIdOptions): Promise; export {}; //# sourceMappingURL=orgs.d.ts.map