import { type ExplainConfig, type ExplainType, type IAnomalyDetectionConfig, type IAnomalyDetectionResult, type IClusteringConfig, type IClusteringResult, type ICollectionItemsConfig, type ICollectionItemsResult, type IDataView, type IExecutionContext, type IExecutionFactory, type IExecutionResult, type IExecutionResultBinaryStreamConfig, type IExecutionResultMetadata, type IExplainProvider, type IExportConfig, type IExportResult, type IForecastConfig, type IForecastResult, type IForecastView, type IOutliersConfig, type IOutliersResult, type IOutliersView, type IPreparedExecution, type IPreparedExecutionOptions } from "@gooddata/sdk-backend-spi"; import { type DataValue, type DimensionGenerator, type IAttributeOrMeasure, type IBucket, type IDimension, type IDimensionDescriptor, type IExecutionConfig, type IExecutionDefinition, type IInsight, type IInsightDefinition, type INullableFilter, type IResultHeader, type IResultWarning, type ISortItem } from "@gooddata/sdk-model"; /** * @alpha */ export type PreparedExecutionWrapper = (execution: IPreparedExecution) => IPreparedExecution; /** * Base class for execution factory decorators. Implements all delegates. * * There is an opt-in functionality to decorate the prepared executions - which is a typical use case for * factory decorators. * * @alpha */ export declare class DecoratedExecutionFactory implements IExecutionFactory { protected readonly decorated: IExecutionFactory; private readonly wrapper; constructor(decorated: IExecutionFactory, wrapper?: PreparedExecutionWrapper); forDefinition(def: IExecutionDefinition, options?: IPreparedExecutionOptions): IPreparedExecution; forItems(items: IAttributeOrMeasure[], filters?: INullableFilter[], options?: IPreparedExecutionOptions): IPreparedExecution; forBuckets(buckets: IBucket[], filters?: INullableFilter[], options?: IPreparedExecutionOptions): IPreparedExecution; forInsight(insight: IInsightDefinition, filters?: INullableFilter[], options?: IPreparedExecutionOptions): IPreparedExecution; forInsightByRef(insight: IInsight, filters?: INullableFilter[], options?: IPreparedExecutionOptions): IPreparedExecution; /** * This method is a hook that can be used to wrap the execution prepared by the decorated factory - in essence * to keep the decorator chain going and add extra functionality to the prepared execution. * * By default, this method will call the wrapper function passed to this class at construction time - so use * that unless you need anything more fancy. * * @param execution - execution to wrap */ protected wrap: (execution: IPreparedExecution) => IPreparedExecution; } /** * Abstract base class for prepared execution decorators. Implements delegates to decorated execution. Concrete * implementations can override just the functions they are interested in. * * @alpha */ export declare abstract class DecoratedPreparedExecution implements IPreparedExecution { protected readonly decorated: IPreparedExecution; readonly definition: IExecutionDefinition; readonly signal: AbortSignal | undefined; readonly context: IExecutionContext; protected constructor(decorated: IPreparedExecution); equals(other: IPreparedExecution): boolean; execute(): Promise; withSignal(signal: AbortSignal): IPreparedExecution; explain(config: ExplainConfig): IExplainProvider<(typeof config)["explainType"]>; fingerprint(): string; withDimensions(...dim: Array): IPreparedExecution; withSorting(...items: ISortItem[]): IPreparedExecution; withBuckets(...buckets: IBucket[]): IPreparedExecution; withDateFormat(dateFormat: string): IPreparedExecution; withExecConfig(config: IExecutionConfig): IPreparedExecution; withContext(context: IExecutionContext): IPreparedExecution; /** * Methods that create new instances of prepared executions (withDimensions, withSorting, withDateFormat) will * call out to this method to create decorated execution. This is essential to maintain the decoration * during immutable operations where decorated implementation creates new instances. * * @param decorated - instance to decorate */ protected abstract createNew(decorated: IPreparedExecution): IPreparedExecution; } /** * Abstract base class for execution result decorators. Implements delegates to decorated execution. Concrete * implementations can override just the functions they are interested in. * * The prepared execution wrap is needed here because of the transform function which normally creates new * instances of prepared execution - and so the decoration needs to be maintained. * * @alpha */ export declare abstract class DecoratedExecutionResult implements IExecutionResult { private readonly decorated; private readonly wrapper; definition: IExecutionDefinition; dimensions: IDimensionDescriptor[]; signal: AbortSignal | undefined; context: IExecutionContext; protected constructor(decorated: IExecutionResult, wrapper?: PreparedExecutionWrapper); export(options: IExportConfig): Promise; readAll(): Promise; readForecastAll(config: IForecastConfig): Promise; readOutliersAll(config: IOutliersConfig): Promise; readAnomalyDetectionAll(config: IAnomalyDetectionConfig): Promise; readClusteringAll(config: IClusteringConfig): Promise; readWindow(offset: number[], size: number[]): Promise; readBinaryStreamAll(config: IExecutionResultBinaryStreamConfig): Promise; transform(): IPreparedExecution; equals(other: IExecutionResult): boolean; fingerprint(): string; resultId(): string | undefined; withSignal(signal: AbortSignal): IExecutionResult; /** * Methods that create new instances of execution results (withSignal) will * call out to this method to create decorated execution result. This is essential to maintain the decoration * during immutable operations where decorated implementation creates new instances. * * @param decorated - instance to decorate */ protected abstract createNew(decorated: IExecutionResult): IExecutionResult; } /** * Abstract base class for data view decorators. Implements delegates to decorated data view. Concrete * implementations can override just the functions they are interested in. * * @alpha */ export declare abstract class DecoratedDataView implements IDataView { private readonly decorated; offset: number[]; count: number[]; totalCount: number[]; headerItems: IResultHeader[][][]; data: DataValue[] | DataValue[][]; totals?: DataValue[][][]; totalTotals?: DataValue[][][]; definition: IExecutionDefinition; result: IExecutionResult; metadata: IExecutionResultMetadata; warnings?: IResultWarning[]; forecastConfig?: IForecastConfig; forecastResult?: IForecastResult; context?: IExecutionContext; protected constructor(decorated: IDataView, result?: IExecutionResult); equals(other: IDataView): boolean; fingerprint(): string; withForecast(config?: IForecastConfig, result?: IForecastResult): IDataView; forecast(): IForecastView; clustering(): IClusteringResult; withClustering(config?: IClusteringConfig, result?: IClusteringResult): IDataView; outliers(): IOutliersView; withOutliers(config?: IOutliersConfig, result?: IOutliersResult): IDataView; readCollectionItems(config: ICollectionItemsConfig): Promise; } //# sourceMappingURL=execution.d.ts.map