Skip to content

createPersistenceEnvelope

function

Back to Helios Web API

Kind
function
Source
src/persistence/schema.js:302

Description

Create a versioned persistence envelope.

Signature

export function createPersistenceEnvelope(kind, payload, metadata = {}) {

Parameters

NameTypeAttributesDefaultDescription
kindstringOne of preferences, visualization, or session.
payloadObjectPayload to normalize for the selected kind.
metadataObjectoptionalCaller-owned metadata copied into the envelope.

Returns

Current-schema persistence envelope.

Type Object

Notes

Envelopes are the boundary used by Helios persistence APIs and by portable network visualization attachments. Unknown payload fields are normalized rather than passed through blindly.