sfcc-cip-analytics-client
Version:
SFCC Commerce Intelligence Platform Analytics Client
19 lines (18 loc) • 993 B
TypeScript
/**
* Avatica protobuf utility functions for decoding and processing result data.
*/
import { ISignature, IFrame, IColumnMetaData } from './protocol';
/**
* Converts an Avatica TypedValue into a standard JavaScript type.
* @param columnValue The Avatica ColumnValue object containing the typed value.
* @param columnMetadata Optional column metadata for enhanced type detection.
* @returns The corresponding JavaScript primitive or object.
*/
export declare function decodeValue(columnValue: any, columnMetadata?: IColumnMetaData): any;
/**
* Processes an Avatica result frame into a more usable format (array of objects).
* @param signature The signature from the execute response, containing column info.
* @param frame The data frame containing rows of typed values.
* @returns An array of objects, where each object represents a row with column names as keys.
*/
export declare function processFrame<T = any>(signature: ISignature | undefined, frame: IFrame | undefined): T[];