import { A as AbstractStruct } from '../abstract-struct-CmI-d1DB.js';

declare const JsonType = "J";
/**
 * JSON serialization adapter
 */
declare class Json extends AbstractStruct {
    readonly TYPE: string;
    /**
     * Returns the JSON representation of a value
     * @param mixed $data
     * @return string
     */
    pack(data: Buffer): string;
    /**
     * Takes a JSON encoded string and converts it into a PHP value
     * @param string $data
     * @return mixed
     */
    unpack(data: string): string | object;
}

declare const MsgpackType = "M";
/**
 * Msgpack serialization adapter
 */
declare class Msgpack extends AbstractStruct {
    readonly TYPE: string;
    pack(data: string): string | Buffer;
    unpack(data: string): string | object;
}

declare const Rfc3986Type = "H";
/**
 * RFC 3986 serialization adapter
 */
declare class Rfc3986 extends AbstractStruct {
    readonly TYPE: string;
    /**
     * Encodes structure as URL-encoded query string
     * @param array $data
     * @return string
     */
    pack(data: string): string;
    /**
     * Parses string as if it were the query string passed via a URL
     * @param string $data
     * @return array
     */
    unpack(data: string): object;
}

declare const SerializeType = "S";
/**
 * Native serialization adapter
 *
 */
declare class Serialize extends AbstractStruct {
    readonly TYPE: string;
    /**
     * Generates a storable representation of a value
     * @param mixed $data
     * @return string
     */
    pack(data: string | Buffer): string | Buffer;
    /**
     * Creates a value from a stored representation
     */
    unpack(data: string): string;
}

declare class StructFactory {
    /**
     * Return Struct class
     * @param string $name
     * @return AbstractStruct
     */
    static create(name: string | Buffer): AbstractStruct;
    /**
     * Returns Struct class basing on payload
     * @param string $payload
     * @return AbstractStruct
     */
    static createFromPayload(payload: string): AbstractStruct;
}

export { AbstractStruct, Json, JsonType, Msgpack, MsgpackType, Rfc3986, Rfc3986Type, Serialize, SerializeType, StructFactory };
