@sisense/sdk-ai-core 0.13.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +0 -1
- package/dist/engines/build-chart/build-chart-engine.d.ts +1 -12
- package/dist/engines/build-chart/build-chart-service.d.ts +0 -1
- package/dist/engines/build-chart/create-chart/assemble-chart-widget.d.ts +7 -3
- package/dist/engines/build-chart/create-chart/chart-json-axes-mapping.d.ts +0 -1
- package/dist/engines/build-chart/create-chart/create-chart.d.ts +0 -1
- package/dist/engines/build-chart/create-chart/generate-chart-recommendations.d.ts +0 -1
- package/dist/engines/build-chart/create-chart/generate-chart.d.ts +0 -1
- package/dist/engines/build-chart/create-chart/get-columns-json.d.ts +0 -1
- package/dist/engines/build-chart/create-chart/rebind-chart-to-query.d.ts +10 -0
- package/dist/engines/build-chart/create-chart/resolve-chart-query.d.ts +0 -1
- package/dist/engines/build-chart/dataset-from-saved-chart-widget.d.ts +0 -1
- package/dist/engines/build-chart/shared/chart-column-utils.d.ts +6 -0
- package/dist/engines/build-chart/shared/csdk-data-options-for-llm.d.ts +0 -1
- package/dist/engines/build-chart/shared/finalize-chart-widget-save.d.ts +7 -0
- package/dist/engines/build-chart/shared/normalize-cartesian-axes-mapping.d.ts +7 -0
- package/dist/engines/build-chart/shared/sync-chart-state-measure-flags.d.ts +21 -0
- package/dist/engines/build-chart/types.d.ts +147 -5
- package/dist/engines/build-chart/update-chart/apply-prior-chart-style.d.ts +0 -1
- package/dist/engines/build-chart/update-chart/chart-options-schemas.d.ts +0 -1
- package/dist/engines/build-chart/update-chart/schemas.d.ts +0 -1
- package/dist/engines/build-chart/update-chart/update-chart-data-options.d.ts +0 -1
- package/dist/engines/build-chart/update-chart/update-chart-query.d.ts +0 -1
- package/dist/engines/build-chart/update-chart/update-chart-style-options.d.ts +0 -1
- package/dist/engines/build-chart/update-chart/update-chart-title.d.ts +0 -1
- package/dist/engines/build-chart/update-chart/update-chart-type.d.ts +0 -1
- package/dist/engines/build-csv-model/build-csv-model-engine.d.ts +0 -1
- package/dist/engines/build-csv-model/index.d.ts +0 -1
- package/dist/engines/build-csv-model/infer-relations.d.ts +0 -1
- package/dist/engines/build-csv-model/rest-build.d.ts +26 -1
- package/dist/engines/build-csv-model/types.d.ts +1 -2
- package/dist/engines/build-dashboard/add-dashboard-filters.d.ts +0 -1
- package/dist/engines/build-dashboard/add-dashboard-widgets.d.ts +0 -1
- package/dist/engines/build-dashboard/build-dashboard-engine.d.ts +1 -10
- package/dist/engines/build-dashboard/build-dashboard-service.d.ts +0 -1
- package/dist/engines/build-dashboard/create-dashboard.d.ts +0 -1
- package/dist/engines/build-dashboard/dashboard-filters/dashboard-filters-system-prompt.d.ts +0 -1
- package/dist/engines/build-dashboard/dashboard-filters/filter-factory-types.d.ts +0 -1
- package/dist/engines/build-dashboard/dashboard-filters/manipulate-dashboard-filters.d.ts +0 -1
- package/dist/engines/build-dashboard/dashboard-filters/measure-factory-types.d.ts +0 -1
- package/dist/engines/build-dashboard/dashboard-filters/translate-filters.d.ts +0 -1
- package/dist/engines/build-dashboard/index.d.ts +1 -2
- package/dist/engines/build-dashboard/load-existing-fusion-dashboard.d.ts +0 -1
- package/dist/engines/build-dashboard/types.d.ts +43 -21
- package/dist/engines/build-dashboard/update-dashboard.d.ts +0 -1
- package/dist/engines/build-data-model/build-data-model-engine.d.ts +0 -1
- package/dist/engines/build-data-model/fake-options.d.ts +0 -1
- package/dist/engines/build-data-model/faker-type-list.d.ts +0 -1
- package/dist/engines/build-data-model/index.d.ts +0 -1
- package/dist/engines/build-data-model/types.d.ts +3 -4
- package/dist/engines/build-data-model/validate-relationships.d.ts +0 -1
- package/dist/engines/build-query/build-query-engine.d.ts +0 -1
- package/dist/engines/build-query/index.d.ts +0 -1
- package/dist/engines/build-query/types.d.ts +0 -1
- package/dist/engines/get-dashboards/get-dashboards-engine.d.ts +0 -1
- package/dist/engines/get-dashboards/index.d.ts +0 -1
- package/dist/engines/get-dashboards/types.d.ts +0 -1
- package/dist/engines/get-data-source-fields/get-data-source-fields-engine.d.ts +0 -1
- package/dist/engines/get-data-source-fields/index.d.ts +0 -1
- package/dist/engines/get-data-source-fields/types.d.ts +2 -2
- package/dist/engines/get-data-sources/get-data-sources-engine.d.ts +0 -1
- package/dist/engines/get-data-sources/index.d.ts +0 -1
- package/dist/engines/get-data-sources/types.d.ts +0 -1
- package/dist/engines/index.d.ts +0 -1
- package/dist/engines/manage-perspectives/index.d.ts +0 -1
- package/dist/engines/manage-perspectives/manage-perspectives-engine.d.ts +0 -1
- package/dist/engines/manage-perspectives/types.d.ts +19 -6
- package/dist/engines/recommend-queries/index.d.ts +0 -1
- package/dist/engines/recommend-queries/recommend-queries-engine.d.ts +0 -1
- package/dist/engines/recommend-queries/types.d.ts +0 -1
- package/dist/engines/shared/get-filters-json-for-llm-summary.d.ts +0 -1
- package/dist/engines/shared/nlq-query-helpers.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +14795 -13893
- package/dist/services/dashboards/dashboards-service.d.ts +0 -1
- package/dist/services/dashboards/fusion-dashboards-service.d.ts +0 -1
- package/dist/services/data-models/data-models-service.d.ts +0 -1
- package/dist/services/data-models/ecm-service.d.ts +0 -1
- package/dist/services/data-sources/data-sources-service.d.ts +0 -1
- package/dist/services/formulas/formulas-service.d.ts +0 -1
- package/dist/services/llm/llm-consumption-service.d.ts +0 -1
- package/dist/services/llm/llm-models-service.d.ts +0 -1
- package/dist/services/llm/llm-settings-service.d.ts +0 -1
- package/dist/services/nlq/nlq-service.d.ts +0 -1
- package/dist/singleton-clients.d.ts +0 -1
- package/dist/utils/abort-signal.d.ts +0 -1
- package/dist/utils/create-custom-fetch.d.ts +0 -1
- package/dist/utils/create-serialized-tool-group.d.ts +0 -1
- package/dist/utils/create-stream-completion.d.ts +0 -1
- package/dist/utils/create-structured-completion.d.ts +0 -1
- package/dist/utils/create-tools-completion.d.ts +0 -1
- package/dist/utils/dev-debug.d.ts +0 -1
- package/dist/utils/http-client.d.ts +0 -1
- package/dist/utils/id-utils.d.ts +0 -1
- package/dist/utils/llm-client.d.ts +0 -1
- package/dist/utils/llm-provider-options.d.ts +0 -1
- package/dist/utils/proxy-utils.d.ts +0 -1
- package/dist/utils/trusted-base-url.d.ts +0 -1
- package/dist/utils/user-action-tracking.d.ts +0 -1
- package/dist/utils/utils.d.ts +0 -1
- package/dist/utils/zod-utils.d.ts +14 -1
- package/package.json +6 -7
- package/dist/constants.d.ts.map +0 -1
- package/dist/engines/build-chart/build-chart-engine.d.ts.map +0 -1
- package/dist/engines/build-chart/build-chart-service.d.ts.map +0 -1
- package/dist/engines/build-chart/create-chart/assemble-chart-widget.d.ts.map +0 -1
- package/dist/engines/build-chart/create-chart/chart-json-axes-mapping.d.ts.map +0 -1
- package/dist/engines/build-chart/create-chart/create-chart.d.ts.map +0 -1
- package/dist/engines/build-chart/create-chart/generate-chart-recommendations.d.ts.map +0 -1
- package/dist/engines/build-chart/create-chart/generate-chart.d.ts.map +0 -1
- package/dist/engines/build-chart/create-chart/get-columns-json.d.ts.map +0 -1
- package/dist/engines/build-chart/create-chart/resolve-chart-query.d.ts.map +0 -1
- package/dist/engines/build-chart/dataset-from-saved-chart-widget.d.ts.map +0 -1
- package/dist/engines/build-chart/shared/csdk-data-options-for-llm.d.ts.map +0 -1
- package/dist/engines/build-chart/types.d.ts.map +0 -1
- package/dist/engines/build-chart/update-chart/apply-prior-chart-style.d.ts.map +0 -1
- package/dist/engines/build-chart/update-chart/chart-options-schemas.d.ts.map +0 -1
- package/dist/engines/build-chart/update-chart/schemas.d.ts.map +0 -1
- package/dist/engines/build-chart/update-chart/update-chart-data-options.d.ts.map +0 -1
- package/dist/engines/build-chart/update-chart/update-chart-query.d.ts.map +0 -1
- package/dist/engines/build-chart/update-chart/update-chart-style-options.d.ts.map +0 -1
- package/dist/engines/build-chart/update-chart/update-chart-title.d.ts.map +0 -1
- package/dist/engines/build-chart/update-chart/update-chart-type.d.ts.map +0 -1
- package/dist/engines/build-csv-model/build-csv-model-engine.d.ts.map +0 -1
- package/dist/engines/build-csv-model/index.d.ts.map +0 -1
- package/dist/engines/build-csv-model/infer-relations.d.ts.map +0 -1
- package/dist/engines/build-csv-model/rest-build.d.ts.map +0 -1
- package/dist/engines/build-csv-model/types.d.ts.map +0 -1
- package/dist/engines/build-dashboard/add-dashboard-filters.d.ts.map +0 -1
- package/dist/engines/build-dashboard/add-dashboard-widgets.d.ts.map +0 -1
- package/dist/engines/build-dashboard/build-dashboard-engine.d.ts.map +0 -1
- package/dist/engines/build-dashboard/build-dashboard-service.d.ts.map +0 -1
- package/dist/engines/build-dashboard/create-chart-widget.d.ts +0 -5
- package/dist/engines/build-dashboard/create-chart-widget.d.ts.map +0 -1
- package/dist/engines/build-dashboard/create-dashboard.d.ts.map +0 -1
- package/dist/engines/build-dashboard/dashboard-filters/dashboard-filters-system-prompt.d.ts.map +0 -1
- package/dist/engines/build-dashboard/dashboard-filters/filter-factory-types.d.ts.map +0 -1
- package/dist/engines/build-dashboard/dashboard-filters/manipulate-dashboard-filters.d.ts.map +0 -1
- package/dist/engines/build-dashboard/dashboard-filters/measure-factory-types.d.ts.map +0 -1
- package/dist/engines/build-dashboard/dashboard-filters/translate-filters.d.ts.map +0 -1
- package/dist/engines/build-dashboard/index.d.ts.map +0 -1
- package/dist/engines/build-dashboard/load-existing-fusion-dashboard.d.ts.map +0 -1
- package/dist/engines/build-dashboard/types.d.ts.map +0 -1
- package/dist/engines/build-dashboard/update-chart-widget.d.ts +0 -5
- package/dist/engines/build-dashboard/update-chart-widget.d.ts.map +0 -1
- package/dist/engines/build-dashboard/update-dashboard.d.ts.map +0 -1
- package/dist/engines/build-data-model/build-data-model-engine.d.ts.map +0 -1
- package/dist/engines/build-data-model/fake-options.d.ts.map +0 -1
- package/dist/engines/build-data-model/faker-type-list.d.ts.map +0 -1
- package/dist/engines/build-data-model/index.d.ts.map +0 -1
- package/dist/engines/build-data-model/types.d.ts.map +0 -1
- package/dist/engines/build-data-model/validate-relationships.d.ts.map +0 -1
- package/dist/engines/build-query/build-query-engine.d.ts.map +0 -1
- package/dist/engines/build-query/index.d.ts.map +0 -1
- package/dist/engines/build-query/types.d.ts.map +0 -1
- package/dist/engines/get-dashboards/get-dashboards-engine.d.ts.map +0 -1
- package/dist/engines/get-dashboards/index.d.ts.map +0 -1
- package/dist/engines/get-dashboards/types.d.ts.map +0 -1
- package/dist/engines/get-data-source-fields/get-data-source-fields-engine.d.ts.map +0 -1
- package/dist/engines/get-data-source-fields/index.d.ts.map +0 -1
- package/dist/engines/get-data-source-fields/types.d.ts.map +0 -1
- package/dist/engines/get-data-sources/get-data-sources-engine.d.ts.map +0 -1
- package/dist/engines/get-data-sources/index.d.ts.map +0 -1
- package/dist/engines/get-data-sources/types.d.ts.map +0 -1
- package/dist/engines/index.d.ts.map +0 -1
- package/dist/engines/manage-perspectives/index.d.ts.map +0 -1
- package/dist/engines/manage-perspectives/manage-perspectives-engine.d.ts.map +0 -1
- package/dist/engines/manage-perspectives/types.d.ts.map +0 -1
- package/dist/engines/recommend-queries/index.d.ts.map +0 -1
- package/dist/engines/recommend-queries/recommend-queries-engine.d.ts.map +0 -1
- package/dist/engines/recommend-queries/types.d.ts.map +0 -1
- package/dist/engines/shared/get-filters-json-for-llm-summary.d.ts.map +0 -1
- package/dist/engines/shared/nlq-query-helpers.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/services/dashboards/dashboards-service.d.ts.map +0 -1
- package/dist/services/dashboards/fusion-dashboards-service.d.ts.map +0 -1
- package/dist/services/data-models/data-models-service.d.ts.map +0 -1
- package/dist/services/data-models/ecm-service.d.ts.map +0 -1
- package/dist/services/data-sources/data-sources-service.d.ts.map +0 -1
- package/dist/services/formulas/formulas-service.d.ts.map +0 -1
- package/dist/services/llm/llm-consumption-service.d.ts.map +0 -1
- package/dist/services/llm/llm-models-service.d.ts.map +0 -1
- package/dist/services/llm/llm-settings-service.d.ts.map +0 -1
- package/dist/services/nlq/nlq-service.d.ts.map +0 -1
- package/dist/singleton-clients.d.ts.map +0 -1
- package/dist/utils/abort-signal.d.ts.map +0 -1
- package/dist/utils/create-custom-fetch.d.ts.map +0 -1
- package/dist/utils/create-serialized-tool-group.d.ts.map +0 -1
- package/dist/utils/create-stream-completion.d.ts.map +0 -1
- package/dist/utils/create-structured-completion.d.ts.map +0 -1
- package/dist/utils/create-tools-completion.d.ts.map +0 -1
- package/dist/utils/dev-debug.d.ts.map +0 -1
- package/dist/utils/http-client.d.ts.map +0 -1
- package/dist/utils/id-utils.d.ts.map +0 -1
- package/dist/utils/llm-client.d.ts.map +0 -1
- package/dist/utils/llm-provider-options.d.ts.map +0 -1
- package/dist/utils/proxy-utils.d.ts.map +0 -1
- package/dist/utils/trusted-base-url.d.ts.map +0 -1
- package/dist/utils/user-action-tracking.d.ts.map +0 -1
- package/dist/utils/utils.d.ts.map +0 -1
- package/dist/utils/zod-utils.d.ts.map +0 -1
package/dist/constants.d.ts
CHANGED
|
@@ -29,4 +29,3 @@ export declare const HEADER_INTERFACE_NAME = "x-interface-name";
|
|
|
29
29
|
export declare const HEADER_FEATURE_NAME = "x-feature-name";
|
|
30
30
|
export declare const HEADER_QUOTA_ID = "x-quota-id";
|
|
31
31
|
export declare const ALLOWED_HEADERS: string[];
|
|
32
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import { ChartSummary, BuildChartContext, buildChartSchema
|
|
1
|
+
import { ChartSummary, BuildChartContext, buildChartSchema } from './types';
|
|
2
2
|
import { default as z } from 'zod/v4';
|
|
3
|
-
/**
|
|
4
|
-
* Build contextual system prompt for build chart
|
|
5
|
-
*/
|
|
6
|
-
export declare function buildContextualSystemPrompt(chartsForContext: ChartContextPromptEntry[], priorChartId?: string, outerQueryId?: string): string;
|
|
7
|
-
/**
|
|
8
|
-
* Standalone build chart engine - completely decoupled from any UI or store
|
|
9
|
-
* @param params - The parameters for the build chart
|
|
10
|
-
* @param context - All external dependencies injected
|
|
11
|
-
* @returns The chart summary
|
|
12
|
-
*/
|
|
13
3
|
export declare function buildChartEngine(params: z.infer<typeof buildChartSchema>, context: BuildChartContext): Promise<ChartSummary>;
|
|
14
|
-
//# sourceMappingURL=build-chart-engine.d.ts.map
|
|
@@ -4,4 +4,3 @@ import { ExtendedChartWidgetProps, BaseChartSummary } from './types';
|
|
|
4
4
|
* Returns `undefined` when `chartState` has not yet been computed (e.g. unsupported chart type).
|
|
5
5
|
*/
|
|
6
6
|
export declare const getBaseChartSummary: (widgetProps: ExtendedChartWidgetProps) => BaseChartSummary | undefined;
|
|
7
|
-
//# sourceMappingURL=build-chart-service.d.ts.map
|
|
@@ -10,17 +10,21 @@ export type AssembleChartWidgetParams = {
|
|
|
10
10
|
columnsJSON: ColumnJSON[];
|
|
11
11
|
title?: string;
|
|
12
12
|
chartTitle: string;
|
|
13
|
+
/** When rebinding, preserve the prior widget entity id. */
|
|
14
|
+
widgetId?: string;
|
|
15
|
+
artifactId?: string;
|
|
13
16
|
};
|
|
14
|
-
export declare const assembleChartWidget: ({ nlqResult, chartType, axesMapping, columnsJSON, title, chartTitle, }: AssembleChartWidgetParams) => ExtendedChartWidgetProps;
|
|
17
|
+
export declare const assembleChartWidget: ({ nlqResult, chartType, axesMapping, columnsJSON, title, chartTitle, widgetId, artifactId, }: AssembleChartWidgetParams) => ExtendedChartWidgetProps;
|
|
15
18
|
/**
|
|
16
19
|
* Assemble a chart widget reusing already-resolved DataOptionsJSON (skips generateChartRecommendations).
|
|
17
20
|
* Returns null when translateChartFromJSON fails, allowing the caller to fall back gracefully.
|
|
18
21
|
*/
|
|
19
|
-
export declare const assembleChartWidgetFromDataOptions: ({ nlqResult, chartType, dataOptions, title, chartTitle, }: {
|
|
22
|
+
export declare const assembleChartWidgetFromDataOptions: ({ nlqResult, chartType, dataOptions, title, chartTitle, widgetId, artifactId, }: {
|
|
20
23
|
nlqResult: QueryExecutionResult;
|
|
21
24
|
chartType: string;
|
|
22
25
|
dataOptions: DataOptionsJSON;
|
|
23
26
|
title?: string;
|
|
24
27
|
chartTitle: string;
|
|
28
|
+
widgetId?: string;
|
|
29
|
+
artifactId?: string;
|
|
25
30
|
}) => ExtendedChartWidgetProps | null;
|
|
26
|
-
//# sourceMappingURL=assemble-chart-widget.d.ts.map
|
|
@@ -24,4 +24,3 @@ export declare function mapAxesToDataOptions<T extends {
|
|
|
24
24
|
* and the already-mapped data options.
|
|
25
25
|
*/
|
|
26
26
|
export declare function assembleChartJSON(queryState: QueryState, chartType: string, dataOptions: DataOptionsJSON): ChartJSON;
|
|
27
|
-
//# sourceMappingURL=chart-json-axes-mapping.d.ts.map
|
|
@@ -7,4 +7,3 @@ import { LanguageModel } from 'ai';
|
|
|
7
7
|
* Column array order defines axis indices; `id` is assigned from position.
|
|
8
8
|
*/
|
|
9
9
|
export declare const generateChartRecommendations: (userPrompt: string, columns: ColumnSummary[] | undefined, chartType: ChartType | undefined, llmClient?: LanguageModel) => Promise<z.infer<typeof chartRecommendationsSchema>>;
|
|
10
|
-
//# sourceMappingURL=generate-chart-recommendations.d.ts.map
|
|
@@ -15,4 +15,3 @@ export type GenerateChartOutput = {
|
|
|
15
15
|
widgetProps: ExtendedChartWidgetProps;
|
|
16
16
|
};
|
|
17
17
|
export declare const generateChart: ({ dataSourceTitle, queryPrompt, chartPrompt, chartType, chartTitle, queryId, priorQueryState, }: GenerateChartParams, context: BuildChartContext) => Promise<GenerateChartOutput>;
|
|
18
|
-
//# sourceMappingURL=generate-chart.d.ts.map
|
|
@@ -12,4 +12,3 @@ export declare function normalizeToStyledColumn(item: unknown): ColumnJSON | nul
|
|
|
12
12
|
export declare function getColumnsJSON(queryState: QueryState): ColumnJSON[];
|
|
13
13
|
export declare function toColumnSummaries(columnsJSON: ColumnJSON[]): ColumnSummary[];
|
|
14
14
|
export declare function columnSummariesFromQueryState(queryState: QueryState): ColumnSummary[];
|
|
15
|
-
//# sourceMappingURL=get-columns-json.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BuildChartContext } from '../types';
|
|
2
|
+
export type RebindChartToQueryParams = {
|
|
3
|
+
priorChartId: string;
|
|
4
|
+
queryId: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const rebindChartToQuery: ({ priorChartId, queryId }: RebindChartToQueryParams, context: BuildChartContext) => Promise<{
|
|
7
|
+
message: string;
|
|
8
|
+
chartState: import('../../..').ChartState | undefined;
|
|
9
|
+
dataset: import('../../..').Dataset | undefined;
|
|
10
|
+
}>;
|
|
@@ -8,4 +8,3 @@ export type ResolveChartQueryParams = {
|
|
|
8
8
|
priorQueryState?: QueryState;
|
|
9
9
|
};
|
|
10
10
|
export declare const resolveChartQuery: ({ dataSourceTitle, queryPrompt, queryId, priorQueryState, }: ResolveChartQueryParams, context: BuildChartContext) => Promise<QueryResult>;
|
|
11
|
-
//# sourceMappingURL=resolve-chart-query.d.ts.map
|
|
@@ -8,4 +8,3 @@ import { ExtendedChartWidgetProps } from './types';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function datasetFromSavedChartWidget(naturalResponseEnabled: boolean | undefined, props: ExtendedChartWidgetProps | null): Dataset | undefined;
|
|
10
10
|
export declare function queryStateFromSavedChartWidget(props: ExtendedChartWidgetProps | null): QueryState | undefined;
|
|
11
|
-
//# sourceMappingURL=dataset-from-saved-chart-widget.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ColumnJSON } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns true when the column set (dimensions + measures) is identical between
|
|
4
|
+
* new and prior queryState — the only change is in filters/highlights.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isFilterOnlyChange(newCols: ColumnJSON[], priorCols: ColumnJSON[]): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ExtendedChartWidgetProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Serializes chartState for tool output while preserving live widget props.
|
|
4
|
+
* translateChartToJSON can mutate dataOptions in place and drop presentation
|
|
5
|
+
* flags such as showOnRightAxis — especially after y2Axis is enabled.
|
|
6
|
+
*/
|
|
7
|
+
export declare function finalizeChartWidgetSave(chartWidgetProps: ExtendedChartWidgetProps): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
|
+
import { axesMappingSchema, ColumnJSON } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* For cartesian charts, moves measure column indices mistakenly placed in breakBy
|
|
5
|
+
* into value so translateChartFromJSON accepts the mapping.
|
|
6
|
+
*/
|
|
7
|
+
export declare function normalizeCartesianAxesMapping(axesMapping: z.infer<typeof axesMappingSchema>, columnsJSON: ColumnJSON[]): z.infer<typeof axesMappingSchema>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ChartDataOptions, StyledMeasureColumn } from '@sisense/sdk-ui';
|
|
2
|
+
import { BaseChartSummary } from '../types';
|
|
3
|
+
export type MeasurePresentationFlags = {
|
|
4
|
+
showOnRightAxis?: boolean;
|
|
5
|
+
color?: StyledMeasureColumn['color'];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Snapshots per-measure presentation flags before translateChartToJSON, which
|
|
9
|
+
* can mutate dataOptions in place and strip showOnRightAxis.
|
|
10
|
+
*/
|
|
11
|
+
export declare function snapshotCartesianMeasureFlags(dataOptions: ChartDataOptions | undefined): Map<string, MeasurePresentationFlags>;
|
|
12
|
+
/**
|
|
13
|
+
* Re-applies presentation flags onto live dataOptions after translateChartToJSON
|
|
14
|
+
* without replacing CSDK class instances (required for CustomSuperJSON).
|
|
15
|
+
*/
|
|
16
|
+
export declare function restoreCartesianMeasureFlags(dataOptions: ChartDataOptions | undefined, flags: Map<string, MeasurePresentationFlags>): void;
|
|
17
|
+
/**
|
|
18
|
+
* Copies per-measure presentation flags from live dataOptions onto chartState
|
|
19
|
+
* after translateChartToJSON, which can drop showOnRightAxis from the summary.
|
|
20
|
+
*/
|
|
21
|
+
export declare function syncChartStateMeasureFlagsFromDataOptions(chartState: BaseChartSummary, dataOptions: ChartDataOptions | undefined): BaseChartSummary;
|
|
@@ -261,12 +261,155 @@ export declare const chartRecommendationsSchema: z.ZodObject<{
|
|
|
261
261
|
* Canonical tool description for buildChart — reusable by any host (sdk-assistant, MCP server, custom integrations).
|
|
262
262
|
* Hosts may append host-specific notes but should not duplicate or contradict this text.
|
|
263
263
|
*/
|
|
264
|
-
export declare const buildChartToolDescription = "Creates or revises a chart
|
|
264
|
+
export declare const buildChartToolDescription = "Creates or revises a chart via a required structured `action` param. For new data, call buildQuery first. Load the buildChart skill via loadSkill before calling this tool \u2014 the skill documents all action types and when to use each. Hosts may append UI notes (e.g. showCanvas).";
|
|
265
|
+
/** JSON-Schema-safe union; run {@link parseActionWithGuards} at execution time. */
|
|
266
|
+
export declare const buildChartActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
267
|
+
type: z.ZodLiteral<"create">;
|
|
268
|
+
queryId: z.ZodString;
|
|
269
|
+
chartType: z.ZodEnum<{
|
|
270
|
+
area: "area";
|
|
271
|
+
table: "table";
|
|
272
|
+
indicator: "indicator";
|
|
273
|
+
column: "column";
|
|
274
|
+
line: "line";
|
|
275
|
+
pie: "pie";
|
|
276
|
+
bar: "bar";
|
|
277
|
+
polar: "polar";
|
|
278
|
+
funnel: "funnel";
|
|
279
|
+
treemap: "treemap";
|
|
280
|
+
sunburst: "sunburst";
|
|
281
|
+
scatter: "scatter";
|
|
282
|
+
areamap: "areamap";
|
|
283
|
+
boxplot: "boxplot";
|
|
284
|
+
scattermap: "scattermap";
|
|
285
|
+
arearange: "arearange";
|
|
286
|
+
}>;
|
|
287
|
+
title: z.ZodString;
|
|
288
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
289
|
+
type: z.ZodLiteral<"update-title">;
|
|
290
|
+
priorChartId: z.ZodString;
|
|
291
|
+
title: z.ZodString;
|
|
292
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
293
|
+
type: z.ZodLiteral<"update-type">;
|
|
294
|
+
priorChartId: z.ZodString;
|
|
295
|
+
chartType: z.ZodEnum<{
|
|
296
|
+
area: "area";
|
|
297
|
+
table: "table";
|
|
298
|
+
indicator: "indicator";
|
|
299
|
+
column: "column";
|
|
300
|
+
line: "line";
|
|
301
|
+
pie: "pie";
|
|
302
|
+
bar: "bar";
|
|
303
|
+
polar: "polar";
|
|
304
|
+
funnel: "funnel";
|
|
305
|
+
treemap: "treemap";
|
|
306
|
+
sunburst: "sunburst";
|
|
307
|
+
scatter: "scatter";
|
|
308
|
+
areamap: "areamap";
|
|
309
|
+
boxplot: "boxplot";
|
|
310
|
+
scattermap: "scattermap";
|
|
311
|
+
arearange: "arearange";
|
|
312
|
+
}>;
|
|
313
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
314
|
+
type: z.ZodLiteral<"rebind-query">;
|
|
315
|
+
priorChartId: z.ZodString;
|
|
316
|
+
queryId: z.ZodString;
|
|
317
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
318
|
+
type: z.ZodLiteral<"update-sorting">;
|
|
319
|
+
priorChartId: z.ZodString;
|
|
320
|
+
userPrompt: z.ZodString;
|
|
321
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
322
|
+
type: z.ZodLiteral<"update-trend-forecast">;
|
|
323
|
+
priorChartId: z.ZodString;
|
|
324
|
+
userPrompt: z.ZodString;
|
|
325
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
326
|
+
type: z.ZodLiteral<"update-style">;
|
|
327
|
+
priorChartId: z.ZodString;
|
|
328
|
+
userPrompt: z.ZodString;
|
|
329
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
330
|
+
type: z.ZodLiteral<"update-data-options">;
|
|
331
|
+
priorChartId: z.ZodString;
|
|
332
|
+
userPrompt: z.ZodString;
|
|
333
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
334
|
+
type: z.ZodLiteral<"update-measure-chart-types">;
|
|
335
|
+
priorChartId: z.ZodString;
|
|
336
|
+
userPrompt: z.ZodString;
|
|
337
|
+
}, z.core.$strip>]>;
|
|
338
|
+
export type BuildChartAction = z.infer<typeof buildChartActionSchema>;
|
|
265
339
|
export declare const buildChartSchema: z.ZodObject<{
|
|
266
340
|
dataSourceTitle: z.ZodString;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
341
|
+
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
342
|
+
type: z.ZodLiteral<"create">;
|
|
343
|
+
queryId: z.ZodString;
|
|
344
|
+
chartType: z.ZodEnum<{
|
|
345
|
+
area: "area";
|
|
346
|
+
table: "table";
|
|
347
|
+
indicator: "indicator";
|
|
348
|
+
column: "column";
|
|
349
|
+
line: "line";
|
|
350
|
+
pie: "pie";
|
|
351
|
+
bar: "bar";
|
|
352
|
+
polar: "polar";
|
|
353
|
+
funnel: "funnel";
|
|
354
|
+
treemap: "treemap";
|
|
355
|
+
sunburst: "sunburst";
|
|
356
|
+
scatter: "scatter";
|
|
357
|
+
areamap: "areamap";
|
|
358
|
+
boxplot: "boxplot";
|
|
359
|
+
scattermap: "scattermap";
|
|
360
|
+
arearange: "arearange";
|
|
361
|
+
}>;
|
|
362
|
+
title: z.ZodString;
|
|
363
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
364
|
+
type: z.ZodLiteral<"update-title">;
|
|
365
|
+
priorChartId: z.ZodString;
|
|
366
|
+
title: z.ZodString;
|
|
367
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
368
|
+
type: z.ZodLiteral<"update-type">;
|
|
369
|
+
priorChartId: z.ZodString;
|
|
370
|
+
chartType: z.ZodEnum<{
|
|
371
|
+
area: "area";
|
|
372
|
+
table: "table";
|
|
373
|
+
indicator: "indicator";
|
|
374
|
+
column: "column";
|
|
375
|
+
line: "line";
|
|
376
|
+
pie: "pie";
|
|
377
|
+
bar: "bar";
|
|
378
|
+
polar: "polar";
|
|
379
|
+
funnel: "funnel";
|
|
380
|
+
treemap: "treemap";
|
|
381
|
+
sunburst: "sunburst";
|
|
382
|
+
scatter: "scatter";
|
|
383
|
+
areamap: "areamap";
|
|
384
|
+
boxplot: "boxplot";
|
|
385
|
+
scattermap: "scattermap";
|
|
386
|
+
arearange: "arearange";
|
|
387
|
+
}>;
|
|
388
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
389
|
+
type: z.ZodLiteral<"rebind-query">;
|
|
390
|
+
priorChartId: z.ZodString;
|
|
391
|
+
queryId: z.ZodString;
|
|
392
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
393
|
+
type: z.ZodLiteral<"update-sorting">;
|
|
394
|
+
priorChartId: z.ZodString;
|
|
395
|
+
userPrompt: z.ZodString;
|
|
396
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
397
|
+
type: z.ZodLiteral<"update-trend-forecast">;
|
|
398
|
+
priorChartId: z.ZodString;
|
|
399
|
+
userPrompt: z.ZodString;
|
|
400
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
401
|
+
type: z.ZodLiteral<"update-style">;
|
|
402
|
+
priorChartId: z.ZodString;
|
|
403
|
+
userPrompt: z.ZodString;
|
|
404
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
405
|
+
type: z.ZodLiteral<"update-data-options">;
|
|
406
|
+
priorChartId: z.ZodString;
|
|
407
|
+
userPrompt: z.ZodString;
|
|
408
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
409
|
+
type: z.ZodLiteral<"update-measure-chart-types">;
|
|
410
|
+
priorChartId: z.ZodString;
|
|
411
|
+
userPrompt: z.ZodString;
|
|
412
|
+
}, z.core.$strip>]>;
|
|
270
413
|
}, z.core.$strip>;
|
|
271
414
|
export declare const createChartSchema: z.ZodObject<{
|
|
272
415
|
queryPrompt: z.ZodString;
|
|
@@ -397,4 +540,3 @@ export interface BuildChartContext {
|
|
|
397
540
|
/** ID of a prior query result when this chart uses that query; otherwise null/undefined */
|
|
398
541
|
queryId?: string | null;
|
|
399
542
|
}
|
|
400
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -7,4 +7,3 @@ import { ExtendedChartWidgetProps } from '../types';
|
|
|
7
7
|
* names that may no longer exist after structural changes (add/remove/swap dimensions).
|
|
8
8
|
*/
|
|
9
9
|
export declare function applyPriorChartStyle(widgetProps: ExtendedChartWidgetProps, priorChart: ExtendedChartWidgetProps): void;
|
|
10
|
-
//# sourceMappingURL=apply-prior-chart-style.d.ts.map
|
|
@@ -2891,4 +2891,3 @@ export declare const tableDataOptionsEditingSchemas: z.ZodObject<{
|
|
|
2891
2891
|
export declare const getChartDataOptionsEditingSchemas: (chartType: ChartType) => z.ZodObject<{}, z.core.$strip>;
|
|
2892
2892
|
export declare const chartDataOptionsSchemas: Partial<Record<ChartType, z.ZodObject<any>>>;
|
|
2893
2893
|
export {};
|
|
2894
|
-
//# sourceMappingURL=chart-options-schemas.d.ts.map
|
|
@@ -10,4 +10,3 @@ export interface BuildCsvModelProgressSnapshot {
|
|
|
10
10
|
relations?: BuiltRelation[];
|
|
11
11
|
}
|
|
12
12
|
export declare function buildCsvModelEngine(params: z.infer<typeof buildCsvModelParamsSchema>, context: CsvModelEngineContext, onProgress?: (phase: string, detail?: string, snapshot?: BuildCsvModelProgressSnapshot) => void): Promise<BuildCsvModelResult>;
|
|
13
|
-
//# sourceMappingURL=build-csv-model-engine.d.ts.map
|
|
@@ -4,4 +4,3 @@ export { buildCsvModelEngine } from './build-csv-model-engine';
|
|
|
4
4
|
export type { BuildCsvModelProgressSnapshot } from './build-csv-model-engine';
|
|
5
5
|
export { inferRelations } from './infer-relations';
|
|
6
6
|
export { triggerFullBuild, pollBuild } from './rest-build';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,6 +2,25 @@ import { HttpClient } from '@sisense/sdk-rest-client';
|
|
|
2
2
|
export declare function triggerFullBuild(datamodelOid: string, httpClient?: HttpClient): Promise<{
|
|
3
3
|
buildOid: string;
|
|
4
4
|
}>;
|
|
5
|
+
export interface WaitForSchemaResult {
|
|
6
|
+
ready: boolean;
|
|
7
|
+
tablesFound: number;
|
|
8
|
+
relationsFound: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Block until the model's schema reflects all expected tables and relations (or
|
|
12
|
+
* the timeout elapses). Returns `ready: false` on timeout so the caller can
|
|
13
|
+
* still attempt the build rather than hang forever.
|
|
14
|
+
*/
|
|
15
|
+
export declare function waitForSchemaPersisted(datamodelOid: string, expected: {
|
|
16
|
+
tableOids: string[];
|
|
17
|
+
relationOids: string[];
|
|
18
|
+
}, options?: {
|
|
19
|
+
intervalMs?: number;
|
|
20
|
+
timeoutMs?: number;
|
|
21
|
+
httpClient?: HttpClient;
|
|
22
|
+
onUpdate?: (detail: string) => void;
|
|
23
|
+
}): Promise<WaitForSchemaResult>;
|
|
5
24
|
export interface PollBuildResult {
|
|
6
25
|
status: 'done' | 'failed' | 'timeout';
|
|
7
26
|
durationMs: number;
|
|
@@ -9,7 +28,13 @@ export interface PollBuildResult {
|
|
|
9
28
|
export declare function pollBuild(buildOid: string, options?: {
|
|
10
29
|
intervalMs?: number;
|
|
11
30
|
timeoutMs?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Delay before the FIRST status check. POST /builds returns an oid before
|
|
33
|
+
* the build row is queryable — GET /builds/{oid} 400s with "BE#983754 Data
|
|
34
|
+
* source not found for build id" for the first few seconds. Wait this long
|
|
35
|
+
* before polling so the first request lands after the row exists.
|
|
36
|
+
*/
|
|
37
|
+
initialDelayMs?: number;
|
|
12
38
|
onUpdate?: (status: string) => void;
|
|
13
39
|
httpClient?: HttpClient;
|
|
14
40
|
}): Promise<PollBuildResult>;
|
|
15
|
-
//# sourceMappingURL=rest-build.d.ts.map
|
|
@@ -4,7 +4,7 @@ import { HttpClient } from '@sisense/sdk-rest-client';
|
|
|
4
4
|
* Canonical tool description for uploadFiles — reusable by any host (sdk-assistant, MCP server, custom integrations).
|
|
5
5
|
* Hosts may append host-specific notes but should not duplicate or contradict this text.
|
|
6
6
|
*/
|
|
7
|
-
export declare const uploadFilesToolDescription = "Opens the host's file-upload flow so the user can provide one or more CSV files. When the host uses a blocking UI, this should be the ONLY tool call in that turn until the user completes the upload \u2014 do not chain other tools in parallel.\n\nUse when the user wants to upload, ingest, import, or onboard raw files into a new Elasticube model.\n\nOnboarding pace: start this step alone; after files are uploaded, agree on a model title with the user in chat before calling buildDataModelFromUploads \u2014 do not rush multiple structural steps in one assistant turn when the workflow expects the user to confirm between steps.\n\nAfter this tool returns successfully, propose a model title derived from the file names and ask the user to confirm or change it before calling buildDataModelFromUploads.\n\nReply format (REQUIRED \u2014 output exactly these four lines, verbatim aside from substituting the proposed name; no extra preamble, no closing sentence, no paraphrasing, no translation, no icons, no headings, no blockquotes, no code fences, no bullets, no extra blank lines):\n\nYour files uploaded successfully\n**Let's set up your data model**\nSuggested name: **<Proposed Model Name>**\nThis name is permanent. If it's already taken, a number will be added at the end automatically.\n\nRules:\n- Each of the first three lines MUST end with exactly two trailing space characters before the newline (CommonMark hard line break). The four lines must therefore render stacked tightly, one per line, with no paragraph gaps. The last line has no trailing spaces.\n- Bold (**\u2026**) appears in exactly two places: the entire second line, and the model-name token on the third line. Nowhere else.\n- All four lines render at the SAME size \u2014 never promote any line to a heading.\n- Substitute <Proposed Model Name> with the title derived from the file names; keep the surrounding ** so it renders bold.\nWait for the user to confirm or change the name before calling buildDataModelFromUploads.";
|
|
7
|
+
export declare const uploadFilesToolDescription = "Opens the host's file-upload flow so the user can provide one or more CSV files. When the host uses a blocking UI, this should be the ONLY tool call in that turn until the user completes the upload \u2014 do not chain other tools in parallel.\n\nUse when the user wants to upload, ingest, import, or onboard raw files into a new Elasticube model.\n\nCALL THIS TOOL IMMEDIATELY, as the FIRST action, the moment the user expresses intent to upload / import / onboard data files or build a model from files (e.g. \"I want to upload data files and build a model\") \u2014 even though no file is attached yet. THIS TOOL IS the upload surface: invoking it opens the file picker. Do NOT reply with text asking the user to attach or upload files via the chat input or paperclip \u2014 that is the wrong response and leaves the user with no upload UI. Open the tool; don't describe it.\n\nOnboarding pace: start this step alone; after files are uploaded, agree on a model title with the user in chat before calling buildDataModelFromUploads \u2014 do not rush multiple structural steps in one assistant turn when the workflow expects the user to confirm between steps.\n\nAfter this tool returns successfully, propose a model title derived from the file names and ask the user to confirm or change it before calling buildDataModelFromUploads.\n\nReply format (REQUIRED \u2014 output exactly these four lines, verbatim aside from substituting the proposed name; no extra preamble, no closing sentence, no paraphrasing, no translation, no icons, no headings, no blockquotes, no code fences, no bullets, no extra blank lines):\n\nYour files uploaded successfully\n**Let's set up your data model**\nSuggested name: **<Proposed Model Name>**\nThis name is permanent. If it's already taken, a number will be added at the end automatically.\n\nRules:\n- Each of the first three lines MUST end with exactly two trailing space characters before the newline (CommonMark hard line break). The four lines must therefore render stacked tightly, one per line, with no paragraph gaps. The last line has no trailing spaces.\n- Bold (**\u2026**) appears in exactly two places: the entire second line, and the model-name token on the third line. Nowhere else.\n- All four lines render at the SAME size \u2014 never promote any line to a heading.\n- Substitute <Proposed Model Name> with the title derived from the file names; keep the surrounding ** so it renders bold.\nWait for the user to confirm or change the name before calling buildDataModelFromUploads.";
|
|
8
8
|
/**
|
|
9
9
|
* Canonical tool description for buildDataModelFromUploads — reusable by any host (sdk-assistant, MCP server, custom integrations).
|
|
10
10
|
* Hosts may append host-specific notes but should not duplicate or contradict this text.
|
|
@@ -71,4 +71,3 @@ export interface CsvModelEngineContext {
|
|
|
71
71
|
toolCallId: string;
|
|
72
72
|
httpClient?: HttpClient;
|
|
73
73
|
}
|
|
74
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -2,4 +2,3 @@ import { AddDashboardFiltersParams, BuildDashboardContext } from './types';
|
|
|
2
2
|
export declare const addDashboardFilters: ({ dashboardId, userPrompt }: AddDashboardFiltersParams, context: BuildDashboardContext) => Promise<{
|
|
3
3
|
message: string;
|
|
4
4
|
}>;
|
|
5
|
-
//# sourceMappingURL=add-dashboard-filters.d.ts.map
|
|
@@ -2,4 +2,3 @@ import { AddDashboardWidgetsParams, BuildDashboardContext } from './types';
|
|
|
2
2
|
export declare const addDashboardWidgets: ({ dashboardId, widgetIdsToAdd }: AddDashboardWidgetsParams, context: BuildDashboardContext) => Promise<{
|
|
3
3
|
message: string;
|
|
4
4
|
}>;
|
|
5
|
-
//# sourceMappingURL=add-dashboard-widgets.d.ts.map
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
import { BuildDashboardContext,
|
|
2
|
-
import { ChartSummary } from '../build-chart/types';
|
|
1
|
+
import { BuildDashboardContext, DashboardSummary, buildDashboardSchema } from './types';
|
|
3
2
|
import { default as z } from 'zod/v4';
|
|
4
|
-
export declare function buildContextualSystemPrompt(chartSummaries: ChartSummary[], chartListSummaries: ChartListSummary[], dashboardsForContext: DashboardContextPromptEntry[], priorDashboardId?: string): string;
|
|
5
|
-
/**
|
|
6
|
-
* Standalone build dashboard engine - completely decoupled from any UI or store
|
|
7
|
-
* @param params - The parameters for the build dashboard
|
|
8
|
-
* @param context - All external dependencies injected
|
|
9
|
-
* @returns The dashboard summary
|
|
10
|
-
*/
|
|
11
3
|
export declare function buildDashboardEngine(params: z.infer<typeof buildDashboardSchema>, context: BuildDashboardContext): Promise<DashboardSummary>;
|
|
12
|
-
//# sourceMappingURL=build-dashboard-engine.d.ts.map
|
|
@@ -4,4 +4,3 @@ import { BaseDashboardSummary, ExtendedDashboardProps } from './types';
|
|
|
4
4
|
* Returns `undefined` when `dashboardState` has not yet been computed.
|
|
5
5
|
*/
|
|
6
6
|
export declare const getBaseDashboardSummary: (dashboardProps: ExtendedDashboardProps) => BaseDashboardSummary | undefined;
|
|
7
|
-
//# sourceMappingURL=build-dashboard-service.d.ts.map
|
|
@@ -2,4 +2,3 @@ import { CreateDashboardParams, BuildDashboardContext } from './types';
|
|
|
2
2
|
export declare const createDashboard: ({ dashboardTitle, widgetIdsToAdd }: CreateDashboardParams, context: BuildDashboardContext) => Promise<{
|
|
3
3
|
message: string;
|
|
4
4
|
}>;
|
|
5
|
-
//# sourceMappingURL=create-dashboard.d.ts.map
|
|
@@ -1,2 +1 @@
|
|
|
1
1
|
export declare const FILTER_FACTORY_TYPES: "import {\n\tDateDimension,\n\tLevelAttribute,\n\tAttribute,\n\tMeasure,\n\tFilter,\n\tBaseMeasure,\n\tFilterRelationsNode,\n\tFilterRelations,\n\tMembersFilterConfig,\n\tBaseFilterConfig,\n} from '../interfaces.js';\n/**\n * Creates a filter representing the union of multiple filters on the same attribute. The resulting\n * union filter filters on items that match any of the given filters.\n *\n * To create 'or' filters using different attributes, use the {@link logic.and | `or()`} function.\n *\n * @example\n * Filter for countries that start with the letter 'A' **or** end with the letter 'A'\n * in the Sample ECommerce data model.\n * ```ts\n * filterFactory.union([\n * filterFactory.startsWith(DM.Country.Country, 'A'),\n * filterFactory.endsWith(DM.Country.Country, 'A'),\n * ])\n * ```\n * @param filters - Filters to union. The filters must all be on the same attribute.\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function union(filters: Filter[], config?: BaseFilterConfig): Filter;\n/**\n * Creates a filter representing the intersection of multiple filters on the same attribute. The resulting\n * intersection filter filters on items that match all of the given filters.\n *\n * To create 'and' filters using different attributes, use the {@link logic.and | `and()`} function.\n *\n * @example\n * Filter for countries that start with the letter 'A' **and** end with the letter 'A'\n * in the Sample ECommerce data model.\n * ```ts\n * filterFactory.intersection([\n * filterFactory.startsWith(DM.Country.Country, 'A'),\n * filterFactory.endsWith(DM.Country.Country, 'A'),\n * ])\n * ```\n * @param filters - Filters to intersect. The filters must all be on the same attribute.\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function intersection(filters: Filter[], config?: BaseFilterConfig): Filter;\n/**\n * Creates a filter that excludes items matching the given filter\n * from all items or from items matching the optional input filter.\n *\n * @example\n * Filter for items where the country name does not contain the letter 'A'\n * from the Sample ECommerce data model.\n * ```ts\n * filterFactory.exclude(filterFactory.contains(DM.Country.Country, 'A'))\n * ```\n *\n * Filter for items where the country name starts with the letter 'B' but does not contain the letter 'A'\n * from the Sample ECommerce data model. This filter will match countries like 'Belgium', but will not\n * match countries like 'Bermuda'.\n * ```ts\n * filterFactory.exclude(\n * filterFactory.contains(DM.Country.Country, 'A'),\n * filterFactory.startsWith(DM.Country.Country, 'B')\n * )\n * ```\n * @param filter - Filter to exclude\n * @param input - Input filter to exclude from, on the same attribute. If not provided, the filter excludes from all items.\n * @param config - Optional configuration for the filter\n * @returns A filter representing an exclusion of the given filter\n * from all attribute members or from the optional input filter\n */\nexport declare function exclude(filter: Filter, input?: Filter, config?: BaseFilterConfig): Filter;\n/**\n * Creates a filter to isolate attribute values that do not contain a specified string.\n *\n * Matching is case insensitive.\n *\n * You can optionally use wildcard characters for pattern matching, as described in the\n * {@link like | `like()`} function.\n *\n * @example\n * Filter for categories in the Sample ECommerce data model where the category name doesn't contain\n * 'digital'. This filter matches categories not like 'Digital Cameras' and 'MP3 & Digital Media Players'.\n * ```ts\n * filterFactory.contains(DM.Category.Category, 'digital')\n * ```\n * @param attribute - Text attribute to filter on\n * @param value - Value to filter by\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function doesntContain(\n\tattribute: Attribute,\n\tvalue: string,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate attribute values that do not end with a specified string.\n *\n * Matching is case insensitive.\n *\n * You can optionally use wildcard characters for pattern matching, as described in the\n * {@link like | `like()`} function.\n *\n * @example\n * Filter for countries in the Sample ECommerce data model where the country name doesn't end with\n * 'land'. This filter matches countries not like 'Iceland' and 'Ireland'.\n * ```ts\n * filterFactory.doesntEndWith(DM.Country.Country, 'land')\n * ```\n * @param attribute - Text attribute to filter on\n * @param value - Value to filter by\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function doesntEndWith(\n\tattribute: Attribute,\n\tvalue: string,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate attribute values that do not start with a specified string.\n *\n * Matching is case insensitive.\n *\n * You can optionally use wildcard characters for pattern matching, as described in the\n * {@link like | `like()`} function.\n *\n * @example\n * Filter for countries in the Sample ECommerce data model where the country name doesn't start with\n * 'United'. This filter matches countries not like 'United States' and 'United Kingdom'.\n * ```ts\n * filterFactory.doesntStartWith(DM.Country.Country, 'United')\n * ```\n * @param attribute - Text attribute to filter on\n * @param value - Value to filter by\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function doesntStartWith(\n\tattribute: Attribute,\n\tvalue: string,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate attribute values that contain a specified string.\n *\n * Matching is case insensitive.\n *\n * You can optionally use wildcard characters for pattern matching, as described in the\n * {@link like | `like()`} function.\n *\n * @example\n * Filter for categories in the Sample ECommerce data model where the category name contains\n * 'digital'. This filter matches categories like 'Digital Cameras' and 'MP3 & Digital Media Players'.\n * ```ts\n * filterFactory.contains(DM.Category.Category, 'digital')\n * ```\n * @param attribute - Text attribute to filter on\n * @param value - Value to filter by\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function contains(\n\tattribute: Attribute,\n\tvalue: string,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate attribute values that end with a specified string.\n *\n * Matching is case insensitive.\n *\n * You can optionally use wildcard characters for pattern matching, as described in the\n * {@link like | `like()`} function.\n *\n * @example\n * Filter for countries in the Sample ECommerce data model where the country name ends with\n * 'land'. This filter matches countries like 'Ireland' and 'Iceland'.\n * ```ts\n * filterFactory.endsWith(DM.Country.Country, 'land')\n * ```\n * @param attribute - Text attribute to filter on\n * @param value - Value to filter by\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function endsWith(\n\tattribute: Attribute,\n\tvalue: string,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate attribute values that start with a specified string.\n *\n * Matching is case insensitive.\n *\n * You can optionally use wildcard characters for pattern matching, as described in the\n * {@link like | `like()`} function.\n *\n * @example\n * Filter for countries in the Sample ECommerce data model where the country name starts with\n * 'United'. This filter matches countries like 'United States' and 'United Kingdom'.\n * ```ts\n * filterFactory.startsWith(DM.Country.Country, 'United')\n * ```\n * @param attribute - Text attribute to filter on\n * @param value - Value to filter by\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function startsWith(\n\tattribute: Attribute,\n\tvalue: string,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate attribute values that match a specified string pattern.\n *\n * The pattern can include the following wildcard characters:\n *\n * + `_`: Matches a single character\n * + `%`: Matches multiple characters\n *\n * To search for a literal underscore (`_`) or percent symbol (`%`), use the backslash (`\\`) escape\n * character.\n *\n * Matching is case insensitive.\n *\n * @example\n * Filter for countries from the Sample ECommerce data model where the country name starts with an\n * 'A' and ends with an 'a'. This filter matches countries like 'Argentina' and 'Australia'.\n * ```ts\n * filterFactory.like(DM.Country.Country, 'A%a')\n * ```\n * @param attribute - Text attribute to filter on\n * @param value - Value to filter by\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function like(\n\tattribute: Attribute,\n\tvalue: string,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate attribute values that do not equal a specified string or number.\n *\n * When filtering against a string:\n *\n * + Matching is case insensitive.\n * + You can optionally use wildcard characters for pattern matching, as described in the\n * {@link like | `like()`} function.\n *\n * @example\n * Filter for items not in new condition from the Sample ECommerce data model.\n * ```ts\n * filterFactory.doesntEqual(DM.Commerce.Condition, 'New')\n * ```\n * @param attribute - Text or numeric attribute to filter on\n * @param value - Value to filter by\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function doesntEqual(\n\tattribute: Attribute,\n\tvalue: string | number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate attribute values that equal a specified string or number.\n *\n * When filtering against a string:\n *\n * + Matching is case insensitive.\n * + You can optionally use wildcard characters for pattern matching, as described in the\n * {@link like | `like()`} function.\n *\n * @example\n * Filter for items in new condition from the Sample ECommerce data model.\n * ```ts\n * filterFactory.equals(DM.Commerce.Condition, 'New')\n * ```\n * @param attribute - Text or numeric attribute to filter on\n * @param value - Value to filter by\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function equals(\n\tattribute: Attribute,\n\tvalue: string | number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate attribute values strictly greater than a specified number.\n *\n * @example\n * Filter for items where the cost is greater than 100 from the Sample ECommerce data model.\n * ```ts\n * filterFactory.greaterThan(DM.Commerce.Cost, 100)\n * ```\n * @param attribute - Numeric attribute to filter on\n * @param value - Value to filter by\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function greaterThan(\n\tattribute: Attribute,\n\tvalue: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate attribute values greater than or equal to a specified number.\n *\n * @example\n * Filter for items where the cost is greater than or equal to 100 from the Sample ECommerce data model.\n * ```ts\n * filterFactory.greaterThanOrEqual(DM.Commerce.Cost, 100)\n * ```\n * @param attribute - Numeric attribute to filter on\n * @param value - Value to filter by\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function greaterThanOrEqual(\n\tattribute: Attribute,\n\tvalue: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate attribute values strictly less than a specified number.\n *\n * @example\n * Filter for items where the cost is less than 100 from the Sample ECommerce data model.\n * ```ts\n * filterFactory.lessThan(DM.Commerce.Cost, 100)\n * ```\n * @param attribute - Numeric attribute to filter on\n * @param value - Value to filter by\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function lessThan(\n\tattribute: Attribute,\n\tvalue: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate attribute values less than or equal to a specified number.\n *\n * @example\n * Filter for items where the cost is less than or equal to 100 from the Sample ECommerce data model.\n * ```ts\n * filterFactory.lessThanOrEqual(DM.Commerce.Cost, 100)\n * ```\n * @param attribute - Numeric attribute to filter on\n * @param value - Value to filter by\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function lessThanOrEqual(\n\tattribute: Attribute,\n\tvalue: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate attribute values within or exactly matching two specified numerical boundaries.\n *\n * @example\n * Filter for items from the Sample ECommerce data model where the cost is greater than or equal to 100 and less than or equal to 200.\n * ```ts\n * filterFactory.between(DM.Commerce.Cost, 100, 200)\n * ```\n * @param attribute - Numeric attribute to filter on\n * @param valueA - Value to filter from\n * @param valueB - Value to filter to\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function between(\n\tattribute: Attribute,\n\tvalueA: number,\n\tvalueB: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter that isolates attribute values strictly within two specified numerical boundaries.\n *\n * @example\n * Filter for items from the Sample ECommerce data model where the cost is greater than 100 and less than 200.\n * ```ts\n * filterFactory.betweenNotEqual(DM.Commerce.Cost, 100, 200)\n * ```\n * @param attribute - Numeric attribute to filter on\n * @param valueA - Value to filter from\n * @param valueB - Value to filter to\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function betweenNotEqual(\n\tattribute: Attribute,\n\tvalueA: number,\n\tvalueB: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a custom numeric filter that filters for given attribute values.\n *\n * @example\n * Filter for items where the cost is greater than 100 and less than 200\n * from the Sample ECommerce data model.\n * ```ts\n * filterFactory.numeric(\n * DM.Commerce.Cost,\n * NumericOperators.From,\n * 100,\n * NumericOperators.To,\n * 200\n * )\n * ```\n * @param attribute - Numeric attribute to filter\n * @param operatorA - First operator\n * @param valueA - First value\n * @param operatorB - Second operator\n * @param valueB - Second value\n * @param config - Optional configuration for the filter\n * @returns A custom numeric filter of the given attribute\n */\nexport declare function numeric(\n\tattribute: Attribute,\n\toperatorA?: string,\n\tvalueA?: number,\n\toperatorB?: string,\n\tvalueB?: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate attribute values that match any of the specified strings.\n *\n * Matching is case sensitive.\n *\n * @example\n * Filter for items where the condition is 'Used' or 'Refurbished'\n * from the Sample ECommerce data model.\n * ```ts\n * filterFactory.members(DM.Commerce.Condition, ['Used', 'Refurbished'])\n * ```\n * @param attribute - Attribute to filter on\n * @param members - Array of member values to filter by\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n * @shortDescription Creates filter on attribute to match certain string values\n */\nexport declare function members(\n\tattribute: Attribute,\n\tmembers: string[],\n\tconfig?: MembersFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate date values starting from and including the given date and level.\n *\n * @example\n * Filter for items in the Sample ECommerce data model where the date is not before the year 2010.\n * ```ts\n * filterFactory.dateFrom(DM.Commerce.Date.Years, '2010-01')\n * ```\n * @param level - Date {@link LevelAttribute} to filter on\n * @param from - Date or string representing the value to filter from\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function dateFrom(\n\tlevel: LevelAttribute,\n\tfrom: Date | string,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate items up until and including the given date and level.\n *\n * @example\n * Filter for items where the date is from the year 2010 or earlier in the Sample ECommerce data model.\n * ```ts\n * filterFactory.dateTo(DM.Commerce.Date.Years, '2010-01')\n * ```\n * @param level - Date {@link LevelAttribute} to filter on\n * @param to - Date or string representing the last member to filter to\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function dateTo(\n\tlevel: LevelAttribute,\n\tto: Date | string,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate items between and including the given dates and level.\n *\n * @example\n * Filter for items in the Sample ECommerce data model where the date is from the years 2009, 2010, or 2011.\n * ```ts\n * filterFactory.dateRange(DM.Commerce.Date.Years, '2009-01', '2011-01')\n * ```\n * @param level - Date {@link LevelAttribute} to filter on\n * @param from - Date or string representing the start member to filter from\n * @param to - Date or string representing the end member to filter to\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function dateRange(\n\tlevel: LevelAttribute,\n\tfrom?: Date | string,\n\tto?: Date | string,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate items with a date dimension value within a specified range after a\n * given date and level.\n *\n * Although the `offset` can be used to set a beginning date prior to the `anchor`, the filter range always\n * continues forward after the offset beginning date. So, using an `offset` of `-6` and a `count` of `18` when `level`\n * is a month level creates a range that begins 6 month before the `anchor` date and extends to 12 months after\n * the `anchor` date.\n *\n * @example\n * Filter for items in the Sample ECommerce data model where the date is in 2011 or the first half of 2012.\n * ```ts\n * filterFactory.dateRelative(DM.Commerce.Date.Months, 0, 18, '2011-01'),\n * ```\n *\n * Filter for items in the Sample ECommerce data model where the date is in the second half of 2010 or in 2011.\n * ```ts\n * filterFactory.dateRelative(DM.Commerce.Date.Months, -6, 18, '2011-01'),\n * ```\n *\n * Filter for items in the Sample ECommerce data model where the date is in the past 6 months.\n * ```ts\n * filterFactory.dateRelative(DM.Commerce.Date.Months, -6, 6),\n * ```\n * @param level - Date {@link LevelAttribute} to filter on\n * @param offset - Number of levels to skip from the given `anchor` or the default of the current day.\n * Positive numbers skip forwards and negative numbers skip backwards (e.g. `-6` is 6 months backwards when `level` is a months level attribute)\n * @param count - Number of levels to include in the filter (e.g. `6` is 6 months when `level` is a months level attribute)\n * @param anchor - Date to filter from, defaults to the current day\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function dateRelative(\n\tlevel: LevelAttribute,\n\toffset: number,\n\tcount: number,\n\tanchor?: Date | string,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate items with a date dimension value within a specified range after a\n * given date and level.\n *\n * @example\n * Filter for items in the Sample ECommerce data model where the date is in 2011 or the first half of 2012.\n * ```ts\n * filterFactory.dateRelativeFrom(DM.Commerce.Date.Months, 0, 18, '2011-01'),\n * ```\n * @param level - Date {@link LevelAttribute} to filter on\n * @param offset - Number of levels to skip from the given `anchor` or the default of the current day (e.g. `6` is 6 months when `level` is a months level attribute)\n * @param count - Number of levels to include in the filter (e.g. `6` is 6 months when `level` is a months level attribute)\n * @param anchor - Date to filter from, defaults to the current day\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function dateRelativeFrom(\n\tlevel: LevelAttribute,\n\toffset: number,\n\tcount: number,\n\tanchor?: Date | string,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate items with a date dimension value within a specified range before a\n * given date and level.\n *\n * @example\n * Filter for items in the Sample ECommerce data model where the date is in the first half of 2010 or in 2011.\n * ```ts\n * filterFactory.dateRelativeTo(DM.Commerce.Date.Months, 0, 18, '2011-12'),\n * ```\n * @param level - Date {@link LevelAttribute} to filter on\n * @param offset - Number of levels to skip from the given `anchor` or the default of the current day (e.g. `6` is 6 months when `level` is a months level attribute)\n * @param count - Number of levels to include in the filter (e.g. `6` is 6 months when `level` is a months level attribute)\n * @param anchor - Date to filter to, defaults to the current day\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function dateRelativeTo(\n\tlevel: LevelAttribute,\n\toffset: number,\n\tcount: number,\n\tanchor?: Date | string,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate items with a date dimension value in the current calendar year.\n *\n * @example\n * Filter for items where the date is in the current calendar year in the Sample ECommerce data model.\n * ```ts\n * filterFactory.thisYear(DM.Commerce.Date)\n * ```\n * @param dimension - Date dimension to filter\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function thisYear(dimension: DateDimension, config?: BaseFilterConfig): Filter;\n/**\n * Creates a filter to isolate items with a date dimension value in the current calendar month.\n *\n * @example\n * Filter for items where the date is in the current calendar month in the Sample ECommerce data model.\n * ```ts\n * filterFactory.thisMonth(DM.Commerce.Date)\n * ```\n * @param dimension - Date dimension to filter\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function thisMonth(dimension: DateDimension, config?: BaseFilterConfig): Filter;\n/**\n * Creates a filter to isolate items with a date dimension value in the current quarter.\n *\n * @example\n * Filter for items where the date is in the current quarter in the Sample ECommerce data model.\n * ```ts\n * filterFactory.thisQuarter(DM.Commerce.Date)\n * ```\n * @param dimension - Date dimension to filter\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function thisQuarter(dimension: DateDimension, config?: BaseFilterConfig): Filter;\n/**\n * Creates a filter to isolate items with a date dimension value of the current date.\n *\n * @example\n * Filter for items where the date is today in the Sample ECommerce data model.\n * ```ts\n * filterFactory.today(DM.Commerce.Date)\n * ```\n * @param dimension - date dimension to filter\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function today(dimension: DateDimension, config?: BaseFilterConfig): Filter;\n/**\n * Creates a filter on all measure values matching the provided criteria.\n *\n * @param attribute - Attribute to filter\n * @param measure - Measure to filter by\n * @param operatorA - Operator to apply on `valueA` ({@link NumericOperators})\n * @param valueA - First value\n * @param operatorB - Operator to apply on `valueB` ({@link NumericOperators})\n * @param valueB - Second value\n * @param config - Optional configuration for the filter\n * @returns A filter representing the provided logic\n * @internal\n */\nexport declare function measureBase(\n\tattribute: Attribute,\n\tmeasure: Measure,\n\toperatorA?: string,\n\tvalueA?: number,\n\toperatorB?: string,\n\tvalueB?: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate a measure value equal to a given number.\n *\n * @example\n * Filter for categories that have an average revenue equal 50 in the Sample ECommerce data model.\n * ```ts\n * filterFactory.measureEquals(\n * measureFactory.average(DM.Commerce.Revenue),\n * 50\n * )\n * ```\n * @param measure - Measure to filter by\n * @param value - Value\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function measureEquals(\n\tmeasure: BaseMeasure,\n\tvalue: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate a measure value greater than to a given number.\n *\n * @example\n * Filter for categories that have an average revenue greater than\n * to 50 in the Sample ECommerce data model.\n * ```ts\n * filterFactory.measureGreaterThan(\n * measureFactory.average(DM.Commerce.Revenue),\n * 50\n * )\n * ```\n * @param measure - Measure to filter by\n * @param value - Min value\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function measureGreaterThan(\n\tmeasure: BaseMeasure,\n\tvalue: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate a measure value greater than or equal to a given number.\n *\n * @example\n * Filter for categories that have an average revenue greater than\n * or equal to 50 in the Sample ECommerce data model.\n * ```ts\n * filterFactory.measureGreaterThanOrEqual(\n * measureFactory.average(DM.Commerce.Revenue),\n * 50\n * )\n * ```\n * @param measure - Measure to filter by\n * @param value - Min value\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function measureGreaterThanOrEqual(\n\tmeasure: BaseMeasure,\n\tvalue: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate a measure value less than or equal to a given number.\n *\n * @example\n * Filter for categories that have an average revenue less than\n * or equal to 100 in the Sample ECommerce data model.\n * ```ts\n * filterFactory.measureLessThanOrEqual(\n * measureFactory.average(DM.Commerce.Revenue),\n * 100\n * )\n * ```\n * @param measure - Measure to filter by\n * @param value - Max value\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function measureLessThanOrEqual(\n\tmeasure: BaseMeasure,\n\tvalue: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate a measure value less than a given number.\n *\n * @example\n * Filter for categories that have an average revenue less than 100 in the Sample ECommerce data model.\n * ```ts\n * filterFactory.measureLessThan(\n * measureFactory.average(DM.Commerce.Revenue),\n * 100\n * )\n * ```\n * @param measure - Measure to filter by\n * @param value - Value\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function measureLessThan(\n\tmeasure: BaseMeasure,\n\tvalue: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate a measure value between or equal to two given numbers.\n *\n * @example\n * Filter for categories that have an average revenue greater than or equal to 50 and less than\n * or equal to 100 in the Sample ECommerce data model.\n * ```ts\n * filterFactory.measureBetween(\n * measureFactory.average(DM.Commerce.Revenue),\n * 50,\n * 100\n * )\n * ```\n * @param measure - Measure to filter by\n * @param valueA - Min value\n * @param valueB - Max value\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function measureBetween(\n\tmeasure: BaseMeasure,\n\tvalueA: number,\n\tvalueB: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate a measure value between but not equal to two given numbers.\n *\n * @example\n * Filter for categories that have an average revenue greater than 50 and less than\n * 100 in the Sample ECommerce data model.\n * ```ts\n * filterFactory.measureBetweenNotEqual(\n * measureFactory.average(DM.Commerce.Revenue),\n * 50,\n * 100\n * )\n * ```\n * @param measure - Measure to filter by\n * @param valueA - Min value\n * @param valueB - Max value\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function measureBetweenNotEqual(\n\tmeasure: BaseMeasure,\n\tvalueA: number,\n\tvalueB: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate items that rank towards the top for a given measure.\n *\n * @example\n * Filter for age ranges with the top 3 highest total revenue in the Sample ECommerce data model.\n * ```ts\n * filterFactory.topRanking(\n * DM.Commerce.AgeRange,\n * measureFactory.sum(DM.Commerce.Revenue),\n * 3\n * )\n * ```\n * @param attribute - Attribute to filter\n * @param measure - Measure to filter by\n * @param count - Number of members to return\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function topRanking(\n\tattribute: Attribute,\n\tmeasure: Measure,\n\tcount: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter to isolate items that rank towards the bottom for a given measure.\n *\n * @example\n * Filter for age ranges with the bottom 3 lowest total revenue in the Sample ECommerce data model.\n * ```ts\n * filterFactory.bottomRanking(\n * DM.Commerce.AgeRange,\n * measureFactory.sum(DM.Commerce.Revenue),\n * 3\n * )\n * ```\n * @param attribute - Attribute to filter\n * @param measure - Measure to filter by\n * @param count - Number of members to return\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function bottomRanking(\n\tattribute: Attribute,\n\tmeasure: Measure,\n\tcount: number,\n\tconfig?: BaseFilterConfig,\n): Filter;\n/**\n * Creates a filter that contains a list of dependent/cascading filters,\n * where each filter depends on the results or state of the previous ones in the array.\n *\n * Each filter in the array operates in the context of its predecessors, and the\n * cascading behavior ensures that all filters are applied sequentially.\n *\n * @example\n * ```ts\n * // Create a cascading filter for gender and age range\n * const cascadingFilter = filterFactory.cascading(\n * [\n * filterFactory.members(DM.Commerce.Gender, ['Male', 'Female']),\n * filterFactory.members(DM.Commerce.AgeRange, ['0-18']),\n * ],\n * { disabled: true }, // Optional configuration to disable the cascading filter\n * );\n * ```\n * @param filters - Array of dependent filters\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n */\nexport declare function cascading(filters: Filter[], config?: BaseFilterConfig): Filter;\n/**\n * Set of logic operators for filter relations construction\n *\n * These operators are still in beta.\n *\n * @example\n * ```ts\n * import { filters } from '@sisense/sdk-data';\n *\n * // define filters\n * const revenueFilter = filterFactory.greaterThan(DM.Commerce.Revenue, 1000);\n * const countryFilter = filterFactory.members(DM.Commerce.Country, ['USA', 'Canada']);\n * const genderFilter = filterFactory.doesntContain(DM.Commerce.Gender, 'Unspecified');\n * const costFilter = filterFactory.between(DM.Commerce.Cost, 1000, 2000);\n *\n * // create filter relations of two filters\n * const orFilerRelations = filterFactory.logic.or(revenueFilter, countryFilter);\n * // revenueFilter OR countryFilter\n *\n * // filter relations can have nested filter relations\n * const mixedFilterRelations = filterFactory.logic.and(genderFilter, orFilerRelations);\n * // genderFilter AND (revenueFilter OR countryFilter)\n *\n * // array, specified in filter relations, will be converted to an intersection of filters automatically\n * const arrayFilterRelations = filterFactory.logic.or([genderFilter, costFilter], mixedFilterRelations);\n * // (genderFilter AND costFilter) OR (genderFilter AND (revenueFilter OR countryFilter))\n * ```\n * @beta\n */\nexport declare namespace logic {\n\t/**\n\t * Creates an 'AND' filter relations\n\t *\n\t * @example\n\t * Create filter relations for items that have a revenue greater than 100 and are in new condition\n\t * in the Sample ECommerce data model.\n\t * ```ts\n\t * const revenueFilter = filterFactory.greaterThan(DM.Commerce.Revenue, 100);\n\t * const conditionFilter = filterFactory.equals(DM.Commerce.Condition, 'New');\n\t *\n\t * const andFilerRelation = filterFactory.logic.and(revenueFilter, conditionFilter);\n\t * ```\n\t * @param left First filter or filter relations\n\t * @param right Second filter or filter relations\n\t * @returns Filter relations\n\t * @beta\n\t */\n\tconst and: (left: FilterRelationsNode, right: FilterRelationsNode) => FilterRelations;\n\t/**\n\t * Creates an 'OR' filter relations\n\t *\n\t * @example\n\t * Create filter relations for items that have a revenue greater than 100 or are in new condition\n\t * in the Sample ECommerce data model.\n\t * ```ts\n\t * const revenueFilter = filterFactory.greaterThan(DM.Commerce.Revenue, 100);\n\t * const conditionFilter = filterFactory.equals(DM.Commerce.Condition, 'New');\n\t *\n\t * const orFilerRelation = filterFactory.logic.or(revenueFilter, conditionFilter);\n\t * ```\n\t * @param left First filter or filter relations\n\t * @param right Second filter or filter relations\n\t * @returns Filter relations\n\t * @beta\n\t */\n\tconst or: (left: FilterRelationsNode, right: FilterRelationsNode) => FilterRelations;\n}\n/**\n * Creates a filter from JAQL\n *\n * @param attribute - Attribute to filter\n * @param jaql - Filter Jaql\n * @param config - Optional configuration for the filter\n * @returns A filter instance\n * @internal\n */\nexport declare function customFilter(\n\tattribute: Attribute,\n\tjaql: any,\n\tconfig?: BaseFilterConfig,\n): Filter;";
|
|
2
|
-
//# sourceMappingURL=filter-factory-types.d.ts.map
|