UNPKG

@synerty/vortexjs

Version:

Custom observable data serialisation and routing based on Angular 2+

36 lines (35 loc) 1.36 kB
import { Jsonable } from "./exports"; import "./UtilArray"; import { PayloadDelegateABC } from "./payload/PayloadDelegateABC"; import { Payload } from "./Payload"; /** * * This class is serialised and transferred over the vortex to the server. */ export declare class PayloadEnvelope extends Jsonable { private static workerDelegate; static readonly vortexUuidKey = "__vortexUuid__"; static readonly vortexNameKey = "__vortexName__"; filt: {}; data: any | string | null; result: string | {} | null; date: Date | null; /** * Payload Envelope * This class is serialised and tranferred over the vortex to the server. * @param filt The filter that the server handler is listening for * @param data: The encoded payload to go into this envelope * different location @depreciated * @param date The date for this envelope, it should match the payload. */ constructor(filt?: {}, data?: any | string | null, date?: Date | null); static setWorkerDelegate(delegate: PayloadDelegateABC): void; get encodedPayload(): string | null; set encodedPayload(val: string | null); isEmpty(): boolean; decodePayload(): Promise<Payload>; private _fromJson; private _toJson; static fromVortexMsg(vortexStr: string): Promise<PayloadEnvelope>; toVortexMsg(): Promise<string>; }