import { QueryBuilderOptions } from '../types/QueryBuilderOptions.js'; declare abstract class AbstractQueryBuilder { protected abstract query: string; protected server_url: string; protected operation_variables: Partial; protected return_schema: string; constructor(options: QueryBuilderOptions); variables(variables: Variables): this; /** * Build this query. * @return The query as a string to send to the GraphQL server. */ abstract build(): { operationName: string; query: string; variables: Partial; }; /** * Make a `fetch` request to the GraphQL server. * @param options `RequestInit` options and an optional `url` option. If no * `url` option is provided, then the `server_url` provided in the `options` * will be used. If no `server_url` is provided, then the default server URL * `https://arweave.net/graphql` will be used. * @returns The response to the request. */ post(options?: RequestInit & { url?: string; }): Promise; /** * Set the value to return. * @param returnValue * @returns `this` instance for further method chaining. * @example * ```ts * import { query } from "@smartweaver/slick-transaction/modules/graphql/Client"; * * const res = await query() * .returnSchema({ * schema: ` * edges { * node { * id * recipient * block { * height * timestamp * } * tags { * name * value * } * } * cursor * } * `, * fields: { * tags: (tags: ({ name, value }) => { * }, * recipient: (value: string) => { * if (value === "YrmlhY6i0uedj0gRgvLzuL-UgIQEUfEw6ojWLYtSkXs") { * return "My Token Process" * } * * return value; * } * } * }) * .post(); * ``` */ returnSchema(schema?: string): this; protected buildQuery(): string; } export { AbstractQueryBuilder };