/** * Thin wrapper over the generated Zeus client for the CLI's backend * GraphQL calls. * * Zeus is generated from `backend/schema.graphql` into * `./zeus/index.ts` (see `backend/axolotl.json`). The generated files are * codegen artifacts — never hand-edit them. This module centralizes auth * headers (machine JWT + optional team id) so call sites never rebuild the * `Authorization` / `X-Team-Id` contract by hand. */ import { Chain, type GraphQLResponse } from "./zeus/index.js"; import { scalars } from "./scalars.js"; export type { GraphQLResponse }; /** Create an authenticated backend GraphQL client (Zeus `Chain`). */ export declare function createBackendClient(opts: { backendUrl: string; machineJwt: string; teamId?: string; }): ReturnType; /** Shared scalar codecs (ID / DateTime / Long). */ export { scalars }; /** True when an error message looks like an auth rejection. */ export declare function isAuthErrorMessage(message: string): boolean; /** * The error message from a caught Zeus `GraphQLError`, or the raw error * string when the thrown value is not a GraphQL response error. */ export declare function graphqlErrorMessage(err: unknown): string; /** * Classify a caught Zeus error as an auth rejection. Zeus throws * `GraphQLError` for HTTP 200 responses with a GraphQL `errors` array, but * non-2xx HTTP responses (e.g. 401/403) are rejected with the parsed JSON * body object. Handle both without losing the original message. */ export declare function classifyGraphqlError(err: unknown): { authRejected: boolean; message: string; }; //# sourceMappingURL=graphql-client.d.ts.map