import * as message from './message';
/**
 * データID付きのデータポイントのリストを表します。
 * @category Data ID and Data Point
 */
export declare class DataPointGroup {
    /** データID。 */
    dataId: message.DataId;
    /** データポイントのリスト。 */
    dataPoints: message.DataPoint[];
    constructor(init: {
        dataId: DataPointGroup['dataId'];
        dataPoints: DataPointGroup['dataPoints'];
    });
}
/**
 * アップストリームチャンクを表します。
 * @category Upstream
 */
export declare class UpstreamChunk {
    /** シーケンス番号。 */
    sequenceNumber: number;
    /** データポイントグループのリスト。 */
    dataPointGroups: DataPointGroup[];
    constructor(init: {
        sequenceNumber: UpstreamChunk['sequenceNumber'];
        dataPointGroups: UpstreamChunk['dataPointGroups'];
    });
}
/**
 * アップストリームチャンクで送信されたデータポイントの処理結果を表します。
 * @category Upstream
 */
export declare class UpstreamChunkResult {
    /** シーケンス番号。 */
    sequenceNumber: number;
    /** 結果コード。 */
    resultCode: message.ResultCode;
    /** 結果文字列。 */
    resultString: string;
    constructor(init: {
        sequenceNumber: UpstreamChunkResult['sequenceNumber'];
        resultCode: UpstreamChunkResult['resultCode'];
        resultString: UpstreamChunkResult['resultString'];
    });
}
/**
 * アップストリームチャンクに対する確認応答を表します。
 * @category Upstream
 */
export declare class UpstreamChunkAck {
    /** 処理結果のリスト */
    results: UpstreamChunkResult[];
    constructor(init: {
        results: UpstreamChunkAck['results'];
    });
}
/**
 * ダウンストリームチャンクを表します。
 * @category Downstream
 */
export declare class DownstreamChunk {
    /** アップストリーム情報。 */
    upstreamInfo: message.UpstreamInfo;
    /** シーケンス番号。 */
    sequenceNumber: number;
    /** データポイントグループのリスト。 */
    dataPointGroups: DataPointGroup[];
    constructor(init: {
        upstreamInfo: DownstreamChunk['upstreamInfo'];
        sequenceNumber: DownstreamChunk['sequenceNumber'];
        dataPointGroups: DownstreamChunk['dataPointGroups'];
    });
}
/**
 * ダウンストリームメタデータを表します。
 * @category Metadata
 */
export declare class DownstreamMetadata {
    /** 送信元ノードID。 */
    sourceNodeId: string;
    /** メタデータ。 */
    metadata: message.Metadata;
    constructor(init: {
        sourceNodeId: DownstreamMetadata['sourceNodeId'];
        metadata: DownstreamMetadata['metadata'];
    });
}
/**
 * ダウンストリームコールを表します。
 * @category E2E Call
 */
export declare class DownstreamCall {
    /** コールID。 */
    callId: string;
    /** 送信元ノードID。 */
    sourceNodeId: string;
    /** 名称。 */
    name: string;
    /** 型。*/
    type: string;
    /** ペイロード。*/
    payload: Uint8Array;
    constructor(init: {
        callId: DownstreamCall['callId'];
        sourceNodeId: DownstreamCall['sourceNodeId'];
        name: DownstreamCall['name'];
        type: DownstreamCall['type'];
        payload: DownstreamCall['payload'];
    });
}
/**
 * ダウンストリームリプライコールを表します。
 * @category E2E Call
 */
export declare class DownstreamReplyCall {
    /** リクエストコールID。 */
    requestCalId: string;
    /** 送信元ノードID。 */
    sourceNodeId: string;
    /** 名称。 */
    name: string;
    /** 型。 */
    type: string;
    /** ペイロード。 */
    payload: Uint8Array;
    constructor(init: {
        requestCalId: DownstreamReplyCall['requestCalId'];
        sourceNodeId: DownstreamReplyCall['sourceNodeId'];
        name: DownstreamReplyCall['name'];
        type: DownstreamReplyCall['type'];
        payload: DownstreamReplyCall['payload'];
    });
}
/**
 * アップストリームコールを表します。
 * @category E2E Call
 */
