import * as Effect from "effect/Effect"; import * as HttpClient from "effect/unstable/http/HttpClient"; import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest"; import { type StateService } from "./State.ts"; /** * Persisted shape of an HTTP state store endpoint — `{ url, authToken }`. * Stored in the credentials file alongside other per-profile secrets. * Deliberately separate from {@link HttpStateStoreProps}: `id` and * `transformClient` are deployment-time choices, not credentials. */ export interface HttpStateStoreCredentials { url: string; /** Bearer token used to authenticate every request. */ authToken: string; } export interface HttpStateStoreProps extends HttpStateStoreCredentials { /** * `StateService.id` slug for telemetry — e.g. `"http"` for a bare * HTTP store, `"cloudflare-http"` for the Cloudflare-deployed * variant. Required so every concrete deployment of this state-store * shape shows up distinctly on the adoption dashboard. */ id: string; transformClient?: (client: HttpClientRequest.HttpClientRequest) => HttpClientRequest.HttpClientRequest; } export declare const checkHttpStateStoreAuth: ({ url, authToken, }: { url: string; authToken: string; }) => Effect.Effect; export declare const makeHttpStateStore: ({ url, authToken, transformClient, id, }: HttpStateStoreProps) => Effect.Effect; /** * Human-readable description of a state-store client failure. * * Several of the errors the HTTP client can raise carry an empty * `message` (e.g. the no-content `Unauthorized` the store returns on a * bad bearer token), which used to surface as a blank * `StateStoreError` with nothing to act on. Always produce a * non-empty message: prefer the error's own message, fall back to its * `_tag`/name, and append the HTTP status and any distinct `cause` * message when available. */ export declare const describeStateStoreFailure: (e: unknown) => string; //# sourceMappingURL=HttpStateStore.d.ts.map