UNPKG

@sassoftware/vi-api

Version:
45 lines (44 loc) 1.81 kB
import { Record, Traversal } from "../svi-datahub"; export interface TraversalWithEndpoint extends Traversal { endPoint?: string | null; } export interface SviRecord extends Record { displayLabel?: string; } /** * This API provides functionality related to traversal data. * * Accessed from the window at `window.sas.vi.traversal`. * * @example window.sas.vi.traversal.getTraversals(); * @category API */ export interface TraversalApi { /** * @method * @description Gets field values from a list of traversals. * @param rootObjectId {string} Traversal's root object ID. * @param rootObjectType {string} Traversal's root object Type. * @param traversalUuids {string[]} Array of traversal UUIDs associated with the root object type. * @param destinationObjectType {string} Destination object's type. * @param fields {string[]} Names of the fields to be retrieved. * @param options {object} Optional object containing options: includeDisplayLabels. * @returns Promise containing the array of objects with specified fields and their values. */ getFieldsByTraversals(rootObjectId: string, rootObjectType: string, traversalUuids: string[], destinationObjectType: string, fields: string[], options?: { includeDisplayLabels?: boolean; }): Promise<SviRecord[]>; /** * @method * @description Gets all Traversals. * @returns Promise containing the array of Traversals. */ getTraversals(): Promise<TraversalWithEndpoint[]>; /** * @method * @description Gets a traversal with the specified UUID parameter. * @param uuid {string} UUID of the traversal to be returned. * @returns Promise containing the specified traversal. */ getTraversalByUuid(uuid: string): Promise<Traversal>; }