import { S as Schemas } from './_spec-EgN7VmAI.mjs'; type Awaitable = T | Promise; /** * Async token storage. The SDK reads the access token from storage on * every request (fresh-token rule); auth methods write/clear the pair. */ interface CustomStorage { getItem(key: string): Awaitable; setItem(key: string, value: string): Awaitable; removeItem(key: string): Awaitable; } type StorageMode = 'memory' | 'nostore' | 'local' | 'session' | CustomStorage; declare const ACCESS_TOKEN_KEY = "cavuno_board_access_token"; declare const REFRESH_TOKEN_KEY = "cavuno_board_refresh_token"; /** Board-password access grant — sent as `X-Board-Access` to pass the wall. */ declare const BOARD_ACCESS_GRANT_KEY = "cavuno_board_access_grant"; /** * The request handed to `onRequest` and `fetch`. `onRequest` may * mutate or replace it wholesale (locale headers, URL rewrites); * whatever it returns is what gets fetched. */ interface BoardRequest { /** Fully built URL, query string included. */ url: string; /** Final RequestInit: method, Headers instance, serialized body, plus passthrough keys (`signal`, `cache`, `next`, `cf`, …). */ init: RequestInit; } interface Logger { debug(message: string): void; error(message: string): void; } /** * Per-call options on every SDK method. Everything besides `body` and * `query` is passed through to `fetch` untouched, so framework caching * (`next: { tags }`, `cf: {...}`, `cache:`) rides for free. */ type FetchOptions = Omit & { body?: unknown; query?: Record; }; interface BoardClientOptions { baseUrl: string; /** Board identifier: `pk_…` key | `boards_…` ID | slug. */ board: string; storage: CustomStorage; globalHeaders?: Record; onRequest?: (req: BoardRequest) => Awaitable; onResponse?: (res: Response, req: BoardRequest) => Awaitable; logger?: Logger; } declare class BoardClient { readonly storage: CustomStorage; private readonly basePath; private readonly options; constructor(options: BoardClientOptions); /** * The full request pipeline. Public and first-class: custom endpoints * work without an SDK release, and still get the board-identifier * base path, default headers, bearer token, and both hooks. * * @example * const stats = await board.client.fetch('/custom/stats'); */ fetch(path: string, init?: FetchOptions): Promise; } type SuggestResult = Schemas['SuggestResult']; type SuggestionItem = Schemas['SuggestionItem']; type CompanySuggestion = Schemas['CompanySuggestion']; type MarketSuggestion = Schemas['MarketSuggestion']; type TermSuggestion = Schemas['TermSuggestion']; /** Kinds accepted by `SearchSuggestQuery.types`. */ type SearchSuggestType = 'company' | 'category' | 'skill' | 'market' | 'post' | 'tag'; /** Query for `board.search.suggest()`. */ type SearchSuggestQuery = { /** Keyword; under 2 chars the server returns an empty `items` array. */ q?: string; /** * Max interleaved suggestions after type filtering (1–25; default 25). * With `types: ['skill']`, this is "up to N skills", not N of a mixed pool. */ limit?: number; /** * Include only these suggestion kinds. Omit for every kind (company, * category, skill, market, post, tag). Repeated query keys on the wire. */ types?: SearchSuggestType[]; }; export { type Awaitable as A, type BoardRequest as B, type CompanySuggestion as C, type FetchOptions as F, type Logger as L, type MarketSuggestion as M, REFRESH_TOKEN_KEY as R, type StorageMode as S, type TermSuggestion as T, BoardClient as a, type SearchSuggestQuery as b, ACCESS_TOKEN_KEY as c, BOARD_ACCESS_GRANT_KEY as d, type CustomStorage as e, type SearchSuggestType as f, type SuggestResult as g, type SuggestionItem as h };