import { DocumentNode } from 'graphql'; import { GraphQLClient as BaseGraphQLClient } from 'graphql-request'; import { TribeEvent } from '../lib/index.js'; import { ClientError, ErrorResponse } from '../lib/response.js'; export declare type TribeClientOptions = { graphqlUrl?: string; accessToken?: string; clientId?: string; clientSecret?: string; notifyOnTokenExpiration?: boolean; fetch?: typeof fetch; onError?: (errors: ErrorResponse[], client: GraphqlClient, error?: null | ClientError) => void; onEvent?: (event: TribeEvent) => void; }; declare type RequestOptions = { query: DocumentNode; variables?: Record; customToken?: string; useBasicToken?: boolean; }; export declare class GraphqlClient extends BaseGraphQLClient { accessToken?: string; graphqlUrl?: string; private clientId?; private clientSecret?; private notifyOnTokenExpiration; private onError?; private onEvent?; private tokenExpirationTimeout?; private tokenExpirationHandler; constructor(options: TribeClientOptions); private getBasicToken; authorizedRequest(options: RequestOptions): Promise; setToken(accessToken: string): void; } export {};