diff --git a/types/qlik-engineapi/index.d.ts b/types/qlik-engineapi/index.d.ts index bf2355e88f..dd9d761f56 100644 --- a/types/qlik-engineapi/index.d.ts +++ b/types/qlik-engineapi/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for 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 { @@ -344,14 +345,14 @@ declare namespace EngineAPI { * 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; + 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; + qPassword?: string; /** * Is generated by the engine. @@ -449,13 +450,13 @@ declare namespace EngineAPI { * Comment related to the variable. * >> This parameter is optional. */ - qComment: string; + qComment?: string; /** * Defines the format of the value. * >> This parameter is optional. */ - qNumberPresentation: IFieldAttributes; + qNumberPresentation?: IFieldAttributes; /** * Set this property to true to update the variable when applying a bookmark. @@ -565,14 +566,14 @@ declare namespace EngineAPI { * 2: for ignore; the reload of the script continues even if an error is detected in the script. * >> This parameter is optional. */ - qMode: number; + qMode?: number; /** * Set to true for partial reload * >> This parameter is optional. * >> The default value is false. */ - qPartial: boolean; + qPartial?: boolean; /** * Set to true if debug breakpoints are to be honored. @@ -580,7 +581,7 @@ declare namespace EngineAPI { * >> This parameter is optional. * >> The default value is false. */ - qDebug: boolean; + qDebug?: boolean; } /** @@ -606,20 +607,20 @@ declare namespace EngineAPI { * Text related to the field value * This parameter is optional. */ - qText: string; + qText?: string; /** * Is set to true if the value is a numeric. * This parameter is optional. Default is false. */ - qIsNumeric: boolean; + qIsNumeric?: boolean; /** * Numeric value of the field. * This parameter is displayed if qIsNumeric is set to true. * This parameter is optional. */ - qNumber: number; + qNumber?: number; } /** @@ -3255,7 +3256,7 @@ declare namespace EngineAPI { * @param qRelativePath - Path of the connection file. This parameter is optional. * @returns - return a Promise of FileDataFormat */ - guessFileType(qConnectionId: string, qRelativePath: string): Promise; + guessFileType(qConnectionId: string, qRelativePath?: string): Promise; /** * Locks all selections in all fields of the current app. @@ -3266,7 +3267,7 @@ declare namespace EngineAPI { * The default value is an empty string. * @returns - A promise of a Qlik engine reply. */ - lockAll(qStateName: string): Promise; + lockAll(qStateName?: string): Promise; /** * migrateDerivedFields. @@ -3530,7 +3531,7 @@ declare namespace EngineAPI { * The default value is an empty string. * @returns - A promise true or false */ - unlockAll(qStateName: string): Promise; + unlockAll(qStateName?: string): Promise; } interface INxFieldProperties { @@ -3851,7 +3852,7 @@ declare namespace EngineAPI { * Everything that matches the text is selected. * >> This parameter is optional. */ - qTextSearch: string; + qTextSearch?: string; /** * Lower value of the search range. @@ -4304,7 +4305,7 @@ declare namespace EngineAPI { * Text related to the attribute expression value. * This property is optional. No text is returned if the attribute expression value is a numeric. */ - qText: string; + qText?: string; /** * Numeric value of the attribute expression. @@ -4322,13 +4323,13 @@ declare namespace EngineAPI { * Some text. * This parameter is optional. */ - qText: string; + qText?: string; /** * A value. * This parameter is optional. */ - qNum: number; + qNum?: number; /** * Rank number of the value, starting from 0. @@ -4363,14 +4364,14 @@ declare namespace EngineAPI { * Is set to true, if qText and qNum are empty. * This parameter is optional. The default value is false. */ - qIsEmpty: boolean; + qIsEmpty?: boolean; /** * Is set to true if a total is displayed in the cell. * This parameter is optional. The default value is false. * Not applicable to list objects. */ - qIsTotalCell: boolean; + qIsTotalCell?: boolean; /** * Is set to true if the cell belongs to the group Others. @@ -4378,20 +4379,20 @@ declare namespace EngineAPI { * This parameter is optional. The default value is false. * Not applicable to list objects. */ - qIsOtherCell: boolean; + qIsOtherCell?: boolean; /** * Frequency of the value. * This parameter is optional. */ - qFrequency: string; + qFrequency?: string; /** * Search hits. * The search hits are highlighted. * This parameter is optional. */ - qHighlightRanges: INxHighlightRanges; + qHighlightRanges?: INxHighlightRanges; /** * Attribute expression values. @@ -4453,14 +4454,14 @@ declare namespace EngineAPI { * This number depends on the paging, more particularly it depends on the values defined in qTop and qHeight * This parameter is optional. Is not shown if the value is 0. */ - qUp: number; + qUp?: number; /** * Number of elements that are part of the next tail. * This number depends on the paging, more particularly it depends on the values defined in qTop and qHeight * This parameter is optional. Is not shown if the value is 0. */ - qDown: number; + qDown?: number; } /** @@ -4555,7 +4556,7 @@ declare namespace EngineAPI { * Text related to the attribute expression value. * This property is optional. No text is returned if the attribute expression value is a numeric. */ - qText: string; + qText?: string; /** * Element number. @@ -4805,7 +4806,7 @@ declare namespace EngineAPI { * This parameter is optional. * Gives information on the error. */ - qError: INxLayoutErrors; + qError?: INxLayoutErrors; /** * Information about the selections. @@ -5620,7 +5621,7 @@ declare namespace EngineAPI { * Dimension numbers/indexes start from 0. * This parameter is optional. If this parameter is not set, the selected values in all dimensions are locked. */ - lock(qPath: string, qColIndices: number[]): Promise; + lock(qPath: string, qColIndices?: number[]): Promise; /** * Publishes a generic object. @@ -5916,7 +5917,7 @@ declare namespace EngineAPI { * Dimension numbers/indexes start from 0. * This parameter is optional. If this parameter is not set, the locked values in all dimensions are unlocked. */ - unlock(qPath: string, qColIndices: number[]): Promise; + unlock(qPath: string, qColIndices?: number[]): Promise; /** * Unpublishes a generic object. @@ -5975,7 +5976,7 @@ declare namespace EngineAPI { * This parameter is optional. * Default value is no grouping. */ - qGrouping: NxGrpType; + qGrouping?: NxGrpType; /** * Array of expressions. @@ -6658,14 +6659,14 @@ declare namespace EngineAPI { * This parameter is optional. Default is false. * Is set to true if the version of ODBC is 32-bit. */ - qBit32: boolean; + qBit32?: boolean; /** * This parameter is optional. Default is false. * Is set to true if the connection is User DSN. * The connection works only for a specific user. */ - qUserOnly: boolean; + qUserOnly?: boolean; } /** @@ -6686,7 +6687,7 @@ declare namespace EngineAPI { * This parameter is optional. Default is false. * Is set to true if the version of the OLEDB provider is 32-bit. */ - qBit32: boolean; + qBit32?: boolean; } /** @@ -6989,7 +6990,7 @@ declare namespace EngineAPI { * >> This parameter is optional. * >> The default value is Main. */ - createApp(qAppName: string, qLocalizedScriptMainSection: string): Promise; // ?Result + createApp(qAppName: string, qLocalizedScriptMainSection?: string): Promise; // ?Result /** * Creates an app and opens an engine session. @@ -7183,7 +7184,7 @@ declare namespace EngineAPI { * If set to true, the GetCustomConnectors method looks for new connectors in the file system. * @returns A Promise Array of CustomConnector */ - getCustomConnectors(qReloadList: boolean): Promise; + getCustomConnectors(qReloadList?: boolean): Promise; /** * Lists the databases in a ODBC, OLEDB or CUSTOM data source. @@ -7519,7 +7520,7 @@ declare namespace EngineAPI { * Number of values in optional state. * Integer */ - qOption: number; + qOption?: number; /** * Number of values in deselected state. @@ -7590,7 +7591,7 @@ declare namespace EngineAPI { * # A for sorting ascending * # D for sorting descending */ - qSortIndicator: SortIndicatorType; + qSortIndicator?: SortIndicatorType; /** * Array of dimension labels. @@ -7624,7 +7625,7 @@ declare namespace EngineAPI { * Gives information on the error. * Null or NxValidationError */ - qError: INxValidationError; + qError?: INxValidationError; /** * Binary format of the field. @@ -7661,7 +7662,7 @@ declare namespace EngineAPI { * This parameter is optional. * FieldAttributes */ - qNumFormat: FieldAttributesType; + qNumFormat?: FieldAttributesType; /** * This parameter is set to true if qNumFormat is set to U (unknown). The engine guesses the type of the field based on the field's definition. @@ -7771,14 +7772,14 @@ declare namespace EngineAPI { * This parameter is optional. * String */ - qContext: string; + qContext?: string; /** * Internal information from the server. * This parameter is optional. * String */ - qExtendedMessage: string; + qExtendedMessage?: string; } /** @@ -7806,13 +7807,13 @@ declare namespace EngineAPI { /** * Sort indicator. This parameter is optional. The default value is no sorting. */ - qSortIndicator: SortIndicatorType; + qSortIndicator?: SortIndicatorType; /** * Format of the field. This parameter is optional. * One of: N for no sorting, A for sorting ascending, D for sorting descending */ - qNumFormat: IFieldAttributes; + qNumFormat?: IFieldAttributes; /** * This parameter is set to true if qNumFormat is set to U (unknown). The engine guesses the type of the field based on the field's expression. @@ -7832,7 +7833,7 @@ declare namespace EngineAPI { /** * This parameter is optional. Gives information on the error. */ - qError: INxValidationError; + qError?: INxValidationError; /** * If set to true, it inverts the sort criteria in the field. @@ -8323,7 +8324,7 @@ declare namespace EngineAPI { * Default value is no grouping. * >> This parameter is optional. */ - qGrouping: NxGrpType; + qGrouping?: NxGrpType; /** * Definition of the expression in the measure. @@ -8414,7 +8415,7 @@ declare namespace EngineAPI { * Label of the cell. * >> This parameter is optional. */ - qLabel: string; + qLabel?: string; /** * Some text related to the cell. @@ -8521,7 +8522,7 @@ declare namespace EngineAPI { /** * This parameter is optional and is displayed in case of error. */ - qError: INxValidationError; + qError?: INxValidationError; /** * Information about the dimension. @@ -8553,7 +8554,7 @@ declare namespace EngineAPI { * Gives information on the error. * >> This parameter is optional. */ - qError: INxLayoutErrors; + qError?: INxLayoutErrors; } /** @@ -8628,7 +8629,7 @@ declare namespace EngineAPI { * >> This parameter is optional. * >> Default is NX_FREQUENCY_NONE. */ - qFrequencyMode: FrequencyModeType; + qFrequencyMode?: FrequencyModeType; /* * If set to true, alternative values are allowed in qData. @@ -8636,7 +8637,7 @@ declare namespace EngineAPI { * If set to false, no alternative values are displayed in qData. Values are excluded instead. * Note that on the contrary, the qStateCounts parameter counts the excluded values as alternative values. */ - qShowAlternatives: boolean; + qShowAlternatives?: boolean; /* * Fetches an initial data set. @@ -8700,7 +8701,7 @@ declare namespace EngineAPI { /** * This parameter is optional and is displayed in case of error. */ - qError: INxValidationError; + qError?: INxValidationError; /** * Information on the dimension. @@ -8787,14 +8788,14 @@ declare namespace EngineAPI { * If set to true, the formatting of the results is slightly different. * >> This property is optional. */ - qIndentMode: boolean; + qIndentMode?: boolean; /** * Is used for pivot tables only. * Position of the last expended cell. * >> This property is optional. */ - qLastExpandedPos: INxCellPosition; + qLastExpandedPos?: INxCellPosition; /** * ... @@ -8941,7 +8942,7 @@ declare namespace EngineAPI { * As long as the condition is not met, the engine does not perform a new calculation. * This property is optional. By default, there is no calculation condition. */ - qCalcCond: IValueExpr; + qCalcCond?: IValueExpr; /** * To enable the sorting by ascending or descending order in the values of a measure. @@ -9002,13 +9003,13 @@ declare namespace EngineAPI { * Optional parameter. This parameter is displayed if its value is true. * Is set to true if the field is a numeric. */ - qIsNum: boolean; + qIsNum?: boolean; /** * Optional parameter. This parameter is displayed if its value is true. * Is set to true if the field is locked. */ - qLocked: boolean; + qLocked?: boolean; /** * Information about the fields that are not selected. @@ -9019,7 +9020,7 @@ declare namespace EngineAPI { * Optional parameter. This parameter is displayed if its value is true. * Property that is set to a field. Is set to true if the field cannot be unselected. */ - qOneAndOnlyOne: boolean; + qOneAndOnlyOne?: boolean; /** * Information about the range of selected values. @@ -9068,7 +9069,7 @@ declare namespace EngineAPI { * Text that was used for the search. * This parameter is filled when searching for a value and selecting it. */ - qTextSearch: string; + qTextSearch?: string; /** * Number of values in the field.