import type { CheckoutArgs, CheckoutResult, CompanyEnvelope, CreateKeyResult, DeviceCodeResult, DeviceTokenResult, Freshness, GetCompanyArgs, GetPostsArgs, GetProfileArgs, KeysListResult, MintKeyResult, MintResult, OfferV1, PeopleSearchEnvelope, PersonEnvelope, PostsEnvelope, RedditGetPostArgs, RedditGetSubredditArgs, RedditGetSubredditPostsArgs, RedditGetUserArgs, RedditPostsEnvelope, RedditResolveUrlArgs, RedditSearchArgs, RedditSearchEnvelope, RedditThreadEnvelope, RedditUserEnvelope, ResolveUrlArgs, RevokeKeyResult, RotateKeyResult, SearchPeopleArgs, SetBalanceAlertResult, SubredditEnvelope, UrlResolutionEnvelope, UsageEnvelope, VeezeeErrorShape, XGetProfileArgs, XGetTweetArgs, XGetTweetsArgs, XProfileEnvelope, XResolveUrlArgs, XSearchArgs, XSearchEnvelope, XTweetEnvelope, XTweetsEnvelope } from "./types.js"; export declare const SDK_VERSION = "0.7.0"; /** Typed error thrown for any non-2xx response; mirrors the problem+json body. */ export declare class VeezeeError extends Error implements VeezeeErrorShape { code: VeezeeErrorShape["code"]; param?: string; doc_url: string; is_retriable: boolean; retry_after_seconds?: number; valid_values?: string[]; claim_url?: string; mint_url?: string; upgrade_url?: string; credits_required?: number; offer?: OfferV1; constructor(shape: VeezeeErrorShape); toShape(): VeezeeErrorShape; } export interface VeezeeClientOptions { /** Paid key (vz_live_) from a browser purchase, or a vz_trial_ key. Sent as * 'Authorization: Bearer '. Every data call needs a key. When omitted, the client * resolves one on first use from VEEZEE_API_KEY or ~/.veezee/config (written by `vz init` / * `client.mint()`), so the quickstart works as printed in Node. No key anywhere: call * `client.mint()` to mint a free trial key and store it locally. */ apiKey?: string; /** Default https://api.veezee.io. */ baseUrl?: string; fetch?: typeof globalThis.fetch; /** Per-attempt request timeout in milliseconds. Default 30000. */ timeoutMs?: number; /** User-Agent on every request. Default "veezee-sdk/"; the CLI sets * "veezee-cli/". Browsers drop the header silently (forbidden name). */ userAgent?: string; } /** LinkedIn platform namespace: client.linkedin.(...). Chassis tools * (resolveUrl, getUsage, checkout) are platform-independent and live at the * top level instead; see the binding doctrine in CONTRACT_POLICY.md. */ export interface LinkedInNamespace { getProfile(args: GetProfileArgs): Promise; searchPeople(args?: SearchPeopleArgs): Promise; getCompany(args: GetCompanyArgs): Promise; getPosts(args: GetPostsArgs): Promise; } /** Reddit platform namespace: client.reddit.(...). */ export interface RedditNamespace { search(args: RedditSearchArgs): Promise; getSubreddit(args: RedditGetSubredditArgs): Promise; getSubredditPosts(args: RedditGetSubredditPostsArgs): Promise; getUser(args: RedditGetUserArgs): Promise; getPost(args: RedditGetPostArgs): Promise; resolveUrl(args: RedditResolveUrlArgs): Promise; } /** X (formerly Twitter) platform namespace: client.x.(...). */ export interface XNamespace { search(args: XSearchArgs): Promise; getProfile(args: XGetProfileArgs): Promise; getTweets(args: XGetTweetsArgs): Promise; getTweet(args: XGetTweetArgs): Promise; resolveUrl(args: XResolveUrlArgs): Promise; } export declare class VeezeeClient { apiKey?: string; baseUrl: string; timeoutMs: number; readonly userAgent: string; private readonly fetchImpl; /** LinkedIn platform namespace: client.linkedin.(...). */ readonly linkedin: LinkedInNamespace; /** Reddit platform namespace: client.reddit.(...). */ readonly reddit: RedditNamespace; /** X (formerly Twitter) platform namespace: client.x.(...). */ readonly x: XNamespace; constructor(options?: VeezeeClientOptions); private request; /** GET /v1/linkedin/resolve-url. Costs 2 credits. Free tier: 200 credits per IP per day on a trial key. */ resolveUrl(args: ResolveUrlArgs): Promise; /** GET /v1/linkedin/profiles. Costs 4 credits base (+2 per section beyond 2, +2 for * realtime). Free tier: 200 credits per IP per day on a trial key. */ private getProfile; /** GET /v1/linkedin/search. Costs 10 credits for the first 10 results, +1 per further 10. * Free tier: 200 credits per IP per day on a trial key; trial keys cap limit at 10. */ private searchPeople; /** GET /v1/linkedin/companies. Costs 4 credits. Free tier: 200 credits per IP per day on a trial key. */ private getCompany; /** GET /v1/linkedin/posts. Costs 4 credits per page. Free tier: 200 credits per IP per day on a trial key. */ private getPosts; /** GET /v1/reddit/search. Costs 6 credits per page. Free tier: 200 credits per IP per day on a trial key. */ private redditSearch; /** GET /v1/reddit/subreddits. Costs 4 credits base (+2 with include_settings). Free tier: 200 credits per IP per day on a trial key. */ private getSubreddit; /** GET /v1/reddit/subreddit-posts. Costs 4 credits per page. Free tier: 200 credits per IP per day on a trial key. */ private getSubredditPosts; /** GET /v1/reddit/users. Costs 4 credits base, +2 per extra section (max 2). Free tier: 200 credits per IP per day on a trial key. */ private getUser; /** GET /v1/reddit/posts. Costs 4 credits for up to 10 ids, +1 per further 10 ids; * +4 credits for detail 'full' (one id only). Free tier: 200 credits per IP per day on a trial key. */ private getPost; /** GET /v1/reddit/resolve-url. Costs 2 credits. Free tier: 200 credits per IP per day on a trial key. */ private redditResolveUrl; /** GET /v1/x/search. Costs 6 credits per page. Free tier: 200 credits per IP per day on a trial key. */ private xSearch; /** GET /v1/x/profiles. Costs 4 credits. Free tier: 200 credits per IP per day on a trial key. */ private getXProfile; /** GET /v1/x/tweets. Costs 4 credits per page. Free tier: 200 credits per IP per day on a trial key. */ private getTweets; /** GET /v1/x/tweet. Costs 4 credits. Free tier: 200 credits per IP per day on a trial key. */ private getTweet; /** GET /v1/x/resolve-url. Costs 2 credits. Free tier: 200 credits per IP per day on a trial key. */ private xResolveUrl; /** GET /v1/usage. Free; exempt from the per-minute rate limit; works on every key, trial * included. Check the budget first. A call with no key throws KEY_REQUIRED (run `vz init` * or call mint()). */ getUsage(): Promise; /** POST /v1/checkout. Creates a Stripe Checkout session for a credit pack. Works without a * key: with no key, payment mints a fresh account and its key is revealed once at * https://veezee.io/purchased; with a key, the purchase credits that same key's account. */ checkout(args: CheckoutArgs): Promise; /** POST /v1/keys/mint. No auth, no body. Mints a free zero-allowance trial key: the free tier * is a per-IP-per-day allowance, not a balance on the key. Does not persist the key or touch * this.apiKey; callers decide what to do with the result. Prefer `mint()`, which does both and * only mints when no key is already resolvable. */ mintKey(): Promise; /** Ensures this client has a usable key: reuses one already resolvable (this.apiKey, then * VEEZEE_API_KEY, then ~/.veezee/config), or mints a free trial key and persists it there. * Sets this.apiKey either way. Never returns or logs the raw key, only key_hint. This is the * library equivalent of `vz init`. */ mint(): Promise; /** GET /v1/keys. Lists this account's keys (metadata only, never secrets). Requires a * management token (vzm_...) as apiKey. */ listKeys(args?: { account_id?: string; }): Promise; /** POST /v1/keys. Creates a new named key on this account; api_key is shown once in the * response, so store it immediately. Requires a management token as apiKey. */ createKey(args?: { label?: string; account_id?: string; }): Promise; /** POST /v1/keys/revoke. Immediately disables a key; requests using it fail auth from then on. * Requires a management token as apiKey. */ revokeKey(args: { key_id: string; account_id?: string; }): Promise; /** POST /v1/keys/rotate. Issues a new secret for an existing key id; the old secret stops * working immediately. api_key is shown once, so store it immediately. Requires a management * token as apiKey. */ rotateKey(args: { key_id: string; account_id?: string; }): Promise; /** POST /v1/alert. Sets or clears the low-balance email alert threshold; pass threshold: null * to turn it off. Requires a management token as apiKey. */ setBalanceAlert(args: { threshold: number | null; account_id?: string; }): Promise; /** POST /v1/device/code. No auth, no body. Starts a device-code login: show user_code and * verification_uri to the human, then poll with pollDeviceToken(). */ createDeviceCode(): Promise; /** POST /v1/device/token. No auth. Poll with the device_code from createDeviceCode() until * status is "complete"; an expired, consumed, or unknown code throws VeezeeError UNAUTHORIZED. */ pollDeviceToken(args: { device_code: string; }): Promise; } export type { Freshness };