TALY Journey Configuration SDK (Software Development Kit)

The package @allianz/taly-sdk contains utility functions for working with TALY journeys and their configuration files.

1. Programmatic Usage

You can use the SDK as a library in your JavaScript projects.

Quick Start

  • Install the package @allianz/taly-sdk with your favorite package manager

  • Use the functions provided by the SDK

    import { getUniqueBuildingBlocks } from '@allianz/taly-sdk';
    import { loadJourneyFromFolder } from '@allianz/taly-sdk/node';
    
    // async function ...() {
    // load a journey configuration from a folder
    // (assuming you have a journey configuration in './config')
    const journey = await loadJourneyFromFolder('./config');
    // get the unique Building Blocks from that journey
    const uniqueBuildingBlocks = getUniqueBuildingBlocks(journey);

2. Command Line Usage

The TALY SDK comes with a Command Line Interface (CLI). Use the CLI to analyze journeys from the command line. Use the taly command that is installed with the @allianz/taly-sdk package, for example using npx:

npx --package @allianz/taly-sdk taly -h
# if @allianz/taly-sdk is installed in your local node_modules,
# you can skip the --package argument and simply run
npx taly -h

The -h argument will make the CLI print out a help message containing the available commands and arguments.

Most CLI commands require a --config-directory/-c argument pointing to a directory containing a journey configuration:

npx --package @allianz/taly-sdk taly get-building-block-packages -c ./apps/playground/config/

2.1. Available Commands

Command Description
generate-workspace Generate a fresh Nx workspace ready to get started with TALY
generate-journey Generate a journey from a single config folder that exists outside of an Nx workspace
validate Validate journey configuration files
get-building-block-counts Print Building Block names and their usage count in a journey
get-building-blocks List all Building Blocks that are used in a journey
get-building-block-packages List all Building Block packages that are used in the journey
get-building-blocks-with-journey-metadata Print Building Block related data, including Building Block selectors, packages, usage count, pages where a Building Block is used, whether a Building Block is a global or local package.
migrate Migrates a journey configuration by running all applicable migrations up to the currently installed TALY version.

results matching ""

    No results matching ""