export declare const defaultEcosystemEndpoint = "https://ecosystem.seam.co/v1/"; export type EcosystemQueryParams = Record; export interface EcosystemRequestOptions { endpoint: string; embedKey?: string | undefined; params?: EcosystemQueryParams; signal?: AbortSignal; /** Page origin for server-side embed-key validation. Browsers send their own Origin. */ origin?: string; /** Optional server fetch implementation, e.g., Next.js fetch with revalidation. */ fetch?: typeof globalThis.fetch; } /** * An error response from the Ecosystem API. * The `type` is the API error type, e.g., `embed_key_required`, * `invalid_embed_key` or `origin_not_allowed`. */ export declare class EcosystemApiError extends Error { readonly status: number; readonly type: string; readonly requestId: string | null; constructor({ status, type, message, requestId, }: { status: number; type: string; message: string; requestId?: string | null; }); } /** True when the error means the embed key is missing, invalid or not allowed here. */ export declare const isEmbedKeyError: (error: unknown) => boolean; export declare const getEcosystemUrl: (endpoint: string, path: string, params?: EcosystemQueryParams) => URL; export declare const fetchEcosystem: (path: string, { endpoint, embedKey, params, signal, origin, fetch, }: EcosystemRequestOptions) => Promise;