@vizzly/services 0.8.1 → 0.8.2-dev-4ac76b0195bc8bd9f3866e4cdcdac08e26caeff3
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/index.js +1 -1
- package/dist/services/src/Services/APIServices.d.ts +7 -5
- package/dist/services/src/Services/CellServices.d.ts +1 -1
- package/dist/services/src/Services/DashboardServices.d.ts +2 -2
- package/dist/services/src/Services/HeaderServices.d.ts +1 -1
- package/dist/services/src/Services/ViewServices.d.ts +1 -1
- package/dist/shared-logic/src/AI/types.d.ts +2 -2
- package/dist/shared-logic/src/AdditionalFilter/types.d.ts +15 -15
- package/dist/shared-logic/src/Aggregate/Aggregate.d.ts +2 -0
- package/dist/shared-logic/src/Aggregate/types.d.ts +2 -2
- package/dist/shared-logic/src/ApiConfig/ApiConfig.d.ts +1 -1
- package/dist/shared-logic/src/BasicTable/index.d.ts +1 -1
- package/dist/shared-logic/src/Callbacks/types.d.ts +6 -6
- package/dist/shared-logic/src/Component/dumpable.d.ts +2 -2
- package/dist/shared-logic/src/Component/types.d.ts +17 -9
- package/dist/shared-logic/src/ComponentInterface/types/ComponentInterfaceConfig.d.ts +1 -1
- package/dist/shared-logic/src/ComponentInterface/types/namespaces.types.d.ts +6 -6
- package/dist/shared-logic/src/ComponentInterface/types.d.ts +1 -1
- package/dist/shared-logic/src/ConditionalFormatting/ConditionalFormatting.d.ts +1 -1
- package/dist/shared-logic/src/CustomField/Rules/types.d.ts +1 -1
- package/dist/shared-logic/src/CustomField/types.d.ts +18 -18
- package/dist/shared-logic/src/Dashboard/fromRaw.d.ts +2 -2
- package/dist/shared-logic/src/Dashboard/types.d.ts +2 -2
- package/dist/shared-logic/src/DashboardAPI/dashboardAPI/creating.d.ts +1 -1
- package/dist/shared-logic/src/DashboardAPI/dashboardAPI/updating.d.ts +2 -0
- package/dist/shared-logic/src/DashboardAPI/dataConfigurationAndIdentity.d.ts +1 -1
- package/dist/shared-logic/src/DashboardAPI/dataSets.d.ts +1 -1
- package/dist/shared-logic/src/DashboardAPI/types.d.ts +2 -2
- package/dist/shared-logic/src/DashboardPermission/types.d.ts +2 -2
- package/dist/shared-logic/src/DataPanelConfig/types.d.ts +10 -10
- package/dist/shared-logic/src/DataSet/newField.d.ts +2 -2
- package/dist/shared-logic/src/DataSet/types.d.ts +2 -2
- package/dist/shared-logic/src/DataTable/types.d.ts +5 -5
- package/dist/shared-logic/src/DateTime/types.d.ts +2 -2
- package/dist/shared-logic/src/DatumKey/DatumKey.d.ts +3 -3
- package/dist/shared-logic/src/Display/Display.d.ts +1 -1
- package/dist/shared-logic/src/Display/dumpable.d.ts +1 -1
- package/dist/shared-logic/src/Display/types.d.ts +5 -5
- package/dist/shared-logic/src/Display/upcast.d.ts +1 -1
- package/dist/shared-logic/src/Field/Field.d.ts +2 -2
- package/dist/shared-logic/src/Field/types.d.ts +6 -6
- package/dist/shared-logic/src/FormatPanelConfig/types.d.ts +14 -14
- package/dist/shared-logic/src/FormattingRule/types.d.ts +1 -1
- package/dist/shared-logic/src/Functions/types.d.ts +2 -2
- package/dist/shared-logic/src/GlobalFilter/types.d.ts +3 -3
- package/dist/shared-logic/src/IdentityConfig/types.d.ts +7 -7
- package/dist/shared-logic/src/JSQueryEngine/types.d.ts +8 -8
- package/dist/shared-logic/src/Logger/Logger.d.ts +2 -0
- package/dist/shared-logic/src/Logger/types.d.ts +1 -1
- package/dist/shared-logic/src/Parameters/index.d.ts +1 -1
- package/dist/shared-logic/src/Progress/types.d.ts +1 -1
- package/dist/shared-logic/src/Project/types.d.ts +4 -4
- package/dist/shared-logic/src/Query/Query.d.ts +2 -2
- package/dist/shared-logic/src/Query/types.d.ts +7 -7
- package/dist/shared-logic/src/Query/validate.d.ts +2 -1
- package/dist/shared-logic/src/QueryAttributes/types.d.ts +3 -3
- package/dist/shared-logic/src/QueryEngineConfig/redshift.d.ts +2 -0
- package/dist/shared-logic/src/QueryEngineConfig/types.d.ts +3 -3
- package/dist/shared-logic/src/Report/types.d.ts +1 -1
- package/dist/shared-logic/src/Result/types.d.ts +1 -1
- package/dist/shared-logic/src/SingleStat/types.d.ts +2 -2
- package/dist/shared-logic/src/Theme/types.d.ts +4 -2
- package/dist/shared-logic/src/TimeDimension/TimeDimension.d.ts +1 -1
- package/dist/shared-logic/src/TimeDimension/types.d.ts +2 -2
- package/dist/shared-logic/src/Translations/extract/shared.d.ts +2 -2
- package/dist/shared-logic/src/Translations/textOverrideComponent.d.ts +3 -3
- package/dist/shared-logic/src/Translations/translation.types.d.ts +8 -1
- package/dist/shared-logic/src/Translations/translations.d.ts +1 -1
- package/dist/shared-logic/src/Translations/types.d.ts +4 -4
- package/dist/shared-logic/src/api/index.d.ts +1 -1
- package/dist/shared-logic/src/api/queryEngine/createDashboard.d.ts +5 -3
- package/dist/shared-logic/src/api/queryEngine/multiGetDashboards.d.ts +1 -1
- package/dist/shared-logic/src/api/queryEngine/updateDashboard.d.ts +2 -2
- package/dist/shared-logic/src/api/types.d.ts +4 -4
- package/dist/shared-logic/src/api/vizzly/aiActions.d.ts +3 -3
- package/dist/shared-logic/src/api/vizzly/aiHelpers/types.d.ts +4 -4
- package/dist/shared-logic/src/api/vizzly/createDashboard.d.ts +5 -3
- package/dist/shared-logic/src/api/vizzly/createDashboardAccess.d.ts +1 -1
- package/dist/shared-logic/src/api/vizzly/getParentDashboards.d.ts +1 -1
- package/dist/shared-logic/src/api/vizzly/getTeamMembers.d.ts +1 -1
- package/dist/shared-logic/src/api/vizzly/multiGetDashboards.d.ts +1 -1
- package/dist/shared-logic/src/api/vizzly/multiGetEncryptedDashboards.d.ts +1 -1
- package/dist/shared-logic/src/api/vizzly/updateDashboard.d.ts +6 -4
- package/dist/shared-logic/src/api/vizzly/updateProjectApiKey.d.ts +1 -1
- package/dist/shared-logic/src/typeHelpers.d.ts +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import * as dataSetsProperty from 'shared-logic/src/DashboardAPI/dataSets';
|
|
|
7
7
|
/**
|
|
8
8
|
* Represents a Vizzly dashboard.
|
|
9
9
|
*/
|
|
10
|
-
export type VizzlyDashboard = {
|
|
10
|
+
export declare type VizzlyDashboard = {
|
|
11
11
|
id: DashboardType['id'];
|
|
12
12
|
parentDashboardId: DashboardType['parentDashboardId'] | undefined;
|
|
13
13
|
display: DashboardType['display'];
|
|
@@ -19,15 +19,17 @@ export type VizzlyDashboard = {
|
|
|
19
19
|
/**
|
|
20
20
|
* Represents the payload for creating a dashboard.
|
|
21
21
|
*/
|
|
22
|
-
export type CreateDashboard = {
|
|
22
|
+
export declare type CreateDashboard = {
|
|
23
23
|
definition: Dashboard.SaveableDashboardDefinition;
|
|
24
|
+
/** @deprecated - use `metadata` instead */
|
|
25
|
+
meta?: any;
|
|
24
26
|
/**
|
|
25
27
|
* The metadata for the dashboard.
|
|
26
28
|
*
|
|
27
29
|
* @property {any} meta - The metadata for the dashboard can be set to anything you require.
|
|
28
30
|
*
|
|
29
31
|
*/
|
|
30
|
-
|
|
32
|
+
metadata?: any;
|
|
31
33
|
/**
|
|
32
34
|
* The ID of the parent dashboard.
|
|
33
35
|
*
|
|
@@ -41,10 +43,10 @@ export type CreateDashboard = {
|
|
|
41
43
|
*
|
|
42
44
|
* @property {VizzlyDashboard['metadata']} metadata - The metadata to update the dashboard with.
|
|
43
45
|
*/
|
|
44
|
-
type UpdateDashboardOptions = {
|
|
46
|
+
declare type UpdateDashboardOptions = {
|
|
45
47
|
metadata?: VizzlyDashboard['metadata'];
|
|
46
48
|
};
|
|
47
|
-
type APIOptions = {
|
|
49
|
+
declare type APIOptions = {
|
|
48
50
|
/**
|
|
49
51
|
* The parent dashboard ID to use when creating a child dashboard.
|
|
50
52
|
*/
|
|
@@ -6,7 +6,7 @@ import { AdditionalFilter } from 'shared-logic/src/AdditionalFilter/types';
|
|
|
6
6
|
* @param colSpan - The span of the cell in terms of columns. Defaults to 12.
|
|
7
7
|
* @param localFilters - The local filters of the cell. Optional.
|
|
8
8
|
*/
|
|
9
|
-
export type CellAttributes = {
|
|
9
|
+
export declare type CellAttributes = {
|
|
10
10
|
component?: ViewServices.View;
|
|
11
11
|
colSpan?: number;
|
|
12
12
|
localFilters?: AdditionalFilter[];
|
|
@@ -4,7 +4,7 @@ import { CustomField } from '../../../shared-logic/src/CustomField/types';
|
|
|
4
4
|
import { Header } from './HeaderServices';
|
|
5
5
|
import { Library } from './ComponentLibraryServices';
|
|
6
6
|
/** Custom fields for a dashboard */
|
|
7
|
-
export type CustomFields = {
|
|
7
|
+
export declare type CustomFields = {
|
|
8
8
|
[dataSetId: string]: Array<CustomField>;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
@@ -13,7 +13,7 @@ export type CustomFields = {
|
|
|
13
13
|
* @param customFields - The custom fields of the dashboard.
|
|
14
14
|
* @param library - The component library of the dashboard.
|
|
15
15
|
*/
|
|
16
|
-
export type DashboardAttributes = {
|
|
16
|
+
export declare type DashboardAttributes = {
|
|
17
17
|
display?: (Row | Header)[];
|
|
18
18
|
customFields?: CustomFields;
|
|
19
19
|
library?: Library;
|
|
@@ -21,7 +21,7 @@ export declare class ViewServices<T extends keyof ViewAttributes> {
|
|
|
21
21
|
constructor(componentType: T, dataSet: DataSet, attributes?: Partial<ViewAttributes[T]>);
|
|
22
22
|
updateAttributes(newAttributes: Partial<ViewAttributes[T]>): void;
|
|
23
23
|
}
|
|
24
|
-
export type View = AreaChart | LineChart | BarChart | PieChart | ScatterChart | ComboChart | PivotTable | BasicTable | HorizontalBarChart | MercatorMap | SingleStat | Progress;
|
|
24
|
+
export declare type View = AreaChart | LineChart | BarChart | PieChart | ScatterChart | ComboChart | PivotTable | BasicTable | HorizontalBarChart | MercatorMap | SingleStat | Progress;
|
|
25
25
|
export declare class AreaChart extends ViewServices<'areaChart'> {
|
|
26
26
|
constructor(dataSet: DataSet, attributes?: Partial<ViewAttributes['areaChart']>);
|
|
27
27
|
}
|
|
@@ -10,7 +10,7 @@ export declare enum AIReaction {
|
|
|
10
10
|
ThumbsUp = "thumbs_up",
|
|
11
11
|
ThumbsDown = "thumbs_down"
|
|
12
12
|
}
|
|
13
|
-
export type Message = {
|
|
13
|
+
export declare type Message = {
|
|
14
14
|
content: string;
|
|
15
15
|
sender_type: SenderType;
|
|
16
16
|
status: 'active';
|
|
@@ -18,7 +18,7 @@ export type Message = {
|
|
|
18
18
|
sent_at: Date;
|
|
19
19
|
reaction: AIReaction | null;
|
|
20
20
|
};
|
|
21
|
-
export type ConversationState = {
|
|
21
|
+
export declare type ConversationState = {
|
|
22
22
|
message: string;
|
|
23
23
|
conversationId: string | undefined;
|
|
24
24
|
messageState: MessageState;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { QueryAttributes } from '../QueryAttributes/types';
|
|
2
2
|
import * as FilterType from './constants';
|
|
3
|
-
export type FilterConfig = {
|
|
3
|
+
export declare type FilterConfig = {
|
|
4
4
|
localFilters?: Array<AdditionalFilter>;
|
|
5
5
|
globalFilters?: Array<AdditionalFilter>;
|
|
6
6
|
};
|
|
7
|
-
export type AdditionalFilter = SingleSelectFilter | DateFilter | DateAndTimeFilter | DateTimeFilter | MultiSelectFilter;
|
|
8
|
-
type Field = {
|
|
7
|
+
export declare type AdditionalFilter = SingleSelectFilter | DateFilter | DateAndTimeFilter | DateTimeFilter | MultiSelectFilter;
|
|
8
|
+
declare type Field = {
|
|
9
9
|
dataSetId: string;
|
|
10
10
|
fieldId: QueryAttributes.Field;
|
|
11
11
|
};
|
|
12
|
-
type AdditionalFilterType = typeof FilterType.DATE_FILTER | typeof FilterType.DATE_TIME_FILTER | typeof FilterType.DATE_AND_TIME_FILTER | typeof FilterType.SINGLE_SELECT_FILTER | typeof FilterType.MULTI_SELECT_FILTER;
|
|
13
|
-
export type OptionalFilters = {
|
|
12
|
+
declare type AdditionalFilterType = typeof FilterType.DATE_FILTER | typeof FilterType.DATE_TIME_FILTER | typeof FilterType.DATE_AND_TIME_FILTER | typeof FilterType.SINGLE_SELECT_FILTER | typeof FilterType.MULTI_SELECT_FILTER;
|
|
13
|
+
export declare type OptionalFilters = {
|
|
14
14
|
[dataSetId: string]: Array<QueryAttributes.Filter>;
|
|
15
15
|
};
|
|
16
|
-
type BaseAdditionalFilter<T extends AdditionalFilterType> = {
|
|
16
|
+
declare type BaseAdditionalFilter<T extends AdditionalFilterType> = {
|
|
17
17
|
/**
|
|
18
18
|
* NOTE: The "dateTimeFilter" type value has been deprecated. Use "dateFilter".
|
|
19
19
|
*/
|
|
@@ -34,36 +34,36 @@ type BaseAdditionalFilter<T extends AdditionalFilterType> = {
|
|
|
34
34
|
optionsFilters?: OptionalFilters;
|
|
35
35
|
hidden?: boolean;
|
|
36
36
|
};
|
|
37
|
-
type FixedRangeValue = {
|
|
37
|
+
declare type FixedRangeValue = {
|
|
38
38
|
type: 'fixedRange';
|
|
39
39
|
before: Date | null;
|
|
40
40
|
after: Date | null;
|
|
41
41
|
};
|
|
42
|
-
type RelativeValue = {
|
|
42
|
+
declare type RelativeValue = {
|
|
43
43
|
type: 'relative';
|
|
44
44
|
value: string;
|
|
45
45
|
};
|
|
46
|
-
export type DateFilter = BaseAdditionalFilter<typeof FilterType.DATE_FILTER> & {
|
|
46
|
+
export declare type DateFilter = BaseAdditionalFilter<typeof FilterType.DATE_FILTER> & {
|
|
47
47
|
value: FixedRangeValue | RelativeValue | null;
|
|
48
48
|
};
|
|
49
|
-
export type DateAndTimeFilter = BaseAdditionalFilter<typeof FilterType.DATE_AND_TIME_FILTER> & {
|
|
49
|
+
export declare type DateAndTimeFilter = BaseAdditionalFilter<typeof FilterType.DATE_AND_TIME_FILTER> & {
|
|
50
50
|
value: FixedRangeValue | RelativeValue | null;
|
|
51
51
|
};
|
|
52
52
|
/**
|
|
53
53
|
* @deprecated The "dateTimeFilter" has been deprecated. Use "dateFilter".
|
|
54
54
|
*/
|
|
55
|
-
export type DateTimeFilter = BaseAdditionalFilter<typeof FilterType.DATE_TIME_FILTER> & {
|
|
55
|
+
export declare type DateTimeFilter = BaseAdditionalFilter<typeof FilterType.DATE_TIME_FILTER> & {
|
|
56
56
|
value: FixedRangeValue | RelativeValue | null;
|
|
57
57
|
};
|
|
58
|
-
export type SingleSelectFilter = BaseAdditionalFilter<typeof FilterType.SINGLE_SELECT_FILTER> & {
|
|
58
|
+
export declare type SingleSelectFilter = BaseAdditionalFilter<typeof FilterType.SINGLE_SELECT_FILTER> & {
|
|
59
59
|
value: string | number | boolean | null;
|
|
60
60
|
optionsPulledFrom?: Array<Field>;
|
|
61
61
|
};
|
|
62
|
-
export type MultiSelectFilter = BaseAdditionalFilter<typeof FilterType.MULTI_SELECT_FILTER> & {
|
|
62
|
+
export declare type MultiSelectFilter = BaseAdditionalFilter<typeof FilterType.MULTI_SELECT_FILTER> & {
|
|
63
63
|
value: string[] | number[] | null;
|
|
64
64
|
optionsPulledFrom?: Array<Field>;
|
|
65
65
|
};
|
|
66
|
-
export type TimeRangeOptions = {
|
|
66
|
+
export declare type TimeRangeOptions = {
|
|
67
67
|
[id: string]: {
|
|
68
68
|
range: {
|
|
69
69
|
after: Date;
|
|
@@ -72,7 +72,7 @@ export type TimeRangeOptions = {
|
|
|
72
72
|
description: string;
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
|
-
export type DateAndTimeRangeOptions = {
|
|
75
|
+
export declare type DateAndTimeRangeOptions = {
|
|
76
76
|
[id: string]: {
|
|
77
77
|
range: {
|
|
78
78
|
afterDate: Date;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { SupportedAggregates } from './types';
|
|
2
|
+
import { DataType } from '../Field/types';
|
|
2
3
|
declare const vizzlyManagedAggregates: SupportedAggregates;
|
|
3
4
|
export declare const supportedAggregates: (keys?: Array<string>) => SupportedAggregates;
|
|
4
5
|
export declare const isSupportedAggregateFunction: (supportedAggregateFunctions: SupportedAggregates, proposedFunction: string) => boolean;
|
|
5
6
|
export declare const isSupportedAggregate: (value: string | undefined, supportedAggregates: SupportedAggregates) => boolean;
|
|
6
7
|
export declare const getPublicName: (id: keyof typeof vizzlyManagedAggregates) => string;
|
|
8
|
+
export declare const hasValidDataType: (fieldDefinitions: SupportedAggregates, fieldName: string, dataType: DataType) => boolean;
|
|
7
9
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { DataType } from '../Field/types';
|
|
2
|
-
export type SupportedAggregate = {
|
|
2
|
+
export declare type SupportedAggregate = {
|
|
3
3
|
publicName: string;
|
|
4
4
|
validDataTypes: Array<DataType>;
|
|
5
5
|
};
|
|
6
|
-
export type SupportedAggregates = {
|
|
6
|
+
export declare type SupportedAggregates = {
|
|
7
7
|
[id: string]: SupportedAggregate;
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component } from '../Component/types';
|
|
2
2
|
import { ComponentInterface, ComponentInterfaceConfig } from '../ComponentInterface/types';
|
|
3
3
|
import { DateTimeFormat } from '../Field/types';
|
|
4
|
-
export type BasicTableComponentInterface = ComponentInterface<Component.BasicTableAttributes, Component.BasicTableAttributes> & {
|
|
4
|
+
export declare type BasicTableComponentInterface = ComponentInterface<Component.BasicTableAttributes, Component.BasicTableAttributes> & {
|
|
5
5
|
setFields: (basicTable: Component.BasicTableAttributes, fieldId: Array<string>) => Component.BasicTableAttributes;
|
|
6
6
|
setDateTimeFormat: (basicTable: Component.BasicTableAttributes, dateTimeFormat: DateTimeFormat) => Component.BasicTableAttributes;
|
|
7
7
|
};
|
|
@@ -2,15 +2,15 @@ import { DataSet } from '../DataSet/types';
|
|
|
2
2
|
import { IdentityConfig } from '../IdentityConfig/types';
|
|
3
3
|
import { DataMap } from '../JSQueryEngine/types';
|
|
4
4
|
import { QueryEngineConfig } from '../QueryEngineConfig/types';
|
|
5
|
-
type CallbackError = null;
|
|
6
|
-
export type loadDataSetsCallback = (identityConfig: IdentityConfig, queryEngineConfig: QueryEngineConfig) => Promise<Array<DataSet>>;
|
|
7
|
-
export type IdentityTokens = {
|
|
5
|
+
declare type CallbackError = null;
|
|
6
|
+
export declare type loadDataSetsCallback = (identityConfig: IdentityConfig, queryEngineConfig: QueryEngineConfig) => Promise<Array<DataSet>>;
|
|
7
|
+
export declare type IdentityTokens = {
|
|
8
8
|
dashboardAccessToken: string;
|
|
9
9
|
dataAccessToken?: string;
|
|
10
10
|
queryEngineAccessToken?: string;
|
|
11
11
|
projectAccessToken?: string | undefined;
|
|
12
12
|
};
|
|
13
|
-
export type identityCallback = () => Promise<IdentityTokens | CallbackError>;
|
|
14
|
-
export type loadQueryEngineConfigCallback = () => Promise<Omit<QueryEngineConfig, 'supportedTransformationFunctions'> | null>;
|
|
15
|
-
export type loadDataCallback = (dataSet: DataSet) => Promise<DataMap[] | CallbackError>;
|
|
13
|
+
export declare type identityCallback = () => Promise<IdentityTokens | CallbackError>;
|
|
14
|
+
export declare type loadQueryEngineConfigCallback = () => Promise<Omit<QueryEngineConfig, 'supportedTransformationFunctions'> | null>;
|
|
15
|
+
export declare type loadDataCallback = (dataSet: DataSet) => Promise<DataMap[] | CallbackError>;
|
|
16
16
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Dumpable } from '../Dumpable';
|
|
2
2
|
import { Component } from './types';
|
|
3
3
|
import { HeaderComponent } from '../Display/types';
|
|
4
|
-
type EmptyComponent = {
|
|
4
|
+
declare type EmptyComponent = {
|
|
5
5
|
isEmpty: true;
|
|
6
6
|
colSpan: number;
|
|
7
7
|
};
|
|
8
|
-
type ComponentDumpable = Dumpable<Component | EmptyComponent | HeaderComponent, Component.RawComponent | EmptyComponent | HeaderComponent>;
|
|
8
|
+
declare type ComponentDumpable = Dumpable<Component | EmptyComponent | HeaderComponent, Component.RawComponent | EmptyComponent | HeaderComponent>;
|
|
9
9
|
export declare const load: ComponentDumpable['load'];
|
|
10
10
|
export declare const dump: ComponentDumpable['dump'];
|
|
11
11
|
export {};
|
|
@@ -6,10 +6,10 @@ import { Result } from '../Result/types';
|
|
|
6
6
|
import { AdditionalFilter } from '../AdditionalFilter/types';
|
|
7
7
|
import { UpdatedMetrics } from '../Parameters';
|
|
8
8
|
import { TableFieldsV2 } from '../DataTable/types';
|
|
9
|
-
export type getNumberFormatter = (formatterId: string | undefined | null) => (number: number) => string;
|
|
10
|
-
export type FormatType = string | null;
|
|
11
|
-
export type ApproxAxisLabelCount = 'auto' | number;
|
|
12
|
-
export type ComponentType = 'barChart' | 'horizontalBarChart' | 'areaChart' | 'lineChart' | 'scatterChart' | 'pieChart' | 'singleStat' | 'dataTable' | 'basicTable' | 'comboChart' | 'mercatorMap' | 'custom' | 'progress';
|
|
9
|
+
export declare type getNumberFormatter = (formatterId: string | undefined | null) => (number: number) => string;
|
|
10
|
+
export declare type FormatType = string | null;
|
|
11
|
+
export declare type ApproxAxisLabelCount = 'auto' | number;
|
|
12
|
+
export declare type ComponentType = 'barChart' | 'horizontalBarChart' | 'areaChart' | 'lineChart' | 'scatterChart' | 'pieChart' | 'singleStat' | 'dataTable' | 'basicTable' | 'comboChart' | 'mercatorMap' | 'custom' | 'progress';
|
|
13
13
|
export declare namespace Component {
|
|
14
14
|
export type LineCurve = 'natural' | 'straight' | 'step' | 'stepBefore' | 'stepAfter';
|
|
15
15
|
export type RawComponent = Omit<Component, 'queries' | 'results' | 'span'> & {
|
|
@@ -288,6 +288,14 @@ export declare namespace Component {
|
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
290
|
export type OnViewClick = TableOnViewClick | ChartOnViewClick;
|
|
291
|
+
export type LabelFormatOptions = {
|
|
292
|
+
fieldId: string;
|
|
293
|
+
func: string;
|
|
294
|
+
type: ComponentType;
|
|
295
|
+
defaultLabel: string;
|
|
296
|
+
viewId: string;
|
|
297
|
+
values: Array<string>;
|
|
298
|
+
};
|
|
291
299
|
export type Parameters = {
|
|
292
300
|
measure?: ParameterMeasure;
|
|
293
301
|
group?: ParameterGroup;
|
|
@@ -323,15 +331,15 @@ export declare namespace AddOn {
|
|
|
323
331
|
type Type = 'selectFilter' | 'dateTimeFilter';
|
|
324
332
|
}
|
|
325
333
|
/** @deprecated */
|
|
326
|
-
export type AddOn = AddOn.SelectFilter.Attributes | AddOn.DateTimeFilter.Attributes;
|
|
327
|
-
export type MaybeOldComponent<Attrs = Component.Attributes> = Omit<Component<Omit<Attrs, 'addOns'> & {
|
|
334
|
+
export declare type AddOn = AddOn.SelectFilter.Attributes | AddOn.DateTimeFilter.Attributes;
|
|
335
|
+
export declare type MaybeOldComponent<Attrs = Component.Attributes> = Omit<Component<Omit<Attrs, 'addOns'> & {
|
|
328
336
|
addOns: AddOn[];
|
|
329
337
|
}>, 'localFilters'> & {
|
|
330
338
|
localFilters: {
|
|
331
339
|
[key: number]: QueryAttributes.Filter;
|
|
332
340
|
};
|
|
333
341
|
};
|
|
334
|
-
export type Component<Attrs = Component.Attributes> = {
|
|
342
|
+
export declare type Component<Attrs = Component.Attributes> = {
|
|
335
343
|
attributes: Attrs;
|
|
336
344
|
localFilters: Array<AdditionalFilter>;
|
|
337
345
|
updatesFromParameters: UpdatedMetrics;
|
|
@@ -343,11 +351,11 @@ export declare enum ProgressType {
|
|
|
343
351
|
Linear = "linear",
|
|
344
352
|
Circular = "circular"
|
|
345
353
|
}
|
|
346
|
-
export type ProgressGoal = {
|
|
354
|
+
export declare type ProgressGoal = {
|
|
347
355
|
field: string;
|
|
348
356
|
value: number;
|
|
349
357
|
};
|
|
350
|
-
export type ProgressTypes = {
|
|
358
|
+
export declare type ProgressTypes = {
|
|
351
359
|
field: string;
|
|
352
360
|
value: ProgressType;
|
|
353
361
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataSet } from '../../DataSet/types';
|
|
2
2
|
import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
3
3
|
import { TextOverride } from '../../Translations/types';
|
|
4
|
-
export type ComponentInterfaceConfig = {
|
|
4
|
+
export declare type ComponentInterfaceConfig = {
|
|
5
5
|
queryEngineConfig: QueryEngineConfig;
|
|
6
6
|
attributesSchemaOptions?: {
|
|
7
7
|
restrictFields?: Array<{
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export type Section<Type> = {
|
|
1
|
+
export declare type Section<Type> = {
|
|
2
2
|
type?: Type;
|
|
3
3
|
title: string;
|
|
4
4
|
description?: string;
|
|
5
5
|
callToAction?: string;
|
|
6
6
|
};
|
|
7
|
-
export type ViewConstants = {
|
|
7
|
+
export declare type ViewConstants = {
|
|
8
8
|
title: string;
|
|
9
9
|
description: string;
|
|
10
10
|
namespace: ComponentNamespace;
|
|
11
11
|
data_panel: DataPanelNamespaces;
|
|
12
12
|
format_panel: FormatPanelNamespaces;
|
|
13
13
|
};
|
|
14
|
-
export type SubSection<Type> = Section<Type> & {
|
|
14
|
+
export declare type SubSection<Type> = Section<Type> & {
|
|
15
15
|
namespace?: string;
|
|
16
16
|
};
|
|
17
|
-
type SubSectionDef = {
|
|
17
|
+
declare type SubSectionDef = {
|
|
18
18
|
line?: SubSection<'metrics'>;
|
|
19
19
|
bar?: SubSection<'metrics'>;
|
|
20
20
|
xAxis?: SubSection<'metrics'>;
|
|
@@ -44,7 +44,7 @@ export interface DataPanelNamespaces {
|
|
|
44
44
|
subSectionDefinition: SubSectionDef;
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
export type Namespace = keyof FormatPanelNamespaces | keyof DataPanelNamespaces;
|
|
47
|
+
export declare type Namespace = keyof FormatPanelNamespaces | keyof DataPanelNamespaces;
|
|
48
48
|
export interface FormatPanelNamespaces {
|
|
49
49
|
axis_labels?: Section<'axisLabels'> & {
|
|
50
50
|
subSectionDefinition: {
|
|
@@ -102,5 +102,5 @@ export interface FormatPanelNamespaces {
|
|
|
102
102
|
};
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
export type ComponentNamespace = 'pivot_table' | 'horizontal_bar_chart' | 'bar_chart' | 'area_chart' | 'line_chart' | 'scatter_chart' | 'pie_chart' | 'single_stat' | 'basic_table' | 'combo_chart' | 'mercator_map' | 'custom' | 'fields' | 'progress' | 'headline';
|
|
105
|
+
export declare type ComponentNamespace = 'pivot_table' | 'horizontal_bar_chart' | 'bar_chart' | 'area_chart' | 'line_chart' | 'scatter_chart' | 'pie_chart' | 'single_stat' | 'basic_table' | 'combo_chart' | 'mercator_map' | 'custom' | 'fields' | 'progress' | 'headline';
|
|
106
106
|
export {};
|
|
@@ -38,4 +38,4 @@ export interface ComponentInterface<Hydrated = any, Dumped = any> extends Dumpab
|
|
|
38
38
|
colorGradient: boolean;
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
export type LoadComponentInterface<Hydrated, Dumped> = (config: ComponentInterfaceConfig) => ComponentInterface<Hydrated, Dumped>;
|
|
41
|
+
export declare type LoadComponentInterface<Hydrated, Dumped> = (config: ComponentInterfaceConfig) => ComponentInterface<Hydrated, Dumped>;
|
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import { QueryAttributes } from '../QueryAttributes/types';
|
|
2
2
|
import { BaseField, DataType, NonDateTimeField } from '../Field/types';
|
|
3
3
|
import { Rules } from './Rules/types';
|
|
4
|
-
type BaseCustomField = Omit<NonDateTimeField, 'dashboardFilterGroups'>;
|
|
5
|
-
export type PercentageField = BaseCustomField & Percentage;
|
|
6
|
-
export type RoundedNumberField = BaseCustomField & RoundedNumber;
|
|
7
|
-
export type OldPercentageField = BaseCustomField & OldPercentage;
|
|
8
|
-
export type SimplePercentageField = BaseCustomField & SimplePercentage;
|
|
9
|
-
export type AggregateMathField = BaseCustomField & AggregateMath;
|
|
10
|
-
export type SimpleMathField = BaseCustomField & SimpleMath & {
|
|
4
|
+
declare type BaseCustomField = Omit<NonDateTimeField, 'dashboardFilterGroups'>;
|
|
5
|
+
export declare type PercentageField = BaseCustomField & Percentage;
|
|
6
|
+
export declare type RoundedNumberField = BaseCustomField & RoundedNumber;
|
|
7
|
+
export declare type OldPercentageField = BaseCustomField & OldPercentage;
|
|
8
|
+
export declare type SimplePercentageField = BaseCustomField & SimplePercentage;
|
|
9
|
+
export declare type AggregateMathField = BaseCustomField & AggregateMath;
|
|
10
|
+
export declare type SimpleMathField = BaseCustomField & SimpleMath & {
|
|
11
11
|
dataType: 'number';
|
|
12
12
|
};
|
|
13
13
|
export interface RulesField extends BaseField {
|
|
14
14
|
rules: Rules[];
|
|
15
15
|
dataType: 'string';
|
|
16
16
|
}
|
|
17
|
-
export type CustomField = PercentageField | SimpleMathField | AggregateMathField | SimplePercentageField | RulesField | RoundedNumberField;
|
|
18
|
-
export type OldPercentage = {
|
|
17
|
+
export declare type CustomField = PercentageField | SimpleMathField | AggregateMathField | SimplePercentageField | RulesField | RoundedNumberField;
|
|
18
|
+
export declare type OldPercentage = {
|
|
19
19
|
numeratorFieldId: string;
|
|
20
20
|
numeratorAggregate: string;
|
|
21
21
|
numeratorFilter: QueryAttributes['filter'];
|
|
22
22
|
dataType: DataType;
|
|
23
23
|
};
|
|
24
|
-
export type Percentage = {
|
|
24
|
+
export declare type Percentage = {
|
|
25
25
|
denominatorFieldId: string;
|
|
26
26
|
denominatorAggregate: string;
|
|
27
27
|
numeratorFilter: QueryAttributes['filter'];
|
|
28
28
|
dataType: DataType;
|
|
29
29
|
};
|
|
30
|
-
export type SimplePercentage = {
|
|
30
|
+
export declare type SimplePercentage = {
|
|
31
31
|
numeratorFieldId: string;
|
|
32
32
|
numeratorAggregate: string;
|
|
33
33
|
denominatorFieldId: string;
|
|
34
34
|
denominatorAggregate: string;
|
|
35
35
|
dataType: DataType;
|
|
36
36
|
};
|
|
37
|
-
export type AggregateNested = {
|
|
37
|
+
export declare type AggregateNested = {
|
|
38
38
|
operator: MathOperator;
|
|
39
39
|
fieldId: string;
|
|
40
40
|
/** @deprecated ignore this outside of upcasting */
|
|
41
41
|
aggregate?: string;
|
|
42
42
|
function: string;
|
|
43
43
|
};
|
|
44
|
-
export type AggregateMath = {
|
|
44
|
+
export declare type AggregateMath = {
|
|
45
45
|
leftFieldId: string;
|
|
46
46
|
leftFunction: string;
|
|
47
47
|
leftNested?: AggregateNested;
|
|
@@ -54,16 +54,16 @@ export type AggregateMath = {
|
|
|
54
54
|
/** @deprecated ignore this outside of upcasting */
|
|
55
55
|
rightAggregate?: string;
|
|
56
56
|
};
|
|
57
|
-
export type SimpleMath = {
|
|
57
|
+
export declare type SimpleMath = {
|
|
58
58
|
leftFieldId: string;
|
|
59
59
|
operator: MathOperator;
|
|
60
60
|
rightFieldId: string;
|
|
61
61
|
};
|
|
62
|
-
export type RoundedNumber = {
|
|
62
|
+
export declare type RoundedNumber = {
|
|
63
63
|
roundToDecimalPlaces: 0 | 2;
|
|
64
64
|
fieldId: string;
|
|
65
65
|
};
|
|
66
|
-
export type MathOperator = '*' | '-' | '/' | '+';
|
|
67
|
-
export type CustomFieldCategory = 'percentage' | 'math' | 'rules' | 'roundedNumber';
|
|
68
|
-
export type MaybeOldCustomField = CustomField | OldPercentage;
|
|
66
|
+
export declare type MathOperator = '*' | '-' | '/' | '+';
|
|
67
|
+
export declare type CustomFieldCategory = 'percentage' | 'math' | 'rules' | 'roundedNumber';
|
|
68
|
+
export declare type MaybeOldCustomField = CustomField | OldPercentage;
|
|
69
69
|
export {};
|
|
@@ -2,8 +2,8 @@ import { StoredTheme } from '../Theme/types';
|
|
|
2
2
|
import { Dashboard, SaveableDashboardDefinition } from './types';
|
|
3
3
|
import { PartialBy } from '../typeHelpers';
|
|
4
4
|
import { QueryEngineConfig } from '../QueryEngineConfig/types';
|
|
5
|
-
export type RawDefinition = PartialBy<SaveableDashboardDefinition, 'isPlayground' | 'customFields'>;
|
|
6
|
-
export type RawDashboard<Definition = RawDefinition> = {
|
|
5
|
+
export declare type RawDefinition = PartialBy<SaveableDashboardDefinition, 'isPlayground' | 'customFields'>;
|
|
6
|
+
export declare type RawDashboard<Definition = RawDefinition> = {
|
|
7
7
|
id: string;
|
|
8
8
|
parent_dashboard_id: string;
|
|
9
9
|
definition: Definition;
|
|
@@ -9,7 +9,7 @@ export declare namespace Dashboard {
|
|
|
9
9
|
[key: string]: string | number;
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
export type Dashboard = {
|
|
12
|
+
export declare type Dashboard = {
|
|
13
13
|
id: string;
|
|
14
14
|
parentDashboardId: string | null;
|
|
15
15
|
metadata: Dashboard.ExternalMetadata;
|
|
@@ -26,7 +26,7 @@ export type Dashboard = {
|
|
|
26
26
|
protectedByOrganisation?: boolean;
|
|
27
27
|
isProgrammatic?: boolean;
|
|
28
28
|
};
|
|
29
|
-
export type SaveableDashboardDefinition = {
|
|
29
|
+
export declare type SaveableDashboardDefinition = {
|
|
30
30
|
display: DisplayDumped;
|
|
31
31
|
componentLibrary: Component.RawComponent[];
|
|
32
32
|
globalFilters: Array<AdditionalFilter>;
|
|
@@ -14,6 +14,6 @@ export declare function prepareCreateResponseForAdding(createdDashboardResponse:
|
|
|
14
14
|
formattedPermissions: DashboardPermissionType[];
|
|
15
15
|
};
|
|
16
16
|
export declare function postCreateDashboard(params: Omit<CreateDashboardParams, 'dashboardAccessToken'>, identityConfig: IdentityConfigType, dashboardStorageStrategy: DashboardStorageStrategy, vizzlyAPI: ReturnType<typeof api>): Promise<{
|
|
17
|
-
dashboard: Dashboard.RawDashboard
|
|
17
|
+
dashboard: Dashboard.RawDashboard<Dashboard.RawDefinition>;
|
|
18
18
|
permissions: RawDashboardPermission[];
|
|
19
19
|
}>;
|
|
@@ -8,7 +8,9 @@ import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
|
8
8
|
export declare function postUpdateDashboard(dashboardStorageStrategy: DashboardStorageStrategy, vizzlyAPI: ReturnType<typeof api>, updateParams: {
|
|
9
9
|
dashboardSessionToken: string;
|
|
10
10
|
definition?: Dashboard.SaveableDashboardDefinition;
|
|
11
|
+
/** @deprecated - use `metadata` instead */
|
|
11
12
|
meta?: any;
|
|
13
|
+
metadata?: any;
|
|
12
14
|
deleted?: boolean;
|
|
13
15
|
}): Promise<UnEncryptedDashboardUpdateResponse>;
|
|
14
16
|
export declare function updateDashboardFromUpdateResponse(updatedDashboardResponse: UnEncryptedDashboardUpdateResponse, dataSets: DataSet[], dashboards: DashboardType[], params: Omit<UpdateDashboardParams, 'dashboardSessionToken'>, queryEngineConfig: QueryEngineConfig | undefined): {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IdentityTokens } from '../Callbacks/types';
|
|
2
2
|
import { identityCallback as identityCallbackImported } from 'shared-logic/src/Callbacks/types';
|
|
3
|
-
export type identityCallback = identityCallbackImported;
|
|
3
|
+
export declare type identityCallback = identityCallbackImported;
|
|
4
4
|
export declare const fetchIdentityConfig: (identityCallback: identityCallbackImported) => Promise<{
|
|
5
5
|
identityConfig: import("../IdentityConfig/types").IdentityConfig;
|
|
6
6
|
tokens: IdentityTokens;
|
|
@@ -3,7 +3,7 @@ import { loadDataSetsCallback } from 'shared-logic/src/Callbacks/types';
|
|
|
3
3
|
import { IdentityConfig } from 'shared-logic/src/IdentityConfig/types';
|
|
4
4
|
import { QueryEngineEndpoint } from 'shared-logic/src/QueryEngineConfig/types';
|
|
5
5
|
import { DataSet } from '../DataSet/types';
|
|
6
|
-
export type DataSetsCallback = (identityConfig: IdentityConfig) => Promise<Array<DataSet> | null>;
|
|
6
|
+
export declare type DataSetsCallback = (identityConfig: IdentityConfig) => Promise<Array<DataSet> | null>;
|
|
7
7
|
export interface Property {
|
|
8
8
|
schema: Joi.Schema;
|
|
9
9
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dashboard } from 'shared-logic/src/Dashboard/types';
|
|
2
2
|
import { QueryEngineEndpoint } from '../QueryEngineConfig/types';
|
|
3
|
-
export type VizzlyDashboard = {
|
|
3
|
+
export declare type VizzlyDashboard = {
|
|
4
4
|
id: Dashboard['id'];
|
|
5
5
|
parentDashboardId: Dashboard['parentDashboardId'] | undefined;
|
|
6
6
|
display: Dashboard['display'];
|
|
@@ -10,7 +10,7 @@ export type VizzlyDashboard = {
|
|
|
10
10
|
updatedAt: Dashboard['updatedAt'];
|
|
11
11
|
metadata: Dashboard['metadata'];
|
|
12
12
|
};
|
|
13
|
-
export type DashboardStorageStrategy = {
|
|
13
|
+
export declare type DashboardStorageStrategy = {
|
|
14
14
|
strategy: 'vizzlyApi';
|
|
15
15
|
} | {
|
|
16
16
|
strategy: 'queryEngine';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export type RawDashboardPermission = {
|
|
1
|
+
export declare type RawDashboardPermission = {
|
|
2
2
|
dashboard_id: string;
|
|
3
3
|
scope: 'read' | 'read_write';
|
|
4
4
|
token: string;
|
|
5
5
|
user_reference: '*' | string;
|
|
6
6
|
};
|
|
7
|
-
export type DashboardPermission = {
|
|
7
|
+
export declare type DashboardPermission = {
|
|
8
8
|
dashboardId: string;
|
|
9
9
|
scope: 'read' | 'read_write';
|
|
10
10
|
token: string;
|