import type { AxiosRequestConfig, AxiosResponse } from "axios"; import type { GraphQLDocument } from "../graphql/graphqlDocument.js"; /** Response of a GraphQL call: the envelope the GitHub API wraps results in. */ type GraphQLResponse = AxiosResponse<{ data: TResult; errors?: Array<{ type?: string; message?: string; }>; }>; /** * @param document Generated query document. * @param scheme `Authorization` scheme for the token. * @returns A fetcher `retryer` can drive. */ declare const createGraphQLFetcher: (document: GraphQLDocument, scheme: "bearer" | "token") => (variables: TVariables, token: string) => Promise>; /** Body of a GraphQL request sent to the GitHub API. */ interface GraphQLRequest { /** The GraphQL query. */ query: string; /** Variables referenced by the query. */ variables: Record; } /** * Send an untyped GraphQL request to the GitHub API. * * @param data Request data. * @param headers Request headers. * @returns Request response. * * @description Superseded by {@link createGraphQLFetcher}. * Still used by the backend status endpoints for their own `rateLimit` query, * and part of this package's published API. * * @todo consider dropping this once those endpoints post through axios directly, * which they already depend on. */ declare const request: (data: GraphQLRequest, headers: NonNullable) => Promise; export { createGraphQLFetcher, request }; export type { GraphQLResponse }; //# sourceMappingURL=http.d.ts.map