import type { paths } from '../lib/api/v1.js'; import type { paths as PdpPaths } from '../lib/api/pdp-v1.js'; import { FetchResponse, MaybeOptionalInit } from 'openapi-fetch'; import type { PathsWithMethod } from 'openapi-typescript-helpers'; import { ApiKeyScope } from './useApiKeyApi.js'; export declare const globalTokenGetterSetter: { tokenGetter: () => string | null; tokenSetter: (token: string) => void; }; export declare const globalScopeGetterSetter: { scopeGetter: () => ApiKeyScope | null; scopeSetter: (_scope: ApiKeyScope) => void; }; declare const useClient: () => { authenticatedApiClient: () => { GET: , Init extends MaybeOptionalInit>(path: Path, path_values?: Omit, body?: paths[Path]["post"] extends { requestBody: { content: { "application/json": infer B; }; }; } ? B : undefined, query?: paths[Path]["get"]["parameters"]["query"]) => Promise, "error"> & { error: string | null; }>; POST: , Init extends MaybeOptionalInit>(path: Path, path_values?: Omit, body?: paths[Path]["post"] extends { requestBody: { content: { "application/json": infer B; }; }; } ? B : undefined, query?: paths[Path]["post"]["parameters"]["query"]) => Promise, "error"> & { error: string | null; }>; PUT: , Init extends MaybeOptionalInit>(path: Path, path_values: Omit, body: paths[Path]["put"]["requestBody"], query: paths[Path]["put"]["parameters"]["query"]) => Promise, "error"> & { error: string | null; }>; DELETE: , Init extends MaybeOptionalInit>(path: Path, path_values: Omit, body: paths[Path]["delete"]["requestBody"], query: paths[Path]["delete"]["parameters"]["query"]) => Promise, "error"> & { error: string | null; }>; PATCH: , Init extends MaybeOptionalInit>(path: Path, path_values: Omit, body?: paths[Path]["patch"]["requestBody"]["content"]["application/json"], query?: paths[Path]["patch"]["parameters"]["query"]) => Promise, "error"> & { error: string | null; }>; }; authenticatedPdpClient: (pdp_url?: string) => { GET: , Init extends MaybeOptionalInit>(path: Path, path_values?: Omit, body?: PdpPaths[Path]["post"] extends { requestBody: { content: { "application/json": infer B; }; }; } ? B : undefined, query?: PdpPaths[Path]["get"]["parameters"]["query"]) => Promise, "error"> & { error: string | null; }>; POST: , Init extends MaybeOptionalInit>(path: Path, path_values?: Omit, body?: PdpPaths[Path]["post"] extends { requestBody: { content: { "application/json": infer B; }; }; } ? B : undefined, query?: PdpPaths[Path]["post"]["parameters"]["query"] | undefined) => Promise, "error"> & { error: string | null; }>; DELETE: , Init extends MaybeOptionalInit>(path: Path, path_values: Omit, body: PdpPaths[Path]["delete"]["requestBody"], query: PdpPaths[Path]["delete"]["parameters"]["query"]) => Promise, "error"> & { error: string | null; }>; }; unAuthenticatedApiClient: (accessToken?: string | null, cookie?: string | null) => { GET: , Init extends MaybeOptionalInit>(path: Path, path_values?: paths[Path]["get"]["parameters"]["path"], body?: paths[Path]["post"] extends { requestBody: { content: { "application/json": infer B; }; }; } ? B : undefined, query?: paths[Path]["get"]["parameters"]["query"]) => Promise, "error"> & { error: string | null; }>; POST: , Init extends MaybeOptionalInit>(path: Path, path_values?: paths[Path]["post"]["parameters"]["path"], body?: paths[Path]["post"] extends { requestBody: { content: { "application/json": infer B; }; }; } ? B : undefined, query?: paths[Path]["post"]["parameters"]["query"]) => Promise, "error"> & { error: string | null; }>; DELETE: , Init extends MaybeOptionalInit>(path: Path, path_values: paths[Path]["delete"]["parameters"]["path"], body: paths[Path]["delete"]["requestBody"], query: paths[Path]["delete"]["parameters"]["query"]) => Promise, "error"> & { error: string | null; }>; PUT: , Init extends MaybeOptionalInit>(path: Path, path_values?: paths[Path]["put"]["parameters"]["path"], body?: paths[Path]["put"] extends { requestBody: { content: { "application/json": infer B; }; }; } ? B : undefined, query?: paths[Path]["put"]["parameters"]["query"] | undefined) => Promise, "error"> & { error: string | null; }>; }; }; export default useClient;