import { type CustomLabel, type CustomMetric, type CustomOverride, type ExportCustomOverride } from "@gooddata/api-client-tiger"; import { type IDimensionDescriptor, type IExecutionDefinition } from "@gooddata/sdk-model"; export type ExportMetrics = { [key: string]: CustomMetric; }; export type ExportLabels = { [key: string]: CustomLabel; }; /** * Resolves custom override value for export payload. * * @param dimensions - the source of default values * @param definition - the source of custom values */ export declare const resolveCustomOverride: (dimensions: IDimensionDescriptor[], definition: IExecutionDefinition) => CustomOverride | undefined; /** * Fills measures/metrics and attributes/labels with the lowest priority values, which serve as default. * * @param dimensions - the source of default values */ export declare const prepareCustomOverride: (dimensions: IDimensionDescriptor[]) => CustomOverride; /** * Overwrites default measure/metric values with custom ones. * This function should be used after {@link prepareCustomOverride}, because it relies upon its output. * * @param definition - the source of custom values * @param metrics - return values from {@link prepareCustomOverride} */ export declare const setCustomMetrics: (definition: IExecutionDefinition, metrics: ExportMetrics) => { [x: string]: CustomMetric | { title: string; format: string; }; }; /** * Overwrites formats of derived measures/metrics with values from master, which they should inherit. * This function should be used after {@link setCustomMetrics}, because it relies upon its output. * * @param definition - the source of data * @param metrics - return values from {@link setCustomMetrics} */ export declare const setDerivedMetrics: (definition: IExecutionDefinition, metrics: ExportMetrics) => ExportMetrics; /** * Overwrites default attribute/label values with custom ones. * This function should be used after {@link prepareCustomOverride}, because it relies upon its output. * * @param definition - the source of custom values * @param labels - return values from {@link prepareCustomOverride} */ export declare const setCustomLabels: (definition: IExecutionDefinition, labels: ExportLabels) => { [x: string]: CustomLabel | { title: string; }; }; /** * Augments custom override with normalized keys to ensure compatibility with backend caching. * * For every (denormalized) key in the custom override, this function adds its value again under the * corresponding normalized key. This ensures that regardless of how the localIds are specified in * the cached result on the backend, the override will match either the denormalized or the normalized one. * * @remarks * The backend may cache execution results using either normalized or denormalized local identifiers. * By augmenting the custom override with both versions of the keys, we ensure the export will work * correctly regardless of which format the backend uses. * * @param customOverride - The custom override to augment, may be undefined. * @param definition - The execution definition used to determine normalization mapping * @returns The augmented custom override with both normalized and denormalized keys, or undefined if input was undefined * * @internal */ export declare const augmentCustomOverrideWithNormalizedKeys: (customOverride: CustomOverride | ExportCustomOverride | undefined, definition: IExecutionDefinition) => ExportCustomOverride | undefined; //# sourceMappingURL=utils.d.ts.map