// Type definitions for non-npm package qlik-engineapi 12.67 // Project: http://help.qlik.com/en-US/sense-developer/November2017/Subsystems/EngineAPI/Content/introducing-engine-API.htm // Definitions by: Konrad Mattheis // Richard Ison // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace EngineAPI { type CommandType = "JsonRequest" | "GetCustomCaption" | "IsConnected" | "DisableQlikViewSelectButton" | "HaveStarField"; type LogonType = "LOG_ON_SERVICE_USER" | "LOG_ON_CURRENT_USER"; type NxGrpType = "N" | "H" | "C" | string; type FieldAttributesType = "U" | "A" | "I" | "R" | "F" | "M" | "D" | "T" | "TS" | "IV"; type FileDataFormatType = "CSV" | "FIX" | "DIF" | "EXCEL_BIFF" | "EXCEL_OOXML" | "HTML" | "XML" | "QVX" | "JSON" | "KML"; type TableRecordKeyType = "NOT_KEY" | "ANY_KEY" | "PRIMARY_KEY" | "PERFECT_KEY"; /** * One of: * - Cleared: In this mode, the first step is to clear any current selections in the app. * The second step is to search for one or more terms in the values of the app. * - LockedFieldsOnly: In this mode, the search applies only to the values associated with * the selections made in locked fields, ignoring selections in any unlocked field. * If no locked fields, the behavior is identical to the Cleared context. * You cannot make any new selections in a locked field. You can get search hits for * the associated values of a locked field but you cannot get the search hits for the non associative values. * - CurrentSelections: In this mode, the current selections are kept (if any). Search for one or more terms in the values of the app. * New selections are made on top of the current selections. If no selections were made before the search, * this mode is identical to the Cleared context. */ type ContextType = "Cleared" | "LockedFieldsOnly" | "CurrentSelections"; type SearchObjectsGroupType = "DatasetType" | "GenericObjectsType"; type SearchObjectsItemType = "0" | "1"; type NxPatchOpType = "Add" | "Remove" | "Replace"; type FileType = "CSV_C" | "CSV_T" | "OOXML"; type ExportStateType = "P" | "A"; type ReductionModeType = "N" | "D1" | "S" | "C" | "ST"; type FieldDefExType = "0" | "1" | "2"; type FolderItemType = "FOLDER" | "FILE" | "OTHER"; type NxCellStateType = "L" | "S" | "O" | "D" | "A" | "X" | "XS" | "XL"; type NxCellType = "V" | "E" | "N" | "T" | "P" | "R" | "U"; type NxSelectionCellType = "D" | "T" | "L"; type SortIndicatorType = "N" | "A" | "D"; type OtherModeType = "OTHER_OFF" | "OTHER_COUNTED" | "OTHER_ABS_LIMITED" | "OTHER_ABS_ACC_TARGET" | "OTHER_REL_LIMITED" | "OTHER_REL_ACC_TARGET"; type OtherLimitModeType = "OTHER_GE_LIMIT" | "OTHER_LE_LIMIT" | "OTHER_GT_LIMIT" | "OTHER_LT_LIMIT"; type OtherSortModeType = "OTHER_SORT_DEFAULT" | "OTHER_SORT_DESCENDING" | "OTHER_SORT_ASCENDING"; type TotalModeType = "TOTAL_OFF" | "TOTAL_EXPR"; type BnfType = "S" | "E"; /** * One of: * - N for NOT_META * - D for META_DOC_NAME * - R for META_RET_TYPE */ type MTType = "N" | "D" | "R"; /** * One of: * - CONNECT_DEFAULT: used internally * - CONNECT_64 * - CONNECT_32 */ type MachineModeType = "CONNECT_DEFAULT" | "CONNECT_64" | "CONNECT_32"; /** * One of: * - IT_SCRIPTLINE; the engine returns the statement that will be executed next. * - IT_MSGBOX; the engine returns a script execution error message. This type can only be returned if the parameter qInteractOnError was set to true when calling the ConfigureReload method. * - IT_BREAK; the engine breaks and waits for a response on what to do next. * - IT_END; the engine has finished to execute all statements in the script. */ type InteractionType = "IT_SCRIPTLINE" | "IT_MSGBOX" | "IT_BREAK" | "IT_END"; type ErrorDataCodeType = "0" | "1" | "2"; /** * One of: * - ALL for FUNC_GROUP_ALL, * - U for FUNC_GROUP_UNKNOWN, * - NONE for FUNC_GROUP_NONE, * - AGGR for FUNC_GROUP_AGGR, * - NUM for FUNC_GROUP_NUMERIC, * - RNG for FUNC_GROUP_RANGE, * - EXP for FUNC_GROUP_EXPONENTIAL_AND_LOGARITHMIC, * - TRIG for FUNC_GROUP_TRIGONOMETRIC_AND_HYPERBOLIC, * - FIN for FUNC_GROUP_FINANCIAL, * - MATH for FUNC_GROUP_MATH_CONSTANT_AND_PARAM_FREE, * - COUNT for FUNC_GROUP_COUNTER, * - STR for FUNC_GROUP_STRING, * - MAPP for FUNC_GROUP_MAPPING, * - RCRD for FUNC_GROUP_INTER_RECORD, * - CND for FUNC_GROUP_CONDITIONAL, * - LOG for FUNC_GROUP_LOGICAL, * - NULL for FUNC_GROUP_NULL, * - SYS for FUNC_GROUP_SYSTEM, * - FILE for FUNC_GROUP_FILE, * - TBL for FUNC_GROUP_TABLE, * - DATE for FUNC_GROUP_DATE_AND_TIME, * - NUMI for FUNC_GROUP_NUMBER_INTERPRET, * - FRMT for FUNC_GROUP_FORMATTING, * - CLR for FUNC_GROUP_COLOR, * - RNK for FUNC_GROUP_RANKING * - GEO for FUNC_GROUP_GEO * - EXT for FUNC_GROUP_EXTERNAL */ type FunctionGroupType = "ALL" | "U" | "NONE" | "AGGR" | "NUM" | "RNG" | "EXP" | "TRIG" | "FIN" | "MATH" | "COUNT" | "STR" | "MAPP" | "RCRD" | "CND" | "LOG" | "NULL" | "SYS" | "FILE" | "TBL" | "DATE" | "NUMI" | "FRMT" | "CLR" | "RNK" | "GEO" | "EXT"; type DimensionType = "D" | "N" | "T"; /** * One of: * - S for DATA_MODE_STRAIGHT; straight table representation * - P for DATA_MODE_PIVOT; pivot table representation * - K for DATA_MODE_PIVOT_STACK; stacked table representation * - T for DATA_MODE_TREE; tree representation */ type NxHypercubeMode = "S" | "P" | "K" | "T"; /** * One of: * - NX_FREQUENCY_NONE * - NX_FREQUENCY_VALUE * - NX_FREQUENCY_PERCENT. The percentage is between 0 and 100. * - NX_FREQUENCY_RELATIVE. Same as percent except that the relative value is between 0 and 1. */ type FrequencyModeType = "NX_FREQUENCY_NONE" | "NX_FREQUENCY_VALUE" | "NX_FREQUENCY_PERCENT" | "NX_FREQUENCY_RELATIVE"; type TypeSortDirection = "1" | "-1" | "0"; /** * Type of the drive. Can be: * - REMOVABLE * - FIXED * - NETWORK * - CD_ROM * - RAM * - UNKNOWN_TYPE */ type DriveType = "REMOVABLE" | "FIXED" | "NETWORK" | "CD_ROM" | "RAM" | "UNKNOWN_TYPE"; /** * One of: * - V for NX_DIM_CELL_VALUE. Applies to values in the data matrix. * - E for NX_DIM_CELL_EMPTY. Applies to empty cells in the top and left dimensions. * - G for NX_DIM_CELL_GENERATED. Applies to generated nodes that are inserted into the returned tree when there is no actual value (qAllValues in NxPageTreeNode set to true). * - N for NX_DIM_CELL_NORMAL. Applies to left and top dimensions cells. * - T for NX_DIM_CELL_TOTAL. Applies to cells marked with Total. * - P for NX_DIM_CELL_PSEUDO. Applies to pseudo dimensions. * - R for NX_DIM_CELL_ROOT. Applies to root node. * - U for NX_DIM_CELL_NULL. Applies to Null values in the data matrix. */ type NxTreeNodeType = "V" | "E" | "G" | "N" | "T" | "P" | "R" | "U"; /** * NxRange... */ interface INxRange { /** * Position in the expression of the first character of the field name. */ qCount: number; /** * Number of characters in the field name. */ qFrom: number; } /** * ExpressionResult... */ interface IExpressionResult { qBadFieldNames: INxRange[]; } /** * CheckExpressionResult width extend ExpressionResult */ interface ICheckExpressionResult extends IExpressionResult { qDangerousFieldNames: INxRange[]; qErrorMsg: string; } /** * CheckNumberOrExpressionResult width extend ExpressionResult */ interface ICheckNumberOrExpressionResult extends IExpressionResult { qErrorMsg: string; } /** * ScriptSyntaxError... */ interface IScriptSyntaxError { /** * Length of the word where the error is located */ qErrLen: number; /** * Number of the faulty section */ qTabIx: number; /** * Line number in the section where the error is located */ qLineInTab: number; /** * Position of the erroneous text from the beginning of the line */ qColInLine: number; /** * Position of the erroneous text from the beginning of the script */ qTextPos: number; /** * The default value is false. */ qSecondaryFailure: boolean; } /* * NxMeta... */ interface INxMeta { /** * Name. * >> This property is optional. */ qName?: string; } /** * NxGetBookmarkOptions. */ interface INxGetBookmarkOptions { /** * List of object types.. */ qTypes: string[]; /** * Set of data. */ qData: any; } /** * NxGetObjectOptions. */ interface INxGetObjectOptions { /** * List of object types.. */ qTypes: string[]; /** * Set to true to include session objects. * * Default: false */ qIncludeSessionObjects: boolean; /** * Set of data. */ qData: any; } /** * NxMetaTitleDescription width extend NxMeta */ interface INxMetaTitleDescription extends INxMeta { /** * Set a title. */ title: string; /** * Set a description. */ description: string; } /** * NxMetaTitleDescriptionTag width extend NxMetaTitleDescription */ interface INxMetaTitleDescriptionTag extends INxMetaTitleDescription { /** * Array of String */ tags: string[]; } /** * Connection... */ interface IConnection { /** * Identifier of the connection. * Is generated by the engine and is unique. */ qId: string; /** * Name of the connection. * This parameter is mandatory and must be set when creating or modifying a connection. */ qName: string; /** * One of: * * - ODBC CONNECT TO [] * - OLEDB CONNECT TO [] * - CUSTOM CONNECT TO [] * - "" * - "" * * Connection string. * This parameter is mandatory and must be set when creating or modifying a connection. */ qConnectionString: string; /** * One of: * - ODBC * - OLEDB * - * - folder * - internet * * Type of the connection. * This parameter is mandatory and must be set when creating or modifying a connection. * For ODBC, OLEDB and custom connections, the engine checks that the connection type matches the connection string. * >> The type is not case sensitive. */ qType: string; /** * Name of the user who creates the connection. * This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. * A call to GetConnection method does not return the user name. */ qUserName?: string; /** * Password of the user who creates the connection. * This parameter is optional; it is only used for OLEDB, ODBC and CUSTOM connections. * A call to GetConnection method does not return the password. */ qPassword?: string; /** * Is generated by the engine. * Creation date of the connection or last modification date of the connection. */ qModifiedDate: string; /** * Information about the connection. */ qMeta: INxMeta; /** * Select which user credentials to use to connect to the source. * * - LOG_ON_SERVICE_USER: Disables * - LOG_ON_CURRENT_USER: Enables */ qLogOn: LogonType; } /** * NxLibraryDimensionDef */ interface INxLibraryDimensionDef { /** * Information about the grouping. */ qGrouping: NxGrpType; /** * Array of dimension names. */ qFieldDefs: string[]; /** * Array of dimension labels. */ qFieldLabels: string[]; /** * no docu */ qLabelExpression: string; } /** * GenericProperties */ interface IGenericProperties { /** * Identifier and type of the object. * >> This parameter is mandatory. */ qInfo: INxInfo; // ?Dynamic properties? [qMetaDef: string]: any; } /** * GenericBookmarkProperties width extend GenericProperties */ interface IGenericBookmarkProperties extends IGenericProperties { } /** * GenericDimensionProperties width extend GenericProperties */ interface IGenericDimensionProperties extends IGenericProperties { qDim: INxLibraryDimensionDef; } /** * GenericMeasureProperties width extend GenericProperties */ interface IGenericMeasureProperties extends IGenericProperties { qMeasure: INxLibraryMeasureDef; } /** * GenericObjectProperties width extend GenericProperties */ interface IGenericObjectProperties extends IGenericProperties { qExtendsId?: string; } /** * GenericVariableProperties width extend GenericProperties */ interface IGenericVariableProperties extends IGenericProperties { /** * Name of the variable. * The name must be unique. * >> This parameter is mandatory. */ qName: string; /** * Comment related to the variable. * >> This parameter is optional. */ qComment?: string; /** * Defines the format of the value. * >> This parameter is optional. */ qNumberPresentation?: IFieldAttributes; /** * Set this property to true to update the variable when applying a bookmark. * The variable value will be persisted in the bookmark. * The value of a variable can affect the state of the selections. * Script variables cannot be persisted in the bookmark. * >> The default value is false. */ qIncludeInBookmark: boolean; /** * Definition of the variable. */ qDefinition: string; } /** * Sets the formatting of a field. * The properties of qFieldAttributes and the formatting mechanism are described below. */ interface IFieldAttributes { /** * Type of the field. * One of: * * - U for UNKNOWN type (default) * - A for ASCII; Numeric fields values contain only standard ASCII characters. * - I for INTEGER; Numeric fields values are shown as integer numbers. * - R for REAL; Numeric fields values are shown as real numbers. * - F for FIX; Numeric fields values are shown as numbers with a fix number of decimals. * - M for MONEY; Numeric fields values are shown as in the money format. * - D for DATE; Numeric fields values are shown as dates. * - T for TIME; Numeric fields values are shown as times. * - TS TIMESTAMP; Numeric fields values are shown as time stamps. * - IV for INTERVAL; Numeric fields values are shown as intervals. * */ qType: FieldAttributesType; /** * Number of decimals. * (Integer between 0 and 15.) * default is 10. */ qnDec: number; /** * Defines whether or not a thousands separator must be used. * default is 0 (false) or 1 (true). */ qUseThou: boolean; /** * Defines the format pattern that applies to qText. * Is used in connection to the type of the field (parameter qType). * For more information, see Formatting mechanism. * Example: YYYY-MM-DD for a date */ qFmt: string; /** * Defines the decimal separator. * Example: . */ qDec: string; /** * Defines the thousand separator (if any). * Is used if qUseThou is set to 1. * Example: , */ qThou: string; /** * no / empty docu */ qSAFEARRAY: any[]; } /** * NxInfo... */ interface INxInfo { /** * Identifier of the object. * If the chosen identifier is already in use, the engine automatically sets another one. * This parameter is optional. If an identifier is not set, the engine automatically sets one. */ qId?: string; /** * Type of the object. * >> This parameter is mandatory. */ qType: string; } /** * DoReloadExParams... */ interface IDoReloadExParams { /** * Error handling mode * One of: * 0: for default mode * 1: for ABEND; the reload of the script ends if an error occurs. * 2: for ignore; the reload of the script continues even if an error is detected in the script. * >> This parameter is optional. */ qMode?: number; /** * Set to true for partial reload * >> This parameter is optional. * >> The default value is false. */ qPartial?: boolean; /** * Set to true if debug breakpoints are to be honored. * The execution of the script will be in debug mode. * >> This parameter is optional. * >> The default value is false. */ qDebug?: boolean; } /** * DoReloadExResult... */ interface IDoReloadExResult { /** * The operation is successful if qSuccess is set to True. */ qSuccess: boolean; /** * Path to the script log file. */ qScriptLogFile: string; } /** * FieldValue... */ interface IFieldValue { /** * Text related to the field value * This parameter is optional. */ qText?: string; /** * Is set to true if the value is a numeric. * This parameter is optional. Default is false. */ qIsNumeric?: boolean; /** * Numeric value of the field. * This parameter is displayed if qIsNumeric is set to true. * This parameter is optional. */ qNumber?: number; } /** * NxMatchingFieldInfo... */ interface INxMatchingFieldInfo { /** * Name of the field */ qName: string; /** * List of tags */ qTags: string[]; } /** * NxAppLayout ... */ interface INxAppLayout { /** * Title of the app. */ qTitle: string; /** * In Qlik Sense Enterprise, this property corresponds to the app identifier (GUID). * In Qlik Sense Desktop, this property corresponds to the full path of the app. */ qFileName: string; /** * Date and time of the last reload of the app in ISO format. */ qLastReloadTime: string; /** * Is set to true if the app has been updated since the last save. */ qModified: boolean; /** * Is set to true if a script is defined in the app. */ qHasScript: boolean; /** * Array of alternate states. */ qStateNames: string[]; /** * Information on publishing and permissions. */ qMeta: INxMeta; /** * Information about the locale. */ qLocaleInfo: ILocaleInfo; /** * Is set to true if the app contains data following a script reload. */ qHasData: boolean; /** * If set to true, it means that the app is read-only. */ qReadOnly: boolean; /** * If set to true, it means that the app was opened without loading its data. */ qIsOpenedWithoutData: boolean; /** * App thumbnail. */ qThumbnail: IStaticContentUrl; } /** * NxAppProperties */ interface INxAppProperties { /** * App title. */ qTitle: string; /** * Last reload time of the app. */ qLastReloadTime: string; /** * App thumbnail. */ qThumbnail: IStaticContentUrlDef; /** * Internal property reserved for app migration. * Patch version of the app. * Do not update. */ qMigrationHash: string; /** * Internal property reserved for app migration. * The app is saved in this version of the product. * Do not update. */ qSavedInProductVersion: string; } /** * AssociationScore... */ interface IAssociationScore { /** * Pair of fields. * / * Where: * is a field in the table 1 (defined in qTable1) * is a field in the table 2 (defined in qTable2) * If the field is a synthetic key, the name of the field is preceded by [Synthetic key]:. */ qFieldPairName: string; /** * Flag used to interpret calculated scores. * One of the following values or sum of values that apply: * * 0: The cardinal ratio cannot be zero but the symbol score and the row score can be zero. * -1: The fields do not have the same type. * -2: The number of rows of the field FieldName1 is zero. * -4: The number of distinct values of the field FieldName1 is zero. * -8: The number of rows of the field FieldName2 is zero. * -16: The number of distinct values of the field FieldName2 is zero. * * Example: * The number of rows of the field FieldName1 is zero, and the number of distinct values * of the field FieldName2 is zero, then qScoreSummary is -18. */ qScoreSummary: number; /** * Association information about the field FieldName1 defined in qFieldPairName. */ qField1Scores: IFieldScores; /** * Association information about the field FieldName2 defined in qFieldPairName. */ qField2Scores: IFieldScores; } /** * FieldScores... */ interface IFieldScores { /** * Field name. * One of the field names defined in qFieldPairName. */ qFieldName: string; /** * Cardinality of a column/field divided by the number of rows in the table. * If the cardinal ratio is 1, it means that the column is a candidate/primary key. */ qCardinalRatio: number; /** * Number of distinct matches between the two fields defined in qFieldPairName divided * by the number of distinct values in the field qFieldName. * If 0, it means that there are no common values between the two fields defined in qFieldPairName. */ qSymbolScore: number; /** * Number of matches between the two fields defined in qFieldPairName divided by the number * of values in the field qFieldName. * If 0, it means that there are no common values between the two fields defined in qFieldPairName. */ qRowScore: number; } /** * ContentLibraryListItem... */ interface IContentLibraryListItem { /** * Name of the library. */ qName: string; /** * Is set to true if the library is specific to the app (not a global content library). */ qAppSpecific: boolean; /** * Information about publishing and permissions. */ qMeta: INxMeta; } /** * ContentLibraryList... */ interface IContentLibraryList { /** * Information about the content library. */ qItems: IContentLibraryListItem; } /** * DatabaseInfo... */ interface IDatabaseInfo { /** * Name of the product accessed by the provider */ qDBMSName: string; /** * If set to true, it means that the data source contains some databases. */ qDBUsage: boolean; /** * If set to true, it means that the data source contains some owners. */ qOwnerUsage: boolean; /** * Character string used after the database name * Example with separator ".": * FROM LinkedTablesData.dbo.Months * Where: * - LinkedTablesData is the database name * - dbo is the owner name * - Months is the table name */ qDBSeparator: string; /** * Character string used after the owner name * Example with separator ".": * FROM LinkedTablesData.dbo.Months * Where: * - LinkedTablesData is the database name * - dbo is the owner name * - Months is the table name */ qOwnerSeparator: string; /** * If set to true, it means that the database is displayed first, before the owners and tables. */ qDBFirst: boolean; /** * Prefix used with field, database or owner names that contain special characters or keywords. */ qQuotePreffix: string; /** * Suffix used with field, database or owner names that contain special characters or keywords. */ qQuoteSuffix: string; /** * List of the special characters */ qSpecialChars: string; /** * Name of the default database */ qDefaultDatabase: string; /** * List of the script keywords */ qKeywords: string[]; } /** * DatabaseOwner... */ interface IDatabaseOwner { /** * Name of the owner */ qName: string; } /** * Database... */ interface IDatabase { /** * Name of the database. */ qName: string; /** * Is set to true if the database is set by default. */ qIsDefault: boolean; } /** * DataField... */ interface IDataField { /** * Name of the field. * */ qName: string; /** * Is set to true if the field is a primary key. */ qIsKey: boolean; /** * Is shown for fixed records. * qOriginalFieldName and qName are identical if no field names are used in the file. * qOriginalFieldName differs from qName if embedded file names are used in the file. */ qOriginalFieldName: string; } /** * DataRecord... */ interface IDataRecord { /** * List of values inside the table. * The first values (in result/qPreview/0/qValues) correspond to the field names in the table. * The following values (from result/qPreview/1/qValues) are the values of the fields in the table. */ qValues: string[]; } /** * DataTable... */ interface IDataTable { /** * Name of the table. */ qName: string; /** * Type of the table. * For examples: Table, View */ qType: string; } /** * FieldDescription... */ interface IFieldDescription { /** * Internal number of the field. */ qInternalNumber: number; /** * Name of the field. */ qName: string; /** * List of table names. */ qSrcTables: string[]; /** * If set to true, it means that the field is a system field. * >> The default value is false. */ qIsSystem?: boolean; /** * If set to true, it means that the field is hidden. * >> The default value is false. */ qIsHidden?: boolean; /** * If set to true, it means that the field is a semantic. * >> The default value is false. */ qIsSemantic?: boolean; /** * If set to true, only distinct field values are shown. * >> The default value is false. */ qDistinctOnly?: boolean; /** * Number of distinct field values. */ qCardinal: number; /** * Total number of field values. */ qTotalCount: number; /** * If set to true, it means that the field is locked. * >> The default value is false. */ qIsLocked?: boolean; /** * If set to true, it means that the field has one and only one selection (not 0 and not more than 1). * If this property is set to true, the field cannot be cleared anymore and no more selections can be * performed in that field. * >> The default value is false. */ qAlwaysOneSelected?: boolean; /** * If set to true a logical AND (instead of a logical OR) is used when making selections in a field. * >> The default value is false. */ qAndMode?: boolean; /** * Is set to true if the value is a numeric. * >> The default value is false. */ qIsNumeric?: boolean; /** * Field comment. */ qComment: string; /** * Gives information on a field. For example, it can return the type of the field. * Examples: key, text, ASCII */ qTags: string[]; /** * If set to true, it means that the field is a field on the fly. * >> The default value is false. */ qIsDefinitionOnly?: boolean; } /** * DelimiterInfo... */ interface IDelimiterInfo { /** * Name of the delimiter. * Example: * "Tab_DELIMITER" */ qName: string; /** * Representation of the delimiter value that is used in the script. * Example: * "'\t'" */ qScriptCode: string; /** * Delimiter character number used by the engine to determine how to separate the values. */ qNumber: number; /** * Is set to true if multiple spaces are used to separate the values. */ qIsMultiple: boolean; } /** * FileDataFormat... */ interface IFileDataFormat { /** * Type of the file. */ qType: FileDataFormatType; /** * One of: * * - embedded labels (field names are present in the file) * - no labels * - explicit labels (for DIFfiles) */ qLabel: string; /** * One of: * * - None (no quotes) * - MSQ (Modern Style Quoting) * - Standard (quotes " " or ' ' can be used, but only if they * are the first and last non blank characters of a field value.) * This property is used for delimited files. */ qQuote: string; /** * String that marks the beginning of the comment line. * Example: # or // * The engine ignores the commented lines during the data load. * This property is only used for delimited files. */ qComment: string; /** * Information about the delimiter. * This property is used for delimited files. */ qDelimiter: IDelimiterInfo; /** * Character set used in the file. */ qCodePage: number; /** * Size of the header. * Example: If the header size is 2, the first two rows in the file are considered as header and not as data. * The header can contain the field names. */ qHeaderSize: number; /** * Record length. * Each record (row of data) contains a number of columns with a fixed field size. * This property is used for fixed record data files. */ qRecordSize: number; /** * Number of spaces that one tab character represents in the table file. * This property is used for fixed record data files. */ qTabSize: number; /** * Is set to true, the end-of-file character is not taken into account during reload. * This property is used for delimited files and fixed record data files. */ qIgnoreEOF: boolean; /** * Positions of the field breaks in the table. * This property is used for fixed record data files. */ qFixedWidthDelimiters: string; } /** * DataTableEx... */ interface IDataTableEx { /** * Name of the table. */ qName: string; /** * List of the fields in the table. */ qFields: IDataField[]; /** * List of format specification items, within brackets. * Examples of specification items: * * - file type * - embedded labels, no labels * - table is */ qFormatSpec: string; } /** * FolderItem... */ interface IFolderItem { /** * Name of the folder item. */ qName: string; /** * Type of the folder item. */ qType: FolderItemType; } /** * List of of content files (Information about the list of content files) */ interface IStaticContentList { qItems: IStaticContentListItem; } /** * StaticContentListItem... */ interface IStaticContentListItem { /** * Relative path to the content file. The URL is static. * In Qlik Sense Enterprise, content files located: * * - in the /content// folder are part of a global content library. * - in the /appcontent/ folder are part of the app specific library. * * The content files are never embedded in the qvf file. * In Qlik Sense Desktop, content files located: * * - in the /content/default/ folder are outside the qvf file. * - in the /media/ folder are embedded in the qvf file. */ qUrlDef: string; /** * Relative path to the content file. The URL is static. * In Qlik Sense Enterprise, content files located: * * - in the /content// folder are part of a global content library. * - in the /appcontent/ folder are part of the app specific library. * * The content files are never embedded in the qvf file. * In Qlik Sense Desktop, content files located: * * - in the /content/default/ folder are outside the qvf file. * - in the /media/ folder are embedded in the qvf file. */ qUrl: string; } /** * StaticContentUrl... * * Note: In addition, this structure can return dynamic properties. */ interface IStaticContentUrl { /** * Relative path of the thumbnail. */ qUrl: string; } /** * StaticContentUrlDef... * * Note: In addition, this structure can contain dynamic properties. */ interface IStaticContentUrlDef { /** * Relative path of the thumbnail. */ qUrl: string; } /** * CalenderStrings... */ interface ICalenderStrings { /** * List of short day names. */ qDayNames: string[]; /** * List of short month names. */ qMonthNames: string[]; /** * List of long day names. */ qLongDayNames: string[]; /** * List of long month names. */ qLongMonthNames: string[]; } /** * LocaleInfo... */ interface ILocaleInfo { /** * Decimal separator. */ qDecimalSep: string; /** * Thousand separator. */ qThousandSep: string; /** * List separator. */ qListSep: string; /** * Money decimal separator. */ qMoneyDecimalSep: string; /** * Money thousand separator. */ qMoneyThousandSep: string; /** * Current year. */ qCurrentYear: number; /** * Money format. * Example: #.##0,00 kr;-#.##0,00 kr */ qMoneyFmt: string; /** * Time format. * Example: hh:mm:ss */ qTimeFmt: string; /** * Date format. * Example: YYYY-MM-DD */ qDateFmt: string; /** * Time stamp format. * Example: YYYY-MM-DD hh:mm:ss[.fff] */ qTimestampFmt: string; /** * Information about the calendar. */ qCalendarStrings: ICalenderStrings; /** * First day of the week, starting from 0. * According to ISO 8601, Monday is the first day of the week. * * 0 = Monday * 1 = Tuesday * .. * 6 = Sunday * * If this property has not been set in a script, the returned value comes from the Windows operating system. */ qFirstWeekDay: boolean; /** * Is set to true if broken weeks are allowed in a year. * According to ISO 8601, no broken weeks should be allowed. * This property is not shown if set to false. * If qBrokenWeeks is set to true, qReferenceDay is irrelevant. * If this property has not been set in a script, the returned value comes from the Windows operating system. */ qBrokenWeeks: number; /** * Day in the year that is always in week 1. * According to ISO 8601, January 4th should always be part of the first week of the year (qReferenceDay=4). * Recommended values are in the range 1 and 7. * If this property has not been set in a script, the returned value comes from the Windows operating system. * This property is not relevant if there are broken weeks in the year. */ qReferenceDay: number; /** * First month of the year, starting from 1. * According to ISO 8601, Januaryis the first month of the year. * * 1 = January * 2 = February * 12 = January * * If this property has not been set in a script, the returned value comes from the Windows operating system. */ qFirstMonthOfYear: number; /** * Locale name (following language tagging convention RFC 4646): * * - * Where * language is a lowercase ISO 639 language code * REGION specifies an uppercase ISO 3166 country code. * If this property has not been set in a script, the returned value comes from the Windows operating system. */ qCollation: string; } /** * MediaListItem... */ interface IMediaListItem { /** * Relative path to the media file. * The URL is static. * Media files located: * * - in the /content/default/ folder are outside the qvf file. * - in the /media/ folder are embedded in the qvf file. */ qUrlDef: string; /** * Relative path to the media file. * Media files located: * * - in the /content/default/ folder are outside the qvf file. * - in the /media/ folder are embedded in the qvf file. */ qUrl: string; } /** * Lists the media files. Is the layout for MediaListDef. * * Note: This struct is deprecated. */ interface IMediaList { /** * Information about the list of media files. * In Qlik Sense Desktop, the media files are retrieved from: * * %userprofile%\Documents\Qlik\Sense\Content\Default * In Qlik Sense Enterprise, the media files are retrieved from: * * \Qlik\Sense\Repository\Content\Default * The default installation directory is ProgramData. */ qItems: IMediaListItem[]; } /** * EditorBreakpoint... */ interface IEditorBreakpoint { /** * Name of the breakpoint. */ qbufferName: string; /** * Line number in the script where the breakpoint is set. */ qlineIx: number; /** * If set to true then the breakpoint is enabled (in use). */ qEnabled: boolean; } /** * TableRow... */ interface ITableRow { /** * Array of field values [{qText, qIsNumeric, qNumber},..] */ vqValue: IFieldValue[]; } /** * Size... */ interface ISize { /** * Number of pixels on the x axis. */ qcx: number; /** * Number of pixels on the y axis. */ qcy: number; } /** * DerivedFieldsInTableData... */ interface IDerivedFieldsInTableData { /** * Name of the derived definition. */ qDefinitionName: string; /** * List of tags. */ qTags: string[]; /** * Is set to true is the derived field is in use. */ qActive: boolean; } /** * FieldInTableData... */ interface IFieldInTableData { /** * Name of the field. */ qName: string; /** * Is shown for fixed records. * qOriginalFieldName and qName are identical if no field names are used in the file. * qOriginalFieldName differs from qName if embedded file names are used in the file. */ qOriginalFields: string[]; /** * ... */ qPresent: boolean; /** * This property is set to true if the field contains some Null values. */ qHasNull: boolean; /** * ... */ qHasWild: boolean; /** * This property is set to true if the field contains some duplicate values. */ qHasDuplicates: boolean; /** * This property is set to true if the field contains a synthetic key. */ qIsSynthetic: boolean; /** * Number of records that have values (i.e. not NULL) in the field as compared to the total number of records in the table. */ qInformationDensity: number; /** * Number of values that are non Null. */ qnNonNulls: number; /** * Number of rows in the field */ qnRows: number; /** * Number of distinct values in the field (in the current table) as * compared to the total number of distinct values of this field (in all tables). */ qSubsetRatio: number; /** * Number of distinct values in the field. */ qnTotalDistinctValues: number; /** * ... */ qnPresentDistinctValues: number; /** * Tells if the field is a key field. */ qKeyType: TableRecordKeyType; /** * Comment related to the field. */ qComment: string; /** * List of tags related to the field. */ qTags: string[]; /** * List of the derived fields. */ qDerivedFields: IDerivedFieldsInTableData; } /** * Point... */ interface IPoint { /** * x-coordinate in pixels. * The origin is the top left of the screen. */ qx: number; /** * y-coordinate in pixels. * The origin is the top left of the screen. */ qy: number; } /** * TableRecord... */ interface ITableRecord { /** * Name of the table. */ qName: string; /** * This property is set to true if the table is loose. */ qLoose: boolean; /** * Number of rows in the table. */ qNoOfRows: number; /** * Information about the fields in the table. */ qFields: IFieldInTableData[]; /** * Information about the position of the table. */ qPos: IPoint; /** * Comment related to the table. */ qComment: string; /** * If set to true, Direct Discovery is used. * Direct Discovery fields are not loaded into memory and remain in the external database. */ qIsDirectDiscovery: boolean; /** * This property is set to true if the table contains a synthetic key. */ qIsSynthetic: boolean; } /** * SourceKeyRecord... */ interface ISourceKeyRecord { /** * Name of the key field. */ qKeyFields: string[]; /** * Table the key belongs to. */ qTables: string[]; } /** * TextMacro... */ interface ITextMacro { /** * Name of the variable. */ qTag: string; /** * Order in which the variable was referenced during the script execution. * The same number sequence is used for both qRefSeqNo and qSetSeqNo. */ qRefSeqNo: number; /** * Order in which the variable was updated during the script execution. * The same number sequence is used for both qRefSeqNo and qSetSeqNo. */ qSetSeqNo: number; /** * Variable value. */ qDisplayString: string; /** * Is set to true if the variable is a system variable. */ qIsSystem: boolean; /** * Is set to true if the variable is a reserved variable. */ qIsReserved: boolean; } /** * Rect... */ interface IRect { /** * Position from the left. * Corresponds to the first column. */ qLeft: number; /** * Position from the top. * Corresponds to the first row. */ qTop: number; /** * Number of columns in the page. The indexing of the columns may vary depending on whether the cells are * expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef). */ qWidth: number; /** * Number of rows or elements in the page. The indexing of the rows may vary depending on whether the cells are * expanded or not (parameter qAlwaysFullyExpanded in HyperCubeDef). */ qHeight: number; } /** * TableViewTableWinSaveInfo... */ interface ITableViewTableWinSaveInfo { /** * Information about the position of the table. */ qPos: IRect; /** * Table name. */ qCaption: string; } /** * TableViewBroomPointSaveInfo... */ interface ITableViewBroomPointSaveInfo { /** * Information about the position of the broom point. */ qPos: IPoint; /** * Name of the table. */ qTable: string; /** * List of fields in the table. */ qFields: string[]; } /** * TableViewConnectionPointSaveInfo... */ interface ITableViewConnectionPointSaveInfo { /** * Information about the position of the connection point. */ qPos: IPoint; /** * List of the fields in the table. */ qFields: string[]; } /** * TableViewSaveInfo... */ interface ITableViewSaveInfo { /** * List of the tables in the database model viewer. */ qTables: ITableViewTableWinSaveInfo[]; /** * List of the broom points in the database model viewer. * Not used in Qlik Sense. */ qBroomPoints: ITableViewBroomPointSaveInfo[]; /** * List of connection points in the database model viewer. * Not used in Qlik Sense. */ qConnectionPoints: ITableViewConnectionPointSaveInfo[]; /** * Zoom factor in the database model viewer. * The default value is 1.0. */ qZoomFactor: number; } /** * TableViewCtlSaveInfo... */ interface ITableViewCtlSaveInfo { /** * Internal view mode. */ qInternalView: ITableViewSaveInfo; /** * Source view mode. */ qSourceView: ITableViewSaveInfo; } /** * TableViewDlgSaveInfo... */ interface ITableViewDlgSaveInfo { /** * Information about the position of the dialog window. * Not used in Qlik Sense. */ qPos: IRect; /** * Set of data for internal and source view modes. */ qCtlInfo: ITableViewCtlSaveInfo; /** * View mode to display when opening Qlik Sense data model viewer. * One of: * 0 for internal view mode * 1 for source view mode */ qMode: number; } /** * SearchCombinationOptions... */ interface ISearchCombinationOptions { /** * List of the search fields. * If empty, the search is performed in all fields of the app. */ qSearchFields: string[]; /** * Search context. * The default value is LockedFieldsOnly. * One of: * * - Cleared: In this mode, the first step is to clear any current selections in the app. * The second step is to search for one or more terms in the values of the app. * * - LockedFieldsOnly: In this mode, the search applies only to the values associated with * the selections made in locked fields, ignoring selections in any unlocked field. If no locked fields, * the behavior is identical to the Cleared context. You cannot make any new selections in a locked field. * You can get search hits for the associated values of a locked field but you cannot get the search hits * for the non associative values. * * - CurrentSelections: In this mode, the current selections are kept (if any). Search for one or more terms * in the values of the app. New selections are made on top of the current selections. If no selections were * made before the search, this mode is identical to the Cleared context. */ qContext: ContextType; /** * Encoding used to compute qRanges of type SearchCharRange. * Possible values: Utf8 (default), Utf16 */ qCharEncoding: "Utf8" | "Utf16"; /** * For SearchSuggest method, this array is empty. * For SearchResults method, this array is empty, * or contains qNum and/or qElemNum. * It allows the user to request details in the outputted SearchGroupItemMatch. * For more information, see SearchGroupItemMatch */ qAttributes?: string[]; } /** * SearchGroupOptions... */ interface ISearchGroupOptions { /** * Type of the group. Can be: * - GenericObjectType: the type of the search group item is a generic object. * Groups have this type when you are calling SearchObjects. * - DatasetType: type of the search group item is a dataset association. * Groups have this type when you are calling SearchResults. */ qGroupType: any; /** * Position starting from 0. * >> The default value is 0. */ qOffset: number; /** * Maximum number of items per group (in qItems[ ]). * The default value is -1; * all values are returned. */ qCount: number; } /** * SearchGroupItemOptions... */ interface ISearchGroupItemOptions { /** * Type of the group item. Can be * * - GenericObject: the type of the search group item is a generic object. * Group items have this type when you are calling SearchObjects. * * - Field: the type of the search group item is a field. * Group items have this type when you are calling SearchResults. */ qGroupItemType: IGenericObject; /** * Position starting from 0. * The default value is 0. */ qOffset: number; /** * Maximum number of matches per item (in qItemMatches[ ]). * The default value is -1: all values are returned. */ qCount: number; } /** * SearchPage... */ interface ISearchPage { /** * Position from the top, starting from 0. * If the offset is set to 0, the first search result to be returned is at position 0. */ qOffset: number; /** * Number of search groups to return (in qSearchGroupArray). */ qCount: number; /** * Maximum number of matching values to return per search result. * The default value is -1; all values are returned. * This property is to be used with the SearchAssociations method. */ qMaxNbrFieldMatches: number; /** * Options of the search groups. * If this property is not set, all values are returned. * This property is to be used with the SearchResults method or the SearchObjects method. */ qGroupOptions: ISearchGroupOptions[]; /** * Options of the search group items. * If this property is not set, all values are returned. * This property is to be used with the SearchResults method or the SearchObjects method. */ qGroupItemOptions: ISearchGroupItemOptions[]; } /** * SearchFieldDictionary... */ interface ISearchFieldDictionary { /** * Position of the field in the list of fields, starting from 0. * The list of fields is defined in qResults/qFieldNames and contains the search associations. */ qField: number; /** * List of the matching values. * The maximum number of values in this list is set by qMaxNbrFieldMatches. */ qResult: ISearchTermResult[]; } /** * SearchCharRange... */ interface ISearchCharRange { /** * Starting position of the match in the search result, starting from 0. */ qCharPos: number; /** * Length of the match in the search result. */ qCharCount: number; /** * Position of the term in the list of search terms, starting from 0. */ qTerm: number; } /** * SearchTermResult... */ interface ISearchTermResult { /** * Text of the associated value. */ qText: string; /** * Element number of the associated value. */ qElemNumber: number; /** * List of ranges. * For example, if the user searches the term read and the associative value is Reading, * then the corresponding range would be Read in Reading. */ qRanges: ISearchCharRange[]; } /** * SearchMatchCombinations... */ interface ISearchMatchCombinations { /** * Array of search combinations. */ qSearchMatchCombinations: ISerachMatchCombination[]; } /** * SerachMatchCombination... */ interface ISerachMatchCombination { /** * Index of the search result, starting from 0. */ qId: number; /** * Information about the search matches. */ qFieldMatches: ISerachFieldMatch[]; } /** * SerachFieldMatch... */ interface ISerachFieldMatch { /** * Position of the field in the list of fields, starting from 0. * The list of fields is defined in qResults/qFieldNames and contains the search associations. */ qField: number; /** * Positions of the matching values in the search results. * The maximum number of values in this list is defined by qMaxNbrFieldMatches. */ qValues: number[]; /** * Positions of the search terms, starting from 0. */ qTerms: number[]; /** * Number of search hits in the field. * The number of values in qValues and the value of qNoOfMatches are equal if qMaxNbrFieldMatches is -1. */ qNoOfMatches: number; } /** * SearchAssociationResult... */ interface ISearchAssociationResult { /** * List of the fields that contains search associations. */ qFieldNames: string[]; /** * List of the search terms. */ qSearchTerms: string[]; /** * Information about the fields containing search hits. */ qFieldDictionaries: ISearchFieldDictionary[]; /** * List of search results. * The maximum number of search results in this list is set by qPage/qCount. */ qSearchTermsMatched: ISearchMatchCombinations[]; /** * Total number of search results. * This number is not limited by qPage/qCount. */ qTotalSearchResults: number; } /** * SearchObjectOptions... */ interface ISearchObjectOptions { /** * This array is either empty or contains qProperty. */ qAttributes: string[]; /* add new member */ /** * Encoding used to compute qRanges of type SearchCharRange. * Possible values: * - Utf8 (default) * - Utf16 * * Note: Only affects the computation of the ranges. It does not impact the encoding of the text. */ qCharEncoding: string; } /** * SearchAttribute... */ interface ISearchAttribute { /** * String corresponding to * SearchObjectOptions.qAttributes * It will be qProperty for SearchObjectOptions. */ qKey: string; /** * String corresponding to qKey for the current SearchGroupItemMatch. * For example, if the match is Make by Price found in the title of a generic object, qValue will be qMetaDef/title. */ qValue: string; } /** * SearchGroupItemMatch... */ interface ISearchGroupItemMatch { /** * Search match value. * Value of the search group item. * If the match is found in a field, it corresponds to the value of the field. * If the match is found in a generic object property, it corresponds to the property value. */ qText: string; /** * Property of the search group item. * For example, if the user requests SearchObjects with SearchObjectOptions.qAttributes = [], * then the outputted qAttributes will be empty. * * Otherwise, if SearchObjectOptions.qAttributes = [qProperty], * SearchGroupItemMatch.qAttributes = [qProperty, qMetaDef/title] * if the match has been found in the title of the item. * * For dimension values, the returned qProperty will be *. */ qAttributes: ISearchAttribute[]; /** * List of ranges. * For example, if the search terms are Price and Make, and the search group item value is Make by Price vs Mileage, * then there are two ranges: one for Price and one for Make. */ qRanges: ISearchCharRange[]; } /** * SearchGroupItem... */ interface ISearchGroupItem { /** * Type of the group item. */ qItemType: SearchObjectsItemType; /** * Total number of distinct matches in the search group item. */ qTotalNumberOfMatches: number; /** * Identifier of the item. * It corresponds to: * * - The name of the field, if the type of the search group is data set. * - The id of the generic object if the type of the search group is generic object. */ qIdentifier: string; /** * List of matches in the search group item. * The group item matches are numbered * from * the value of SearchGroupItemOptions.qOffset * to * the value of SearchGroupItemOptions.qOffset + SearchGroupItemOptions.qCount. */ qItemMatches: ISearchGroupItemMatch[]; /** * Indexes of the search terms that are included in the group item. * These search terms are related to the list of terms defined in SearchResult.qSearchTerms. */ qSearchTermsMatched: number[]; } /** * SearchGroup... */ interface ISearchGroup { /** * Identifier of the search group. */ qId: number; /** * Type of the search group. * One of: * * - 1 for DatasetType: the type of the group is a data set. * This group contains search matches that are related to fields in the app. * - 2 for GenericObjectsType: the type of the group is a generic object. * This group contains search matches that are related to generic objects in the app. */ qGroupType: SearchObjectsGroupType; /** * Indexes of the search terms that are included in the group. * These search terms are related to the list of terms defined in SearchResult.qSearchTerms. */ qSearchTermsMatched: number[]; /** * Total number of distinct items in the search group. */ qTotalNumberOfItems: number; /** * List of items in the search group. * The group items are numbered * from * the value of SearchGroupOptions.qOffset * to * the value of SearchGroupOptions.qOffset + SearchGroupOptions.qCount */ qItems: ISearchGroupItem[]; } /** * SearchResult... */ interface ISearchResult { /** * List of the search terms. */ qSearchTerms: string[]; /** * Total number of groups. */ qTotalNumberOfGroups: number; /** * List of search groups. * The groups are numbered * from * the value of SearchPage.qOffset * to * the value of SearchPage.qOffset + SearchPage.qCount. */ qSearchGroupArray: ISearchGroup; } /** * SearchSuggestItem... */ interface ISearchSuggestItem { /** * Value of the suggestion. */ qValue: string; /** * Index of the suggestion value. * The indexing starts from 0 and from the left. */ qTerm: number; } /** * SearchSuggestionResult... */ interface ISearchSuggestionResult { /** * List of suggestions. */ qSuggestions: ISearchSuggestItem[]; /** * List of field names that contain search hits. */ qFieldNames: string[]; } /** * This class describes all the methods that apply at app level. * The handle member in the JSON request for all methods listed in this section is the handle of the app. */ interface IApp extends enigmaJS.IGeneratedAPI { global: IGlobal; /** * Aborts any selection mode in an app. For more information about selection mode! * @param qAccept - Set this parameter to true to accept the selections before exiting the selection mode. * @returns - A promise of a Qlik engine reply. */ abortModal(qAccept: boolean): Promise; /** * You can create multiple states within a Qlik Sense app and apply these states to specific objects within the app. * Objects in a given state are not affected by user selections in the other states. * @param qStateName - Name of the alternate state. >> This parameter is mandatory. * @returns - A promise of a Qlik engine reply. */ addAlternateState(qStateName: string): Promise; /** * Adds a field on the fly. The expression of a field on the fly is persisted but not its values. * @param qName - Name of the field. * @param qExpr - Expression value. It is not possible to use all aggregation functions. * For example, you cannot add a field on the fly with an expression that uses the Sum or Count aggregation functions. * @returns - true or false */ addFieldFromExpression(qName: string, qExpr: string): Promise; /** * Applies a bookmark. * @param qId - Identifier of the bookmark. * @returns - true or false */ applyBookmark(qId: string): Promise; /** * Returns the number of entries on the Back stack.. * @returns - "qReturn": */ backCount(): Promise; /** * Loads the last logical operation (if any). * @returns" */ back(): Promise; /** * Checks if a given expression is valid. * * Note: The expression is correct if the parameters qErrorMsg, qBadFieldNames and qDangerousFieldNames are empty. * @param qExpr - Expression to check.. * @param qLabels - (Array of String) List of labels. This parameter is optional. * @returns - A promise of a Qlik engine reply. */ checkExpression(qExpr: string, qLabels?: string[]): Promise; /** * Checks if: * * - a given expression is valid * - a number is correct according to the locale. * * Note: The expression is correct if the parameters qErrorMsg and qBadFieldNames are empty. * @param qExpr - Expression to check. * @returns - A promise of a Qlik engine reply. */ checkNumberOrExpression(qExpr: string): Promise; /** * Checks the syntax of a script. * If there are errors, the engine returns the following properties in the response: * * - qErrLen: (Integer) Length of the word where the error is located * - qTabIx: (Integer) Number of the faulty section * - qLineInTab: (Integer) Line number in the section where the error is located * - qColInLine: (Integer) Position of the erroneous text from the beginning of the line * - qTextPos: (Integer) Position of the erroneous text from the beginning of the script. * - qSecondaryFailure: (Boolean) The default value is false. * * Note: The first area is the primary error area, the second area is the secondary error area. * The second area is optional and is shown only if qSecondaryFailure is set to true. * The second area ends when the next statement in the script begins. */ checkScriptSyntax(): Promise; /** * Clears all selections in all fields of the current app. * @param qLockedAlso - This parameter is optional. Default is false. Selections on locked fields are not cleared. * Set this parameter to true to clear all selections, including the locked fields. * @param qStateName - Name of the alternate state. If an alternate state is defined in qStateName, only the selections * related to this alternate state are cleared. This parameter is optional. * Default state is current selections. * @returns - A promise of a Qlik engine reply. */ clearAll(qLockedAlso: boolean, qStateName?: string): Promise; /** * Clears entirely the undo and redo buffer. * @returns - A promise of a Qlik engine reply. */ clearUndoBuffer(): Promise; /** * Clones a bookmark. * * @param qId - Identifier of the object to clone * @returns - A promise of a Qlik engine reply. */ cloneBookmark(qId: string): Promise; /** * Clones a dimension. * * Note: The identifier is set by the engine. * @param qId - Identifier of the object to clone * @returns - A promise of a Qlik engine reply. */ cloneDimension(qId: string): Promise; /** * Clones a measure. * * Note: The identifier is set by the engine. * @param qId - Identifier of the object to clone * @returns - A promise of a Qlik engine reply. */ cloneMeasure(qId: string): Promise; /** * Clones any visualizations, sheets and stories. The clone method works for both app objects and child objects. * When you clone an object that contains children, the children are cloned as well. * * Note: The identifier is set by the engine. * @param qId - Identifier of the object to clone * @returns - A promise of a Qlik engine reply. */ cloneObject(qId: string): Promise; /** * Commits the draft of an object that was previously created by invoking the CreateDraft method. * Committing a draft replaces the corresponding published object. * * Note: The identifier is set by the engine. * @param qId - Identifier of the draft to commit. * @returns - A promise of a Qlik engine reply. */ commitDraft(qId: string): Promise; /** * Creates a bookmark. * @param qProp - Information about the object. >> This parameter is mandatory. * @returns - A promise of a Qlik engine reply. */ createBookmark(qProp: IGenericBookmarkProperties): Promise; /** * Creates a connection. A connection indicates from which data source, the data should be taken. * @param qConnection - Information about the connection. >> This parameter is mandatory. * @returns - returns a ConnectionId */ createConnection(qConnection: IConnection): Promise; /** * Creates a master dimension. * A master dimension is stored in the library of an app and can be used in many objects. * Several generic objects can contain the same dimension. * @param qProp - Information about the properties. >> This parameter is mandatory. * @returns - returns a GenericDimension object */ createDimension(qProp: IGenericDimensionProperties): Promise; /** * Creates a draft of an object. * This method can be used to create a draft of a sheet or a story that is published. * This is a way to continue working on a sheet or a story that is published. * Replace the published object by the content of the draft by invoking the CommitDraft method. * * Note: The identifier is set by the engine. * @param qId - Identifier of the object to create a draft from. * @returns - returns a DraftId */ createDraft(qId: string): Promise; /** * Creates a master measure. * A master measure is stored in the library of an app and can be used in many objects. * Several generic objects can contain the same measure. * @param gProp - Information about the properties >> This parameter is mandatory. * @returns - returns a GenericMeasure */ createMeasure(qProp: IGenericMeasureProperties): Promise; /** * Creates a generic object at app level. * It is possible to create a generic object that is linked to another object. * A linked object is an object that points to a linking object. * The linking object is defined in the properties of the linked object (in qExtendsId). * The linked object has the same properties as the linking object. * Notre: The linking object cannot be a transient object. * @param gProp - Information about the properties >> This parameter is mandatory. * @returns - returns a GenericObject */ createObject(qProp: IGenericObjectProperties): Promise; /** * Creates a transient object. For example, you can use a transient object to create an app overview or a story overview. * It is possible to create a transient object that is linked to another object. * A linked object is an object that points to a linking object. * The linking object is defined in the properties of the linked object (in qExtendsId). * The linked object has the same properties as the linking object. * @param gProp - Information about the properties >> This parameter is mandatory. * @returns - returns a GenericObject */ createSessionObject(qProp: IGenericObjectProperties): Promise; /** * Creates a transient variable. * @param gProp - Name of the variable. Variable names are case sensitive. * >> This parameter is mandatory. * @returns - returns a GenericVariable */ createSessionVariable(qProp: IGenericVariableProperties): Promise; /** * Creates a variable. * * Note: This method is deprecated (not recommended to use). Use CreateVariableEx method instead. * @param qName - Name of the variable. Variable names are case sensitive. >> This parameter is mandatory. * @returns - returns a Boolean */ createVariable(qName: string): Promise; /** * Creates a variable. * * Note: This method is deprecated (not recommended to use). Use CreateVariableEx method instead. * @param qProp - Name of the variable. Variable names are case sensitive and must be unique. * >> This parameter is mandatory. * @returns - returns a NxInfo. Identifier and type of the object. >> This parameter is mandatory. */ createVariableEx(qProp: IGenericVariableProperties): Promise; /** * Deletes a connection. * The AttachedFiles connection can only be removed by the administrator of the system. * * Note: In Qlik Sense Enterprise, there is an additional file connection named AttachedFiles. * @param qConnectionId - Identifier of the connection to remove. >> This parameter is mandatory. * @returns - A promise of a Qlik engine reply. */ deleteConnection(qConnectionId: string): Promise; /** * Removes a bookmark. * * Note: The operation is successful if qSuccess is set to true. * @param qId - Identifier of the bookmark * @returns - A promise of Boolean */ destroyBookmark(qId: string): Promise; /** * Removes a dimension. * * Note: The operation is successful if qSuccess is set to true. * @param qId - Identifier of the dimension to remove. >> This parameter is mandatory. * @returns - A promise of Boolean */ destroyDimension(qId: string): Promise; /** * Removes a dimension. * * Note: The operation is successful if qSuccess is set to true. * @param qId - Identifier of the draft object to remove. >> This parameter is mandatory. * @param qSourceId - Identifier of the source object (the object from which a draft was created). * @returns - A promise of Boolean */ destroyDraft(qId: string, qSourceId: string): Promise; /** * Removes a generic measure. * * Note: The operation is successful if qSuccess is set to true. * @param qId - Identifier of the measure to remove. >> This parameter is mandatory. * @returns - A promise of Boolean */ destroyMeasure(qId: string): Promise; /** * Removes an app object. * * Note: The operation is successful if qSuccess is set to true. * @param qId - Identifier of the object to remove. >> This parameter is mandatory. * @returns - A promise of Boolean */ destroyObject(qId: string): Promise; /** * Removes a transient object. * * Note: The operation is successful if qSuccess is set to true. * @param qId - Identifier of the object to remove. >> This parameter is mandatory. * @returns - A promise of Boolean */ destroySessionObject(qId: string): Promise; /** * Removes a transient variable. * * Note: The operation is successful if qSuccess is set to true. * @param qId - Identifier of the object to remove. >> This parameter is mandatory. * @returns - A promise of Boolean */ destroySessionVariable(qId: string): Promise; /** * Removes a variable. * * Note: The operation is successful if qSuccess is set to true. * Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. * @param qId - Identifier of the variable. * @returns - A promise of Boolean */ destroyVariableById(qId: string): Promise; /** * Removes a variable. * * Note: The operation is successful if qSuccess is set to true. * Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. * @param qName - Name of the variable.. * @returns - A promise of Boolean */ destroyVariableByName(qName: string): Promise; /** * Reloads the script that is set in an app. * * Note: The operation is successful if qSuccess is set to true. * @param qMode - Error handling mode. * * 0: for default mode * 1: for ABEND; the reload of the script ends if an error occurs * 2: for ignore; the reload of the script continues even if an error is detected in the script. * * This parameter is optional. * @param qPartial - Set to true for partial reload. This parameter is optional. * The default value is false. * @param qDebug - Set to true if debug breakpoints are to be honored. * The execution of the script will be in debug mode. * This parameter is optional. The default value is false. * @returns - A promise of Boolean */ doReload(qMode?: number, qPartial?: boolean, qDebug?: boolean): Promise; /** * Reloads the script that is set in an app and returns the path to the script log file. * * Note: A log file is created per reload. * @param qParams - This parameter is optional. * @returns - If the data load has successfully finished, no matter how the indexing behaves, true is returned. * This happens even if there is a timeout, a memory limit is reached or any other error occurs during the indexing. */ doReloadEx(qParams?: IDoReloadExParams): Promise; /** * Saves an app. All objects and data in the data model are saved. * Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. * @param qFileName - Name of the file to save. This parameter is optional. * @returns - A promise of a Qlik engine reply. */ doSave(qFileName?: string): Promise; /** * Evaluates an expression as a string. * Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. * @param qExpression - Expression to evaluate. * @returns - return a expression evaluated as a string */ evaluate(qExpression: string): Promise; /** * Evaluates an expression as a dual. * Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. * @param qExpression - Expression to evaluate. * @returns - return a Promise with a FieldValue */ evaluateEx(qExpression: string): Promise; /** * Export an Qlik QVF with a reduced datamodel * @param qOptions - qBookmarkId - bookmark to export * qExpires - download expires in [s] * @returns - return a Promise with the qDownloadInfo */ exportReducedData(qOptions?: { qBookmarkId?: string, qExpires?: number}): Promise<{ qDownloadInfo: any }>; /** * Retrieves any fields that belong to the same archipelago as the specified field and * that match at least one of the specified tags. * Tags set by Qlik Sense are prefixed by the $ sign. * @param qFieldName - Name of the field. This method looks for fields that * belong to the same archipelago as this specified field. * @param qTags - List of tags. This method looks for fields that match at least one of the tags in this list. * @returns - A promise of FieldValue. */ findMatchingFields(qFieldName: string, qTags: string[]): Promise; /** * Loads the next logical operation (if any). * @returns - A promise of a Qlik engine reply. */ forward(): Promise; /** * Returns the number of entries on the Forward stack. * @returns - A promise and Number of entries in the forward stack */ forwardCount(): Promise; /** * Returns the identifier and the type of any generic object in the app. * Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. * @param qInfos - (Array of NxInfo) Information about all generic objects in the app. * @returns - return a Promise Array of INxInfo */ getAllInfos(): Promise; /** * Returns dynamic properties (if any) in addition to the engine (fixed) properties. * Script-defined variables cannot be removed using the DestroyVariableById method or the DestroyVariableByName method. * @returns - return a Promise of a data set NxAppLayout */ getAppLayout(): Promise; /** * Gets the properties of an app. * @returns - return a Promise of NxAppProperties qProp. Information about the properties of the app. */ getAppProperties(): Promise; /** * Computes a set of association scores for each pair of fields between two given tables that have been loaded in an app. * @param qTable1 - Name of the first table. * @param qTable2 - Name of the second table. * @returns - return a Promise of IAssociationScore qScore. */ getAssociationScores(qTable1: string, qTable2: string): Promise; /** * Returns the handle of a bookmark. * @param qId - Identifier of the bookmark. * @returns - return a Promise of IGenericBookmark. */ getBookmark(qId: string): Promise; /** * Returns a list of bookmarks in the app. * @param qOptions - Information about the list of bookmarks. * @returns - return a Promise of INxContainerEntry. */ getBookmarks(qOptions: INxGetBookmarkOptions): Promise>; /** * Retrieves a connection and returns: * - The creation time of the connection * - The identifier of the connection * - The type of the connection * - The name of the connection * - The connection string * @param qConnectionId - Identifier of the connection. >> This parameter is mandatory. * @returns - return a Connection. */ getConnection(qConnectionId: string): Promise; /** * Lists the connections in an app. * * Note: In Qlik Sense Enterprise, there is an additional file connection named AttachedFiles. * This connection is stored in the Qlik Sense repository. * @returns - return a Promise of Array of Connection. */ getConnections(): Promise; /** * Lists the content libraries. * To differentiate a global content library from an app specific content library, * you can check the property qAppSpecific. * If this property is set to true, it means that the content library is app specific. * * Note: There is always one specific content library per app. * @returns - return a Promise of ContentLibraryList. */ getContentLibraries(): Promise; /** * Gives information about an ODBC, OLEDB or CUSTOM connection. * @param qConnectionId - Identifier of the connection. >> This parameter is mandatory. * @returns - return a Promise of DatabaseInfo. */ getDatabaseInfo(qConnectionId: string): Promise; /** * Lists the owners of a database for a ODBC, OLEDB or CUSTOM connection. * @param qConnectionId - Identifier of the connection. >> This parameter is mandatory. * @param qDatabase - Name of the database. >> This parameter is mandatory. * @returns - return a Promise Array of DatabaseOwner. */ getDatabaseOwners(qConnectionId: string, qDatabase?: string): Promise; /** * Lists the databases inside a ODBC, OLEDB or CUSTOM data source. * @param qConnectionId - Identifier of the connection. >> This parameter is mandatory. * @returns - return a Promise Array of Database. */ getDatabases(qConnectionId: string): Promise; /** * Lists the fields inside a table of a database for a ODBC, OLEDB or CUSTOM connection. * @param qConnectionId - Identifier of the connection. >> This parameter is mandatory. * @param qDatabase - Name of the database. >> This parameter is mandatory. * (If qDatabase is not set then qOwner must be set.) * @param qOwner - Owner of the database. >> This parameter is mandatory. * (If qOwner is not set then qDatabase must be set.) * @param qTable - Name of the table. >> This parameter is mandatory. * @returns - return a Promise Array of DataField. */ getDatabaseTableFields(qConnectionId: string, qTable: string, qDatabase?: string, qOwner?: string): Promise; /** * Retrieves the values of the specified table of a database for a ODBC, OLEDB or CUSTOM connection. * @param qConnectionId - Identifier of the connection. >> This parameter is mandatory. * @param qDatabase - Name of the database. >> This parameter is mandatory. * (If qDatabase is not set then qOwner must be set.) * @param qOwner - Owner of the database. >> This parameter is mandatory. * (If qOwner is not set then qDatabase must be set.) * @param qTable - Name of the table. >> This parameter is mandatory. * @returns - return a Promise Array of DataRecord. */ getDatabaseTablePreview(qConnectionId: string, qTable: string, qDatabase?: string, qOwner?: string): Promise; /** * Lists the tables inside a database for a ODBC, OLEDB or CUSTOM connection. * @param qConnectionId - Identifier of the connection. >> This parameter is mandatory. * @param qDatabase - Name of the database. >> This parameter is mandatory. * (If qDatabase is not set then qOwner must be set.) * @param qOwner - Owner of the database. >> This parameter is mandatory. * (If qOwner is not set then qDatabase must be set.) * @returns - return a Promise Array of DataTable. */ getDatabaseTables(qConnectionId: string, qDatabase?: string, qOwner?: string): Promise; /** * Returns the handle of a dimension. * @param qId - Identifier of the dimension. >> This parameter is mandatory. * @returns - return a Promise GenericDimension. */ getDimension(qId: string): Promise; /** * Creates a script that contains one section. * This section contains Set statements that give localized information from the regional settings of the computer. * * Note: The computer regional settings are retrieved when the engine starts. * @param qLocalizedMainSection - Name of the script section. The default value is Main. This parameter is optional. * @returns - return a Promise . */ getEmptyScript(qLocalizedMainSection?: string): Promise; /** * Retrieves the variables that are tagged as favorite. * @returns - return a Promise Array of String */ getFavoriteVariables(): Promise; /** * Retrieves the description of a field. * @param qFieldName - Name of the field. >> This parameter is mandatory * @returns - return a Promise of FieldDescription. */ getFieldDescription(qFieldName: string): Promise; /** * Fetches the Expression behind a Field that is declared with DECLARE FIELD DEFINITIO * @param qReadableName: name of a Field that is declared with DECLARE FIELD DEFINITION * @returns qname wich contains the expression */ getFieldOnTheFlyByName(qReadableName: string): Promise<{qName: string}>; /** * Retrieves the description of a field. * @param qFieldName - Name of the field. >> This parameter is mandatory. * @param qStateName - Name of the alternate state. This parameter is optional. Default state is current selections. * @returns - return a Promise of FieldDescription. */ getField(qFieldName: string, qStateName?: string): Promise; /** * Lists the fields of a table for a folder connection. * @param qConnectionId - Identifier of the connection. >> This parameter is mandatory. * @param qRelativePath - Path of the connection file. This parameter is optional. * @param qDataFormat - Type of the file. * @param qTable - Name of the table. This parameter must be set for XLS, XLSX, HTML and XML files. * @returns - return a Promise Array of DataField or String. */ getFileTableFields(qConnectionId: string, qDataFormat: IFileDataFormat, qTable: string, qRelativePath?: string): Promise<{qFields: IDataField[], qFormatSpec: string}>; /** * Lists the values in a table for a folder connection. * @param qConnectionId - Identifier of the connection. >> This parameter is mandatory. * @param qRelativePath - Path of the connection file. This parameter is optional. * @param qDataFormat - Type of the file. * @param qTable - Name of the table. This parameter must be set for XLS, XLSX, HTML and XML files. * @returns - return a Promise or . */ getFileTablePreview(qConnectionId: string, qRelativePath: string, qDataFormat: IFileDataFormat, qTable: string): Promise<{qPreview: IDataRecord[], qFormatSpec: string}>; /** * Lists the tables and fields of a JSON or XML file for a folder connection. * @param qConnectionId - Identifier of the connection. >> This parameter is mandatory. * @param qRelativePath - Path of the connection file. This parameter is optional. * @param qDataFormat - Type of the file. * @returns - return a Promise Array of DataTableEx. */ getFileTablesEx(qConnectionId: string, qRelativePath: string, qDataFormat: IFileDataFormat): Promise; /** * Lists the tables for a folder connection. * @param qConnectionId - Identifier of the connection. >> This parameter is mandatory. * @param qRelativePath - Path of the connection file. This parameter is optional. * @param qDataFormat - Type of the file. * @returns - return a Promise Array of DataTable. */ getFileTables(qConnectionId: string, qRelativePath: string, qDataFormat: IFileDataFormat): Promise; /** * There are two ways to specify the directory to retrieve the files from: * - Enter the connection identifier; the directory associated to the connection is used. * - Enter the connection identifier and a relative path * @param qConnectionId - Identifier of the connection. >> This parameter is mandatory. * @param qRelativePath - Path of the connection file. This parameter is optional. * @returns - return a Promise Array of FolderItem. */ getFolderItemsForConnection(qConnectionId: string, qRelativePath: string): Promise; /** * Gets the content of a file. * @param qLibPath - ["lib://CONNECTION_NAME\\.txt"] or * - ["lib://Connection_Name\\\\.txt"] * - [ ] should be used when having a lib reference in the first variable. * @returns - return a Promise of String. */ getIncludeFileContent(qLibPath: string): Promise; /** * Returns the content of a library. * @param qName - Name of the content library. It corresponds to the property * qContentLibraryListItem/qName returned by the GetContentLibraries method. * @returns - return a Promise of StaticContentList. */ getLibraryContent(qName: string): Promise; /** * Returns the lineage of the datamodel. * @returns - return a Promise of qLineage. */ getLineage(): Promise<{ qLineage: Array<{ qDiscriminator: string }> }>; /** * Retrieves locale information. * @returns - return a Promise of LocaleInfo. */ getLocaleInfo(): Promise; /** * Returns a vector of loosely coupled state flags, one element for each table in the app. * so that the circular references do not create a loop. * Where is an array of state flags, one for each table in the app. * * 0 means that the table is not loose * 1 means that the table is loose * 2 means that the table is always loose and cannot be unloose using the Qlik Engine API. * * Note: The last three values in the vector are extra values. These values are for internal use. * Note: In case of circular references, the engine automatically create loosely coupled tables * @returns - return a Promise . */ getLooselyCoupledVector(): Promise; /** * Retrieves any fields that match all or one of the specified tags in the data model of an app. * * Note: Tags set by Qlik Sense are prefixed by the $ sign. * @param qTags - List of tags. Array of String * The GetMatchingFields method looks for fields that match one or all of the tags in this list, * depending on the value of qMatchingFieldMode. * @param qMatchingFieldMode - Matching field mode. * This parameter is optional. * The default value is 0. * @returns - return a Promise Array of NxMatchingFieldInfo. */ getMatchingFields(qTags: string[], qMatchingFieldMode?: boolean): Promise; /** * Lists the media files. * * Note: This method is deprecated (not recommended to use). Use GetLibraryContent method instead. * @returns - return a Promise Boolean or MediaList */ getMediaList(): Promise; /** * Returns the handle of a measure. * * @param qId - Identifier of the measure. >> This parameter is mandatory. * @returns - return a Promise String GenericMeasure */ getMeasure(qId: string): Promise; /** * Returns the type of the app object and the corresponding handle. * * @param qId - Identifier of the measure. >> This parameter is mandatory. * @returns - return a Promise String GenericObject */ getObject(qId: string): Promise; /** * Returns a list of objects in the app. * * @param qOptions - Information about the list of objects. * @returns - return a Promise array of NxContainerEntry. */ getObjects(qOptions: INxGetObjectOptions): Promise>; /** * Shows the properties of an object. * * Returns the identifier and the definition of the measure. * * Note: If the member delta is set to true in the request object, only the delta is retrieved. * @returns - return a Promise GenericObject */ getProperties(): Promise; /** * Lists the breakpoints in the script of an app. * * Returns information about the breakpoints. * @returns - return a Promise Array of EditorBreakpoint */ getScriptBreakpoints(): Promise; /** * Gets values in script. * @returns - return a Promise String