export declare class UpstreamCall {
    /** 宛先ノードID。 */
    destinationNodeId: string;
    /** 名称。 */
    name: string;
    /** 型。 */
    type: string;
    /** ペイロード。 */
    payload: Uint8Array;
    constructor(init: {
        destinationNodeId: UpstreamCall['destinationNodeId'];
        name: UpstreamCall['name'];
        type: UpstreamCall['type'];
        payload: UpstreamCall['payload'];
    });
}
/**
 * アップストリームリプライコールを表します。
 * @category E2E Call
 */
export declare class UpstreamReplyCall {
    /** リクエストコールID。 */
    requestCallId: string;
    /** 送信先ノードID。*/
    destinationNodeId: string;
    /** 名称。 */
    name: string;
    /** 型。*/
    type: string;
    /** ペイロード。 */
    payload: Uint8Array;
    constructor(init: {
        requestCallId: UpstreamReplyCall['requestCallId'];
        destinationNodeId: UpstreamReplyCall['destinationNodeId'];
        name: UpstreamReplyCall['name'];
        type: UpstreamReplyCall['type'];
        payload: UpstreamReplyCall['payload'];
    });
}
/**
 * ダウンストリームの状態を表します。
 * @category Downstream
 */
export declare class DownstreamState {
    /** データIDエイリアスとデータIDのマップ。 */
    dataIdAliases: Record<number, message.DataId>;
    /** アップストリームエイリアスとアップストリーム情報のマップ。 */
    upstreamInfos: Record<number, message.UpstreamInfo>;
    /** 最後に払い出されたデータIDエイリアス。 */
    lastIssuedDataIdAlias?: number;
    /** 最後に払い出されたアップストリーム情報のエイリアス。 */
    lastIssuedUpstreamInfoAlias?: number;
    /** 最後に払い出されたAckID。 */
    lastIssuedAckId?: number;
    constructor(init: {
        dataIdAliases: DownstreamState['dataIdAliases'];
        upstreamInfos: DownstreamState['upstreamInfos'];
        lastIssuedDataIdAlias: DownstreamState['lastIssuedDataIdAlias'];
        lastIssuedUpstreamInfoAlias: DownstreamState['lastIssuedUpstreamInfoAlias'];
        lastIssuedAckId: DownstreamState['lastIssuedAckId'];
    });
}
/**
 * アップストリームの状態を表します。
 * @category Upstream
 */
export declare class UpstreamState {
    /** データIDエイリアスとデータIDのマップ。 */
    dataIdAliases: Record<number, message.DataId>;
    /** 総送信データポイント数。 */
    totalDataPoints: bigint;
    /** 最後に払い出されたシーケンス番号。 */
    lastIssuedSequenceNumber?: number;
    /** 内部に保存しているデータポイントバッファ。 */
    dataPointsBuffer?: DataPointGroup[];
    constructor(init: {
        dataIdAliases: UpstreamState['dataIdAliases'];
        totalDataPoints: UpstreamState['totalDataPoints'];
        lastIssuedSequenceNumber: UpstreamState['lastIssuedSequenceNumber'];
        dataPointsBuffer: UpstreamState['dataPointsBuffer'];
    });
}
/**
 * ログの出力レベルです。
 * @category Enum
 * @enum
 */
export declare const LOG_LEVEL: {
    /** ログを出力しません。 */
    readonly NONE: "none";
    /** 動作状況に関する詳細な情報を出力します。 */
    readonly DEBUG: "debug";
    /** 実行時の何らかの注目すべき事象を出力します。 */
    readonly INFO: "info";
    /** エラーではない例外的な事象を出力します。 */
    readonly WARNING: "warning";
    /** エラーを出力します。 */
    readonly ERROR: "error";
};
/**
 * {@link LOG_LEVEL}の型です。
 * @category Enum
 */
export type LogLevel = (typeof LOG_LEVEL)[keyof typeof LOG_LEVEL];
/**
 * イベントリスナーを追加する時に指定可能なオプションです。
 * @category Other
 */
export interface EventListenerOptions {
    /**
     * 一度だけイベントを呼び出します。
     * @default false
     */
    once?: boolean;
}
