Default tree export resolver used to resolve a tree id/name to a full export w/o dependencies of that tree from a platform instance.
Count all journeys in the active realm.
exact count when supported by the backing API
Factory that creates a tree export resolver used to resolve a tree id to a full export of that tree from a multi-tree export file.
multi-tree export file
tree export resolver
Create journey without dependencies.
journey id/name
journey payload object
a promise that resolves to a journey object
Create an empty multi tree export template
an empty multi tree export template
Create an empty single tree export template
an empty single tree export template
Delete a journey
journey id/name
deep=true also delete all the nodes and inner nodes, verbose=true print verbose info
Delete all journeys
deep=true also delete all the nodes and inner nodes, verbose=true print verbose info
OptionalresultCallback: ResultCallback<DeleteJourneyStatus>
Optional callback to process individual results
Disable a journey
journey id/name
the updated tree/journey object
Enable a journey
journey id/name
the updated tree/journey object
Create export data for a tree/journey with all its nodes and dependencies. The export data can be written to a file as is.
tree id/name
Optionaloptions: TreeExportOptions
export options
a promise that resolves to an object containing the tree and any exported dependencies
Create export data for all trees/journeys with all their nodes and dependencies. The export data can be written to a file as is.
Optionaloptions: TreeExportOptions
export options
OptionalresultCallback: ResultCallback<SingleTreeExportInterface>
Optional callback to process individual results
a promise that resolves to an object containing the trees and all their nodes and dependencies
Find every journey/node that references a given script, by scanning all nodes in the active realm for a matching script id and cross-referencing against every journey's node map. Also resolves references nested inside a container node (e.g. a Page Node), reporting the top-level node a journey actually references alongside the inner node that uses the script.
script id to find references to
a promise that resolves to every reference found
Get the node reference obbject for a node object. Node reference objects are used in a tree flow definition and within page nodes to reference nodes. Among other things, node references contain all the non-configuration meta data that exists for readaility, like the x/y coordinates of the node and the display name chosen by the tree designer. The dislay name is the only intuitive link between the graphical representation of the tree and the node configurations that make up the tree.
node object to retrieve the node reference object for
tree export with or without dependencies
node reference object
Get tree dependencies (all descendent inner trees). The whole tree is
described, to any depth: a sub-journey referenced by several journeys is
repeated and expanded in full under every parent. A sub-journey that is
already an ancestor on the current path (a cycle), or whose id is in
resolvedTreeIds, appears as a leaf and is not expanded again. A
sub-journey that cannot be resolved appears as a leaf. Each sub-journey is
resolved at most once per call.
single tree export
tree export resolver callback function
OptionalresolvedTreeIds: string[]
list of tree ids that are listed as leaves and not expanded (the list is not modified)
a promise that resolves to a tree dependency map
Import journey
tree object containing tree and all its dependencies
import options
a promise that resolves to a journey object
Import journeys
map of trees object
import options
OptionalresultCallback: ResultCallback<TreeSkeleton>
Optional callback to process individual results. When given, the outcome of every journey is passed to it as it happens (the journey, or an error that names the journey) and a failed journey does not throw. Without it, a validation error or a missing dependency rejects the batch before anything is written, and a journey that cannot be written throws. Failing to list the installed journeys always throws.
a promise that resolves to the journeys that were imported
Without a result callback the complete batch is validated before reading installed journeys or writing any journey. If validation fails, the batch is rejected without partially importing valid journeys. With a result callback every journey is an item of its own: a journey that has validation errors, a journey that needs a journey that is neither installed nor in the import data, and a journey that needs a journey of the batch that failed are reported to the callback as failed and are not written; every other journey is imported.
Read journey without dependencies.
journey id/name
a promise that resolves to a journey object
Read all journeys without dependencies.
a promise that resolves to an array of journey objects
Resolve journey dependencies
Map of installed journeys
Map of journeys to resolve dependencies for
Map to hold the names of unresolved journeys and their dependencies
Array to hold the names of resolved journeys
Optionalindex: number
Depth of recursion
Update journey without dependencies.
journey id/name
journey payload object
a promise that resolves to a journey object
Validate journeys for referential integrity.
journeyIds |
journeysExport |
Behavior |
|---|---|---|
omitted, null or [] |
omitted | Read and validate all journeys in the realm. |
['login'] |
omitted | Read and validate journey login from the realm. |
omitted, null or [] |
supplied | Validate all journeys in the export offline. |
['login'] |
supplied | Validate tree login in the export offline. |
Duplicate IDs are processed once. Live validation reads each journey once;
findings are returned without printing. When verbose, live validation
prints the export trace as exportJourney does (findings are never
printed). Missing, blank, or unreadable journeys are reported together
after all requested journeys are processed: without a result callback the
function then throws one error that nests one error per failed journey
and returns no findings; with one, each journey's outcome is passed to
the callback as it happens (the findings of the journey, or an error that
names the journey), the function does not throw for a failed journey and
returns the findings of all journeys that could be validated.
Dependency-completeness warnings are export-only: each non-empty dependency
section is checked against that journey's node references. Empty sections
are skipped. Live validation reads with deps: false, so it performs no
dependency checks and does not check resource existence in the tenant.
OptionaljourneyIds: string[]
journey names; omit or pass an empty array to validate all journeys
OptionaljourneysExport: MultiTreeExportInterface
optional export; when supplied, validation is offline
OptionalresultCallback: ResultCallback<JourneyValidationFinding[]>
Optional callback to process individual results: the findings of one journey (an empty array for a journey without findings) or an error that names the journey that could not be validated. Failing to list the journeys of the realm, and invalid arguments, always throw.
validation findings
Tree export resolver used to resolve a tree id/name to a full export of that tree from individual
treename.journey.jsonexport files.