import { type DateAttributeGranularity } from "../../base/dateGranularities.js"; import { type Identifier, type LocalIdRef, type ObjRef, type ObjRefInScope } from "../../objRef/index.js"; import { type IAttribute } from "../attribute/index.js"; import { type IMeasure } from "../measure/index.js"; import { type ComparisonConditionOperator, type EmptyValues, type IAbsoluteDateFilter, type IArbitraryAttributeFilter, type IAttributeElements, type ILowerBoundedFilter, type IMatchAttributeFilter, type IMeasureValueFilter, type INegativeAttributeFilter, type IPositiveAttributeFilter, type IRankingFilter, type IRelativeDateFilter, type IUpperBoundedFilter, type MatchFilterOperator, type RangeConditionOperator, type RankingFilterOperator } from "./index.js"; export declare function generateLocalId(prefix: string, objRef: ObjRef, inObject: IAttributeElements): string; /** * Creates a new positive attribute filter. * * @remarks * NOTE: when specifying attribute element using URIs (primary keys), please keep in mind that they MAY NOT be transferable * across workspaces. On some backends same element WILL have different URI in each workspace. * In general we recommend using URIs only if your code retrieves them at runtime from backend using elements query * or from the data view's headers. Hardcoding URIs is never a good idea, if you find yourself doing that, * please consider specifying attribute elements by value * * @param attributeOrRef - either instance of attribute to create filter for or ref or identifier of attribute's display form * @param inValues - values to filter for; these can be either specified as AttributeElements object or as an array * of attribute element _values_; if you specify empty array, then the filter will be noop and will be ignored * @public */ export declare function newPositiveAttributeFilter(attributeOrRef: IAttribute | ObjRef | Identifier, inValues: IAttributeElements | (string | null)[], localIdentifier?: string): IPositiveAttributeFilter; /** * Creates a new negative attribute filter. * * @remarks * NOTE: when specifying attribute element using URIs (primary keys), please keep in mind that they MAY NOT be transferable * across workspaces. On some backends same element WILL have different URI in each workspace. * In general we recommend using URIs only if your code retrieves them at runtime from backend using elements query * or from the data view's headers. Hardcoding URIs is never a good idea, if you find yourself doing that, * please consider specifying attribute elements by value * * @param attributeOrRef - either instance of attribute to create filter for or ref or identifier of attribute's display form * @param notInValues - values to filter out; these can be either specified as AttributeElements object or as an array * of attribute element _values_; if you specify empty array, then the filter will be noop and will be ignored * @public */ export declare function newNegativeAttributeFilter(attributeOrRef: IAttribute | ObjRef | Identifier, notInValues: IAttributeElements | string[], localIdentifier?: string): INegativeAttributeFilter; /** * Creates a new arbitrary attribute filter. * * @remarks * Arbitrary filters allow specifying custom string values that don't need to exist as actual attribute elements. * Useful for custom/external data integration scenarios. * * @param attributeOrRef - either instance of attribute to create filter for or ref or identifier of attribute's display form * @param values - arbitrary values to filter by; can be empty array; use null for empty/missing values * @param negativeSelection - whether this is a negative filter (NOT IN); defaults to false * @param localIdentifier - optional local identifier for the filter * @alpha */ export declare function newArbitraryAttributeFilter(attributeOrRef: IAttribute | ObjRef | Identifier, values: Array, negativeSelection?: boolean, localIdentifier?: string): IArbitraryAttributeFilter; /** * Creates a new match attribute filter. * * @remarks * Match filters provide literal-based matching with various operators. * The literal cannot be empty for a valid filter. * * @param attributeOrRef - either instance of attribute to create filter for or ref or identifier of attribute's display form * @param operator - match operator (contains, startsWith, endsWith) * @param literal - literal string to match (should not be empty for valid filter) * @param options - optional configuration for case sensitivity and negation * @param localIdentifier - optional local identifier for the filter * @alpha */ export declare function newMatchAttributeFilter(attributeOrRef: IAttribute | ObjRef | Identifier, operator: MatchFilterOperator, literal: string, options?: { caseSensitive?: boolean; negativeSelection?: boolean; }, localIdentifier?: string): IMatchAttributeFilter; /** * Creates a new absolute date filter. * * @param dateDataSet - ref or identifier of the date data set to filter on * @param from - start of the interval in ISO-8601 calendar date format * @param to - end of the interval in ISO-8601 calendar date format * @param localIdentifier - filter local identifier * * @public */ export declare function newAbsoluteDateFilter(dateDataSet: ObjRef | Identifier, from: string, to: string, localIdentifier?: string, emptyValueHandling?: EmptyValues): IAbsoluteDateFilter; /** * Creates a new relative date filter. * * @param dateDataSet - ref or identifier of the date data set to filter on * @param granularity - granularity of the filters (month, year, etc.) * @param from - start of the interval – negative numbers mean the past, zero means today, positive numbers mean the future * @param to - end of the interval – negative numbers mean the past, zero means today, positive numbers mean the future * @param boundedFilter - optional bounded filter to use in the filter * @param localIdentifier - filter local identifier * * See also {@link DateAttributeGranularity} and {@link DateGranularity} * @public */ export declare function newRelativeDateFilter(dateDataSet: ObjRef | Identifier, granularity: DateAttributeGranularity, from: number, to: number, localIdentifier?: string, boundedFilter?: IUpperBoundedFilter | ILowerBoundedFilter, emptyValueHandling?: EmptyValues): IRelativeDateFilter; /** * Creates a new all time date filter. This filter is used to indicate that there should be no filtering on the given date data set. * * @param dateDataSet - ref or identifier of the date data set to filter on * @public */ export declare function newAllTimeFilter(dateDataSet: ObjRef | Identifier, localIdentifier?: string, emptyValueHandling?: EmptyValues): IRelativeDateFilter; /** * Creates a new measure value filter. * * @param measureOrRef - instance of measure to filter, or reference of the measure object; if instance of measure is * provided, then it is assumed this measure is in scope of execution and will be referenced by the filter by * its local identifier * @param operator - comparison or range operator to use in the filter * @param value - the value to compare to * @param treatNullValuesAs - value to use instead of null values * @public */ export declare function newMeasureValueFilter(measureOrRef: IMeasure | ObjRefInScope | string, operator: ComparisonConditionOperator, value: number, treatNullValuesAs?: number): IMeasureValueFilter; /** * Creates a new measure value filter. * * @param measureOrRef - instance of measure to filter, or reference of the measure object; if instance of measure is * provided, then it is assumed this measure is in scope of execution and will be referenced by the filter by * its local identifier * @param operator - range operator to use in the filter * @param from - the start of the range * @param to - the end of the range * @param treatNullValuesAs - value to use instead of null values * @public */ export declare function newMeasureValueFilter(measureOrRef: IMeasure | ObjRefInScope | LocalIdRef | string, operator: RangeConditionOperator, from: number, to: number, treatNullValuesAs?: number): IMeasureValueFilter; /** * Options for creating a measure value filter with comparison condition. * * @public */ export interface IMeasureValueFilterComparisonOptions { /** * Comparison operator to use in the filter */ operator: ComparisonConditionOperator; /** * The value to compare to */ value: number; /** * Optional value to use instead of null values */ treatNullValuesAs?: number; /** * Optional array of attributes to define the dimensionality for the filter. * If instance of attribute is provided, it will be referenced by its local identifier. */ dimensionality?: Array; /** * Optional flag to apply the filter on result. * When undefined, backend defaults are used. */ applyOnResult?: boolean; } /** * Options for creating a measure value filter with range condition. * * @public */ export interface IMeasureValueFilterRangeOptions { /** * Range operator to use in the filter */ operator: RangeConditionOperator; /** * The start of the range */ from: number; /** * The end of the range */ to: number; /** * Optional value to use instead of null values */ treatNullValuesAs?: number; /** * Optional array of attributes to define the dimensionality for the filter. * If instance of attribute is provided, it will be referenced by its local identifier. */ dimensionality?: Array; /** * Optional flag to apply the filter on result. * When undefined, backend defaults are used. */ applyOnResult?: boolean; } /** * Options for creating a measure value filter with ALL operator. * * @public */ export interface IMeasureValueFilterAllOptions { operator: "ALL"; /** * Optional array of attributes to define the dimensionality for the filter. * If instance of attribute is provided, it will be referenced by its local identifier. */ dimensionality?: Array; /** * Optional flag to apply the filter on result. * When undefined, backend defaults are used. */ applyOnResult?: boolean; } /** * Condition for comparison operator. * * @public */ export interface IOptionsComparisonCondition { operator: ComparisonConditionOperator; value: number; } /** * Condition for range operator. * * @public */ export interface IOptionsRangeCondition { operator: RangeConditionOperator; from: number; to: number; } /** * Condition for ALL operator. * * @public */ export interface IOptionsAllCondition { operator: "ALL"; } /** * Condition for measure value filter. * * @public */ export type OptionsCondition = IOptionsComparisonCondition | IOptionsRangeCondition | IOptionsAllCondition; /** * Options for creating a measure value filter with multiple conditions. * * @public */ export interface IMeasureValueFilterConditionsOptions { conditions: OptionsCondition[]; /** * Optional value to use instead of null values */ treatNullValuesAs?: number; /** * Optional array of attributes to define the dimensionality for the filter. * If instance of attribute is provided, it will be referenced by its local identifier. */ dimensionality?: Array; /** * Optional flag to apply the filter on result. * When undefined, backend defaults are used. */ applyOnResult?: boolean; } /** * Options for creating a measure value filter. * * @public */ export type IMeasureValueFilterOptions = IMeasureValueFilterComparisonOptions | IMeasureValueFilterRangeOptions | IMeasureValueFilterAllOptions | IMeasureValueFilterConditionsOptions; /** * Creates a new measure value filter with options object. * * @remarks * This factory function provides a cleaner API for creating measure value filters * with optional dimensionality support. * * @param measureOrRef - instance of measure to filter, or reference of the measure object; if instance of measure is * provided, then it is assumed this measure is in scope of execution and will be referenced by the filter by * its local identifier * @param options - options object containing operator, value(s), and optional dimensionality * @public */ export declare function newMeasureValueFilterWithOptions(measureOrRef: IMeasure | ObjRefInScope | string, options: IMeasureValueFilterOptions): IMeasureValueFilter; /** * Creates a new ranking filter. * * @param measureOrRef - instance of measure to filter, or reference of the measure object; if instance of measure is * provided, then it is assumed this measure is in scope of execution and will be referenced by the filter by * its local identifier * @param operator - TOP or BOTTOM operator to use in the filter * @param value - Number of values to use in filter * @param attributesOrRefs - Array of attributes used in filter, or reference of the attribute object. If instance of attribute is * provided, then it is assumed this attribute is in scope of execution and will be referenced by the filter by * its local identifier * @public */ export declare function newRankingFilter(measureOrRef: IMeasure | ObjRefInScope | string, attributesOrRefs: Array, operator: RankingFilterOperator, value: number): IRankingFilter; /** * Creates a new ranking filter. * * @param measureOrRef - instance of measure to filter, or reference of the measure object; if instance of measure is * provided, then it is assumed this measure is in scope of execution and will be referenced by the filter by * its local identifier * @param operator - TOP or BOTTOM operator to use in the filter * @param value - Number of values to use in filter * @public */ export declare function newRankingFilter(measureOrRef: IMeasure | ObjRefInScope | string, operator: RankingFilterOperator, value: number): IRankingFilter; //# sourceMappingURL=factory.d.ts.map