Skip to main content

Outputs

normalizeOutputs(outputs)

Takes a ready deployment’s outputs and returns NormalizedOutputs. It accepts bare values and { value, sensitive } wrappers, drops values meant only for Cybr, and never throws on a malformed value. null or undefined returns empty lists.
OutputRow has key, label, value, secret, sensitive, and kind. The launch guide explains each one. OutputRowKind is the type of kind.

Learners

createGuestLearnerId(prefix?)

Returns a new guest learner ID: <prefix>_<uuid>. The prefix defaults to guest and accepts 1 to 64 letters, digits, underscores, or hyphens. Other prefixes throw TypeError.
Call it on your server and keep the result in an httpOnly cookie. See guest learners.

Videos

videoEmbedUrl(video)

Returns the iframe src for a LabVideo, on the provider’s privacy-enhanced player, starting at startSeconds when set. Returns null for an unknown provider or a malformed ID.

videoWatchUrl(video)

Returns a link to the video on the provider’s own site, or null in the same cases.
@cybr/labs-sdk/video makes no requests and is safe to bundle into a web page. It also exports the LabVideo and VideoProvider types.