import { type ProcessEndpointOptions } from "@tai-kun/surrealdb/engine"; import type { Formatter } from "@tai-kun/surrealdb/formatter"; import type { Jwt } from "@tai-kun/surrealdb/standard-client"; import type { RpcParams, RpcResultMapping } from "@tai-kun/surrealdb/types"; import type { UnionToIntersection, ValueOf } from "type-fest"; export type InlineRpcFetcherRequestInit = { method: "POST"; headers: { "Content-Type": string; "Surreal-DB"?: string; "Surreal-NS"?: string; Accept: string; Authorization?: string; }; body: string | Uint8Array; signal: AbortSignal; }; export type InlineRpcFetcher = (input: string, init: InlineRpcFetcherRequestInit) => Response | PromiseLike; export type InlineRpcOptions = ProcessEndpointOptions & { readonly formatter?: Formatter | undefined; readonly namespace?: string | undefined; readonly database?: string | undefined; readonly token?: string | Jwt | undefined; readonly fetch?: InlineRpcFetcher | undefined; readonly signal?: AbortSignal | undefined; }; export type InlineRpcMethod = "authenticate" | "create" | "delete" | "info" | "insert" | "insert_relation" | "invalidate" | "merge" | "patch" | "ping" | "query" | "relate" | "run" | "graphql" | "select" | "signin" | "signup" | "unset" | "update" | "upsert" | "version"; interface RpcWithRequiredParams { /** * @experimental */ (endpoint: string | URL, method: TMethod, options: InlineRpcOptions & { readonly params: RpcParams; }): Promise; } interface RpcWithOptionalParams { /** * @experimental */ (endpoint: string | URL, method: TMethod, options?: (InlineRpcOptions & { readonly params?: RpcParams; }) | undefined): Promise; } declare const _default: UnionToIntersection ? RpcWithOptionalParams : RpcWithRequiredParams; }>>; export default _default; //# sourceMappingURL=rpc.d.ts.map