import type { Client, ClientOptions } from 'openapi-fetch'; import type { paths } from './generated/schema.js'; /** * A fully typed client for the Camunda Hub public API v2. Endpoints are called * by path and method, e.g. `client.GET('/projects/{projectKey}', ...)`, with * request and response types inferred from the OpenAPI spec. */ export type HubApiClient = Client; /** * A bearer token, or a (possibly async) function returning one. The function * form is resolved on every request, so it can return a freshly refreshed * token. */ export type BearerTokenProvider = string | (() => string | undefined | Promise); export interface CreateHubApiClientOptions extends ClientOptions { /** * Base URL of the API, including the `/api/v2` path segment, e.g. * `https://modeler.camunda.io/api/v2`. */ baseUrl: string; /** * Bearer token (JWT) used to authenticate requests. When provided, an * `Authorization: Bearer ` header is attached to every request. */ token?: BearerTokenProvider; } /** * Creates a typed client for the Camunda Hub public API v2. * * @param options - Client configuration. `baseUrl` is required; `token` * enables bearer authentication. Any other `openapi-fetch` option (e.g. a * custom `fetch` or default `headers`) is forwarded. * @returns A typed client exposing one method per HTTP verb. */ export declare function createHubApiClient(options: CreateHubApiClientOptions): HubApiClient; //# sourceMappingURL=client.d.ts.map