import { z } from "zod"; import { type SkillhookClient } from "./api.js"; export declare const PricingSchema: z.ZodObject<{ product: z.ZodOptional>; currency: z.ZodOptional>; updated_at: z.ZodOptional>; plans: z.ZodArray>; code: z.ZodOptional>; name: z.ZodString; monthly_cents: z.ZodOptional>; yearly_cents: z.ZodOptional>; tagline: z.ZodOptional>; price: z.ZodOptional>; yearly: z.ZodOptional>; }, z.core.$loose>>>; limits: z.ZodOptional>>>; features: z.ZodOptional>>; checkout_url: z.ZodOptional>; checkout_url_yearly: z.ZodOptional>; signup_url: z.ZodOptional>; contact: z.ZodOptional>; }, z.core.$loose>>; pricing_url: z.ZodOptional>; docs: z.ZodOptional>; enforced: z.ZodOptional>; }, z.core.$loose>; export type Pricing = z.infer; export declare const CheckoutLinkSchema: z.ZodObject<{ kind: z.ZodOptional>; url: z.ZodString; plan: z.ZodOptional>; interval: z.ZodOptional>; price: z.ZodOptional>; note: z.ZodOptional>; }, z.core.$loose>; export type CheckoutLink = z.infer; export interface PublicCloudOptions { /** The cloud the kept key belongs to, when there is one: pricing comes from the same cloud. */ keptUrl?: string; client: SkillhookClient; fetchImpl?: typeof fetch; } /** `GET /api/v1/pricing?ref=agent-`: every plan, its price, limits, features and checkout link. */ export declare function fetchPricing(env: NodeJS.ProcessEnv, cloud: { url?: string; }, options: PublicCloudOptions): Promise<{ data: { [x: string]: unknown; product?: string | null | undefined; currency?: string | null | undefined; updated_at?: string | null | undefined; plans: { [x: string]: unknown; id?: string | null | undefined; code?: string | null | undefined; name: string; monthly_cents?: number | null | undefined; yearly_cents?: number | null | undefined; tagline?: string | null | undefined; price?: { [x: string]: unknown; monthly?: number | null | undefined; yearly?: number | null | undefined; } | null | undefined; limits?: Record | null | undefined; features?: string[] | null | undefined; checkout_url?: string | null | undefined; checkout_url_yearly?: string | null | undefined; signup_url?: string | null | undefined; contact?: string | null | undefined; }[]; pricing_url?: string | null | undefined; docs?: string | null | undefined; enforced?: boolean | null | undefined; }; raw: unknown; url: string; }>; /** `POST /api/v1/billing/checkout` without a key: the plan's checkout link, which signs a person in (or up) first. */ export declare function publicCheckoutLink(env: NodeJS.ProcessEnv, cloud: { url?: string; }, input: { plan: string; interval: "month" | "year"; }, options: PublicCloudOptions): Promise<{ data: { [x: string]: unknown; kind?: string | null | undefined; url: string; plan?: string | null | undefined; interval?: string | null | undefined; price?: string | null | undefined; note?: string | null | undefined; }; raw: unknown; url: string; }>; /** The plans as a terminal table: price, the main limits, how to buy. */ export declare function renderPricing(pricing: Pricing, table: (rows: string[][], headers: string[]) => string): string;