@viewdo/dxp-story-cli
Version:
DXP Story Management CLI
153 lines (152 loc) • 5.23 kB
TypeScript
import { AssetDefinition } from "../AssetDefinition";
import { IModelConfiguration } from "../IModelConfiguration";
import { EpisodeConfiguration } from "./EpisodeConfiguration";
import { OrganizationConfiguration } from "./OrganizationConfiguration";
import { EmailTemplate } from "./support/EmailTemplate";
import { TemplateMeta } from "./support/TemplateMeta";
import { Input } from "./support/Input";
import { StoryAction } from "./support/StoryAction";
import { StoryCustomKpi } from "./support/StoryCustomKpi";
import { StoryCustomLink } from "./support/StoryCustomLink";
import { StoryEvent } from "./support/StoryEvent";
import { StoryExternalEvent } from "./support/StoryExternalEvent";
import { StoryInputMap } from "./support/StoryInputMap";
/**
* STORY CONFIG:
* -----------------------------------------------------
* This file defines configurable story settings hosted in the DXP platform.
*/
export declare class StoryConfiguration implements IModelConfiguration {
/**
* DXP model-type (read-only)
*/
readonly kind: string;
/**
* API version, model location (read-only)
*/
readonly apiVersion: string;
static file_name: string;
private from_key;
/** @ignore */
externalSyncId: string;
/**
* The key for this model in the DXP platform (readonly)
* @pattern ^[A-Za-z0-9-_]{1,18}$
*/
key: string;
/**
* The key for this model in the DXP platform (readonly)
* @pattern ^[A-Za-z0-9-_]{1,18}$
*/
publicKey: string;
name: string;
description?: string;
/** @ignore */
thumbnailUrl?: string;
organizationKey: string;
/**
* The host-type this story is meant for.
* Hosted for NENT-based stories served from the platform, otherwise
* Website for stories served from a website.
*/
host: "Website" | "Hosted";
/**
* Hosted URL for the story.
* If set manually, overrides default convention-based URL.
*/
url: string;
/**
* Hosted production-facing URL for the story.
* If set manually, overrides default convention-based production URL.
*/
vanityUrl: string;
/**
* Set this value to true to prevent duplicates
* in public-created experiences. Be sure to
* annotate which contact-experiences is the
* identifier to check.
*/
preventDuplicates: boolean;
/**
* A list of story milestones, in order.
* @items.pattern ^[A-Za-z0-9-_\s]{1,30}$
*/
milestones: Array<string>;
/**
* A list of story inputs, used to define the story database.
*/
inputs: Array<Input>;
/**
* A list of story events that can be raised during the experience.
*/
events: Array<StoryEvent>;
/**
* A list of external events that can be raised using our published web-hooks.
*/
externalEvents: Array<StoryExternalEvent>;
/**
* A list of alternative story data, css and js sets that have the same data inputs and contacts.
*/
episodes: Array<EpisodeConfiguration>;
/**
* A list of story custom links to distribute trackable redirection URLs.
*/
customLinks: Array<StoryCustomLink>;
/**
* A list of story KPIs counters that can be incremented with published web-hooks.
*/
customKpis: Array<StoryCustomKpi>;
/**
* Toggle to allow anonymous experiences
*/
funnelEnabled: boolean;
/**
* Root directory where email templates are stored in Stripo.
*/
stripoRootDirectory: string;
/**
* A list of story email templates, usable in Actions
*/
emailTemplates: Array<EmailTemplate>;
/**
* A list of story HTML templates that will be hosted and rendered using DXP tokens.
*/
htmlTemplates: Array<TemplateMeta>;
/**
* A list of story text templates usable in Actions or in the story as a URL reference.
*/
textTemplates: Array<TemplateMeta>;
/** A set of maps usable in actions or in the XAPI to translate input keys to external keys. */
inputMaps: Array<StoryInputMap>;
/**
* A list of configured actions that are triggered via events fired during the lifetime of an experience.
*
* These actions use services configured with the organization-configuration.
*/
actions: Array<StoryAction>;
/**
* Optional (but encouraged) org model to be used during validateOnly story pushes
*/
organization: OrganizationConfiguration;
/** @ignore */
workflow: Array<StoryAction>;
/** @ignore */
get api_root(): string;
private _local_root;
/** @ignore */
get local_root(): string;
set local_root(local_root: string);
/** @ignore */
get assets_directory(): string;
/** @ignore */
get cdn_root(): string;
getAssets(from_key?: string, local_root?: string): Array<AssetDefinition>;
getExportPath(): string;
getTemplateKey(dir: string, file: string): string;
getTemplateName(input: string): string;
_getEpisodeAssetKey(index: number, asset_key: string): string;
getAssetDefinition(key: string): AssetDefinition;
convertFromModel(story: any): StoryConfiguration;
/** @ignore */
get episode_keys(): string[];
}