@mastra/core
Version:
Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.
24 lines • 850 B
TypeScript
import type { MastraDBMessage } from './types.js';
/**
* Serialized form of a MastraDBMessage where Date is converted to string
*/
export type SerializedMessage = Omit<MastraDBMessage, 'createdAt'> & {
createdAt: string;
};
/**
* Serialize a message by converting Date to string
*/
export declare function serializeMessage(message: MastraDBMessage): SerializedMessage;
/**
* Deserialize a message by converting string back to Date
*/
export declare function deserializeMessage(message: SerializedMessage): MastraDBMessage;
/**
* Serialize an array of messages
*/
export declare function serializeMessages(messages: MastraDBMessage[]): SerializedMessage[];
/**
* Deserialize an array of messages
*/
export declare function deserializeMessages(messages: SerializedMessage[]): MastraDBMessage[];
//# sourceMappingURL=serialization.d.ts.map