import type { GammaEvent, GammaEventRaw, GammaMarket, GammaMarketRaw } from "../types"; import { type SearchParamValue } from "./http"; export declare const POLYMARKET_GAMMA_PATHS: { readonly events: "/events"; readonly markets: "/markets"; readonly search: "/public-search"; readonly series: "/series"; readonly tags: "/tags"; }; export type GetGammaEventsParams = Record & { showOnlyMarketsAcceptingOrders?: boolean; }; export type GetGammaMarketsParams = Record; export type GetGammaMarketParams = { includeTag?: boolean; }; export type GetPolymarketPublicSearchParams = Record & { q: string; limit_per_type?: number; page?: number; sort?: string; ascending?: boolean; search_tags?: boolean; events_status?: string; recurrence?: string; }; export type PolymarketSearchResult = { events?: GammaEventRaw[] | null; tags?: unknown[] | null; profiles?: unknown[] | null; pagination?: Record; }; export type GetGammaSeriesParams = Record & { slug?: string | string[]; closed?: boolean; recurrence?: string; limit?: number; offset?: number; }; export type GammaSeries = { [key: string]: unknown; id?: string | number; slug?: string; title?: string; recurrence?: string; active?: boolean; closed?: boolean; volume?: number; liquidity?: number; }; export type GammaTag = { id?: string; label?: string | null; slug?: string | null; forceShow?: boolean | null; isCarousel?: boolean | null; forceHide?: boolean | null; publishedAt?: string | null; createdAt?: string | null; updatedAt?: string | null; }; export type GetGammaTagsParams = Record & { limit?: number; offset?: number; order?: string; ascending?: boolean; isCarousel?: boolean; }; export declare function getGammaEvents(params?: GetGammaEventsParams): Promise; export declare function getGammaMarkets(params?: GetGammaMarketsParams): Promise; export declare function getGammaEvent(slugOrId: string, params?: GetGammaMarketParams): Promise; export declare function getGammaMarket(slugOrId: string, params?: GetGammaMarketParams): Promise; export declare function searchPolymarket(params: GetPolymarketPublicSearchParams): Promise; export declare function getGammaSeriesList(params?: GetGammaSeriesParams): Promise; export declare function getGammaSeries(id: string | number): Promise; export declare function getGammaTags(params?: GetGammaTagsParams): Promise; export declare function getGammaTag(slugOrId: string | number): Promise; export declare function transformGammaEvent(event: GammaEventRaw, showOnlyMarketsAcceptingOrders?: boolean): GammaEvent; export declare function transformGammaMarketOutcomes(market: GammaMarketRaw): GammaMarket; /** * Parses a Polymarket-encoded JSON string array (Gamma returns * `outcomePrices`, `outcomes`, and `clobTokenIds` as stringified JSON * arrays inside the market object). Returns `[]` for `undefined`, empty, * non-string, malformed, or non-array input. * * Exported for testability — drift in this swallow-on-failure behaviour * silently hides outcome data, so a fixture covers each failure mode. */ export declare function parseStringArray(value: unknown): string[]; /** * Converts a camelCase parameter key to the snake_case form Gamma expects. * Polymarket's Gamma endpoints (per the published OpenAPI: `liquidity_min`, * `start_date_min`, `tag_slug`, `include_tag`, ...) accept snake_case only; * sending camelCase silently filters nothing. */ export declare function gammaSnakeCaseKey(key: string): string;