import type { DocumentNode } from "graphql"; import type * as Hasura from "hasura-metadata-types"; import { ActionBuildResult, DataSourceOptions, InheritedRoles } from "../types"; /** * The builder for the metadata. */ export declare class MetadataBuilder { private _metadata; constructor(); /** * Adds a source to the metadata. * * @param sourceOptions The options of the source to add. */ addSource(sourceOptions: DataSourceOptions): this; /** * Adds multiple sources to the metadata. * * @param sourceOptionsList The options of the sources to add. */ addSources(sourceOptionsList: DataSourceOptions[]): this; /** * Adds an action to the metadata. * * @param action The action to add. * @note Use the `ActionBuilder` to create an action. */ addAction(action: ActionBuildResult): this; addGraphQLDefinitions(document: DocumentNode): this; _pushCustomTypes(custom_types: Hasura.CustomTypes): this; /** * Adds multiple actions to the metadata. * * @param actions The actions to add. * @note Use the `ActionBuilder` to create an action. */ addActions(actions: ActionBuildResult[]): this; /** * Adds inherited roles to the metadata. * * @param roles The map of roles to inherit. */ addInheritedRoles(roles: InheritedRoles): this; /** * Returns the metadata. * * @note This method is not async because we might need to do some async stuff in the future. */ getMetadata(): Hasura.Metadata | Promise; /** * Applies the metadata to the Hasura instance. * * @param hasuraUrl The URL of the Hasura instance. * @param adminSecret The admin secret of the Hasura instance. * @returns The response of the Hasura instance. */ applyMetadata({ hasuraUrl, adminSecret }: { hasuraUrl: string; adminSecret: string; }): Promise; }