import { ConfigOverride } from '../SWFConfig'; import { ClaimCheck } from './ClaimCheck'; export declare const DefaultFields: string[]; /** * we want to be able to pass around JSON objects but SWF * only really supports strings for most of its data fields * this class takes care of wrapping fields as well as claimChecking * fields that are above the max length */ export declare class FieldSerializer { fields: string[]; claimChecker: ClaimCheck; maxLength: number; private cache; constructor(claimChecker: ClaimCheck, fields?: string[], opts?: ConfigOverride); serializeAll(input: any, cb: { (Error?, T?); }): void; serialize(input: any, cb: { (err: Error | null, output: string); }): void; deserializeAll(input: Object, cb: { (Error?, T?); }): void; deserializeSome(fields: string[], input: Object, cb: { (Error?, T?); }): void; deserialize(input: string | null, cb: { (Error?, T?); }): any; isCached(key: string): boolean; getFromCache(key: string): T | null; saveToCache(key: string, val: T): void; private tooLong(field); }