import { GraphQLClient } from 'graphql-request'; import { FunctionEvent, GraphcoolOptions, APIOptions, APIEndpoint, Endpoints } from './types'; import { GraphQLSchema } from 'graphql'; export { FunctionEvent, GraphcoolOptions, APIOptions }; export default class Graphcool { serviceId: string; token?: string; endpoints: Endpoints; constructor(serviceId: string, options?: GraphcoolOptions); getFullEndpoint(endpointKey?: APIEndpoint): any; api(endpoint?: APIEndpoint, options?: APIOptions): GraphQLClient; generateAuthToken(nodeId: string, typeName: string): Promise; generateNodeToken(nodeId: string, typeName: string, expirationInSeconds?: number): Promise; /** Returns an instance of the Simple API endpoint (based on graphql-tools) */ createSchema(): Promise; validateToken(token: string): Promise; checkPermissionQuery(query: string, variables?: any): Promise; updateAll(typeName: string, filter?: { [key: string]: any; }): Promise; deleteAll(typeName: string, filter?: { [key: string]: any; }): Promise; private systemClient(); private checkRootTokenIsSet(functionName); } export declare function fromEvent(event: FunctionEvent, options?: GraphcoolOptions): Graphcool;