/** * This package provides foundational reusable code useful for building new or decorating existing Analytical Backend implementations. * * @remarks * The package includes several composable backend decorators and metadata object builders. * You can use them to either build your own Analytical Backend implementation or enhance existing * implementations (by adding caching, for example). * * @packageDocumentation */ import { AccessGranularPermission } from '@gooddata/sdk-model'; import { AttributeModifications } from '@gooddata/sdk-model'; import { CatalogItem } from '@gooddata/sdk-model'; import { CatalogItemType } from '@gooddata/sdk-model'; import { DashboardFiltersApplyMode } from '@gooddata/sdk-model'; import { DateAttributeGranularity } from '@gooddata/sdk-model'; import { DimensionGenerator } from '@gooddata/sdk-model'; import { ErrorConverter } from '@gooddata/sdk-backend-spi'; import { ExplainConfig } from '@gooddata/sdk-backend-spi'; import { ExplainType } from '@gooddata/sdk-backend-spi'; import { FilterContextItem } from '@gooddata/sdk-model'; import { FiltersByTab } from '@gooddata/sdk-backend-spi'; import { GenAIObjectType } from '@gooddata/sdk-model'; import { IActiveCalendars } from '@gooddata/sdk-model'; import { IAiRateLimit } from '@gooddata/sdk-model'; import { IAlertDefault } from '@gooddata/sdk-model'; import { IAllowedRelationshipType } from '@gooddata/sdk-model'; import { IAnalyticalBackend } from '@gooddata/sdk-backend-spi'; import { IAnalyticalBackendConfig } from '@gooddata/sdk-backend-spi'; import { IAnomalyDetectionConfig } from '@gooddata/sdk-backend-spi'; import { IAnomalyDetectionResult } from '@gooddata/sdk-backend-spi'; import { IAttribute } from '@gooddata/sdk-model'; import { IAttributeDisplayFormGeoAreaConfig } from '@gooddata/sdk-model'; import { IAttributeDisplayFormMetadataObject } from '@gooddata/sdk-model'; import { IAttributeMetadataObject } from '@gooddata/sdk-model'; import { IAttributeOrMeasure } from '@gooddata/sdk-model'; import { IAuthenticatedPrincipal } from '@gooddata/sdk-backend-spi'; import { IAuthenticationContext } from '@gooddata/sdk-backend-spi'; import { IAuthenticationProvider } from '@gooddata/sdk-backend-spi'; import { IAvailableAccessGrantee } from '@gooddata/sdk-model'; import { IBucket } from '@gooddata/sdk-model'; import { ICatalogAttribute } from '@gooddata/sdk-model'; import { ICatalogAttributeHierarchy } from '@gooddata/sdk-model'; import { ICatalogComputedAttribute } from '@gooddata/sdk-model'; import { ICatalogDateAttribute } from '@gooddata/sdk-model'; import { ICatalogDateDataset } from '@gooddata/sdk-model'; import { ICatalogFact } from '@gooddata/sdk-model'; import { ICatalogGroup } from '@gooddata/sdk-model'; import { ICatalogMeasure } from '@gooddata/sdk-model'; import { IChatConversation } from '@gooddata/sdk-backend-spi'; import { IChatConversationItemsQuery } from '@gooddata/sdk-backend-spi'; import { IChatConversations } from '@gooddata/sdk-backend-spi'; import { IChatConversationThread } from '@gooddata/sdk-backend-spi'; import { IClusteringConfig } from '@gooddata/sdk-backend-spi'; import { IClusteringResult } from '@gooddata/sdk-backend-spi'; import { ICollectionItemsConfig } from '@gooddata/sdk-backend-spi'; import { IComputedAttributeMetadataObject } from '@gooddata/sdk-model'; import { IDashboard } from '@gooddata/sdk-model'; import { IDashboardAttributeFilterConfig } from '@gooddata/sdk-model'; import { IDashboardBase } from '@gooddata/sdk-model'; import { IDashboardDefinition } from '@gooddata/sdk-model'; import { IDashboardExportImageOptions } from '@gooddata/sdk-backend-spi'; import { IDashboardExportPdfOptions } from '@gooddata/sdk-backend-spi'; import { IDashboardExportPresentationOptions } from '@gooddata/sdk-backend-spi'; import { IDashboardExportRawOptions } from '@gooddata/sdk-backend-spi'; import { IDashboardExportTabularOptions } from '@gooddata/sdk-backend-spi'; import { IDashboardFilterReference } from '@gooddata/sdk-model'; import { IDashboardFilterView } from '@gooddata/sdk-model'; import { IDashboardMetadataObject } from '@gooddata/sdk-model'; import { IDashboardObjectIdentity } from '@gooddata/sdk-model'; import { IDashboardPermissions } from '@gooddata/sdk-model'; import { IDashboardPlugin } from '@gooddata/sdk-model'; import { IDashboardPluginDefinition } from '@gooddata/sdk-model'; import { IDashboardReferences } from '@gooddata/sdk-backend-spi'; import { IDashboardsQuery } from '@gooddata/sdk-backend-spi'; import { IDashboardWithReferences } from '@gooddata/sdk-backend-spi'; import { IDataSetMetadataObject } from '@gooddata/sdk-model'; import { IDataView } from '@gooddata/sdk-backend-spi'; import { IDateFilter } from '@gooddata/sdk-model'; import { IDefaultExportTemplate } from '@gooddata/sdk-model'; import { IDimension } from '@gooddata/sdk-model'; import { IDimensionDescriptor } from '@gooddata/sdk-model'; import { IExecutionConfig } from '@gooddata/sdk-model'; import { IExecutionContext } from '@gooddata/sdk-backend-spi'; import { IExecutionDefinition } from '@gooddata/sdk-model'; import { IExecutionFactory } from '@gooddata/sdk-backend-spi'; import { IExecutionResult } from '@gooddata/sdk-backend-spi'; import { IExecutionResultBinaryStreamConfig } from '@gooddata/sdk-backend-spi'; import { IExistingDashboard } from '@gooddata/sdk-model'; import { IExplainProvider } from '@gooddata/sdk-backend-spi'; import { IExportConfig } from '@gooddata/sdk-backend-spi'; import { IExportResult } from '@gooddata/sdk-backend-spi'; import { IExportTemplate } from '@gooddata/sdk-model'; import { IExportTemplateDefinition } from '@gooddata/sdk-model'; import { IFactMetadataObject } from '@gooddata/sdk-model'; import { IFilter } from '@gooddata/sdk-model'; import { IFilterContext } from '@gooddata/sdk-model'; import { IFilterContextDefinition } from '@gooddata/sdk-model'; import { IFiscalYear } from '@gooddata/sdk-model'; import { IForecastConfig } from '@gooddata/sdk-backend-spi'; import { IForecastResult } from '@gooddata/sdk-backend-spi'; import { IGeoService } from '@gooddata/sdk-backend-spi'; import { IGetDashboardOptions } from '@gooddata/sdk-backend-spi'; import { IGetDashboardPluginOptions } from '@gooddata/sdk-backend-spi'; import { IGetInsightOptions } from '@gooddata/sdk-backend-spi'; import { IGetScheduledMailOptions } from '@gooddata/sdk-backend-spi'; import { IGetVisualizationClassesOptions } from '@gooddata/sdk-backend-spi'; import { IGranularAccessGrantee } from '@gooddata/sdk-model'; import { IGroupableCatalogItemBase } from '@gooddata/sdk-model'; import { IInsight } from '@gooddata/sdk-model'; import { IInsightDefinition } from '@gooddata/sdk-model'; import { IInsightDefinitionWithOptionalIdentity } from '@gooddata/sdk-model'; import { IInsightReferences } from '@gooddata/sdk-backend-spi'; import { IInsightReferencing } from '@gooddata/sdk-backend-spi'; import { IInsightsQuery } from '@gooddata/sdk-backend-spi'; import { IInsightsQueryOptions } from '@gooddata/sdk-backend-spi'; import { IInsightsQueryResult } from '@gooddata/sdk-backend-spi'; import { IInsightWidget } from '@gooddata/sdk-model'; import { IInsightWidgetDefinition } from '@gooddata/sdk-model'; import { IKpi } from '@gooddata/sdk-model'; import { IKpiComparisonDirection } from '@gooddata/sdk-model'; import { IKpiComparisonTypeComparison } from '@gooddata/sdk-model'; import { IKpiWidget } from '@gooddata/sdk-model'; import { IKpiWidgetDefinition } from '@gooddata/sdk-model'; import { IListedDashboard } from '@gooddata/sdk-model'; import { IMeasure } from '@gooddata/sdk-model'; import { IMeasureMetadataObject } from '@gooddata/sdk-model'; import { IMetadataObject } from '@gooddata/sdk-model'; import { IMetadataObjectBase } from '@gooddata/sdk-model'; import { IMetadataObjectIdentity } from '@gooddata/sdk-model'; import { IMetricFormatOverrideSetting } from '@gooddata/sdk-model'; import { InsightDrillDefinition } from '@gooddata/sdk-model'; import { INullableFilter } from '@gooddata/sdk-model'; import { IObjectAccessList } from '@gooddata/sdk-model'; import { IObjectCertificationWrite } from '@gooddata/sdk-model'; import { IObjectPermissionsObject } from '@gooddata/sdk-backend-spi'; import { IOrganizationExportTemplatesService } from '@gooddata/sdk-backend-spi'; import { IOutliersConfig } from '@gooddata/sdk-backend-spi'; import { IOutliersResult } from '@gooddata/sdk-backend-spi'; import { IPagedResource } from '@gooddata/sdk-backend-spi'; import { IPostProcessing } from '@gooddata/sdk-model'; import { IPreparedExecution } from '@gooddata/sdk-backend-spi'; import { IPreparedExecutionOptions } from '@gooddata/sdk-backend-spi'; import { IPublisherDocumentDefinitionV1 } from '@gooddata/sdk-model'; import { IPublisherDocumentDefinitionV2 } from '@gooddata/sdk-model'; import { IPublisherDocumentExportPdfOptions } from '@gooddata/sdk-backend-spi'; import { IPublisherDocumentTemplateDefinitionV1 } from '@gooddata/sdk-model'; import { IPublisherDocumentTemplateDefinitionV2 } from '@gooddata/sdk-model'; import { IPublisherDocumentTemplateV1 } from '@gooddata/sdk-model'; import { IPublisherDocumentTemplateV2 } from '@gooddata/sdk-model'; import { IPublisherDocumentV1 } from '@gooddata/sdk-model'; import { IPublisherDocumentV2 } from '@gooddata/sdk-model'; import { IPublisherPageTemplateDefinitionV1 } from '@gooddata/sdk-model'; import { IPublisherPageTemplateDefinitionV2 } from '@gooddata/sdk-model'; import { IPublisherPageTemplateV1 } from '@gooddata/sdk-model'; import { IPublisherPageTemplateV2 } from '@gooddata/sdk-model'; import { IRawExportCustomOverrides } from '@gooddata/sdk-backend-spi'; import { IRequestCorrelationMetadata } from '@gooddata/sdk-backend-spi'; import { IResultHeader } from '@gooddata/sdk-model'; import { IScheduledMail } from '@gooddata/sdk-model'; import { IScheduledMailDefinition } from '@gooddata/sdk-model'; import { ISecuritySettingsService } from '@gooddata/sdk-backend-spi'; import { ISemanticConditionalFormatting } from '@gooddata/sdk-model'; import { ISemanticSearchQuery } from '@gooddata/sdk-backend-spi'; import { ISemanticSearchRelationship } from '@gooddata/sdk-model'; import { ISeparators } from '@gooddata/sdk-model'; import { ISettings } from '@gooddata/sdk-model'; import { ISortItem } from '@gooddata/sdk-model'; import { IUser } from '@gooddata/sdk-model'; import { IUserWorkspaceSettings } from '@gooddata/sdk-backend-spi'; import { IVariableMetadataObject } from '@gooddata/sdk-model'; import { IVisualizationClass } from '@gooddata/sdk-model'; import { IWidget } from '@gooddata/sdk-model'; import { IWidgetAlert } from '@gooddata/sdk-model'; import { IWidgetAlertCount } from '@gooddata/sdk-backend-spi'; import { IWidgetAlertDefinition } from '@gooddata/sdk-model'; import { IWidgetReferences } from '@gooddata/sdk-backend-spi'; import { IWorkspaceAttributesService } from '@gooddata/sdk-backend-spi'; import { IWorkspaceAutomationService } from '@gooddata/sdk-backend-spi'; import { IWorkspaceCatalog } from '@gooddata/sdk-backend-spi'; import { IWorkspaceCatalogAvailableItemsFactory } from '@gooddata/sdk-backend-spi'; import { IWorkspaceCatalogFactory } from '@gooddata/sdk-backend-spi'; import { IWorkspaceCatalogFactoryOptions } from '@gooddata/sdk-backend-spi'; import { IWorkspaceComputedAttributesService } from '@gooddata/sdk-backend-spi'; import { IWorkspaceDashboardsService } from '@gooddata/sdk-backend-spi'; import { IWorkspaceDatasetsService } from '@gooddata/sdk-backend-spi'; import { IWorkspaceExportTemplatesService } from '@gooddata/sdk-backend-spi'; import { IWorkspaceFactsService } from '@gooddata/sdk-backend-spi'; import { IWorkspaceInsightsService } from '@gooddata/sdk-backend-spi'; import { IWorkspaceMeasuresService } from '@gooddata/sdk-backend-spi'; import { IWorkspaceObjectPermissionsService } from '@gooddata/sdk-backend-spi'; import { IWorkspacePublisherService } from '@gooddata/sdk-backend-spi'; import { IWorkspacePublisherServiceV2 } from '@gooddata/sdk-backend-spi'; import { IWorkspaceSettings } from '@gooddata/sdk-backend-spi'; import { IWorkspaceSettingsService } from '@gooddata/sdk-backend-spi'; import { KpiDrillDefinition } from '@gooddata/sdk-model'; import { MeasureBuilder } from '@gooddata/sdk-model'; import { MeasureModifications } from '@gooddata/sdk-model'; import { MetricType } from '@gooddata/sdk-model'; import { NotAuthenticated } from '@gooddata/sdk-backend-spi'; import { ObjRef } from '@gooddata/sdk-model'; import { PublisherDocumentListItemV2 } from '@gooddata/sdk-backend-spi'; import { SupportedDashboardReferenceTypes } from '@gooddata/sdk-backend-spi'; import { SupportedInsightReferenceTypes } from '@gooddata/sdk-backend-spi'; import { SupportedWidgetReferenceTypes } from '@gooddata/sdk-backend-spi'; import { ValidationContext } from '@gooddata/sdk-backend-spi'; import { VisualizationProperties } from '@gooddata/sdk-model'; /** * Abstract base class that can be extended to implement concrete execution factories for different * backend implementations. * * This class implements the convenience methods which do not need to change in implementations. * * Note: the `forInsightByRef` is implemented as fallback to freeform execution done by `forInsight`. The * rationale is that most backends do not support that anyway so it is a safe default behavior. If the backend * supports execute-by-reference, then overload the method with your own implementation * * @internal */ export declare abstract class AbstractExecutionFactory implements IExecutionFactory { protected readonly workspace: string; constructor(workspace: string); abstract 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; } /** * Defines callbacks for events that are emitted by with eventing backend decorator. * * @beta */ export declare type AnalyticalBackendCallbacks = { /** * Called before prepared execution's execute() is called. * * @param def - definition that will be used for the execution * @param executionId - unique ID assigned to each execution that can be used to correlate individual events that "belong" to the same execution */ beforeExecute?: (def: IExecutionDefinition, executionId: string) => void; /** * Called when the execute successfully completes. * * @param result - execution result (mind that this contains definition already) * @param executionId - unique ID assigned to each execution that can be used to correlate individual events that "belong" to the same execution */ successfulExecute?: (result: IExecutionResult, executionId: string) => void; /** * Called when the execute ends with an error. * * @param error - error from the underlying backend, contractually this should be an instance of AnalyticalBackendError * @param executionId - unique ID assigned to each execution that can be used to correlate individual events that "belong" to the same execution */ failedExecute?: (error: any, executionId: string) => void; /** * Called when IExecuteResult.readAll() successfully completes. * * @param dataView - data view (mind that this contains definition and result already) * @param executionId - unique ID assigned to each execution that can be used to correlate individual events that "belong" to the same execution */ successfulResultReadAll?: (dataView: IDataView, executionId: string) => void; /** * Called when IExecuteResult.readAll() ends with an error. * * @param error - error from the underlying backend, contractually this should be an instance of AnalyticalBackendError * @param executionId - unique ID assigned to each execution that can be used to correlate individual events that "belong" to the same execution */ failedResultReadAll?: (error: any, executionId: string) => void; /** * Called when IExecuteResult.readWindow() successfully completes. The function is called with the requested * window arguments and the resulting data size (note: requested window & actual window may differ) * * @param offset - *requested window offset, the actual offset may differ, actual offset is in data view * @param size - *request* window size, the actual size may differ, actual size is in data view * @param dataView - data view (mind that this contains definition and result already) * @param executionId - unique ID assigned to each execution that can be used to correlate individual events that "belong" to the same execution */ successfulResultReadWindow?: (offset: number[], size: number[], dataView: IDataView, executionId: string) => void; /** * Called when IExecuteResult.readWindow() ends with an error. The function is called with the requested * window arguments and the error from the underlying backend. * * @param offset - *requested window offset, the actual offset may differ, actual offset is in data view * @param size - *request* window size, the actual size may differ, actual size is in data view * @param error - error from the underlying backend, contractually this should be an instance of AnalyticalBackendError * @param executionId - unique ID assigned to each execution that can be used to correlate individual events that "belong" to the same execution */ failedResultReadWindow?: (offset: number[], size: number[], error: any, executionId: string) => void; /** * Called success when forecast results read * * @param forecastResult - forecast result * @param executionId - unique ID assigned to each execution that can be used to correlate individual events that "belong" to the same execution */ successfulForecastResultReadAll?: (forecastResult: IForecastResult, executionId: string) => void; /** * Called when forecast results read failed * * @param error - error from the underlying backend, contractually this should be an instance of AnalyticalBackendError * @param executionId - unique ID assigned to each execution that can be used to correlate individual events that "belong" to the same execution */ failedForecastResultReadAll?: (error: any, executionId: string) => void; /** * Called success when outlier results read */ successfulOutliersResultReadAll?: (outliersResult: IOutliersResult, executionId: string) => void; /** * Called when outlier results read failed * */ failedOutliersResultReadAll?: (error: any, executionId: string) => void; }; /** * This is a noop implementation of authentication provider - it does nothing and assumes anonymous user. * * @public */ export declare class AnonymousAuthProvider implements IAuthProviderCallGuard { disablePrincipalCache: boolean; authenticate(_context: IAuthenticationContext): Promise; getCurrentPrincipal(_context: IAuthenticationContext): Promise; deauthenticate(_context: IAuthenticationContext): Promise; reset(): void; } /** * @beta */ export declare type ApiClientProvider = (config: CustomBackendConfig) => any; /** * Attribute display form metadata object builder * See {@link Builder} * * @beta */ export declare class AttributeDisplayFormMetadataObjectBuilder extends MetadataObjectBuilder { attribute(ref: ObjRef): this; displayFormType(type: string | undefined): this; isDefault(value: boolean | undefined): this; isPrimary(value: boolean | undefined): this; geoAreaConfig(config: IAttributeDisplayFormGeoAreaConfig | undefined): this; conditionalFormatting(conditionalFormatting?: ISemanticConditionalFormatting): this; } /** * Attribute metadata object builder * See {@link Builder} * * @beta */ export declare class AttributeMetadataObjectBuilder extends MetadataObjectBuilder { isLocked(value: boolean): this; dataSet(value: IDataSetMetadataObject | undefined): this; drillDownStep(ref: ObjRef | undefined): this; drillToAttributeLink(ref: ObjRef | undefined): this; displayForms(displayForms: IAttributeDisplayFormMetadataObject[]): this; sourceColumn(value: string | undefined): this; conditionalFormatting(conditionalFormatting?: ISemanticConditionalFormatting): this; } /** * @alpha */ export declare type AttributesDecoratorFactory = (attributes: IWorkspaceAttributesService, workspace: string) => IWorkspaceAttributesService; /** * Authenticated async call * * @beta */ export declare type AuthenticatedAsyncCall = (sdk: TSdk, context: IAuthenticatedAsyncCallContext) => Promise; /** * Authenticated call guard * * @beta */ export declare type AuthenticatedCallGuard = (call: AuthenticatedAsyncCall, errorConverter?: ErrorConverter) => Promise; /** * This implementation of auth provider ensures, that the auth provider is called exactly once in the happy path * execution where provider successfully authenticates a principal. * * If underlying provider fails, subsequent calls that need authentication will land in the provider. * * This class encapsulates the stateful nature of interaction of the provider across multiple different instances * of the bear backend, all of which are set with the same provider. All instances of the backend should be * subject to the same authentication flow AND the call to the authentication provider should be synchronized * through this scoped instance. * * @internal */ export declare class AuthProviderCallGuard implements IAuthProviderCallGuard { private readonly realProvider; private inflightRequest; private principal; disablePrincipalCache: boolean; constructor(realProvider: IAuthenticationProvider); reset: () => void; initializeClient: (client: any) => void; onNotAuthenticated: (context: IAuthenticationContext, error: NotAuthenticated) => void; authenticate: (context: IAuthenticationContext) => Promise; getCurrentPrincipal(context: IAuthenticationContext): Promise; deauthenticate(context: IAuthenticationContext, returnTo?: string): Promise; } /** * @alpha */ export declare type AutomationsDecoratorFactory = (automations: IWorkspaceAutomationService, workspace: string) => IWorkspaceAutomationService; /** * We are using Builder pattern to create sdk-model objects https://en.wikipedia.org/wiki/Builder_pattern * Each sdk-model should have its own builder, and you should use it. * * This class serves to: * - unify all builders & builder factories across our codebase * - hold all common methods and properties of builders (e.g. item & build) * * @beta */ export declare class Builder implements IBuilder { protected item: Partial; protected validator?: ((item: Partial) => void) | undefined; constructor(item: Partial, validator?: ((item: Partial) => void) | undefined); build(): T; modify(modifications: BuilderModifications): this; validate(): this; } /** * Type that represents generic builder constructor * * @beta */ export declare type BuilderConstructor, TItem> = new (item: Partial) => TBuilder; /** * Generic builder factory to create sdk-model objects using builder pattern * * @beta */ export declare function builderFactory, TBuilderConstructor extends BuilderConstructor>(Builder: TBuilderConstructor, defaultItem: Partial, modifications: BuilderModifications): TItem; /** * Function that will be called to perform modifications on item before it is fully constructed * * @beta */ export declare type BuilderModifications, TItem = ExtractBuilderType> = (builder: TBuilder) => TBuilder; /** * Cache control can be used to interact with the caching layer - at the moment to reset the contents of the * different top-level caches. * * @public */ export declare type CacheControl = { /** * Resets all execution caches. * * NOTE: this only resets the top-level caches. If your code holds onto execution results returned by * caching backend, those have additional sub-caches which _will not_ be impacted by this call. */ resetExecutions: () => void; /** * Resets all catalog caches. */ resetCatalogs: () => void; /** * Resets all organization security settings caches. */ resetSecuritySettings: () => void; /** * Resets all workspace attribute caches. */ resetAttributes: () => void; /** * Resets all workspace facts caches. */ resetFacts: () => void; /** * Resets all workspace dataset caches. */ resetDatasets: () => void; /** * Resets all workspace settings caches. */ resetWorkspaceSettings: () => void; /** * Resets the cached geo style. */ resetGeoStyles: () => void; /** * Resets the export templates cache. */ resetExportTemplates: () => void; /** * Resets all workspace insight caches. */ resetInsights: () => void; /** * Resets all workspace measures caches. */ resetMeasures: () => void; /** * Resets all workspace automation caches. */ resetAutomations: () => void; /** * Convenience method to reset all caches (calls all the particular resets). */ resetAll: () => void; }; /** * Specifies where should the caching decorator apply and to what size should caches grow. * * @public */ export declare type CachingConfiguration = { /** * Maximum number of executions which will have their results cached. The execution fingerprint is used * as cache key - the caching is thus subject to some limitations. See `defFingerprint` function for more * information. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * executions cache is dangerous in applications with long-lived sessions that can create many unique executions - * memory usage will only go up. * * When non-positive number is specified, then no caching will be done. * * Note: When specified, this takes precedence over `maxExecutionsAge`. */ maxExecutions?: number; /** * Maximum age of cached execution results. The value is in milliseconds. * * Items are not pro-actively pruned out as they age, but if you try to get an item that is too old, * it'll drop it and make a new request to the backend. The purpose of the cache setting is not mainly * to limit its size to prevent memory usage grow but to ensure that cached execution results are * refreshed periodically to reflect any data changes on the backend. * * Only used when `maxExecutions` is not specified. * * When non-positive number is specified, then no caching will be done. */ maxExecutionsAge?: number; /** * Maximum number of execution result's pages to cache PER result. The window offset and limit are used as cache key. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * result window cache is dangerous in applications that read result windows in 'random' fashion. * * When non-positive number is specified, then no caching of result windows will be done. * * Note: this option has no effect if execution caching is disabled. */ maxResultWindows?: number; /** * Maximum number of cached geo collection items per execution result. * * @remarks * This limits how many unique combinations of collection filters and attribute values can be stored when * caching responses from {@link @gooddata/sdk-backend-spi#IDataView.readCollectionItems}. Once the number of * cached entries grows beyond this size, least recently used entries will be evicted. * * When non-positive number is specified, caching of collection items will be disabled. */ maxGeoCollectionItemsPerResult?: number; /** * Maximum number of workspaces for which to cache catalogs. The workspace identifier is used as cache key. For * each workspace, there will be a cache entry holding `maxCatalogOptions` entries. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * catalogs cache may be OK in applications where number of workspaces is small - the cache will be limited * naturally and will not grow uncontrollably. * * When non-positive number is specified, then no caching of result windows will be done. */ maxCatalogs?: number; /** * Catalog can be viewed in many different ways - determined by the options specified during load. This option * indicates how many unique options to cache results for. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. How dangerous * this is depends on how many catalog load options combinations your application allows to create. Recommended * approach is to load entire catalog of all items once and reuse it. If there is chance that your app can create * many unique options, then it is better to bound this. * * Setting non-positive number here is invalid. If you want to turn off catalog caching, tweak the `maxCatalogs`. */ maxCatalogOptions?: number; /** * Specify function to call once the caching is set up. If present, the function will be called * with an instance of {@link CacheControl} which you can use to interact with the caches. * * @param cacheControl - cache control instance */ onCacheReady?: (cacheControl: CacheControl) => void; /** * Maximum number of organizations that will have its security settings cached. The scope string built by * particular backend implementation from organization ID will be used as cache key. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * security settings organization cache is dangerous in applications with long-lived sessions that can * create many unique requests and memory usage will only go up. * * When non-positive number is specified, then no caching will be done. */ maxSecuritySettingsOrgs?: number; /** * Maximum number of URLs per organization that will have its validation result cached. The URL * and validation context is used to form a cache key. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * security settings organization URL cache is dangerous in applications with long-lived sessions that can * create many unique requests and memory usage will only go up. * * Setting non-positive number here is invalid. If you want to turn off organization security settings caching, * tweak the `maxSecuritySettingsOrgs`. */ maxSecuritySettingsOrgUrls?: number; /** * Maximum age of cached organization's URL validation results. The value is in milliseconds. * * Items are not pro-actively pruned out as they age, but if you try to get an item that is too old, * it'll drop it and make a new request to the backend. The purpose of the cache setting is not mainly * to limit its size to prevent memory usage grow (tweak `maxSecuritySettingsOrgUrls` for that) * but to propagate URL whitelist changes on backend to the long-lived application sessions. * * Setting non-positive number here is invalid. If you want to turn off organization security settings * caching, tweak the `maxSecuritySettingsOrgs`. */ maxSecuritySettingsOrgUrlsAge?: number; /** * Maximum number of workspaces for which to cache selected {@link @gooddata/sdk-backend-spi#IWorkspaceAttributesService} calls. * The workspace identifier is used as cache key. * For each workspace, there will be a cache entry holding `maxAttributeDisplayFormsPerWorkspace` entries for attribute display form-related calls. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * cache may be OK in applications where number of workspaces is small - the cache will be limited * naturally and will not grow uncontrollably. * * When non-positive number is specified, then no caching will be done. */ maxAttributeWorkspaces?: number; /** * Maximum number of workspaces for which to cache selected {@link @gooddata/sdk-backend-spi#IWorkspaceAutomationsService} calls. * The workspace identifier is used as cache key. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * cache may be OK in applications where number of workspaces is small - the cache will be limited * naturally and will not grow uncontrollably. * * When non-positive number is specified, then no caching will be done. */ maxAutomationsWorkspaces?: number; /** * Maximum number of insights to cache per workspace. * * Only the read-only, idempotent {@link @gooddata/sdk-backend-spi#IWorkspaceInsightsService.getInsight} * call is cached. The insight reference (plus any options that change the response) is used as cache key. * This mainly serves to de-duplicate in-flight requests so that concurrent dashboard widgets referencing * the same insight share a single network request. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. * * When non-positive number is specified, then no caching of insights will be done. */ maxInsightsPerWorkspace?: number; /** * Maximum number of workspaces for which to cache selected {@link @gooddata/sdk-backend-spi#IWorkspaceFactsService} calls. * The workspace identifier is used as cache key. * For each workspace, there will be a cache entry holding `maxFactsPerWorkspace` entries for fact-related calls. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * cache may be OK in applications where number of workspaces is small - the cache will be limited * naturally and will not grow uncontrollably. * * When non-positive number is specified, then no caching will be done. */ maxFactsWorkspaces?: number; /** * Maximum number of facts to cache per workspace. * * This limit applies independently to the cache of facts (`getFact`) and the cache of fact dataset * metadata (`getFactDatasetMeta`). * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * facts cache may be OK in applications where number of facts is small and/or they are requested * infrequently - the cache will be limited naturally and will not grow uncontrollably. * * Setting non-positive number here is invalid. If you want to turn off facts caching, * tweak the `maxFactsWorkspaces` value. */ maxFactsPerWorkspace?: number; /** * Maximum number of workspaces for which to cache selected {@link @gooddata/sdk-backend-spi#IWorkspaceMeasuresService} calls. * The workspace identifier is used as cache key. * For each workspace, there will be a cache entry holding `maxMeasuresPerWorkspace` entries. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * cache may be OK in applications where number of workspaces is small - the cache will be limited * naturally and will not grow uncontrollably. * * When non-positive number is specified, then no caching will be done. */ maxMeasuresWorkspaces?: number; /** * Maximum number of measures to cache per workspace. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * measures cache may be OK in applications where number of measures is small and/or they are requested * infrequently - the cache will be limited naturally and will not grow uncontrollably. * * Setting non-positive number here is invalid. If you want to turn off measures caching, * tweak the `maxMeasuresWorkspaces` value. */ maxMeasuresPerWorkspace?: number; /** * Maximum number of workspaces for which to cache selected {@link @gooddata/sdk-backend-spi#IWorkspaceDatasetsService} calls. * The workspace identifier is used as cache key. * For each workspace, there will be a cache entry holding `maxDatasetsPerWorkspace` entries for dataset metadata reads. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * cache may be OK in applications where number of workspaces is small - the cache will be limited * naturally and will not grow uncontrollably. * * When non-positive number is specified, then no caching will be done. */ maxDatasetWorkspaces?: number; /** * Maximum number of datasets to cache per workspace. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * dataset cache may be OK in applications where number of datasets is small and/or they are requested * infrequently - the cache will be limited naturally and will not grow uncontrollably. * * Setting non-positive number here is invalid. If you want to turn off dataset caching, * tweak the `maxDatasetWorkspaces` value. */ maxDatasetsPerWorkspace?: number; /** * Maximum number of organizations for which to cache organization-level export templates. * Organization export templates are organization-level, so typically a single entry suffices. * * When non-positive number is specified, then no caching will be done. */ maxExportTemplatesOrgs?: number; /** * Maximum number of workspaces for which to cache workspace-level export templates. * * When limit is reached, cache entries will be evicted using LRU policy. * * When non-positive number is specified, then no caching will be done. * * For backward compatibility this value is also used as a fallback for * {@link CachingConfiguration.maxExportTemplatesOrgs} when the latter is unset — it used to be * the deprecated alias that sized the organization export-templates cache. */ maxExportTemplatesWorkspaces?: number; /** * Maximum number of attribute display forms to cache per workspace. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * attribute display form cache may be OK in applications where number of attribute display forms is small * and/or they are requested infrequently - the cache will be limited naturally and will not grow uncontrollably. * * Setting non-positive number here is invalid. If you want to turn off attribute display form * caching, tweak the `maxAttributeWorkspaces` value. */ maxAttributeDisplayFormsPerWorkspace?: number; /** * Maximum number of attributes to cache per workspace. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * attribute cache may be OK in applications where number of attributes is small and/or they are requested * infrequently - the cache will be limited naturally and will not grow uncontrollably. * * Setting non-positive number here is invalid. If you want to turn off attribute caching, * tweak the `maxAttributeWorkspaces` value. */ maxAttributesPerWorkspace?: number; /** * Maximum number of common attribute results to cache per workspace. * * This bounds the cache used by `getCommonAttributes` and `getCommonAttributesBatch`, keyed by the * (order-independent) set of input attribute references. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. * * Setting non-positive number here is invalid. If you want to turn off common attribute caching, * tweak the `maxAttributeWorkspaces` value. */ maxCommonAttributesPerWorkspace?: number; /** * Maximum number of connected attribute results to cache per workspace. * * This bounds the cache used by `getConnectedAttributesByDisplayForm`, keyed by the display form * reference identifier/uri. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. * * Setting non-positive number here is invalid. If you want to turn off connected attribute caching, * tweak the `maxAttributeWorkspaces` value. */ maxConnectedAttributesPerWorkspace?: number; /** * Maximum number of attribute element results to cache per workspace. * * Note that not all the queries are cached (e.g. queries with `filter` value). * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * attribute elements cache may be OK in applications where number of attributes and/or their elements is small * and/or they are requested infrequently - the cache will be limited naturally and will not grow uncontrollably. * * The `maxAttributeWorkspaces` value must be positive, otherwise this setting is ignored. * When non-positive number is specified, then no caching of attribute element results will be done. */ maxAttributeElementResultsPerWorkspace?: number; /** * Maximum number of elements in an element list that may be searched locally. * * A query with a `filter` normally always goes to the backend. When the elements of the same attribute * were already loaded in full and there are no more than this many of them, the filter is instead applied * to that list in memory, which spares the backend a request per keystroke. Clearing the filter is * answered from the same list. Above this many elements the query goes to the backend as before. * * The number of lists kept is bounded by `maxAttributeElementResultsPerWorkspace`, and local filtering is * only done when that cache is enabled too. * * When no maximum number is specified, or the specified number is non-positive, then no local filtering * will be done. */ maxAttributeElementsForLocalFiltering?: number; /** * Maximum number of settings for a workspace and for a user to cache per workspace. * * When limit is reached, cache entries will be evicted using LRU policy. * * When no maximum number is specified, the cache will be unbounded and no evictions will happen. Unbounded * workspace settings cache is dangerous in applications that change query the settings of many different * workspaces - this will cache quite large objects for each workspace and can make the memory usage go up. * * When non-positive number is specified, then no caching of result windows will be done. */ maxWorkspaceSettings?: number; /** * When true, cache geo assets returned by `backend.geo()`. * * The geo style is the same for all workspaces within a single backend instance. Cached style * entries are keyed by the requested style ID and kept in a small LRU cache. * The default sprite icon list is cached as a single shared promise. This is useful to avoid * repeated network calls when multiple geo charts are rendered on the same page. * * @remarks * Default is false. Set to true to enable caching. */ cacheGeoStyles?: boolean; }; /** * Catalog attribute builder * See {@link Builder} * * @beta */ export declare class CatalogAttributeBuilder extends GroupableCatalogItemBuilder { attribute(attributeOrRef: IAttributeMetadataObject | ObjRef, modifications?: BuilderModifications): this; defaultDisplayForm(displayFormOrRef: IAttributeDisplayFormMetadataObject | ObjRef, modifications?: BuilderModifications): this; dataSet(dataSet: IDataSetMetadataObject | undefined): this; displayForms(displayForms: IAttributeDisplayFormMetadataObject[]): this; geoPinDisplayForms(displayForms: IAttributeDisplayFormMetadataObject[]): this; toExecutionModel(modifications?: AttributeModifications): IAttribute; } /** * Catalog computed attribute builder * See {@link Builder} * * @beta */ export declare class CatalogComputedAttributeBuilder extends GroupableCatalogItemBuilder { computedAttribute(computedAttribute: IComputedAttributeMetadataObject): this; defaultDisplayForm(displayForm: IAttributeDisplayFormMetadataObject): this; displayForms(displayForms: IAttributeDisplayFormMetadataObject[]): this; } /** * Catalog date attribute builder * See {@link Builder} * * @beta */ export declare class CatalogDateAttributeBuilder extends Builder { granularity(granularity: DateAttributeGranularity): this; attribute(attributeOrRef: IAttributeMetadataObject | ObjRef, modifications?: BuilderModifications): this; defaultDisplayForm(displayFormOrRef: IAttributeDisplayFormMetadataObject | ObjRef, modifications?: BuilderModifications): this; } /** * Catalog date dataset builder * See {@link Builder} * * @beta */ export declare class CatalogDateDatasetBuilder extends Builder { relevance(relevance: number): this; dateAttributes(dateAttributes: ICatalogDateAttribute[]): this; dataSet(dataSetOrRef: IDataSetMetadataObject | ObjRef, modifications?: BuilderModifications): this; } /** * @alpha */ export declare type CatalogDecoratorFactory = (catalog: IWorkspaceCatalogFactory) => IWorkspaceCatalogFactory; /** * Catalog fact builder * See {@link Builder} * * @beta */ export declare class CatalogFactBuilder extends GroupableCatalogItemBuilder { fact(factOrRef: IFactMetadataObject | ObjRef, modifications?: BuilderModifications): this; } /** * Catalog group builder * See {@link Builder} * * @beta */ export declare class CatalogGroupBuilder extends Builder { title(title: string): this; tag(tagRef: ObjRef): this; } /** * Catalog measure builder * See {@link Builder} * * @beta */ export declare class CatalogMeasureBuilder extends GroupableCatalogItemBuilder { measure(measureOrRef: IMeasureMetadataObject | ObjRef, modifications?: BuilderModifications): this; toExecutionModel(modifications?: MeasureModifications): IMeasure; } /** * Computes canonical lookup key for collection items request identity. * * @remarks * The key is derived from normalized request identity, not raw object shape. * Keep recorder and replay on this shared helper to avoid key drift. * * @internal */ export declare function collectionItemsIdentityKey(config: ICollectionItemsConfig): string; /** * Adjusts both workspace and user settings * * @beta */ export declare type CommonSettingsWrapper = (settings: ISettings) => ISettings; /** * @alpha */ export declare type ComputedAttributesDecoratorFactory = (computedAttributes: IWorkspaceComputedAttributesService, workspace: string) => IWorkspaceComputedAttributesService; /** * Adjusts current user config * * @beta */ export declare type CurrentUserSettingsWrapper = (settings: IUserWorkspaceSettings) => IUserWorkspaceSettings; /** * Creates an instance of backend which uses custom functions to calculate results. See {@link CustomBackendConfig} * to learn more on what and how should be customized. * * --- * * Authentication is handled according to the specification described in the IAnalyticalBackend SPI. The custom backend * can be set up with authentication provider which will realize the desired authentication mechanism. * * Unless explicitly told via forced authentication (see {@link IAnalyticalBackend#authenticate}), the custom backend * will defer authentication until it is actually needed. In order for the custom backend to recognize that authentication * is needed, the different providers must throw the `NotAuthenticated` error. * * @beta */ export declare function customBackend(config: CustomBackendConfig): IAnalyticalBackend; /** * @beta */ export declare type CustomBackendConfig = IAnalyticalBackendConfig & { /** * Provider which will be called to obtain an instance of API client to talk to the backend server. */ readonly clientProvider: ApiClientProvider; /** * Provider of execution results for particular execution definition - this triggers the actual * computation on the backend. * * The UI.SDK separates between the execution result and the actual data. The execution result is an umbrella * for the entire computation. It contains descriptors of the result dimensions and allows to obtain different * views on the data - be it different data windows (pages) or all data for the computation. * * --- * * Given the execution context, trigger computation on the backend and return an IExecutionResult * representing the result. * * The result provider must choose one of two approaches: * * 1. Use the resultFactory included in the context to create a default implementation of the IExecutionResult. * The default implementation includes all the boilerplate and uses `dataProvider` to obtain DataViews for * the {@link IExecutionResult#readAll} and {@link IExecutionResult#readWindow} methods. * * 2. Create its own implementation of IExecutionResult and instantiate as needed. In that case the the * `dataProvider` does not have to be specified. * * --- * * Note: if the provider encounters problems during execution, it MUST raise exceptions from the `AnalyticalBackendError` * error hierarchy. */ readonly resultProvider: ResultProvider; /** * Provider of data for particular execution result. * * --- * * This property MUST be specified when your implementation of `resultProvider` uses the default implementation * of the IExecutionResult. Otherwise this property is optional. See description of `resultProvider` to learn more. * * --- * * Note: if the provider encounters problems during execution, it MUST raise exceptions from the `AnalyticalBackendError` * error hierarchy. * */ readonly dataProvider?: DataProvider; }; /** * @beta */ export declare type CustomBackendState = { /** * Telemetry available at the time of the provider call. */ telemetry?: TelemetryData; /** * Authentication call guard. * * Always wrap custom calls to authenticated APIs in the call guard. That way if the client is not yet authenticated the * backend will trigger authentication flow and have authentication provider take care of the situation. * * Note that calls to `resultProvider` and `dataProvider` done by the custom backend infrastructure are already * wrapped by this and provide the `client` as part of their respective call contexts. Use that instance of `client` */ authApiCall: AuthenticatedCallGuard; }; /** * @beta */ export declare type CustomCallContext = { /** * Actual configuration of the backend. */ config: CustomBackendConfig; /** * Essential backend state of the custom backend is passed down to providers. */ state: CustomBackendState; /** * API client to use for backend communication. The custom backend obtains this * instance using the `clientProvider` specified in the custom backend configuration. * * Use this instance to communicate with the backend. You SHOULD NOT use the clientProvider to obtain * an instance of client. The custom backend implementation takes care of obtaining an instance * of client and uses the same instance to drive authentication flow as needed. */ client: any; }; /** * Dashboard metadata object builder * See {@link Builder} * * @beta */ export declare class DashboardMetadataObjectBuilder extends MetadataObjectBuilder { } /** * @alpha */ export declare type DashboardsDecoratorFactory = (dashboards: IWorkspaceDashboardsService, workspace: string) => IWorkspaceDashboardsService; /** * @beta */ export declare type DataProvider = (context: DataProviderContext) => Promise; /** * @beta */ export declare type DataProviderContext = CustomCallContext & { /** * Execution result from which to obtain data. */ result: IExecutionResult; /** * Indicates whether all data or just a window of data should be returned. * * If window is not defined, then all data are desired. */ window?: { offset: number[]; size: number[]; }; }; /** * DataSet metadata object builder * See {@link Builder} * * @beta */ export declare class DataSetMetadataObjectBuilder extends MetadataObjectBuilder { } /** * @alpha */ export declare type DatasetsDecoratorFactory = (datasets: IWorkspaceDatasetsService, workspace: string) => IWorkspaceDatasetsService; /** * Decorated backend is a wrapper of any other backend implementations that can be used to enrich * functionality of the services that the wrapped backend normally provides. * * It can be for instance used to decorate execution factories and in conjunction with {@link DecoratedPreparedExecution} * also create decorated prepared executions. * * @param backend - instance of backend to decorate * @param decorators - configuration for the decorations * @returns new decorated backend * @alpha */ export declare function decoratedBackend(backend: IAnalyticalBackend, decorators: DecoratorFactories): IAnalyticalBackend; /** * 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 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; } /** * @alpha */ export declare abstract class DecoratedOrganizationExportTemplatesService implements IOrganizationExportTemplatesService { protected readonly decorated: IOrganizationExportTemplatesService; protected constructor(decorated: IOrganizationExportTemplatesService); getExportTemplates(): Promise; getExportTemplate(ref: ObjRef): Promise; createExportTemplate(template: IExportTemplateDefinition): Promise; patchExportTemplate(ref: ObjRef, template: Partial): Promise; deleteExportTemplate(ref: ObjRef): Promise; } /** * 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; } /** * @alpha */ export declare abstract class DecoratedSecuritySettingsService implements ISecuritySettingsService { private decorated; scope: string; protected constructor(decorated: ISecuritySettingsService); isUrlValid(url: string, context: ValidationContext): Promise; isDashboardPluginUrlValid(url: string, workspace: string): Promise; } /** * @alpha */ export declare abstract class DecoratedWorkspaceCatalog implements IWorkspaceCatalog { private readonly decorated; protected constructor(decorated: IWorkspaceCatalog); availableItems(): IWorkspaceCatalogAvailableItemsFactory; attributes(): ICatalogAttribute[]; dateDatasets(): ICatalogDateDataset[]; facts(): ICatalogFact[]; groups(): ICatalogGroup[]; allItems(): CatalogItem[]; measures(): ICatalogMeasure[]; attributeHierarchies(): ICatalogAttributeHierarchy[]; computedAttributes(): ICatalogComputedAttribute[]; } /** * @alpha */ export declare abstract class DecoratedWorkspaceCatalogFactory implements IWorkspaceCatalogFactory { private decorated; protected readonly wrapper: WorkspaceCatalogWrapper; options: IWorkspaceCatalogFactoryOptions; workspace: string; protected constructor(decorated: IWorkspaceCatalogFactory, wrapper?: WorkspaceCatalogWrapper); withPageSize(pageSize: number): IWorkspaceCatalogFactory; forDataset(dataset: ObjRef): IWorkspaceCatalogFactory; forTypes(types: CatalogItemType[]): IWorkspaceCatalogFactory; excludeTags(tags: ObjRef[]): IWorkspaceCatalogFactory; includeTags(tags: ObjRef[]): IWorkspaceCatalogFactory; withOptions(options: IWorkspaceCatalogFactoryOptions): IWorkspaceCatalogFactory; withGroups(loadGroups: boolean): IWorkspaceCatalogFactory; withSignal(signal: AbortSignal): IWorkspaceCatalogFactory; load(): Promise; /** * Methods that create new instances of catalog loader (e.g. all except load) will * call out to this method to create decorated loader. 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: IWorkspaceCatalogFactory): IWorkspaceCatalogFactory; } /** * @alpha */ export declare abstract class DecoratedWorkspaceDashboardsService implements IWorkspaceDashboardsService { protected decorated: IWorkspaceDashboardsService; workspace: string; protected constructor(decorated: IWorkspaceDashboardsService, workspace: string); getDashboards(options?: IGetDashboardOptions): Promise; getDashboardsQuery(): IDashboardsQuery; getDashboard(ref: ObjRef, filterContextRef?: ObjRef, options?: IGetDashboardOptions): Promise; getDashboardWithReferences(ref: ObjRef, filterContextRef?: ObjRef, options?: IGetDashboardOptions, types?: SupportedDashboardReferenceTypes[]): Promise; getExportDataByExportId: (exportId: string, type: "visual" | "slides" | undefined, tabId?: string) => Promise<{ filterContext?: IFilterContext; title?: string; hideWidgetTitles?: boolean; exportMetadata?: Record; timezoneId?: string; } | null>; getDashboardReferencedObjects(dashboard: IDashboard, types?: SupportedDashboardReferenceTypes[]): Promise; createDashboard(dashboard: IDashboardDefinition, generateId?: boolean): Promise; updateDashboard(dashboard: IDashboard, updatedDashboard: IDashboardDefinition): Promise; updateDashboardMeta(updatedDashboard: IDashboardObjectIdentity & Partial): Promise; setCertification(ref: ObjRef, certification?: IObjectCertificationWrite): Promise; deleteDashboard(ref: ObjRef): Promise; exportDashboardToPdf(ref: ObjRef, filters?: FilterContextItem[], filtersByTab?: FiltersByTab, options?: IDashboardExportPdfOptions): Promise; exportDashboardToPresentation(ref: ObjRef, format: "PPTX" | "PDF", filters?: FilterContextItem[], filtersByTab?: FiltersByTab, options?: IDashboardExportPresentationOptions): Promise; exportDashboardToImage(ref: ObjRef, filters?: FilterContextItem[], filtersByTab?: FiltersByTab, options?: IDashboardExportImageOptions): Promise; exportDashboardToTabular(ref: ObjRef, options?: IDashboardExportTabularOptions): Promise; exportDashboardToCSVRaw(definition: IExecutionDefinition, fileName: string, customOverrides?: IRawExportCustomOverrides, options?: IDashboardExportRawOptions): Promise; createScheduledMail(scheduledMail: IScheduledMailDefinition, exportFilterContext?: IFilterContextDefinition): Promise; updateScheduledMail(ref: ObjRef, scheduledMailDefinition: IScheduledMailDefinition, filterContextRef?: ObjRef): Promise; deleteScheduledMail(ref: ObjRef): Promise; getScheduledMailsForDashboard(ref: ObjRef, options?: IGetScheduledMailOptions): Promise; getScheduledMailsCountForDashboard(ref: ObjRef): Promise; getAllWidgetAlertsForCurrentUser(): Promise; getDashboardWidgetAlertsForCurrentUser(ref: ObjRef): Promise; getWidgetAlertsCountForWidgets(refs: ObjRef[]): Promise; createWidgetAlert(alert: IWidgetAlertDefinition): Promise; updateWidgetAlert(alert: IWidgetAlert | IWidgetAlertDefinition): Promise; deleteWidgetAlert(ref: ObjRef): Promise; deleteWidgetAlerts(refs: ObjRef[]): Promise; getWidgetReferencedObjects(widget: IWidget, types?: SupportedWidgetReferenceTypes[]): Promise; getResolvedFiltersForWidget(widget: IWidget, filters: IFilter[], attributeFilterConfigs: IDashboardAttributeFilterConfig[]): Promise; getResolvedFiltersForWidgetWithMultipleDateFilters(widget: IWidget, commonDateFilters: IDateFilter[], otherFilters: IFilter[], attributeFilterConfigs: IDashboardAttributeFilterConfig[]): Promise; getDashboardPlugins(options?: IGetDashboardPluginOptions): Promise; getDashboardPlugin(ref: ObjRef, options?: IGetDashboardPluginOptions): Promise; createDashboardPlugin(plugin: IDashboardPluginDefinition): Promise; deleteDashboardPlugin(ref: ObjRef): Promise; getDashboardPermissions(ref: ObjRef): Promise; validateDashboardsExistence(dashboardRefs: ObjRef[]): Promise; getFilterViewsForCurrentUser(dashboardRef: ObjRef): Promise; createFilterView(filterView: IDashboardFilterView): Promise; deleteFilterView(ref: ObjRef): Promise; setFilterViewAsDefault(ref: ObjRef, isDefault: boolean): Promise; } /** * @alpha */ export declare abstract class DecoratedWorkspaceExportTemplatesService implements IWorkspaceExportTemplatesService { protected readonly decorated: IWorkspaceExportTemplatesService; protected constructor(decorated: IWorkspaceExportTemplatesService); getExportTemplates(): Promise; getExportTemplate(ref: ObjRef): Promise; createExportTemplate(template: IExportTemplateDefinition): Promise; patchExportTemplate(ref: ObjRef, template: Partial): Promise; deleteExportTemplate(ref: ObjRef): Promise; } /** * Abstract base class for decorators of the {@link @gooddata/sdk-backend-spi#IWorkspaceInsightsService}. * * @remarks * It delegates all the calls to the decorated service. Override the methods you want to enrich. * * @alpha */ export declare abstract class DecoratedWorkspaceInsightsService implements IWorkspaceInsightsService { protected readonly decorated: IWorkspaceInsightsService; readonly workspace: string; protected constructor(decorated: IWorkspaceInsightsService, workspace: string); getVisualizationClass(ref: ObjRef): Promise; getVisualizationClasses(options?: IGetVisualizationClassesOptions): Promise; getInsightWithCatalogItems(ref: ObjRef, options?: IGetInsightOptions): Promise<{ insight: IInsight; catalogItems: Array; }>; getInsight(ref: ObjRef, options?: IGetInsightOptions): Promise; getInsights(options?: IInsightsQueryOptions): Promise; getInsightsQuery(): IInsightsQuery; createInsight(insight: IInsightDefinitionWithOptionalIdentity, generateId?: boolean): Promise; updateInsight(insight: IInsight): Promise; updateInsightMeta(insight: Partial & IMetadataObjectIdentity): Promise; setCertification(ref: ObjRef, certification?: IObjectCertificationWrite): Promise; deleteInsight(ref: ObjRef): Promise; getInsightReferencedObjects(insight: IInsight, types?: SupportedInsightReferenceTypes[]): Promise; getInsightReferencingObjects(ref: ObjRef): Promise; getInsightWithAddedFilters(insight: T, filters: IFilter[]): Promise; } /** * Base class for object-permissions decorators. Delegates every method of the decorated * `IWorkspaceObjectPermissionsService`; subclasses override the methods they customize. * * @alpha */ export declare abstract class DecoratedWorkspaceObjectPermissionsService implements IWorkspaceObjectPermissionsService { protected readonly decorated: IWorkspaceObjectPermissionsService; protected constructor(decorated: IWorkspaceObjectPermissionsService); getAccessList(target: IObjectPermissionsObject): Promise; getPermissionsForCurrentUser(target: IObjectPermissionsObject): Promise; manageObjectPermissions(target: IObjectPermissionsObject, grantees: IGranularAccessGrantee[]): Promise; getAvailableAssignees(target?: IObjectPermissionsObject): Promise; } /** * Base class for publisher-service decorators. Delegates every method of the decorated * `IWorkspacePublisherService`; subclasses override the methods they customize. * * @alpha */ export declare abstract class DecoratedWorkspacePublisherService implements IWorkspacePublisherService { protected readonly decorated: IWorkspacePublisherService; protected constructor(decorated: IWorkspacePublisherService); getPageTemplates(): Promise; getPageTemplate(ref: ObjRef): Promise; createPageTemplate(page: IPublisherPageTemplateDefinitionV1): Promise; updatePageTemplate(page: IPublisherPageTemplateV1): Promise; deletePageTemplate(ref: ObjRef): Promise; getDocumentTemplates(): Promise; getDocumentTemplate(ref: ObjRef): Promise; createDocumentTemplate(template: IPublisherDocumentTemplateDefinitionV1): Promise; updateDocumentTemplate(template: IPublisherDocumentTemplateV1): Promise; deleteDocumentTemplate(ref: ObjRef): Promise; getDocuments(): Promise; hasDocuments(): Promise; getDocument(ref: ObjRef): Promise; createDocument(publisherDocument: IPublisherDocumentDefinitionV1): Promise; updateDocument(publisherDocument: IPublisherDocumentV1): Promise; deleteDocument(ref: ObjRef): Promise; exportDocumentToPdf(ref: ObjRef, options?: IPublisherDocumentExportPdfOptions): Promise; } /** * Base class for content version 2 publisher-service decorators. Delegates every method of the decorated * `IWorkspacePublisherServiceV2`; subclasses override the methods they customize. * * @alpha */ export declare abstract class DecoratedWorkspacePublisherServiceV2 implements IWorkspacePublisherServiceV2 { protected readonly decorated: IWorkspacePublisherServiceV2; protected constructor(decorated: IWorkspacePublisherServiceV2); getPageTemplates(): Promise; getPageTemplate(ref: ObjRef): Promise; createPageTemplate(template: IPublisherPageTemplateDefinitionV2): Promise; updatePageTemplate(template: IPublisherPageTemplateV2): Promise; deletePageTemplate(ref: ObjRef): Promise; getDocumentTemplates(): Promise; getDocumentTemplate(ref: ObjRef): Promise; createDocumentTemplate(template: IPublisherDocumentTemplateDefinitionV2): Promise; updateDocumentTemplate(template: IPublisherDocumentTemplateV2): Promise; deleteDocumentTemplate(ref: ObjRef): Promise; getDocuments(): Promise; getDocument(ref: ObjRef): Promise; createDocument(publisherDocument: IPublisherDocumentDefinitionV2): Promise; updateDocument(publisherDocument: IPublisherDocumentV2): Promise; deleteDocument(ref: ObjRef): Promise; exportDocumentToPdf(ref: ObjRef, options?: IPublisherDocumentExportPdfOptions): Promise; } /** * @alpha */ export declare abstract class DecoratedWorkspaceSettingsService implements IWorkspaceSettingsService { protected decorated: IWorkspaceSettingsService; protected constructor(decorated: IWorkspaceSettingsService); setAlertDefault(value: IAlertDefault): Promise; getSettings(): Promise; getSettingsForCurrentUser(): Promise; setLocale(locale: string): Promise; setMetadataLocale(locale: string): Promise; setFormatLocale(locale: string): Promise; setSeparators(separators: ISeparators): Promise; setActiveLlmEndpoint(endpoint: string): Promise; setActiveLlmProvider(provider: string, defaultModelId: string): Promise; setTimezone(timezone: string): Promise; setEnableTimezoneChange(enabled: boolean): Promise; setDateFormat(dateFormat: string): Promise; setWeekStart(weekStart: string): Promise; setFiscalCalendar(fiscalYear: IFiscalYear): Promise; setActiveCalendars(calendars: IActiveCalendars): Promise; setDashboardFiltersApplyMode(dashboardFiltersApplyMode: DashboardFiltersApplyMode): Promise; deleteDashboardFiltersApplyMode(): Promise; setDefaultExportTemplate(value: IDefaultExportTemplate): Promise; deleteDefaultExportTemplate(): Promise; setEnableAiOnData(enabled: boolean): Promise; setAiRateLimit(value: IAiRateLimit): Promise; deleteAiRateLimit(): Promise; getAiRateLimit(): Promise; getEnableDrillToUrlByDefault(): Promise; getExportCsvCustomDelimiter(): Promise; setEnableDrillToUrlByDefault(enabled: boolean): Promise; setEnablePartialDataResults(enabled: boolean): Promise; setEnableNullJoins(enabled: boolean): Promise; setEnableQueryTags(enabled: boolean): Promise; setExportCsvCustomDelimiter(delimiter: string): Promise; deleteEnableDrillToUrlByDefault(): Promise; deleteExportCsvCustomDelimiter(): Promise; setTheme(themeId: string): Promise; deleteTheme(): Promise; deleteColorPalette(): Promise; setColorPalette(colorPaletteId: string): Promise; setMetricFormatOverride(override: IMetricFormatOverrideSetting): Promise; deleteMetricFormatOverride(): Promise; } /** * Provides factory functions for the different decorators (currently only supports execution * decorator). Input to each factory function is the original implementation from the wrapped backend, output * is whatever decorateur sees fit. * * @alpha */ export declare type DecoratorFactories = { execution?: ExecutionDecoratorFactory; catalog?: CatalogDecoratorFactory; securitySettings?: SecuritySettingsDecoratorFactory; workspaceSettings?: WorkspaceSettingsDecoratorFactory; attributes?: AttributesDecoratorFactory; computedAttributes?: ComputedAttributesDecoratorFactory; automations?: AutomationsDecoratorFactory; insights?: InsightsDecoratorFactory; measures?: MeasuresDecoratorFactory; datasets?: DatasetsDecoratorFactory; dashboards?: DashboardsDecoratorFactory; facts?: FactsDecoratorFactory; geo?: GeoDecoratorFactory; organizationExportTemplates?: OrganizationExportTemplatesDecoratorFactory; workspaceExportTemplates?: WorkspaceExportTemplatesDecoratorFactory; workspacePublisher?: WorkspacePublisherDecoratorFactory; workspacePublisherV2?: WorkspacePublisherV2DecoratorFactory; objectPermissions?: ObjectPermissionsDecoratorFactory; }; /** * @internal */ export declare class Denormalizer { readonly state: NormalizationState; static from(state: NormalizationState): Denormalizer; private readonly originalAttributes; private readonly originalMeasures; private constructor(); /** * Given the current normalization state, this method transforms the dimension descriptors of the * normalized execution, so that all the customization of the original execution definition is restored * into them: * * - Reverse lookup of local identifiers happens * - Attribute / Measure name is set according to the defined alias * - Measure format is set according to the format in definition * * @param normalizedDims - normalized dimension descriptors * @returns new descriptors */ denormalizeDimDescriptors: (normalizedDims: IDimensionDescriptor[]) => IDimensionDescriptor[]; /** * Derived measures or arithmetic measures have the 'name' in result header defaulted to measure * localId. This method deals with it. It creates a copy of headers with the measure headers denormalized, * values replaced with the contents of alias or title (whichever comes first). * * @param headerItems - headers to denormalize, copy will be done * @returns new headers */ denormalizeHeaders: (headerItems: T[][][]) => T[][][]; private originalLocalId; private fillOriginalMeasureTitle; private originalMeasureTitle; } /** * Returns dummy backend - this backend focuses on the execution 'branch' of the SPI. it implements * execution factory and prepared execution so that clients receive NoData exception when trying to obtain * results. * * This implementation is suitable when testing code which builds and configures an instance of IPreparedExecution or * testing component behavior when backend returns no results. * * @remarks see {@link dummyBackendEmptyData} for a variant of dummy backend * @param config - Provide configuration of the backend (host/user) * @internal */ export declare function dummyBackend(config?: DummyBackendConfig): IAnalyticalBackend; /** * @internal */ export declare type DummyBackendConfig = IAnalyticalBackendConfig & { /** * Influences whether readAll() / readWindow() should throw NoDataError() or return empty data view. * * The empty data view is returned by default - and can be used in tests that verify definition parts of * the returned data view. * * Throwing NoDataError is closer to how normal backends behave. * * If set to "without-data-view", it will throw NoDataErrors without a DataView. * If set to "with-data-view", it will throw NoDataErrors with a DataView. */ raiseNoDataExceptions: false | "without-data-view" | "with-data-view"; }; /** * Convenience function to create a dummy backend configured to NOT throw exceptions when client requests * data view. Instead, it returns an empty data view (which does not follow the SPI contract...) * * While this behavior violates contract of the SPI, a backend configured in this way is suitable for * particular test scenarios - for instance in tests that exercise logic which only works with IDataView's * execution definition. * * @internal */ export declare function dummyBackendEmptyData(): IAnalyticalBackend; /** * Dummy chat conversations interface for testing. * @internal */ export declare class DummyChatConversations implements IChatConversations { getConversationItemsQuery(): IChatConversationItemsQuery; create(): Promise; update(_conversationId: string, _conversation: IChatConversation): Promise; switchAgent(_conversationId: string, _agentId: string): Promise; delete(_conversationId: string): Promise; generateTitle(_conversationId: string): Promise; getConversation(_conversationId: string): Promise; getConversationThread(_conversationId: string): IChatConversationThread; } /** * Creates a new, empty data view for the provided execution definition. The definition will be retained as-is, data * will be empty. * * @param definition - execution definition * @param result - A result to link with the data view, if not provided an execution result will be * created * @param config - Override config that will be passed to exec result that may be created for the * data view (it is needed there in order to correctly handle readAll() and read()); config will not be used * if the `result` parameter is provided explicitly * @returns new instance of data view * @internal */ export declare function dummyDataView(definition: IExecutionDefinition, result?: IExecutionResult, config?: DummyBackendConfig): IDataView; /** * Dummy query builder for semantic search testing. * When allowedRelationshipTypes is set (e.g. viewer: dashboard only), filters results to matching source types * so Backstop and Storybook match real backend behavior. * @internal */ export declare class DummySemanticSearchQueryBuilder implements ISemanticSearchQuery { private readonly workspaceId; constructor(workspaceId: string); question: string; private allowedRelationshipTypes; withQuestion(question: string): this; withLimit(): this; withObjectTypes(): this; withDeepSearch(): this; withAllowedRelationshipTypes(allowedRelationshipTypes: IAllowedRelationshipType[]): this; withIncludeTags(): this; withExcludeTags(): this; query({ signal }?: { signal?: AbortSignal; }): Promise<{ results: { id: string; type: GenAIObjectType; workspaceId: string; title: string; description: string; tags: string[]; createdAt: string; modifiedAt: string; visualizationUrl: string | undefined; score: number; scoreTitle: number; scoreDescriptor: number; scoreExactMatch: number; }[]; relationships: ISemanticSearchRelationship[]; }>; } /** * @alpha */ export declare type ExecutionDecoratorFactory = (executionFactory: IExecutionFactory) => IExecutionFactory; /** * This implementation of execution factory will transparently upgrade any `forInsight` execution * to `forInsightByRef` execution IF the argument to `forInsight` is actually a persisted insight (`IInsight` which * is subtype of `IInsightDefinition`). * * @internal */ export declare class ExecutionFactoryUpgradingToExecByReference extends DecoratedExecutionFactory { constructor(decorated: IExecutionFactory); forInsight(insight: IInsightDefinition, filters?: INullableFilter[], options?: IPreparedExecutionOptions): IPreparedExecution; } /** * This implementation of execution factory allows transparent injection of fixed set of filters to all * executions started through it. * * This factory will not perform any filter merging. All it does is ensure some filters are always passed * to the underlying factory. The responsibility to do the filter merging lies in the underlying factory. * * @internal */ export declare class ExecutionFactoryWithFixedFilters extends DecoratedExecutionFactory { private readonly filters; constructor(decorated: IExecutionFactory, filters?: INullableFilter[]); 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; } /** * Extracts item type from generic builder type * * @beta */ export declare type ExtractBuilderType = TBuilder extends IBuilder ? TItem : never; /** * Fact metadata object builder * See {@link Builder} * * @beta */ export declare class FactMetadataObjectBuilder extends MetadataObjectBuilder { isLocked(value: boolean): this; dataSet(value: IDataSetMetadataObject | undefined): this; } /** * @alpha */ export declare type FactsDecoratorFactory = (facts: IWorkspaceFactsService, workspace: string) => IWorkspaceFactsService; /** * Date filter local identifier generator. * * The identifiers are predictable. * * @param index - The index of the date filter in the list of filters. * @param dateDatasetRef - Optional reference to the date dataset. * @returns A string representing the generated local identifier. * * @internal */ export declare const generateDateFilterLocalIdentifier: (index: number, dateDatasetRef?: ObjRef) => string; /** * @alpha */ export declare type GeoDecoratorFactory = (geo: IGeoService) => IGeoService; /** * Groupable catalog item builder * See {@link Builder} * * @beta */ export declare class GroupableCatalogItemBuilder extends Builder implements IGroupableCatalogItemBuilder { groups(tagRefs: ObjRef[]): this; } /** * Authenticated async call context * * @beta */ export declare interface IAuthenticatedAsyncCallContext { /** * Returns the currently authenticated principal. * Calling this function MAY trigger the authentication flow in case the current session * is not yet authenticated and the principal is unknown. * If the authentication flow fails, the NotAuthenticated error is thrown. */ getPrincipal(): Promise; } /** * see AuthProviderCallGuard * @public */ export declare interface IAuthProviderCallGuard extends IAuthenticationProvider { reset(): void; } /** * Common builder interface * @beta */ export declare interface IBuilder { /** * Build & return current item */ build(): T; /** * Modify current item with set of modifications */ modify(modifications: BuilderModifications): this; /** * Validate current item, throws error when item is not valid */ validate(): this; } /** * Groupable catalog item builder interface * * @beta */ export declare interface IGroupableCatalogItemBuilder extends IBuilder { groups(tagRefs: ObjRef[]): this; } /** * Insight widget builder * * @alpha */ export declare interface IInsightWidgetBuilder extends IWidgetBaseBuilder { drills(valueOrUpdateCallback: ValueOrUpdateCallback): this; insight(valueOrUpdateCallback: ValueOrUpdateCallback): this; properties(valueOrUpdateCallback: ValueOrUpdateCallback): this; } /** * Kpi widget builder * * @alpha */ export declare interface IKpiWidgetBuilder extends IWidgetBaseBuilder { drills(valueOrUpdateCallback: ValueOrUpdateCallback): this; measure(valueOrUpdateCallback: ValueOrUpdateCallback): this; comparisonType(valueOrUpdateCallback: ValueOrUpdateCallback): this; comparisonDirection(valueOrUpdateCallback: ValueOrUpdateCallback): this; } /** * Metadata object builder interface * * @beta */ export declare interface IMetadataObjectBuilder extends IBuilder { /** * Set metadata object title * * @param title - metadata object title * @returns this */ title(title: string): this; /** * Set metadata object description * * @param description - metadata object description * @returns this */ description(description: string): this; /** * Set metadata object tags * * @param tags - metadata object tags * @returns this */ tags(tags: string[]): this; /** * Set metadata object identifier * * @param id - metadata object identifier * @returns this */ id(id: string): this; /** * Set metadata object uri * * @param uri - metadata object uri * @returns this */ uri(uri: string): this; /** * Sets metadata object 'unlisted' flag * * @param value - true if unlisted * @returns this */ unlisted(value: boolean): this; /** * Set metadata object isProduction flag * * @param isProduction - true if production * @returns this */ production(isProduction: boolean): this; /** * Set metadata object isDeprecated flag * * @param isDeprecated - true if deprecated * @returns this */ deprecated(isDeprecated: boolean): this; /** * Set metadata object isHidden flag * * @param isHidden - true if hidden * @returns this */ isHidden(isHidden?: boolean): this; /** * Set metadata object isHiddenFromKda flag * * @param isHiddenFromKda - true if hidden from kda * @returns this */ isHiddenFromKda(isHiddenFromKda?: boolean): this; } /** * This implementation of {@link @gooddata/sdk-backend-spi#IPagedResource} pages over a list of items * provided at construction time. The paging is done using pre-configured page limit and starts at particular offset. * * @internal */ export declare class InMemoryPaging implements IPagedResource { protected readonly allItems: T[]; readonly items: T[]; readonly limit: number; readonly offset: number; readonly totalCount: number; constructor(allItems: T[], limit?: number, offset?: number); next(): Promise>; goTo(pageIndex: number): Promise>; all(): Promise; allSorted(compareFn: (a: T, b: T) => number): Promise; } /** * In-memory implementation of the publisher service. * * @remarks * Serves the default page templates and stores created page templates, document templates and documents in * memory for the lifetime of the instance (dummy backend, tests). * * @alpha */ export declare class InMemoryWorkspacePublisherService implements IWorkspacePublisherService { private readonly pageTemplates; private readonly templates; private readonly documents; private sequence; private newRef; private findDefaultPageTemplate; getPageTemplates(): Promise; getPageTemplate(ref: ObjRef): Promise; createPageTemplate(layout: IPublisherPageTemplateDefinitionV1): Promise; updatePageTemplate(layout: IPublisherPageTemplateV1): Promise; deletePageTemplate(ref: ObjRef): Promise; private assertPageTemplateEditable; getDocumentTemplates(): Promise; getDocumentTemplate(ref: ObjRef): Promise; createDocumentTemplate(template: IPublisherDocumentTemplateDefinitionV1): Promise; updateDocumentTemplate(template: IPublisherDocumentTemplateV1): Promise; deleteDocumentTemplate(ref: ObjRef): Promise; getDocuments(): Promise; hasDocuments(): Promise; getDocument(ref: ObjRef): Promise; createDocument(publisherDocument: IPublisherDocumentDefinitionV1): Promise; updateDocument(publisherDocument: IPublisherDocumentV1): Promise; deleteDocument(ref: ObjRef): Promise; exportDocumentToPdf(_ref: ObjRef, _options?: IPublisherDocumentExportPdfOptions): Promise; private store; private assertExistsAndUnlocked; } /** * In-memory implementation of the content version 2 publisher service. * * @remarks * Stores page templates, document templates and documents in memory for the lifetime of the instance * (dummy backend, tests). It serves no default page templates. Saves validate the content and reject * with {@link @gooddata/sdk-backend-spi#PublisherContentNotSupportedError}. * * @alpha */ export declare class InMemoryWorkspacePublisherServiceV2 implements IWorkspacePublisherServiceV2 { private readonly pageTemplates; private readonly documentTemplates; private readonly documents; getPageTemplates(): Promise; getPageTemplate(ref: ObjRef): Promise; createPageTemplate(template: IPublisherPageTemplateDefinitionV2): Promise; updatePageTemplate(template: IPublisherPageTemplateV2): Promise; deletePageTemplate(ref: ObjRef): Promise; getDocumentTemplates(): Promise; getDocumentTemplate(ref: ObjRef): Promise; createDocumentTemplate(template: IPublisherDocumentTemplateDefinitionV2): Promise; updateDocumentTemplate(template: IPublisherDocumentTemplateV2): Promise; deleteDocumentTemplate(ref: ObjRef): Promise; getDocuments(): Promise; getDocument(ref: ObjRef): Promise; createDocument(publisherDocument: IPublisherDocumentDefinitionV2): Promise; updateDocument(publisherDocument: IPublisherDocumentV2): Promise; deleteDocument(ref: ObjRef): Promise; exportDocumentToPdf(_ref: ObjRef, _options?: IPublisherDocumentExportPdfOptions): Promise; } /** * @internal */ export declare interface INormalizerOptions { /** * If true, things like aliases, titles, etc. are kept in the objects. Defaults to false. */ keepRemovableProperties?: boolean; } /** * @alpha */ export declare type InsightsDecoratorFactory = (insights: IWorkspaceInsightsService, workspace: string) => IWorkspaceInsightsService; /** * @alpha */ export declare class InsightWidgetBuilder extends WidgetBaseBuilder implements IInsightWidgetBuilder { protected item: IInsightWidget; protected validator?: ((item: Partial) => void) | undefined; constructor(item: IInsightWidget, validator?: ((item: Partial) => void) | undefined); static for(insightWidget: IInsightWidgetDefinition): InsightWidgetBuilder; static forNew(insight: ObjRef): InsightWidgetBuilder; drills: (valueOrUpdateCallback: ValueOrUpdateCallback) => this; insight: (valueOrUpdateCallback: ValueOrUpdateCallback) => this; properties: (valueOrUpdateCallback: ValueOrUpdateCallback) => this; } /** * @internal */ export declare type IServerPagingParams = { offset: number; limit: number; cacheId?: string; totalCount?: number; }; /** * @internal */ export declare interface IServerPagingResult { items: T[]; totalCount: number; cacheId?: string; } /** * Common widget props builder * * @alpha */ export declare interface IWidgetBaseBuilder extends IBuilder { title(valueOrUpdateCallback: ValueOrUpdateCallback): this; description(valueOrUpdateCallback: ValueOrUpdateCallback): this; ignoreDashboardFilters(valueOrUpdateCallback: ValueOrUpdateCallback): this; dateDataSet(valueOrUpdateCallback: ValueOrUpdateCallback): this; ref(valueOrUpdateCallback: ValueOrUpdateCallback): this; id(valueOrUpdateCallback: ValueOrUpdateCallback): this; uri(valueOrUpdateCallback: ValueOrUpdateCallback): this; } /** * Specifies workspace settings and current user settings to be adjusted by the decorator. * * @beta */ export declare interface IWorkspaceSettingsConfiguration { /** * Transforms both workspace settings and user settings obtained from the real backend. Can add, * remove or alter settings or provide a completely new settings. * Execution of this wrapper precedes execution of the specific wrappers for user and workspace settings */ commonSettingsWrapper?: CommonSettingsWrapper; /** * Transforms workspace settings obtained from the real backend. Can add, remove or alter settings * or provide a completely new settings */ settingsWrapper?: SettingsWrapper; /** * Transforms user settings obtained from the real backend. Can add, remove or alter settings * or provide a completely new settings */ currentUserSettingsWrapper?: CurrentUserSettingsWrapper; } /** * @alpha */ export declare class KpiWidgetBuilder extends WidgetBaseBuilder implements IKpiWidgetBuilder { protected item: IKpiWidget; protected validator?: ((item: Partial) => void) | undefined; constructor(item: IKpiWidget, validator?: ((item: Partial) => void) | undefined); static for(kpiWidget: IKpiWidgetDefinition): KpiWidgetBuilder; static forNew(measure: ObjRef): KpiWidgetBuilder; protected setKpiWidgetProp: (prop: K, valueOrUpdateCallback: ValueOrUpdateCallback) => this; drills: (valueOrUpdateCallback: ValueOrUpdateCallback) => this; measure: (valueOrUpdateCallback: ValueOrUpdateCallback) => this; comparisonType: (valueOrUpdateCallback: ValueOrUpdateCallback) => this; comparisonDirection: (valueOrUpdateCallback: ValueOrUpdateCallback) => this; } /** * @beta */ export declare type LocalIdMap = { [from: string]: string; }; /** * Measure metadata object builder * See {@link Builder} * * @beta */ export declare class MeasureMetadataObjectBuilder extends MetadataObjectBuilder { certification(certification?: IMeasureMetadataObject["certification"]): this; expression(maql: string): this; format(format: string): this; metricType(metricType?: MetricType): this; conditionalFormatting(conditionalFormatting?: ISemanticConditionalFormatting): this; isLocked(isLocked: boolean): this; tags(tags: string[]): this; created(createdAt?: string): this; createdBy(createdBy?: IUser): this; updated(updatedAt?: string): this; updatedBy(updatedBy?: IUser): this; permissions(permissions?: AccessGranularPermission[]): this; } /** * @alpha */ export declare type MeasuresDecoratorFactory = (measures: IWorkspaceMeasuresService, workspace: string) => IWorkspaceMeasuresService; /** * Merge two bounding boxes into a single covering bounding box. * * @internal */ export declare function mergeBbox(a?: number[], b?: number[]): number[] | undefined; /** * Metadata object builder * See {@link Builder} * * @beta */ export declare class MetadataObjectBuilder extends Builder implements IMetadataObjectBuilder { title(title: string): this; description(description: string): this; tags(tags: string[]): this; id(identifier: string): this; uri(uri: string): this; unlisted(value: boolean): this; production(isProduction: boolean): this; deprecated(isDeprecated: boolean): this; isHidden(isHidden?: boolean): this; isHiddenFromKda(isHidden?: boolean): this; } /** * Attribute display form metadata object factory * * @param ref - attribute display form reference * @param modifications - attribute diplay form builder modifications to perform * @returns created attribute display form metadata object * @beta */ export declare const newAttributeDisplayFormMetadataObject: (ref: ObjRef, modifications?: BuilderModifications) => IAttributeDisplayFormMetadataObject; /** * Attribute metadata object factory * * @param ref - attribute reference * @param modifications - attribute builder modifications to perform * @returns created attribute metadata object * @beta */ export declare const newAttributeMetadataObject: (ref: ObjRef, modifications?: BuilderModifications) => IAttributeMetadataObject; /** * Catalog attribute factory * * @param modifications - catalog attribute builder modifications to perform * @returns created catalog attribute * @beta */ export declare const newCatalogAttribute: (modifications?: BuilderModifications) => ICatalogAttribute; /** * Catalog computed attribute factory * * @param modifications - catalog computed attribute builder modifications to perform * @returns created catalog computed attribute * @beta */ export declare const newCatalogComputedAttribute: (modifications: BuilderModifications) => ICatalogComputedAttribute; /** * Catalog date attribute factory * * @param modifications - catalog date attribute builder modifications to perform * @returns created catalog date attribute * @beta */ export declare const newCatalogDateAttribute: (modifications?: BuilderModifications) => ICatalogDateAttribute; /** * Catalog date dataset factory * * @param modifications - catalog date dataset builder modifications to perform * @returns created catalog date dataset * @beta */ export declare const newCatalogDateDataset: (modifications?: BuilderModifications) => ICatalogDateDataset; /** * Catalog fact factory * * @param modifications - catalog fact builder modifications to perform * @returns created catalog fact * @beta */ export declare const newCatalogFact: (modifications?: BuilderModifications) => ICatalogFact; /** * Catalog group factory * * @param modifications - catalog group builder modifications to perform * @returns created catalog group * @beta */ export declare const newCatalogGroup: (modifications?: BuilderModifications) => ICatalogGroup; /** * Catalog measure factory * * @param modifications - catalog measure builder modifications to perform * @returns created catalog measure * @beta */ export declare const newCatalogMeasure: (modifications?: BuilderModifications) => ICatalogMeasure; /** * Dashboard metadata object factory * * @param ref - dashboard reference * @param modifications - dashboard builder modifications to perform * @returns created dashboard metadata object * @beta */ export declare const newDashboardMetadataObject: (ref: ObjRef, modifications?: BuilderModifications) => IDashboardMetadataObject; /** * DataSet metadata object factory * * @param ref - dataset reference * @param modifications - dataset builder modifications to perform * @returns created dataset metadata object * @beta */ export declare const newDataSetMetadataObject: (ref: ObjRef, modifications?: BuilderModifications) => IDataSetMetadataObject; /** * Fact metadata object factory * * @param ref - fact reference * @param modifications - fact builder modifications to perform * @returns created fact metadata object * @beta */ export declare const newFactMetadataObject: (ref: ObjRef, modifications?: BuilderModifications) => IFactMetadataObject; /** * @alpha */ export declare const newInsightWidget: (insight: ObjRef, modifications: (builder: InsightWidgetBuilder) => InsightWidgetBuilder) => IInsightWidget; /** * @alpha */ export declare const newKpiWidget: (measure: ObjRef, modifications: (builder: KpiWidgetBuilder) => KpiWidgetBuilder) => IKpiWidget; /** * Measure metadata object factory * * @param ref - measure reference * @param modifications - measure builder modifications to perform * @returns created measure metadata object * @beta */ export declare const newMeasureMetadataObject: (ref: ObjRef, modifications?: BuilderModifications) => IMeasureMetadataObject; /** * Variable metadata object factory * * @param ref - variable reference * @param modifications - variable builder modifications to perform * @returns created variable metadata object * @beta */ export declare const newVariableMetadataObject: (ref: ObjRef, modifications?: BuilderModifications) => IVariableMetadataObject; /** * This implementation serves as a Null object for IAuthProviderCallGuard. * * @internal */ export declare class NoopAuthProvider implements IAuthProviderCallGuard { disablePrincipalCache: boolean; authenticate(_context: IAuthenticationContext): Promise; getCurrentPrincipal(_context: IAuthenticationContext): Promise; deauthenticate(_context: IAuthenticationContext): Promise; reset(): void; } /** * @beta */ export declare type NormalizationConfig = { /** * Specify callback where the normalizing backend will dispatch state of the normalizations being done. */ normalizationStatus?: (normalizationState: NormalizationState) => void; /** * Specify what should happen if the normalized backend is asked to perform execution by reference. * * Background: * * Execution by reference cannot be normalized - strictly because execution by reference executes exactly * what is stored somewhere on the backend (this can connect to authorization schemes, ACLs and so on - such as * allowing users to execute only insights exactly as they were prepared by someone else) * * By default, trying to run execute-by-reference using normalizing decorator will fail. It is possible * to modify this behavior so that instead there will be fallback to freeform execution. For backends that * do not support execute-by-ref this is all good. */ executeByRefMode?: NormalizationWhenExecuteByRef; }; /** * @beta */ export declare type NormalizationState = { /** * Normalized execution definition */ readonly normalized: IExecutionDefinition; /** * Original execution definition */ readonly original: IExecutionDefinition; /** * Local ID mapping between normalized and original execution definitions. */ readonly n2oMap: LocalIdMap; }; /** * @beta */ export declare type NormalizationWhenExecuteByRef = "prohibit" | "fallback"; /** * Normalizes collection items request to canonical identity form. * * @remarks * This normalization is intentionally deterministic only (dedupe/sort/filter-empty), * not semantic. It must preserve backend request semantics exactly, so different values * (for example `CA` vs `US-CA`) stay different identities. * * Recorder and replay must both use this function. If its behavior changes, recordings * must be regenerated because identity keys will change. * * @internal */ export declare function normalizeCollectionItemsIdentityConfig(config: ICollectionItemsConfig): NormalizedCollectionItemsIdentityConfig; /** * Canonical collection items config used to compute request identity. * * @internal */ export declare type NormalizedCollectionItemsIdentityConfig = Pick; /** * The normalization of execution definition means stripping away all the detail that is unnecessary for the * backend: * * - attribute / measure alias * - measure title * - measure format * - custom-crafted local IDs * * The code does the job by _mutating_ a clone of the original definition. The mutation approach, while not * backed by functionality in sdk-model and therefore somewhat hacky, is a simpler one for this task. * * The main reason behind that is the occurrence of attribute and measure objects in multiple parts of the * execution definition: same attributes and measures are referenced from both buckets and the attributes and measures * props of the execution definition. Mutating values means that after normalizing values the execution definition * is fully normalized. * * @internal */ export declare class Normalizer { readonly original: IExecutionDefinition; protected readonly options: INormalizerOptions; static normalize(def: IExecutionDefinition, options?: INormalizerOptions): NormalizationState; readonly normalized: IExecutionDefinition; /** * original to normalized local id map */ private readonly o2nMap; /** * normalized to original local id map */ private readonly n2oMap; private readonly originalMeasures; private readonly alreadyNormalized; private constructor(); /** * Creates a new mapping between original local ID and the proposed normalized local ID. This method * ensures uniqueness of the normalized local ID. If the proposed normalized local ID is taken, it will * append a suffix to make a unique local ID. * * This can happen if the original execution definition contains same measure / attribute multiple times, * each time using different local ID. */ private createUniqueMapping; private normalizedLocalId; private maybeNormalizedLocalId; private normalizeAttributes; private normalizeTotal; private normalizeTotals; /** * Simple measure normalization will toss away noop filters. There is nothing else to do. */ private normalizeSimple; private normalizePoP; private normalizePreviousPeriod; private normalizeArithmetic; private normalizeMeasure; private normalizeMeasureByLocalId; private normalizeMeasures; private normalizeFilters; private normalizeSorts; private normalizeDimensions; private normalize; } /** * @alpha */ export declare type ObjectPermissionsDecoratorFactory = (objectPermissions: IWorkspaceObjectPermissionsService, workspace: string) => IWorkspaceObjectPermissionsService; /** * @alpha */ export declare type OrganizationExportTemplatesDecoratorFactory = (exportTemplates: IOrganizationExportTemplatesService, organizationId: string) => IOrganizationExportTemplatesService; /** * @alpha */ export declare type PreparedExecutionWrapper = (execution: IPreparedExecution) => IPreparedExecution; /** * These are the recommended settings for the backend caching. * * @remarks * For more information on what the options mean see {@link CachingConfiguration}. * * @public */ export declare const RecommendedCachingConfiguration: CachingConfiguration; /** * Calls an update callback when it's a function, otherwise returns the value itself. * This is just an utility function to DRY the builder implementation a bit. * * @alpha * @param valueOrUpdateCallback - value to set, or update callback * @param valueToUpdate - original value to update */ export declare const resolveValueOrUpdateCallback: (valueOrUpdateCallback: ValueOrUpdateCallback, valueToUpdate: TValue) => TValue; /** * @beta */ export declare type ResultFactory = (dimensions: IDimensionDescriptor[], fingerprint: string) => IExecutionResult; /** * @public */ export declare type ResultHeaderTransformer = (resultHeader: IResultHeader, postProcessing?: IPostProcessing) => IResultHeader; /** * @beta */ export declare type ResultProvider = (context: ResultProviderContext) => Promise; /** * @beta */ export declare type ResultProviderContext = CustomCallContext & { /** * An execution that has been prepared and configured by the client code and describes what do compute * and how the results should look like. */ execution: IPreparedExecution; /** * A factory function to create instances of IExecutionResult. * * When implementing custom backend, you may opt to use this factory to create a default implementation * of execution result which implements all the boilerplate and defers readAll() and readWindow() functions * to dataProviders OR create your own implementation of IExecutionResult from scratch. * */ resultFactory: ResultFactory; }; /** * @alpha */ export declare type SecuritySettingsDecoratorFactory = (securitySettings: ISecuritySettingsService) => ISecuritySettingsService; /** * Common implementation of the {@link @gooddata/sdk-backend-spi#IPagedResource} for the server-side paging. * * @internal */ export declare class ServerPaging implements IPagedResource { protected readonly getData: (pagingParams: IServerPagingParams) => Promise>; readonly limit: number; readonly offset: number; readonly totalCount: number; readonly items: T[]; readonly cacheId?: string | undefined; static for(getData: (pagingParams: IServerPagingParams) => Promise>, limit?: number, offset?: number, cacheId?: string): Promise>; constructor(getData: (pagingParams: IServerPagingParams) => Promise>, limit: number | undefined, offset: number | undefined, totalCount: number, items: T[], cacheId?: string | undefined); next: () => Promise>; goTo: (pageIndex: number) => Promise>; all: () => Promise; allSorted: (compareFn: (a: T, b: T) => number) => Promise; } /** * Adjusts workspace config * * @beta */ export declare type SettingsWrapper = (settings: IWorkspaceSettings) => IWorkspaceSettings; /** * @beta */ export declare type TelemetryData = { componentName?: string; props?: string[]; /** * Correlation metadata to be sent to backend. */ correlationMetadata?: IRequestCorrelationMetadata; }; /** * Transforms the result headers in an AFM execution result. * * @param resultHeaders - Execution result headers to be transformed. * @param resultHeaderTransformer - The transformation function to be called to transform each result header. * @param postProcessing - Contains any configuration that should be used during transformation. * @returns The transformed result headers if resultHeaderTransformer has a value, * or resultHeaders is returned if resultHeaderTransformer does not have any value. * * @public */ export declare function transformResultHeaders(resultHeaders: IResultHeader[][][], resultHeaderTransformer?: ResultHeaderTransformer, postProcessing?: IPostProcessing): IResultHeader[][][]; /** * Performs validation of dashboard plugin URL. This is purely client-side and checks that the URL does * not contain invalid characters and contains correct protocol. * * @param url - url to validate * @alpha */ export declare function validatePluginUrlIsSane(url: string): string | undefined; /** * Represents a callback to update the value, or the value itself. * @alpha */ export declare type ValueOrUpdateCallback = TValue | ((value: TValue) => TValue); /** * Variable metadata object builder * See {@link Builder} * * @beta */ export declare class VariableMetadataObjectBuilder extends MetadataObjectBuilder { } /** * @alpha */ export declare class WidgetBaseBuilder extends Builder implements IWidgetBaseBuilder { protected setWidget: (updateCallback: (widget: Partial) => Partial) => this; protected setWidgetProp: (prop: K, valueOrUpdateCallback: ValueOrUpdateCallback) => this; title: (valueOrUpdateCallback: ValueOrUpdateCallback) => this; description: (valueOrUpdateCallback: ValueOrUpdateCallback) => this; ignoreDashboardFilters: (valueOrUpdateCallback: ValueOrUpdateCallback) => this; dateDataSet: (valueOrUpdateCallback: ValueOrUpdateCallback) => this; ref: (valueOrUpdateCallback: ValueOrUpdateCallback) => this; id: (valueOrUpdateCallback: ValueOrUpdateCallback) => this; uri: (valueOrUpdateCallback: ValueOrUpdateCallback) => this; } /** * Adds caching layer on top of an existing analytical backend instance. It is currently possible to cache * results of executions and the workspace LDM catalog. * * @remarks see {@link CachingConfiguration} properties for more information. * @param realBackend - real backend to decorate with caching * @param config - caching configuration. {@link RecommendedCachingConfiguration} can be used * @public */ export declare function withCaching(realBackend: IAnalyticalBackend, config: CachingConfiguration): IAnalyticalBackend; /** * Adjusts workspace configs and current user configs from the real backend. * * @remarks see {@link IWorkspaceSettingsConfiguration} properties for more information. * @param realBackend - real backend to decorate with custom workspace settings * @param config - workspace configs configuration * @beta */ export declare function withCustomWorkspaceSettings(realBackend: IAnalyticalBackend, config: IWorkspaceSettingsConfiguration): IAnalyticalBackend; /** * This implementation of analytical backend decorates another implementation with support for eventing. Events * for significant actions are emitted to defined callback functions (event handlers). * * @param realBackend - backend supplying the actual implementation of SPI * @param callbacks - callbacks to event handlers * @beta */ export declare function withEventing(realBackend: IAnalyticalBackend, callbacks: AnalyticalBackendCallbacks): IAnalyticalBackend; /** * Decorates backend with logic which transparently normalizes execution definitions before they are dispatched * to the underlying backend. The normalization standardizes local identifiers and removes any fields that do not * impact the resulting data itself: aliases, title customizations and measure format customizations. * * All the detail that is stripped on the way to the execution APIs is restored before the results reach the * caller code. * * The normalization is essential to increase cache hits - be it both on client or on the server. * * @param realBackend - real backend to decorate * @param config - Specify configuration of the normalization process, see {@link NormalizationConfig} * @returns new instance of backend * @beta */ export declare function withNormalization(realBackend: IAnalyticalBackend, config?: NormalizationConfig): IAnalyticalBackend; /** * @alpha */ export declare type WorkspaceCatalogWrapper = (catalog: IWorkspaceCatalog) => IWorkspaceCatalog; /** * @alpha */ export declare type WorkspaceExportTemplatesDecoratorFactory = (exportTemplates: IWorkspaceExportTemplatesService, workspace: string) => IWorkspaceExportTemplatesService; /** * @alpha */ export declare type WorkspacePublisherDecoratorFactory = (publisher: IWorkspacePublisherService, workspace: string) => IWorkspacePublisherService; /** * @alpha */ export declare type WorkspacePublisherV2DecoratorFactory = (publisher: IWorkspacePublisherServiceV2, workspace: string) => IWorkspacePublisherServiceV2; /** * @alpha */ export declare type WorkspaceSettingsDecoratorFactory = (settings: IWorkspaceSettingsService, workspace: string) => IWorkspaceSettingsService; export { }