// Generated by dts-bundle-generator v9.5.1 import { Replacer } from '@surrealdb/cbor'; import { UUID } from 'uuidv7'; /** * The base error class for all SQON errors. */ export declare class SqonError extends Error { } /** * Thrown when a parsed date or datetime is invalid */ export declare class InvalidDateError extends SqonError { name: string; constructor(dateOrMessage: Date | string); } /** * Thrown when a RecordId or RecordIdRange is constructed with invalid parts */ export declare class InvalidRecordIdError extends SqonError { name: string; } /** * Thrown when a Duration string cannot be parsed or a duration operation is invalid */ export declare class InvalidDurationError extends SqonError { name: string; } /** * Thrown when a Decimal operation fails (division by zero, invalid input, etc.) */ export declare class InvalidDecimalError extends SqonError { name: string; } /** * Thrown when a number does not fit the kind it is made or sent as: a sized number out of its * range, an integer past the signed 64-bit range of a SurrealDB `int`, or CBOR which gives a * number the wrong kind of content */ export declare class InvalidNumberError extends SqonError { name: string; } /** * Thrown when a Table or StringRecordId is constructed with an invalid value */ export declare class InvalidTableError extends SqonError { name: string; } /** * Thrown when a SQON text value cannot be parsed */ export declare class TextParseError extends SqonError { name: string; /** The zero-based character offset at which parsing failed */ readonly offset: number; constructor(message: string, offset: number); } /** * Thrown when shaped frame bytes cannot be read: a block whose version this decoder does not * know, a shape which breaks the wire rules or passes a limit, or a row which does not fit the * shape it names. The decoder refuses such bytes rather than reading past them. */ export declare class ShapedFrameError extends SqonError { name: string; constructor(message: string); } /** * Options used to configure the value codec */ export interface CodecOptions { /** Use native `Date` objects instead of custom `DateTime` objects. Using `Date` objects will result in a loss of nanosecond precision. */ useNativeDates?: boolean; /** Specify a custom visitor function to process encode values. */ valueEncodeVisitor?: (value: unknown) => unknown; /** Specify a custom visitor function to process decode values. */ valueDecodeVisitor?: (value: unknown) => unknown; } /** * A codec for encoding and decoding SurrealQL values. * * The `Wire` generic controls the serialised format: * - `Uint8Array` for binary codecs (CBOR, FlatBuffer) * - `unknown` for structured codecs (JSON) that produce a plain object tree * * Defaults to `Uint8Array` for backward compatibility. */ export interface ValueCodec { encode(data: T): Wire; decode(data: Wire): T; } /** * Recursively compare supported SurrealQL values for equality. * * @param x The first value to compare * @param y The second value to compare * @returns Whether the two values are recursively equal */ export declare function equals(x: unknown, y: unknown): boolean; /** * A complex SurrealQL value type */ export declare abstract class Value { protected static _useExperimentalToJson: boolean; static [Symbol.hasInstance](instance: unknown): boolean; constructor(); /** * Compare equality with another value. */ abstract equals(other: unknown): boolean; /** * Convert this value to a serializable string */ abstract toJSON(): unknown; /** * Convert this value to a string representation */ abstract toString(): string; /** * Enable the new experimental toJSON implementation. * * When enabled, the `toJSON` method will return values encoded by the `JsonCodec` resulting in a type-safe JSON representation. */ static useExperimentalToJson(enabled?: boolean): void; } type DurationTuple = [ number | bigint, number | bigint ] | [ number | bigint ] | [ ]; /** * A SurrealQL duration value with support for parsing, formatting, arithmetic, and nanosecond precision. */ export declare class Duration extends Value { static [Symbol.hasInstance](instance: unknown): boolean; private readonly _seconds; private readonly _nanoseconds; /** * Constructs a new Duration by cloning an existing duration * * @param input Duration input */ constructor(input: Duration); /** * Constructs a new Duration from a tuple representation * * @param input Second and nanosecond tuple */ constructor(input: DurationTuple); /** * Constructs a new Duration from a human-readable string, e.g. "1h30m" * * @param input Duration string */ constructor(input: string); equals(other: unknown): boolean; toJSON(): unknown; /** * @returns Human readable duration string */ toString(): string; /** * Converts the duration to a tuple */ toCompact(): [ bigint, bigint ] | [ bigint ] | [ ]; /** * Parses a duration string like "1h30m" * * @param input Input string * @returns [seconds, nanoseconds] */ static parseString(input: string): [ bigint, bigint ]; /** * Compare this duration with another * * @param other The duration to compare with * @returns -1 if this is shorter, 0 if equal, 1 if this is longer */ compare(other: Duration): number; /** * Adds two durations together * * @param other The duration to add * @returns The resulting duration */ add(other: Duration): Duration; /** * Subtracts another duration from this one * * @param other The duration to subtract * @returns The resulting duration */ sub(other: Duration): Duration; /** * Multiplies the duration by a scalar * * @param factor The factor to multiply by * @returns The resulting duration */ mul(factor: number | bigint): Duration; /** * Divides the duration * * @param divisor The duration or scalar to divide by * @returns A new Duration or ratio (unitless bigint) */ div(divisor: Duration): bigint; div(divisor: number | bigint): Duration; /** * Computes the remainder after division * * @param mod The divisor * @returns The remainder duration */ mod(mod: Duration): Duration; /** * Total nanoseconds in this duration */ get nanoseconds(): bigint; /** * Total microseconds */ get microseconds(): bigint; /** * Total milliseconds */ get milliseconds(): bigint; /** * Whole seconds in the duration */ get seconds(): bigint; /** * Total whole minutes in the duration */ get minutes(): bigint; /** * Total whole hours in the duration */ get hours(): bigint; /** * Total whole days in the duration */ get days(): bigint; /** * Total whole weeks in the duration */ get weeks(): bigint; /** * Total whole years in the duration */ get years(): bigint; /** * Creates a Duration from nanoseconds * * @param ns Nanoseconds value * @returns The resulting duration */ static nanoseconds(ns: number | bigint): Duration; /** * Creates a Duration from microseconds * * @param µs Microseconds value * @returns The resulting duration */ static microseconds(µs: number | bigint): Duration; /** * Creates a Duration from milliseconds * * @param ms Milliseconds value * @returns The resulting duration */ static milliseconds(ms: number | bigint): Duration; /** * Creates a Duration from seconds * * @param s Seconds value * @returns The resulting duration */ static seconds(s: number | bigint): Duration; /** * Creates a Duration from minutes * * @param m Minutes value * @returns The resulting duration */ static minutes(m: number | bigint): Duration; /** * Creates a Duration from hours * * @param h Hours value * @returns The resulting duration */ static hours(h: number | bigint): Duration; /** * Creates a Duration from days * * @param d Days value * @returns The resulting duration */ static days(d: number | bigint): Duration; /** * Creates a Duration from weeks * * @param w Weeks value * @returns The resulting duration */ static weeks(w: number | bigint): Duration; /** * Creates a Duration from years * * @param y Years value * @returns The resulting duration */ static years(y: number | bigint): Duration; /** * Parses a duration from a float string with a single time unit, e.g. "1.998487792s", "1.5m", "500.0ms" * * @param input Float duration string * @returns The resulting duration */ static parseFloat(input: string): Duration; /** * Measures the elapsed time since the function was called * If the Performance API is available, it uses it to measure the elapsed time in nanoseconds * * @returns A function that returns the elapsed time as a Duration */ static measure(): () => Duration; } type DateTimeTuple = [ number | bigint, number | bigint ]; /** * A SurrealQL datetime value with support for parsing, formatting, arithmetic, and nanosecond precision. */ export declare class DateTime extends Value { static [Symbol.hasInstance](instance: unknown): boolean; private readonly _seconds; private readonly _nanoseconds; private static loadHr; /** * Constructs a new DateTime with the current time, equivalent to `DateTime.now()` */ constructor(); /** * Constructs a new DateTime by cloning an existing datetime * * @param input DateTime input */ constructor(input: DateTime); /** * Constructs a new DateTime from a JavaScript Date object * * @param input Date input */ constructor(input: Date); /** * Constructs a new DateTime from a tuple representation * * @param input Second and nanosecond tuple */ constructor(input: DateTimeTuple); /** * Constructs a new DateTime from an ISO String * * @param input ISO String string */ constructor(input: string); /** * Constructs a new DateTime from a number or bigint * * @param input Number or bigint input */ constructor(input: number | bigint); equals(other: unknown): boolean; toJSON(): unknown; /** * @returns The ISO 8601 string representation of the datetime */ toString(): string; /** * Converts the datetime to a tuple */ toCompact(): [ bigint, bigint ]; /** * Formats the datetime as an ISO 8601 string */ toISOString(): string; /** * Converts to JavaScript Date object */ toDate(): Date; /** * Parses a datetime string * * @param input Input string (ISO 8601 format) * @returns [seconds, nanoseconds] tuple */ static parseString(input: string): [ bigint, bigint ]; /** * Adds a duration to this datetime * * @param duration The duration to add * @returns The new datetime instance */ add(duration: Duration): DateTime; /** * Subtracts a duration from this datetime * * @param duration The duration to subtract * @returns The new datetime instance */ sub(duration: Duration): DateTime; /** * Calculates the duration between two datetimes * * @param other The other datetime */ diff(other: DateTime): Duration; /** * Compares this DateTime with another * * @param other The DateTime to compare with * @returns -1 if other is after, 0 if equal, 1 if other is before */ compare(other: DateTime): number; /** Total nanoseconds since Unix epoch */ get nanoseconds(): bigint; /** Total microseconds since Unix epoch */ get microseconds(): bigint; /** Total milliseconds since Unix epoch */ get milliseconds(): number; /** Seconds since Unix epoch */ get seconds(): number; /** * Creates a DateTime from nanoseconds since Unix epoch * * @param ns Nanoseconds value */ static fromEpochNanoseconds(ns: number | bigint): DateTime; /** * Creates a DateTime from microseconds since Unix epoch * * @param µs Microseconds value */ static fromEpochMicroseconds(µs: number | bigint): DateTime; /** * Creates a DateTime from milliseconds since Unix epoch * * @param ms Milliseconds value */ static fromEpochMilliseconds(ms: number | bigint): DateTime; /** * Creates a DateTime from seconds since Unix epoch * * @param s Seconds value */ static fromEpochSeconds(s: number | bigint): DateTime; /** * Returns a new DateTime representing the current time */ static now(): DateTime; /** * Returns a new DateTime representing the Unix epoch (1970-01-01T00:00:00Z) */ static epoch(): DateTime; } type DecimalTuple = [ bigint, bigint, number ]; /** * A SurrealQL decimal number value with support for parsing, formatting, arithmetic, and high precision. */ export declare class Decimal extends Value { static [Symbol.hasInstance](instance: unknown): boolean; private readonly _int; private readonly _frac; private readonly _scale; /** * Constructs a new Decimal by cloning an existing Decimal * * @param input Decimal input */ constructor(input: Decimal); /** * Constructs a new Decimal from a scientific notation string * * @param input String input */ constructor(input: string); /** * Constructs a new Decimal from a number or bigint * * @param input Number or bigint input */ constructor(input: number | bigint); /** * Constructs a new Decimal from a tuple [int, frac, scale] * * @param input Tuple input */ constructor(input: DecimalTuple); equals(other: unknown): boolean; toJSON(): unknown; /** * @returns The canonical string representation of the decimal with * trailing zeros in fractional part trimmed */ toString(): string; /** Returns the integer part of the number */ get int(): bigint; /** Returns the fractional part of the number */ get frac(): bigint; /** Returns the scale (number of decimal places) */ get scale(): number; /** * Adds another Decimal to this one * * @param other The Decimal to add * @returns A new Decimal representing the sum */ add(other: Decimal): Decimal; /** * Subtracts another Decimal from this one * * @param other The Decimal to subtract * @returns A new Decimal representing the difference */ sub(other: Decimal): Decimal; /** * Multiplies this Decimal by another * * @param other The Decimal to multiply by * @returns A new Decimal representing the product */ mul(other: Decimal): Decimal; /** * Divides this Decimal by another, with fixed precision * * @param other The Decimal to divide by * @returns A new Decimal representing the quotient */ div(other: Decimal): Decimal; /** * Computes the remainder of this Decimal divided by another * * @param other The divisor Decimal * @returns A new Decimal representing the remainder */ mod(other: Decimal): Decimal; /** * Returns the absolute value of this Decimal * @returns A new Decimal with non-negative components */ abs(): Decimal; /** * Returns the negated value of this Decimal * @returns A new Decimal with inverted sign */ neg(): Decimal; /** * Checks if the value is exactly zero * @returns True if both int and frac parts are zero */ isZero(): boolean; /** * Checks if the value is negative * @returns True if negative */ isNegative(): boolean; /** * Compares this Decimal with another * * @param other The Decimal to compare with * @returns -1 if less, 0 if equal, 1 if greater */ compare(other: Decimal): number; /** * Rounds the Decimal to a fixed number of decimal places * * @param precision Number of digits to keep after the decimal point * @returns The new decimal instance */ round(precision: number): Decimal; /** * Converts the number to fixed-point notation string * * @param precision Number of digits after the decimal point */ toFixed(precision: number): string; /** * Converts the Decimal to a native JavaScript number * @returns A number approximation (may lose precision) */ toFloat(): number; /** * Converts to bigint by truncating the fractional part * @returns An bigint approximation (may lose precision) */ toBigInt(): bigint; /** * Returns the raw parts of the Decimal * @returns An object with int, frac, and scale */ toParts(): { int: bigint; frac: bigint; scale: number; }; /** * Converts to scientific notation string (e.g., "1.23e4") */ toScientific(): string; /** * Parses a number in scientific notation into a Decimal * * @param input The scientific notation string */ static fromScientificNotation(input: string): Decimal; private toBigIntWithScale; } /** * A SurrealQL file reference value. */ export declare class FileRef extends Value { static [Symbol.hasInstance](instance: unknown): boolean; private readonly _bucket; private readonly _key; constructor(bucket: string, key: string); get bucket(): string; get key(): string; equals(other: unknown): boolean; toJSON(): unknown; toString(): string; } /** * An uncomputed SurrealQL future value. * * @deprecated Futures were removed in SurrealDB 3.0 */ export declare class Future extends Value { static [Symbol.hasInstance](instance: unknown): boolean; private readonly _body; constructor(body: string); equals(other: unknown): boolean; toJSON(): unknown; /** * @returns The uncomputed future notation */ toString(): string; /** * The body of the future */ get body(): string; } /** * A SurrealQL geometry value. */ export declare abstract class Geometry extends Value { static [Symbol.hasInstance](instance: unknown): boolean; constructor(); abstract toJSON(): GeoJson; abstract is(geometry: Geometry): boolean; abstract clone(): Geometry; equals(other: unknown): boolean; toString(): string; /** * Create a Geometry instance from a GeoJSON object. */ static fromJSON(json: GeoJson): Geometry; } /** * A SurrealQL point geometry value. */ export declare class GeometryPoint extends Geometry { static [Symbol.hasInstance](instance: unknown): boolean; readonly point: [ number, number ]; /** Construct from a coordinate pair. */ constructor(point: [ number | Decimal, number | Decimal ]); /** Construct from a GeoJSON Point object. */ constructor(json: GeoJsonPoint); /** Clone an existing GeometryPoint. */ constructor(source: GeometryPoint); toJSON(): GeoJsonPoint; get coordinates(): GeoJsonPoint["coordinates"]; is(geometry: Geometry): geometry is GeometryPoint; clone(): GeometryPoint; } /** * A SurrealQL line geometry value. */ export declare class GeometryLine extends Geometry { static [Symbol.hasInstance](instance: unknown): boolean; readonly line: [ GeometryPoint, GeometryPoint, ...GeometryPoint[] ]; /** Construct from an array of points. */ constructor(line: [ GeometryPoint, GeometryPoint, ...GeometryPoint[] ]); /** Construct from a GeoJSON LineString object. */ constructor(json: GeoJsonLineString); /** Clone an existing GeometryLine. */ constructor(source: GeometryLine); toJSON(): GeoJsonLineString; get coordinates(): GeoJsonLineString["coordinates"]; close(): void; is(geometry: Geometry): geometry is GeometryLine; clone(): GeometryLine; } /** * A SurrealQL polygon geometry value. */ export declare class GeometryPolygon extends Geometry { static [Symbol.hasInstance](instance: unknown): boolean; readonly polygon: [ GeometryLine, ...GeometryLine[] ]; /** Construct from an array of line rings. */ constructor(polygon: [ GeometryLine, ...GeometryLine[] ]); /** Construct from a GeoJSON Polygon object. */ constructor(json: GeoJsonPolygon); /** Clone an existing GeometryPolygon. */ constructor(source: GeometryPolygon); toJSON(): GeoJsonPolygon; get coordinates(): GeoJsonPolygon["coordinates"]; is(geometry: Geometry): geometry is GeometryPolygon; clone(): GeometryPolygon; } /** * A SurrealQL multi-point geometry value. */ export declare class GeometryMultiPoint extends Geometry { static [Symbol.hasInstance](instance: unknown): boolean; readonly points: [ GeometryPoint, ...GeometryPoint[] ]; /** Construct from an array of points. */ constructor(points: [ GeometryPoint, ...GeometryPoint[] ]); /** Construct from a GeoJSON MultiPoint object. */ constructor(json: GeoJsonMultiPoint); /** Clone an existing GeometryMultiPoint. */ constructor(source: GeometryMultiPoint); toJSON(): GeoJsonMultiPoint; get coordinates(): GeoJsonMultiPoint["coordinates"]; is(geometry: Geometry): geometry is GeometryMultiPoint; clone(): GeometryMultiPoint; } /** * A SurrealQL multi-line geometry value. */ export declare class GeometryMultiLine extends Geometry { static [Symbol.hasInstance](instance: unknown): boolean; readonly lines: [ GeometryLine, ...GeometryLine[] ]; /** Construct from an array of lines. */ constructor(lines: [ GeometryLine, ...GeometryLine[] ]); /** Construct from a GeoJSON MultiLineString object. */ constructor(json: GeoJsonMultiLineString); /** Clone an existing GeometryMultiLine. */ constructor(source: GeometryMultiLine); toJSON(): GeoJsonMultiLineString; get coordinates(): GeoJsonMultiLineString["coordinates"]; is(geometry: Geometry): geometry is GeometryMultiLine; clone(): GeometryMultiLine; } /** * A SurrealQL multi-polygon geometry value. */ export declare class GeometryMultiPolygon extends Geometry { static [Symbol.hasInstance](instance: unknown): boolean; readonly polygons: [ GeometryPolygon, ...GeometryPolygon[] ]; /** Construct from an array of polygons. */ constructor(polygons: [ GeometryPolygon, ...GeometryPolygon[] ]); /** Construct from a GeoJSON MultiPolygon object. */ constructor(json: GeoJsonMultiPolygon); /** Clone an existing GeometryMultiPolygon. */ constructor(source: GeometryMultiPolygon); toJSON(): GeoJsonMultiPolygon; get coordinates(): GeoJsonMultiPolygon["coordinates"]; is(geometry: Geometry): geometry is GeometryMultiPolygon; clone(): GeometryMultiPolygon; } /** * A SurrealQL geometry collection value. */ export declare class GeometryCollection extends Geometry { static [Symbol.hasInstance](instance: unknown): boolean; readonly collection: [ Geometry, ...Geometry[] ]; /** Construct from an array of geometries. */ constructor(collection: [ Geometry, ...Geometry[] ]); /** Construct from a GeoJSON GeometryCollection object. */ constructor(json: GeoJsonCollection); /** Clone an existing GeometryCollection. */ constructor(source: GeometryCollection); toJSON(): GeoJsonCollection; get geometries(): GeoJsonCollection["geometries"]; is(geometry: Geometry): geometry is GeometryCollection; clone(): GeometryCollection; } type GeoJson = GeoJsonPoint | GeoJsonLineString | GeoJsonPolygon | GeoJsonMultiPoint | GeoJsonMultiLineString | GeoJsonMultiPolygon | GeoJsonCollection; type GeoJsonPoint = { type: "Point"; coordinates: [ number, number ]; }; type GeoJsonLineString = { type: "LineString"; coordinates: [ GeoJsonPoint["coordinates"], GeoJsonPoint["coordinates"], ...GeoJsonPoint["coordinates"][] ]; }; type GeoJsonPolygon = { type: "Polygon"; coordinates: [ GeoJsonLineString["coordinates"], ...GeoJsonLineString["coordinates"][] ]; }; type GeoJsonMultiPoint = { type: "MultiPoint"; coordinates: [ GeoJsonPoint["coordinates"], ...GeoJsonPoint["coordinates"][] ]; }; type GeoJsonMultiLineString = { type: "MultiLineString"; coordinates: [ GeoJsonLineString["coordinates"], ...GeoJsonLineString["coordinates"][] ]; }; type GeoJsonMultiPolygon = { type: "MultiPolygon"; coordinates: [ GeoJsonPolygon["coordinates"], ...GeoJsonPolygon["coordinates"][] ]; }; type GeoJsonCollection = { type: "GeometryCollection"; geometries: GeoJson[]; }; /** * Represents a range bound which includes the value within the range */ export declare class BoundIncluded { readonly value: T; static [Symbol.hasInstance](instance: unknown): boolean; constructor(value: T); } /** * Represents a range bound which excludes the value from the range */ export declare class BoundExcluded { readonly value: T; static [Symbol.hasInstance](instance: unknown): boolean; constructor(value: T); } /** * Represents a Bound which can represent the start or end of a range */ export type Bound = BoundIncluded | BoundExcluded | undefined; /** * A SurrealQL range value. */ declare class Range$1 extends Value { static [Symbol.hasInstance](instance: unknown): boolean; private readonly _beg; private readonly _end; constructor(beg: Bound, end: Bound); equals(other: unknown): boolean; toJSON(): unknown; /** * @returns The escaped range string */ toString(): string; /** * The range bound beginning */ get begin(): Bound; /** * The range bound ending */ get end(): Bound; } type WidenRecordIdValue = T extends string ? string : T extends number ? number : T extends bigint ? bigint : T; declare const RECORD_TYPE: unique symbol; declare class Table extends Value { static [Symbol.hasInstance](instance: unknown): boolean; /** * Declares the record type of a table, while inferring its name. * * @example * ```ts * const users = Table.of()("users"); // Table<"users", User> * ``` */ static of(): (tb: Tb) => Table; readonly [RECORD_TYPE]?: T; private readonly _name; constructor(tb: Tb); equals(other: unknown): boolean; toJSON(): unknown; /** * @returns The escaped table name */ toString(): string; /** * The unescaped table name */ get name(): Tb; } interface TableConstructor { /** * Create a table reference, keeping the table name as a literal type. * * The record type can be declared with a type annotation: * * @example * ```ts * const users: Table<"users", User> = new Table("users"); * ``` */ new (tb: Tb): Table; /** * Create a table reference with a record type, as in `new Table("users")`. * * Note that the table name is only typed as `string` in this form. To also keep * the name as a literal type, use `Table.of()("users")`, or pass both type * arguments: `new Table<"users", User>("users")`. */ new (tb: string): Table; readonly of: typeof Table.of; } /** * A SurrealQL table value. * * @typeParam Tb The table name, as a string literal type * @typeParam T The type of the records stored in the table. This is a compile-time * annotation only: it is not validated against the data returned by the server. */ type _Table = Table; declare const _Table: TableConstructor; /** * A SurrealQL UUID value. */ export declare class Uuid extends Value { static [Symbol.hasInstance](instance: unknown): boolean; private readonly _inner; /** * Constructs a new Uuid by cloning an existing uuid * * @param input Uuid input */ constructor(uuid: Uuid | UUID); /** * Constructs a new Uuid from a string representation * * @param uuid String input */ constructor(uuid: string); /** * Constructs a new Uuid from a binary representation * * @param uuid ArrayBuffer or Uint8Array input */ constructor(uuid: ArrayBufferLike | Uint8Array); equals(other: unknown): boolean; toJSON(): unknown; /** * @returns The string representation of the UUID */ toString(): string; /** * Converts the UUID to a Uint8Array */ toUint8Array(): Uint8Array; /** * Converts the UUID to a ArrayBuffer */ toBuffer(): ArrayBufferLike; /** * Generate a new UUID v4 */ static v4(): Uuid; /** * Generate a new UUID v7 */ static v7(): Uuid; } export type RecordIdValue = string | number | Uuid | bigint | unknown[] | Record; declare class RecordId extends Value { static [Symbol.hasInstance](instance: unknown): boolean; private readonly _table; private readonly _id; constructor(table: Tb | _Table, id: Id); equals(other: unknown): boolean; toJSON(): unknown; /** * @returns The escaped record ID string including the table name */ toString(): string; /** * The table part value */ get table(): _Table; /** * The ID part value */ get id(): Id; } interface RecordIdConstructor { new (table: Tb | _Table, id: I): RecordId, T>; new >(table: R["table"]["name"], id: R["id"]): RecordId; } /** * A SurrealQL record ID value. */ type _RecordId = RecordId; declare const _RecordId: RecordIdConstructor; declare class RecordIdRange extends Value { static [Symbol.hasInstance](instance: unknown): boolean; private readonly _table; private readonly _beg; private readonly _end; constructor(table: Tb | _Table, beg: Bound, end: Bound); equals(other: unknown): boolean; toJSON(): unknown; /** * @returns The escaped record ID range string */ toString(): string; /** * The table part value */ get table(): _Table; /** * The range bound beginning */ get begin(): Bound; /** * The range bound ending */ get end(): Bound; } interface RecordIdRangeConstructor { new (table: Tb | _Table, beg: Bound, end: Bound): RecordIdRange, T>; new >(table: R["table"]["name"], beg: R["begin"], end: R["end"]): RecordIdRange ? (I extends RecordIdValue ? I : never) : never>; } /** * A SurrealQL record ID range value. */ type _RecordIdRange = RecordIdRange; declare const _RecordIdRange: RecordIdRangeConstructor; /** * The fixed-width number kinds of SurrealDB 4.0. */ export type SizedNumberKind = "i8" | "u8" | "i16" | "u16" | "i32" | "u32" | "u64" | "f16" | "f32"; /** * A number of one of SurrealDB 4.0's fixed-width kinds: `i8`, `u8`, `i16`, `u16`, `i32`, * `u32` and `u64`, and the floats `f16` and `f32`. * * A connection which speaks `cbor.2` reads values of these kinds as instances of the * subclasses, and sends instances of them tagged, so that the server stores them with their * width. Over plain `cbor`, which servers before 4.0 speak, the server sends them widened, as * plain numbers, and the SDK sends instances widened in the same way: integers as integers (a * `u64` above the signed 64-bit range as a {@link Decimal}) and floats as floats. * * Each instance converts to its number with `valueOf()`, so arithmetic and comparisons with * plain numbers work on it (a `U64` to a `bigint`). */ export declare abstract class SizedNumber extends Value { static [Symbol.hasInstance](instance: unknown): boolean; /** * The value, which the kind holds exactly */ readonly value: T; protected constructor(value: T); /** * The kind of number, as SurrealQL spells it */ abstract get kind(): SizedNumberKind; /** * Equal to a number of the same kind and value. NaN equals NaN, and -0 differs from 0. */ equals(other: unknown): boolean; valueOf(): T; toJSON(): unknown; toString(): string; } /** A SurrealDB `i8`: an integer from -128 to 127. */ export declare class I8 extends SizedNumber { static [Symbol.hasInstance](instance: unknown): boolean; constructor(value: number | bigint); get kind(): "i8"; } /** A SurrealDB `u8`: an integer from 0 to 255. */ export declare class U8 extends SizedNumber { static [Symbol.hasInstance](instance: unknown): boolean; constructor(value: number | bigint); get kind(): "u8"; } /** A SurrealDB `i16`: an integer from -32768 to 32767. */ export declare class I16 extends SizedNumber { static [Symbol.hasInstance](instance: unknown): boolean; constructor(value: number | bigint); get kind(): "i16"; } /** A SurrealDB `u16`: an integer from 0 to 65535. */ export declare class U16 extends SizedNumber { static [Symbol.hasInstance](instance: unknown): boolean; constructor(value: number | bigint); get kind(): "u16"; } /** A SurrealDB `i32`: an integer from -2147483648 to 2147483647. */ export declare class I32 extends SizedNumber { static [Symbol.hasInstance](instance: unknown): boolean; constructor(value: number | bigint); get kind(): "i32"; } /** A SurrealDB `u32`: an integer from 0 to 4294967295. */ export declare class U32 extends SizedNumber { static [Symbol.hasInstance](instance: unknown): boolean; constructor(value: number | bigint); get kind(): "u32"; } /** * A SurrealDB `u64`: an integer from 0 to 18446744073709551615, held as a `bigint`. It is the * only integer kind which goes past the signed 64-bit range of a plain SurrealDB `int`. */ export declare class U64 extends SizedNumber { static [Symbol.hasInstance](instance: unknown): boolean; constructor(value: number | bigint); get kind(): "u64"; } /** * A SurrealDB `f16`: an IEEE 754 half-precision float. The value is rounded to the nearest * half when the instance is made, as a cast does, so `new F16(0.1).value` is `0.0999755859375`. */ export declare class F16 extends SizedNumber { static [Symbol.hasInstance](instance: unknown): boolean; constructor(value: number); get kind(): "f16"; } /** * A SurrealDB `f32`: an IEEE 754 single-precision float. The value is rounded to the nearest * single when the instance is made, as a cast does, so `new F32(0.1).value` is * `0.10000000149011612`. */ export declare class F32 extends SizedNumber { static [Symbol.hasInstance](instance: unknown): boolean; constructor(value: number); get kind(): "f32"; } /** * A SurrealQL string-represented record ID value. */ export declare class StringRecordId extends Value { static [Symbol.hasInstance](instance: unknown): boolean; private readonly _rid; constructor(rid: string | StringRecordId | _RecordId); equals(other: unknown): boolean; toJSON(): unknown; /** * @returns The string representation of the record ID */ toString(): string; } /** * Escape a given string to be used as a valid SurrealQL ident * * @param str - The string to escape * @returns Optionally escaped string */ export declare function escapeIdent(str: string): string; /** * Escape a number to be used as a valid SurrealQL ident * * @param num - The number to escape * @returns Optionally escaped number */ export declare function escapeNumber(num: number | bigint): string; /** * Escape a record id value part * * @param id The record id value part * @returns The escaped record id value part */ export declare function escapeIdPart(id: RecordIdValue): string; /** * Escape a range bound value * * @param bound The range bound containing a value * @returns The escaped range bound */ export declare function escapeRangeBound(bound: Bound): string; export type Jsonify = T extends U64 ? string : T extends SizedNumber ? number : JsonifyValue; type JsonifyValue = T extends Date | DateTime | Uuid | Decimal | Duration | Future | FileRef | Range$1 | StringRecordId ? string : T extends undefined ? undefined : T extends Record | Array ? { [K in keyof T]: Jsonify; } : T extends Map ? Map> : T extends Set ? Set> : T extends Geometry ? ReturnType : T extends _RecordId ? `${Tb}:${string}` : T extends _RecordIdRange ? `${Tb}:${string}..${string}` : T extends _Table ? `${Tb}` : T; /** * Recursively convert any supported SurrealQL value into a serializable JSON representation. * * @param input The input value * @returns JSON-safe representation */ export declare function jsonify(input: T): Jsonify; /** * Recursively convert any supported SurrealQL value into a string representation. * * @param input The input value * @returns Stringified SurrealQL representation */ export declare function toSurqlString(input: unknown): string; /** * Options for the CBOR codec */ export interface CborCodecOptions extends CodecOptions { /** * The CBOR dialect: 1 for `cbor`, which every server speaks, or 2 for `cbor.2`, which * SurrealDB 4.0 adds. `cbor.2` is `cbor` plus the tags 180 to 188 of the sized numbers. * Defaults to 1. */ version?: 1 | 2; } /** * A codec for encoding and decoding SurrealQL values using the SQON Binary (cbor) format. */ export declare class CborCodec implements ValueCodec { #private; /** * The default CborCodec instance. */ static readonly DEFAULT: CborCodec; constructor(options: CborCodecOptions); /** * The CBOR dialect this codec speaks: 1 for `cbor`, 2 for `cbor.2` */ get version(): 1 | 2; encode(data: T): Uint8Array; decode(data: Uint8Array): T; protected replacer: Replacer; protected tagged: Record; } /** * A codec for encoding and decoding SurrealQL values using the SQON Binary (flatbuffer) format. * * *Note*: This codec is not implemented in this version. */ export declare class FlatBufferCodec implements ValueCodec { #private; /** * The default FlatBufferCodec instance. */ static readonly DEFAULT: FlatBufferCodec; constructor(options: CodecOptions); encode(_data: T): Uint8Array; decode(_data: Uint8Array): T; } /** * A codec for encoding and decoding SurrealQL values using the SQON Json format. */ export declare class JsonCodec implements ValueCodec { #private; /** * The default JsonCodec instance. */ static readonly DEFAULT: JsonCodec; constructor(options: CodecOptions); /** * Encode a value tree to a SQON-J structure (JSON-safe plain object tree). */ encode(data: T): unknown; /** * Decode a SQON-J structure back to value instances. */ decode(data: unknown): T; } /** * How a column holds its values. A fixed kind takes a slot of a known width in the row's fixed * region, a variable kind a slot in the row's var region, and `object` takes neither: its value * is built from the columns which follow it. */ export declare enum Kind { Bool = 1, Int = 2, Float = 3, Datetime = 4, Duration = 5, Uuid = 6, Bit = 7, I8 = 8, I16 = 9, I32 = 10, U8 = 11, U16 = 12, U32 = 13, U64 = 14, F32 = 15, String = 16, Bytes = 17, Decimal = 18, Record = 19, Dynamic = 20, Array = 22, F16 = 23, DatetimeNs = 24, DurationNs = 25, Object = 32 } /** One column of a shape, as the SHAPE message lists it */ export interface Column { /** The key this column holds, non-empty UTF-8 */ name: string; /** How the value is held */ kind: Kind; /** For an `array`, the kind of every element; `undefined` for every other kind */ element: Kind | undefined; /** `MAY_BE_ABSENT` and `MAY_BE_NULL` */ flags: number; /** The first of the column's presence bits, or `NO_SLOT` for a required column */ presence: number; /** The fixed offset of a fixed kind, the var slot of a variable kind, `NO_SLOT` for an object */ slot: number; /** For a `record`, the table every value names, or empty when each value carries its own */ table: string; /** For an `object`, how many columns its subtree holds */ children: number; /** * For an `object`, the var slot of the node's remainder (`NO_SLOT` when it is closed); for a * kind with an overflow slot, that var slot; `NO_SLOT` for every other kind. */ rest: number; } /** * A validated shape: the row layout its columns imply, and the columns themselves depth-first. * * A shape is checked once, when the SHAPE message which announces it is read, so that the rows * which follow can be read without re-checking their layout. Every slot a column names is known * to lie inside the region it belongs to, so reading a row only has to bound its own bytes. */ export declare class Shape { #private; /** What each row is: `ROOT_OBJECT` or `ROOT_VALUE` */ readonly root: number; /** The bits of a row's presence region */ readonly presenceBits: number; /** The bytes of a row's fixed region */ readonly fixedSize: number; /** The number of var slots in a row */ readonly varCount: number; /** The root's remainder slot, `NO_SLOT` when closed; or a value root's value slot */ readonly rootRest: number; /** The columns, depth-first */ readonly columns: readonly Column[]; private constructor(); /** The bytes of a row before its var region */ get headerLength(): number; /** The bytes of a row's presence region */ get presenceLength(): number; /** Where a row's ends table starts */ get endsAt(): number; /** The deepest nesting of object columns */ get depth(): number; /** The bits of a row's last presence byte which must be zero, or `0` when it is full */ get paddingMask(): number; /** * The indices of the child columns of `node`, or of the root when it is `undefined`. * * Worked out once per shape rather than once per node per row: a shape is announced before * the rows which name it, so everything about its layout is settled before any row is read. */ children(node: number | undefined): readonly number[]; /** The remainder slot of `node`, or of the root when it is `undefined` */ rest(node: number | undefined): number; /** * A shape built from its parts, checked by the same rules a shape read off the wire is. * A shape derived from values to send goes through here, so a shape this SDK writes can * never be one it would refuse to read. */ static of(def: { root?: number; presenceBits?: number; fixedSize?: number; varCount?: number; rootRest?: number; columns?: Column[]; }): Shape; /** The SHAPE payload of this shape, past its shape id */ encode(): Uint8Array; /** Reads a shape from a SHAPE payload past its shape id, which it must fill exactly */ static decode(bytes: Uint8Array): Shape; } /** Decodes the one CBOR item a dynamic slice holds */ export type DynamicDecoder = (bytes: Uint8Array) => unknown; interface ReadOptions { /** Whether a datetime reads back as a native `Date`, the codec's `useNativeDates` */ nativeDates?: boolean; /** The codec's `valueDecodeVisitor`, which the CBOR path runs from each tag handler */ visit?: (value: unknown) => unknown; } /** * A block of rows, still in its bytes. * * Tag 57 decodes to this rather than to the rows themselves, because the shape ids a block * names live in a scope which is wider than the one CBOR item: the frames of one `query_stream` * share a scope, and so do the notifications of one live query. The envelope is decoded first, * which says which scope a block belongs to, and the block is read against it afterwards. */ export declare class ShapedBlock { /** The block's contents: its version byte and messages, past the CBOR byte string head */ readonly contents: Uint8Array; constructor(contents: Uint8Array); } /** * The shapes announced in one scope, and the reader which turns that scope's blocks into rows. * * ``` * block = version:u8 message* * message = type:u8 length:u32 payload[length] * SHAPE = shape_id:u32 shape * BATCH = shape_id:u32 row_count:u32 row[row_count] * ``` * * A SHAPE announces a shape under an id; the batches after it name the shape by that id, in the * same block or in a later one of the same scope. Announcing an id again replaces it for the * batches which follow. */ export declare class BlockReader { #private; /** Forgets every shape, ending the scope */ reset(): void; /** The rows of `block`, read against the shapes this scope has announced so far */ read(block: ShapedBlock, dynamic: DynamicDecoder, options?: ReadOptions): unknown[]; } /** One row of `shape` at the start of `bytes`: its value, and the bytes it took */ export declare function decodeRow(shape: Shape, bytes: Uint8Array, dynamic: DynamicDecoder, options?: ReadOptions): [ unknown, number ]; /** * How many rows an array needs before it is worth sending as a block. Below this the shape * costs more than the keys it saves, since a shape names every column once however few rows * follow it. */ export declare const BLOCK_THRESHOLD = 32; /** Options for the shaped codec */ export interface ShapedCodecOptions extends Omit { /** * The fewest rows an array must hold before it is sent as a block rather than as a CBOR * array. `Infinity` never sends one, which leaves this codec reading blocks only. * * @default 32 */ blockThreshold?: number; } /** * The codec of the `shaped` format: `cbor.2`, plus the tag 57 blocks which carry a list of rows. * * Everything which is not a row list — the response envelope, `begin`, `value`, `finished` and * `end` stream frames, a notification's `id`, `action` and `record`, errors — is `cbor.2` as * the CBOR codec writes it, so this codec is that codec with one tag added. * * **Reading.** Tag 57 decodes to a {@link ShapedBlock}, which still holds its bytes. The shape * ids in a block are resolved against a scope wider than the block itself, so the caller reads * a block through the {@link BlockReader} of its scope once the envelope says which scope that * is. * * **Writing.** The server reads a block wherever a CBOR request holds a value — an RPC * parameter, a query variable — so an array of rows long enough to be worth it is sent as one. * A shape is derived from the rows themselves, since a client is not told the schema of what it * sends; what no column can describe goes in a `dynamic` column. Only a connection which * negotiated `shaped` uses this codec, which is also how the SDK knows the server is one that * reads blocks at all: a server before 4.0 refuses tag 57 as an unknown tag. */ export declare class ShapedCodec extends CborCodec { #private; constructor(options?: ShapedCodecOptions); /** A decoder for the one CBOR item a dynamic slice holds */ get dynamic(): DynamicDecoder; /** The rows of `block`, read in `scope` */ rows(block: ShapedBlock, scope: BlockReader): unknown[]; encode(data: T): Uint8Array; /** * `rows` as the bytes of a tag 57 block, or `undefined` when they are not worth sending as * one: too few, not an array of objects, or a block which would be no smaller than the * CBOR array it replaces. * * That last case is real rather than theoretical. A shape gives every column a fixed width, * so a column of small integers takes eight bytes a row where CBOR takes one or two, and a * block of them is larger than the array. The server does not meet this because its shapes * come from a table's field definitions over rows already stored in that layout; a client * deriving a shape from the values in hand does. So the block is written and measured, and * kept only if it actually won. */ block(rows: readonly unknown[]): Uint8Array | undefined; } /** * A cursor over a block's bytes. * * Every number in the format is little-endian and unaligned, and every one is read through * here, so the rest of the decoder names the kind it wants rather than its width and byte * order. A read past the end refuses the bytes instead of returning a short result. */ export declare class ByteReader { #private; constructor(bytes: Uint8Array); /** Whether every byte has been read */ get done(): boolean; /** The bytes which remain unread */ get rest(): Uint8Array; /** Moves the cursor to `at`, counted from the start */ seek(at: number): this; /** Takes `n` bytes, as a view over the same buffer */ bytes(n: number): Uint8Array; /** Takes `n` bytes as UTF-8, or refuses them naming `what` they were */ text(n: number, what: string): string; u8(): number; i8(): number; u16(): number; i16(): number; u32(): number; i32(): number; u64(): bigint; i64(): bigint; /** The `int` in the next eight bytes, as {@link readInt} reads one */ int(): number | bigint; f32(): number; f64(): number; /** An IEEE 754 binary16, which `DataView` does not read everywhere this SDK runs */ f16(): number; /** Bit `at` of the bytes, counted least significant first within each byte */ bit(at: number): boolean; } /** * A run of slices addressed by a table of where each one ends. * * `ends[i]` is where slice `i` stops, counted from the start of the slices, so slice `i` runs * from `ends[i - 1]` to `ends[i]` with nothing before the first. A row's var region is built * this way, and so are the elements of an array of a variable kind. */ export declare class Slices { #private; /** Reads a table of `count` ends where the reader stands, then takes the slices after it */ constructor(r: ByteReader, count: number); /** How many bytes the slices take in all */ get length(): number; /** How many slices there are */ get count(): number; /** Slice `index` */ at(index: number): Uint8Array; } declare class ByteWriter { #private; /** * `capacity` is how many bytes to start with. A caller which knows the size it is about to * write passes it, which matters for a large one: growing from the default doubles its way * there, copying everything written so far each time. */ constructor(capacity?: number); /** The bytes written so far */ get bytes(): Uint8Array; /** How many bytes have been written */ get length(): number; u8(v: number): this; i8(v: number): this; u16(v: number): this; i16(v: number): this; u32(v: number): this; i32(v: number): this; u64(v: bigint): this; i64(v: bigint): this; f32(v: number): this; f64(v: number): this; /** An IEEE 754 binary16, which `DataView` does not write everywhere this SDK runs */ f16(v: number): this; raw(bytes: Uint8Array): this; /** UTF-8 text behind its length as a `u16`, as a shape writes a name or a table */ u16Text(value: string): this; /** Overwrites the `u32` at `at`, for a length which is only known once its body is written */ patchU32(at: number, v: number): this; } /** Encodes one value as a CBOR item, for the slices which hold one */ export type DynamicEncoder = (value: unknown) => Uint8Array; /** * Writing rows into a block. * * Only a request ever carries a block this SDK wrote: the server reads one wherever a CBOR * request holds a value, and answers are read, never written. A row is written in the shape * {@link deriveShape} found for the whole array, so every row fits by construction and a write * which does not fit is a bug rather than something to recover from. */ /** One block: a SHAPE message announcing `shape` under id 1, then a BATCH of every row */ export declare function writeBlock(shape: Shape, rows: readonly unknown[], dynamic: DynamicEncoder): Uint8Array; /** * One row: * * ``` * row = presence[ceil(presence_bits / 8)] fixed[fixed_size] ends[var_count]:u32 var[L] * ``` * * The presence and fixed regions are a fixed size, so they are built in place and copied in; * the var slices are gathered as they are produced, which is what gives the ends table. */ export declare function writeRow(out: ByteWriter, shape: Shape, row: unknown, dynamic: DynamicEncoder): void; /** * A batch of rows read into per-column form, and the shape they share. * * {@link collect} reads every row once. The shape is settled from what that saw, so it can be * measured before anything is written, and {@link write} then builds the block from the values * already in hand. */ export declare class Columns { #private; readonly shape: Shape; private constructor(); /** * Reads `rows` into columns and settles their shape, or gives up when they are not rows a * block can carry: an empty array, entries which are not plain objects, or no keys at all. */ static collect(rows: readonly unknown[]): Columns | undefined; /** The block these rows make: a SHAPE message announcing their shape, then one BATCH */ write(dynamic: DynamicEncoder): Uint8Array; } /** * The constants of the shaped block format, version 1. * * A block is a CBOR tag 57 around a byte string. Its contents are a version byte and then a * run of messages, each of which announces a shape or carries a batch of rows written in a * shape announced earlier. The format is specified in the server's * `doc/design/shaped-frames.md`; these names follow the ones it uses. */ /** The CBOR tag which wraps a block's byte string */ export declare const SHAPED_TAG = 57; /** The only block version this decoder reads */ declare const VERSION = 1; /** The presence index, slot or remainder of a column which has none */ export declare const NO_SLOT = 4294967295; /** A column flag: the column may be absent, or hold `NONE` */ export declare const MAY_BE_ABSENT = 1; /** A column flag: the column may be `NULL` */ export declare const MAY_BE_NULL = 2; /** The most columns a shape holds, at every depth */ export declare const MAX_COLUMNS = 4096; /** The deepest object nesting a shape holds */ export declare const MAX_DEPTH = 32; /** The most shapes one scope announces */ export declare const MAX_SHAPES = 65536; /** The largest fixed region of a row */ export declare const MAX_FIXED: number; /** * The shape which holds every row of `rows`, or `undefined` when they are not rows a block can * carry: an empty array, or one whose entries are not all plain objects. * * The server shapes rows it has not seen yet, so it fits each row to the shape in hand and * widens or re-announces when one does not fit. A client already holds the whole array, so it * reads every row once to learn the union of what they hold — which keys appear, which are ever * missing, `NULL` or `NONE`, and whether their kinds agree — and writes them all in one shape. * One SHAPE, one BATCH, no joining and no re-announcement. * * What no column can describe — a nested object, a ragged array, keys whose kinds disagree — * becomes a `dynamic` column holding one CBOR item. So a shape is always possible for an array * of objects; it just stops being worth sending when most of it is dynamic. * * That read is also what writing the rows needs, so the two share one pass: this hands back the * shape alone, for callers which only want to know what the rows look like. */ export declare function deriveShape(rows: readonly unknown[]): Shape | undefined; /** The kind which holds `value`, which is never `null` or `undefined` — those are states */ export declare function kindOf(value: unknown): Kind; /** * Options used to configure the {@link TextCodec}. */ export interface TextCodecOptions { /** * Use native `Date` objects instead of custom `DateTime` objects. * Using `Date` objects will result in a loss of nanosecond precision. */ useNativeDates?: boolean; } /** * A codec for encoding and decoding SurrealQL values using the SQON text format. * * Encoding produces a SurrealQL value string; decoding parses a single * SurrealQL value back into native JavaScript values and SQON `Value` * derivatives, matching the output of the CBOR and JSON codecs. */ export declare class TextCodec implements ValueCodec { #private; /** * The default TextCodec instance. */ static readonly DEFAULT: TextCodec; constructor(options?: TextCodecOptions); /** * Encode a value into its SurrealQL text representation. */ encode(data: T): string; /** * Decode a SurrealQL value string into value instances. */ decode(data: string): T; /** Parse any single SQON value. */ static parseValue(input: string, options?: TextCodecOptions): unknown; /** Parse a string value. */ static parseString(input: string, options?: TextCodecOptions): string; /** Parse a numeric value (`int` as `number`/`bigint`, `float` as `number`). */ static parseNumber(input: string, options?: TextCodecOptions): number | bigint; /** Parse a boolean value. */ static parseBool(input: string, options?: TextCodecOptions): boolean; /** Parse a decimal value. */ static parseDecimal(input: string, options?: TextCodecOptions): Decimal; /** Parse a duration value. */ static parseDuration(input: string, options?: TextCodecOptions): Duration; /** Parse a datetime value (a `Date` when `useNativeDates` is set). */ static parseDatetime(input: string, options?: TextCodecOptions): DateTime | Date; /** Parse a UUID value. */ static parseUuid(input: string, options?: TextCodecOptions): Uuid; /** Parse a bytes value. */ static parseBytes(input: string, options?: TextCodecOptions): Uint8Array; /** Parse a file reference value. */ static parseFile(input: string, options?: TextCodecOptions): FileRef; /** Parse a table value. */ static parseTable(input: string, options?: TextCodecOptions): _Table; /** Parse a record id value. */ static parseRecordId(input: string, options?: TextCodecOptions): _RecordId; /** Parse a record id range value. */ static parseRecordIdRange(input: string, options?: TextCodecOptions): _RecordIdRange; /** Parse a range value. */ static parseRange(input: string, options?: TextCodecOptions): Range$1; /** Parse a geometry point value. */ static parseGeometryPoint(input: string, options?: TextCodecOptions): GeometryPoint; /** Parse an array value. */ static parseArray(input: string, options?: TextCodecOptions): unknown[]; /** Parse a set value. */ static parseSet(input: string, options?: TextCodecOptions): Set; /** Parse a plain object value. */ static parseObject(input: string, options?: TextCodecOptions): Record; } export { Range$1 as Range, VERSION as SHAPED_VERSION, _RecordId as RecordId, _RecordIdRange as RecordIdRange, _Table as Table, toSurqlString as toSurrealqlString, }; export {};