import { GraphQLResult } from '@aws-amplify/api-graphql'; import { DocumentNode } from 'graphql'; import Observable from 'zen-observable'; import { GraphQLClient, GraphQLClientOptions } from './graphqlClient'; /** * Convenience wrapper for GraphQL API using Amplify SDK. */ export declare class AmplifyClient implements GraphQLClient { private readonly options; private client; private readonly amplify; constructor(options: GraphQLClientOptions); private configure; /** * Performs GraphQL query operation. * * @param options query document, query variables and authentication * token (optional). If authentication token is provided then the * token provided via the constructor will be ignored. * @returns query result. */ query(options: { query: string | DocumentNode; variables?: any; authToken?: string; }): Promise>; private queryInternal; /** * Performs GraphQL mutation operation. * * @param options mutation document, mutation variables and authentication * token (optional). If authentication token is provided then the * token provided via the constructor will be ignored. * @returns mutation result. */ mutate(options: { mutation: string | DocumentNode; variables?: any; authToken?: string; }): Promise>; private mutateInternal; /** * Performs GraphQL subscription operation. * * @param options subscription document, subscription variables and * authentication token (optional). If authentication token is provided * then the token provided via the constructor will be ignored. * @returns observable for receiving subscription notifications. */ subscribe(options: { subscription: string | DocumentNode; variables?: any; authToken?: string; }): Promise>>; private subscribeInternal; /** * Resolves a TokenProvider into its actual token value. * Handles both string tokens and async/sync function providers. */ private resolveToken; private transformAuthMode; private createClient; private resolveAuthOptions; }