@vizzly/services 0.7.0 → 0.7.1-dev-b20a0c09c1eedef43690cbdff448965dfea9c70a

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.
Files changed (108) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/services/src/Services/APIServices.d.ts +153 -0
  3. package/dist/services/src/Services/CellServices.d.ts +4 -4
  4. package/dist/services/src/Services/ComponentLibraryServices.d.ts +4 -4
  5. package/dist/services/src/Services/DashboardServices.d.ts +1 -1
  6. package/dist/services/src/Services/ViewServices.d.ts +61 -0
  7. package/dist/services/src/index.d.ts +17 -13
  8. package/dist/shared-logic/src/AI/types.d.ts +12 -0
  9. package/dist/shared-logic/src/ApiResource/index.d.ts +7 -0
  10. package/dist/shared-logic/src/AreaChart/attributesSchema.d.ts +1 -1
  11. package/dist/shared-logic/src/BarChart/attributesSchema.d.ts +1 -1
  12. package/dist/shared-logic/src/Base64/index.d.ts +3 -0
  13. package/dist/shared-logic/src/BasicTable/attributesSchema.d.ts +1 -1
  14. package/dist/shared-logic/src/ComboChart/attributesSchema.d.ts +1 -1
  15. package/dist/shared-logic/src/Component/Component.d.ts +1 -3
  16. package/dist/shared-logic/src/Component/attributesSchema.d.ts +2 -2
  17. package/dist/shared-logic/src/Component/constants.d.ts +4 -0
  18. package/dist/shared-logic/src/Component/setAttributes.d.ts +1 -1
  19. package/dist/shared-logic/src/Component/sharedSchemas.d.ts +8 -7
  20. package/dist/shared-logic/src/Component/types.d.ts +30 -2
  21. package/dist/shared-logic/src/ComponentInterface/types.d.ts +3 -1
  22. package/dist/shared-logic/src/DashboardAPI/dashboardAPI/creating.d.ts +18 -0
  23. package/dist/shared-logic/src/DashboardAPI/dashboardAPI/updating.d.ts +16 -0
  24. package/dist/shared-logic/src/DashboardAPI/dashboardAPI.d.ts +17 -0
  25. package/dist/shared-logic/src/DashboardAPI/dashboardManager.d.ts +6 -0
  26. package/dist/shared-logic/src/DashboardAPI/dataConfigurationAndIdentity.d.ts +7 -0
  27. package/dist/shared-logic/src/DashboardAPI/dataSets.d.ts +12 -0
  28. package/dist/shared-logic/src/DashboardAPI/getDashboardAdminOverride.d.ts +1 -0
  29. package/dist/shared-logic/src/DashboardAPI/types.d.ts +17 -0
  30. package/dist/shared-logic/src/DashboardPermission/index.d.ts +7 -0
  31. package/dist/shared-logic/src/DashboardPermission/types.d.ts +12 -0
  32. package/dist/shared-logic/src/DataPanelConfig/types.d.ts +8 -1
  33. package/dist/shared-logic/src/DataTable/attributesSchema.d.ts +1 -1
  34. package/dist/shared-logic/src/DataTable/types.d.ts +1 -0
  35. package/dist/shared-logic/src/Documentation/index.d.ts +2 -0
  36. package/dist/shared-logic/src/Documentation/joiToDocumentation.d.ts +4 -0
  37. package/dist/shared-logic/src/Documentation/joiToSchemaDefinition.d.ts +2 -0
  38. package/dist/shared-logic/src/FormatPanelConfig/types.d.ts +5 -1
  39. package/dist/shared-logic/src/IdentityConfig/IdentityConfig.d.ts +4 -0
  40. package/dist/shared-logic/src/IdentityConfig/index.d.ts +1 -0
  41. package/dist/shared-logic/src/JWT/JWT.d.ts +2 -0
  42. package/dist/shared-logic/src/LineChart/attributesSchema.d.ts +1 -1
  43. package/dist/shared-logic/src/MercatorMap/attributesSchema.d.ts +1 -1
  44. package/dist/shared-logic/src/PieChart/attributesSchema.d.ts +1 -1
  45. package/dist/shared-logic/src/Progress/attributesSchema.d.ts +3 -0
  46. package/dist/shared-logic/src/Progress/index.d.ts +5 -0
  47. package/dist/shared-logic/src/Progress/types.d.ts +2 -0
  48. package/dist/shared-logic/src/Project/types.d.ts +67 -0
  49. package/dist/shared-logic/src/Query/validate.d.ts +6 -6
  50. package/dist/shared-logic/src/ScatterChart/attributesSchema.d.ts +1 -1
  51. package/dist/shared-logic/src/SingleStat/attributesSchema.d.ts +1 -1
  52. package/dist/shared-logic/src/SingleStat/upcastSingleValueAttributes.d.ts +4 -0
  53. package/dist/shared-logic/src/Table/attributesSchema.d.ts +1 -1
  54. package/dist/shared-logic/src/Theme/types.d.ts +7 -0
  55. package/dist/shared-logic/src/api/httpClient.d.ts +1 -0
  56. package/dist/shared-logic/src/api/index.d.ts +71 -0
  57. package/dist/shared-logic/src/api/queryEngine/createDashboard.d.ts +18 -0
  58. package/dist/shared-logic/src/api/queryEngine/fetchDataSets.d.ts +4 -0
  59. package/dist/shared-logic/src/api/queryEngine/multiGetDashboards.d.ts +7 -0
  60. package/dist/shared-logic/src/api/queryEngine/updateDashboard.d.ts +13 -0
  61. package/dist/shared-logic/src/api/types.d.ts +1 -0
  62. package/dist/shared-logic/src/api/vizzly/askAi/types.d.ts +2 -0
  63. package/dist/shared-logic/src/api/vizzly/askAi/validateAndUpcast.d.ts +5 -0
  64. package/dist/shared-logic/src/api/vizzly/askAi.d.ts +12 -0
  65. package/dist/shared-logic/src/api/vizzly/createDashboard.d.ts +18 -0
  66. package/dist/shared-logic/src/api/vizzly/createDashboardAccess.d.ts +8 -0
  67. package/dist/shared-logic/src/api/vizzly/createProjectApiKey.d.ts +2 -0
  68. package/dist/shared-logic/src/api/vizzly/createQueryEngineUser.d.ts +2 -0
  69. package/dist/shared-logic/src/api/vizzly/createSelfHostedDynamicQueryEngine.d.ts +3 -0
  70. package/dist/shared-logic/src/api/vizzly/createSelfHostedInBrowserQueryEngineProject.d.ts +3 -0
  71. package/dist/shared-logic/src/api/vizzly/createSelfHostedQueryEngineProject.d.ts +3 -0
  72. package/dist/shared-logic/src/api/vizzly/createVizzlyConfigVersion.d.ts +2 -0
  73. package/dist/shared-logic/src/api/vizzly/getConnection.d.ts +7 -0
  74. package/dist/shared-logic/src/api/vizzly/getManagedQueryEngineKeyPair.d.ts +5 -0
  75. package/dist/shared-logic/src/api/vizzly/getParentDashboards.d.ts +9 -0
  76. package/dist/shared-logic/src/api/vizzly/getProject.d.ts +3 -0
  77. package/dist/shared-logic/src/api/vizzly/getQueryEngineUser.d.ts +3 -0
  78. package/dist/shared-logic/src/api/vizzly/getTeamMembers.d.ts +11 -0
  79. package/dist/shared-logic/src/api/vizzly/getVizzlyConfig.d.ts +4 -0
  80. package/dist/shared-logic/src/api/vizzly/multiGetDashboards.d.ts +7 -0
  81. package/dist/shared-logic/src/api/vizzly/multiGetEncryptedDashboards.d.ts +7 -0
  82. package/dist/shared-logic/src/api/vizzly/saveConnection.d.ts +2 -0
  83. package/dist/shared-logic/src/api/vizzly/saveEncryptedProjectEncryptionSecret.d.ts +2 -0
  84. package/dist/shared-logic/src/api/vizzly/saveScheduledReport.d.ts +6 -0
  85. package/dist/shared-logic/src/api/vizzly/updateDashboard.d.ts +18 -0
  86. package/dist/shared-logic/src/api/vizzly/updateProjectApiKey.d.ts +6 -0
  87. package/dist/shared-logic/src/errors/AIUsageLimitReached.d.ts +4 -0
  88. package/dist/shared-logic/src/errors/CorruptedView.d.ts +1 -1
  89. package/dist/shared-logic/src/errors/DashboardQuotaReached.d.ts +4 -0
  90. package/dist/shared-logic/src/errors/EncryptedProjectSecretAlreadyExists.d.ts +4 -0
  91. package/dist/shared-logic/src/errors/FailedToCreateDashboard.d.ts +4 -0
  92. package/dist/shared-logic/src/errors/FailedToCreateDashboardAccess.d.ts +4 -0
  93. package/dist/shared-logic/src/errors/FailedToGetDashboard.d.ts +4 -0
  94. package/dist/shared-logic/src/errors/FailedToLoadIdentity.d.ts +4 -0
  95. package/dist/shared-logic/src/errors/FailedToResolveDataSets.d.ts +4 -0
  96. package/dist/shared-logic/src/errors/FailedToSaveVizzlyConfigVersion.d.ts +3 -0
  97. package/dist/shared-logic/src/errors/FailedToUpdateDashboard.d.ts +4 -0
  98. package/dist/shared-logic/src/errors/InvalidDataSetsPropType.d.ts +4 -0
  99. package/dist/shared-logic/src/errors/InvalidIdentityReturn.d.ts +4 -0
  100. package/dist/shared-logic/src/errors/ProjectEncryptedSecretAlreadySaved.d.ts +4 -0
  101. package/dist/shared-logic/src/errors/ReadOnlyPermissionNotFound.d.ts +4 -0
  102. package/dist/shared-logic/src/errors/ReadPermissionNotFound.d.ts +4 -0
  103. package/dist/shared-logic/src/errors/VizzlyApiCallErrorFailedToSetupProject.d.ts +4 -0
  104. package/dist/shared-logic/src/errors/WritePermissionNotFound.d.ts +4 -0
  105. package/dist/shared-logic/src/getComponentInterface.d.ts +1 -0
  106. package/package.json +1 -1
  107. package/dist/services/src/Services/ComponentServices.d.ts +0 -58
  108. package/dist/shared-logic/src/SingleStat/upcastSingleStatAttributes.d.ts +0 -3
@@ -0,0 +1,17 @@
1
+ import { Dashboard } from 'shared-logic/src/Dashboard/types';
2
+ import { QueryEngineEndpoint } from '../QueryEngineConfig/types';
3
+ export type VizzlyDashboard = {
4
+ id: Dashboard['id'];
5
+ parentDashboardId: Dashboard['parentDashboardId'] | undefined;
6
+ display: Dashboard['display'];
7
+ componentLibrary: Dashboard['componentLibrary'];
8
+ createdAt: Dashboard['createdAt'];
9
+ updatedAt: Dashboard['updatedAt'];
10
+ metadata: Dashboard['metadata'];
11
+ };
12
+ export type DashboardStorageStrategy = {
13
+ strategy: 'vizzlyApi';
14
+ } | {
15
+ strategy: 'queryEngine';
16
+ endpoint: QueryEngineEndpoint;
17
+ };
@@ -0,0 +1,7 @@
1
+ import { DashboardPermission } from './types';
2
+ export declare const getDashboardIds: (dashboardPermissions: DashboardPermission[]) => Array<string>;
3
+ export declare const getReadPermission: (dashboardId: string, dashboardPermissions: DashboardPermission[]) => DashboardPermission;
4
+ export declare const getReadOnlyPermission: (dashboardId: string, dashboardPermissions: DashboardPermission[]) => DashboardPermission;
5
+ export declare const getWritePermission: (dashboardId: string, dashboardPermissions: DashboardPermission[]) => DashboardPermission;
6
+ export declare const hasWritePermission: (dashboardId: string, dashboardPermissions: DashboardPermission[]) => boolean;
7
+ export declare const hasReadOnlyPermission: (dashboardId: string, dashboardPermissions: DashboardPermission[]) => boolean;
@@ -0,0 +1,12 @@
1
+ export type RawDashboardPermission = {
2
+ dashboard_id: string;
3
+ scope: 'read' | 'read_write';
4
+ token: string;
5
+ user_reference: '*' | string;
6
+ };
7
+ export type DashboardPermission = {
8
+ dashboardId: string;
9
+ scope: 'read' | 'read_write';
10
+ token: string;
11
+ userReference: '*' | string;
12
+ };
@@ -32,6 +32,13 @@ export type LabelledMetricSection = Section<'labelledMetrics'> & {
32
32
  title: string;
33
33
  }>;
34
34
  };
35
- export type DataPanelSection = Section<'dataSet'> | MetricsSection | FieldCollectorSection | LabelledMetricSection | Section<'customMetrics'> | DimensionSection | Section<'drilldown'> | Section<'comparison'> | Section<'comboChartDimension'> | Section<'timeDimension'> | Section<'xAxis'> | Section<'views'> | Section<'sort'> | Section<'filter'> | Section<'limit'> | Section<'pagination'> | Section<'fields'> | Section<'country'>;
35
+ export interface ProgressGoalSection<T> extends Omit<Section<T>, 'type'> {
36
+ goals?: {
37
+ field: string;
38
+ value: number;
39
+ }[];
40
+ }
41
+ export type ProgressGoalsSection = Section<'progressGoals'> & ProgressGoalSection<'progressGoals'>;
42
+ export type DataPanelSection = Section<'dataSet'> | MetricsSection | FieldCollectorSection | LabelledMetricSection | Section<'customMetrics'> | DimensionSection | Section<'drilldown'> | Section<'comparison'> | Section<'comboChartDimension'> | Section<'timeDimension'> | Section<'xAxis'> | Section<'views'> | Section<'sort'> | Section<'filter'> | Section<'limit'> | Section<'pagination'> | Section<'fields'> | Section<'country'> | ProgressGoalsSection;
36
43
  export type DataPanelConfig = Array<DataPanelSection>;
37
44
  export {};
@@ -1,3 +1,3 @@
1
- import Joi from 'joi';
1
+ import Joi from '@vizzly/joi';
2
2
  import { ComponentInterfaceConfig } from '../ComponentInterface/types';
3
3
  export declare const attributesSchema: (config: ComponentInterfaceConfig) => Joi.ObjectSchema<any>;
@@ -4,6 +4,7 @@ export type GroupedTitle = {
4
4
  colSpan: number;
5
5
  content: string;
6
6
  rowGroup?: boolean;
7
+ unformatted: string;
7
8
  };
8
9
  export type TableContent = {
9
10
  value: any;
@@ -0,0 +1,2 @@
1
+ export * from './joiToDocumentation';
2
+ export * from './joiToSchemaDefinition';
@@ -0,0 +1,4 @@
1
+ import Joi from '@vizzly/joi';
2
+ import joiToJson from 'joi-to-json';
3
+ export type SchemaDocumentation = ReturnType<typeof joiToJson>;
4
+ export declare const joiToDocumentation: (obj: Joi.Schema) => SchemaDocumentation;
@@ -0,0 +1,2 @@
1
+ import Joi from '@vizzly/joi';
2
+ export declare const joiToSchemaDefinition: (obj: Joi.Schema) => any;
@@ -35,5 +35,9 @@ export interface ConditionalFormattingSection extends Section<'conditionalFormat
35
35
  }
36
36
  export interface GoalLineSection extends Section<'goalLine'> {
37
37
  }
38
- export type FormatPanelSection = HeadingSection | FormatSection | ChartStylesSection | PrefixSection | AxisLabelsSection | LabelsSection | MapColorsSection | ConditionalFormattingSection | GoalLineSection;
38
+ export interface ProgressTypeSection<T> extends Omit<Section<T>, 'type'> {
39
+ progressType?: Omit<Section<T>, 'type'>;
40
+ }
41
+ export type ProgressTypesSection = Section<'progressType'> & ProgressTypeSection<'progressType'>;
42
+ export type FormatPanelSection = HeadingSection | FormatSection | ChartStylesSection | PrefixSection | AxisLabelsSection | LabelsSection | MapColorsSection | ConditionalFormattingSection | GoalLineSection | ProgressTypesSection;
39
43
  export type FormatPanelConfig = Array<FormatPanelSection>;
@@ -0,0 +1,4 @@
1
+ import { IdentityConfig } from './types';
2
+ export declare const init: (dashboardSessionToken: string, dataAccessToken?: string, queryEngineAccessToken?: string, dashboardAdminOverrideToken?: string | undefined | null) => IdentityConfig;
3
+ export declare const fingerprintOfDashboardAccess: (identityDashboardAccess: IdentityConfig['dashboardAccess']) => string;
4
+ export declare const logWarningsIfTokensHaveExpired: (identityConfig: IdentityConfig) => void;
@@ -0,0 +1 @@
1
+ export * from './IdentityConfig';
@@ -0,0 +1,2 @@
1
+ export declare const peek: (jwtString: string) => any;
2
+ export declare const fromToken: <T>(token: string) => T;
@@ -1,3 +1,3 @@
1
- import Joi from 'joi';
1
+ import Joi from '@vizzly/joi';
2
2
  import { ComponentInterfaceConfig } from '../ComponentInterface/types';
3
3
  export declare const attributesSchema: (config: ComponentInterfaceConfig) => Joi.ObjectSchema<any>;
@@ -1,3 +1,3 @@
1
- import Joi from 'joi';
1
+ import Joi from '@vizzly/joi';
2
2
  import { ComponentInterfaceConfig } from '../ComponentInterface/types';
3
3
  export declare const attributesSchema: (config: ComponentInterfaceConfig) => Joi.ObjectSchema<any>;
@@ -1,3 +1,3 @@
1
- import Joi from 'joi';
1
+ import Joi from '@vizzly/joi';
2
2
  import { ComponentInterfaceConfig } from '../ComponentInterface/types';
3
3
  export declare const attributesSchema: (config: ComponentInterfaceConfig) => Joi.ObjectSchema<any>;
@@ -0,0 +1,3 @@
1
+ import Joi from '@vizzly/joi';
2
+ import { ComponentInterfaceConfig } from '../ComponentInterface/types';
3
+ export declare const attributesSchema: (config: ComponentInterfaceConfig) => Joi.ObjectSchema<any>;
@@ -0,0 +1,5 @@
1
+ import { Component } from '../Component/types';
2
+ import { LoadComponentInterface } from '../ComponentInterface/types';
3
+ import { DumpedProgressAttributes } from './types';
4
+ declare const Progress: LoadComponentInterface<Component.ProgressAttributes, DumpedProgressAttributes>;
5
+ export default Progress;
@@ -0,0 +1,2 @@
1
+ import { Component } from '../Component/types';
2
+ export type DumpedProgressAttributes = Component.ProgressAttributes;
@@ -0,0 +1,67 @@
1
+ import { Dashboard } from '../Dashboard';
2
+ export type ProjectType = 'instant_dashboard' | 'self_hosted' | 'managed_query_engine' | 'in_browser' | 'dynamic_self_hosted_query_engine';
3
+ export type Project = {
4
+ instant_dashboard_id: string | null;
5
+ managed_query_engine_id: string | null;
6
+ id: string;
7
+ name: string;
8
+ type: ProjectType;
9
+ created_at: Date;
10
+ share_links?: ShareLink[];
11
+ parent_dashboards: Dashboard[];
12
+ key_pairs: RawKeyPair[];
13
+ encrypted_encryption_secret: string | null;
14
+ query_engine_users: Array<{
15
+ id: string;
16
+ /** Hashed and encrypted using the encryption secret on the query engine */
17
+ password: string | null;
18
+ user: {
19
+ id: string;
20
+ email: string;
21
+ first_name: string;
22
+ last_name: string;
23
+ };
24
+ }>;
25
+ config_store: {
26
+ id: string;
27
+ versions: Array<{
28
+ id: string;
29
+ created_at: string;
30
+ updated_at: string;
31
+ }>;
32
+ };
33
+ connections: Array<{
34
+ id: string;
35
+ created_at: string;
36
+ updated_at: string;
37
+ disabled: boolean;
38
+ }>;
39
+ api_keys: Array<{
40
+ id: string;
41
+ created_at: string;
42
+ disabled: boolean;
43
+ }>;
44
+ deleted: boolean;
45
+ data_upload: {
46
+ created_at: string;
47
+ id: string;
48
+ updated_at: string;
49
+ };
50
+ };
51
+ export type ShareLink = {
52
+ id: string;
53
+ token: string;
54
+ active: boolean;
55
+ created_at: string;
56
+ title: string;
57
+ email: string | null;
58
+ };
59
+ export type RawKeyPair = {
60
+ id: string;
61
+ uploaded_by: string;
62
+ public_key: string;
63
+ organisation_id: string;
64
+ uploaded_at: string;
65
+ updated_at: string;
66
+ disabled: boolean;
67
+ };
@@ -1,4 +1,4 @@
1
- import Joi from 'joi';
1
+ import Joi from '@vizzly/joi';
2
2
  import { QueryEngineConfig } from '../QueryEngineConfig/types';
3
3
  import { Query } from './types';
4
4
  export declare class InvalidQuery extends Error {
@@ -7,10 +7,10 @@ type JoiOptions = {
7
7
  convert: boolean;
8
8
  stripUnknown: boolean;
9
9
  };
10
- export declare const postgresQuerySchema: Joi.AlternativesSchema<any>;
11
- export declare const snowflakeQuerySchema: Joi.AlternativesSchema<any>;
12
- export declare const mariadbQuerySchema: Joi.AlternativesSchema<any>;
13
- export declare const mysqlQuerySchema: Joi.AlternativesSchema<any>;
14
- export declare const bigqueryQuerySchema: Joi.AlternativesSchema<any>;
10
+ export declare const postgresQuerySchema: Joi.AlternativesSchema<unknown>;
11
+ export declare const snowflakeQuerySchema: Joi.AlternativesSchema<unknown>;
12
+ export declare const mariadbQuerySchema: Joi.AlternativesSchema<unknown>;
13
+ export declare const mysqlQuerySchema: Joi.AlternativesSchema<unknown>;
14
+ export declare const bigqueryQuerySchema: Joi.AlternativesSchema<unknown>;
15
15
  export declare const validate: (queries: Array<unknown>, queryEngineConfig: QueryEngineConfig, joiOptions: JoiOptions) => Array<Query>;
16
16
  export {};
@@ -1,3 +1,3 @@
1
- import Joi from 'joi';
1
+ import Joi from '@vizzly/joi';
2
2
  import { ComponentInterfaceConfig } from '../ComponentInterface/types';
3
3
  export declare const attributesSchema: (config: ComponentInterfaceConfig) => Joi.ObjectSchema<any>;
@@ -1,3 +1,3 @@
1
- import Joi from 'joi';
1
+ import Joi from '@vizzly/joi';
2
2
  import { ComponentInterfaceConfig } from '../ComponentInterface/types';
3
3
  export declare const attributesSchema: (config: ComponentInterfaceConfig) => Joi.ObjectSchema<any>;
@@ -0,0 +1,4 @@
1
+ import { Component } from '../Component/types';
2
+ import { DumpedSingleStatAttributes } from './types';
3
+ import { DumpedProgressAttributes } from '../Progress/types';
4
+ export declare const upcastSingleValueAttributes: (dumped: DumpedSingleStatAttributes | DumpedProgressAttributes) => Component.SingleStatAttributes | Component.ProgressAttributes;
@@ -1,4 +1,4 @@
1
- import Joi from 'joi';
1
+ import Joi from '@vizzly/joi';
2
2
  import { QueryEngineConfig } from '../QueryEngineConfig/types';
3
3
  export declare const conditionalFormattingRuleSchema: (queryEngineConfig: QueryEngineConfig) => Joi.ObjectSchema<any>;
4
4
  export declare const prefixSchema: Joi.ObjectSchema<any>;
@@ -218,10 +218,15 @@ export declare namespace VizzlyTheming {
218
218
  };
219
219
  interface List extends Panel {
220
220
  title?: FontStyle;
221
+ subTitle?: ListSubTitle;
221
222
  fontSize?: CSSProperties['fontSize'];
222
223
  color?: CSSProperties['color'];
223
224
  icon?: ListIcon;
224
225
  }
226
+ type ListSubTitle = FontStyle & {
227
+ textTransform?: CSSProperties['textTransform'];
228
+ borderBottom?: CSSProperties['borderBottom'];
229
+ };
225
230
  type ListIcon = {
226
231
  color?: CSSProperties['color'];
227
232
  background?: CSSProperties['background'];
@@ -342,6 +347,8 @@ export declare namespace VizzlyTheming {
342
347
  row?: {
343
348
  padding?: CSSProperties['padding'];
344
349
  borderBottom?: CSSProperties['borderBottom'];
350
+ borderLeft?: CSSProperties['borderLeft'];
351
+ borderRight?: CSSProperties['borderRight'];
345
352
  };
346
353
  level?: {
347
354
  2: {
@@ -3,4 +3,5 @@ import { Request } from './types';
3
3
  export declare const httpClient: (config: ApiConfig) => <T>(request: Request<any>) => Promise<{
4
4
  status: number;
5
5
  body: T;
6
+ headers: Headers | null;
6
7
  }>;
@@ -0,0 +1,71 @@
1
+ import { ApiConfig } from '../ApiConfig';
2
+ export declare const api: (config: ApiConfig) => {
3
+ config: ApiConfig;
4
+ getParentDashboards: () => Promise<{
5
+ id: string;
6
+ created_at: string;
7
+ updated_at: string;
8
+ webhook_id: string | null;
9
+ }[] | undefined>;
10
+ saveScheduledReport: (params: {
11
+ dashboardAccessToken: string;
12
+ scheduledReportId: string;
13
+ cronSchedule: string | null;
14
+ }) => Promise<boolean>;
15
+ createDashboardAccess: (dashboardAccessToken: string, dashboardAdminOverrideToken: string | undefined, abortSignal: AbortSignal) => Promise<{
16
+ permissions: import("../DashboardPermission/types").DashboardPermission[];
17
+ }>;
18
+ multiGetDashboards: (dashboardAccessTokens: string[], abortSignal: AbortSignal) => Promise<import("./vizzly/multiGetDashboards").Response>;
19
+ multiGetEncryptedDashboards: (dashboardAccessTokens: string[]) => Promise<import("./vizzly/multiGetEncryptedDashboards").Response>;
20
+ createDashboard: (params: import("./vizzly/createDashboard").CreateDashboardParams) => Promise<{
21
+ dashboard: import("../Dashboard").RawDashboard;
22
+ permissions: import("../DashboardPermission/types").RawDashboardPermission[];
23
+ }>;
24
+ updateDashboard: (params: import("./vizzly/updateDashboard").UpdateDashboardParams) => Promise<import("./vizzly/updateDashboard").EncryptedDashboardUpdateResponse | import("./vizzly/updateDashboard").UnEncryptedDashboardUpdateResponse>;
25
+ askAi: (conversationId: string | undefined, currentAttributes: Partial<import("../Component/types").Component.Attributes>, question: string, dashboardAccessToken: string, dataSets: import("../DataSet/types").DataSet[], queryEngineConfig: import("../QueryEngineConfig/types").QueryEngineConfig) => Promise<{
26
+ conversationId: string | undefined;
27
+ attributes: import("../Component/types").Component.Attributes;
28
+ messageHistory: {
29
+ content: string;
30
+ sender_type: "user" | "ai";
31
+ status: "active";
32
+ }[];
33
+ }>;
34
+ createVizzlyConfigVersion: (projectId: string, encryptedVizzlyConfig: string) => Promise<boolean>;
35
+ getVizzlyConfig: (projectId: string) => Promise<{
36
+ encryptedConfig: string | null;
37
+ } | undefined>;
38
+ saveConnection: (projectId: string, encryptedConnection: string, encryptedConfig: string) => Promise<boolean>;
39
+ getConnection: (projectId: string) => Promise<{
40
+ status: number;
41
+ encryptedCredentials: string;
42
+ } | {
43
+ status: number;
44
+ }>;
45
+ createProjectApiKey: (projectId: string) => Promise<string>;
46
+ updateProjectApiKey: (projectId: string, projectApiKeyId: string, updateParams: {
47
+ disabled: boolean;
48
+ }) => Promise<string>;
49
+ getProjectAccessToken: (projectId: string, appSessionAuthToken?: string | undefined, resourceFilters?: string[] | undefined) => Promise<string | undefined>;
50
+ getProject: (projectId: string) => Promise<import("../Project/types").Project | null>;
51
+ createQueryEngineUser: (projectId: string, email: string, password: string) => Promise<boolean>;
52
+ getQueryEngineUser: (projectId: string, email: string) => Promise<{
53
+ id: string;
54
+ password: string | null;
55
+ user: {
56
+ id: string;
57
+ email: string;
58
+ first_name: string;
59
+ last_name: string;
60
+ };
61
+ } | undefined>;
62
+ getProjectTeamMembers: (projectId: string) => Promise<import("./vizzly/getTeamMembers").TeamMember[] | undefined>;
63
+ createSelfHostedQueryEngineProject: (appSessionToken?: string | undefined) => Promise<import("../Project/types").Project | undefined>;
64
+ createSelfHostedDynamicQueryEngineProject: (appSessionToken?: string | undefined) => Promise<import("../Project/types").Project | undefined>;
65
+ createSelfHostedInBrowserQueryEngineProject: (appSessionToken?: string | undefined) => Promise<import("../Project/types").Project | undefined>;
66
+ getManagedQueryEngineKeyPair: (managedProjectId: string, keyPairId: string, appSessionToken?: string | undefined) => Promise<{
67
+ publicKey: string;
68
+ privateKey: string | null;
69
+ } | undefined>;
70
+ saveEncryptedProjectEncryptionSecret: (projectId: string, encryptedProjectEncryptionSecret: string, allowRotation?: boolean) => Promise<boolean>;
71
+ };
@@ -0,0 +1,18 @@
1
+ import { RawDashboard, SaveableDashboardDefinition } from '../../Dashboard';
2
+ import { RawDashboardPermission } from '../../DashboardPermission/types';
3
+ import { QueryEngineEndpoint } from '../../QueryEngineConfig/types';
4
+ export type Response = {
5
+ dashboard: RawDashboard;
6
+ permissions: Array<RawDashboardPermission>;
7
+ };
8
+ export type CreateDashboardParams = {
9
+ dashboardAccessToken: string;
10
+ definition: SaveableDashboardDefinition;
11
+ meta: any;
12
+ parentDashboardId: string | null;
13
+ permissions: Array<any>;
14
+ };
15
+ export declare const createDashboardViaQueryEngine: (queryEngineEndpoint: QueryEngineEndpoint) => (params: CreateDashboardParams) => Promise<{
16
+ dashboard: RawDashboard;
17
+ permissions: Array<RawDashboardPermission>;
18
+ }>;
@@ -0,0 +1,4 @@
1
+ import { DataSet } from '../../DataSet/types';
2
+ import { QueryEngineEndpoint } from '../../QueryEngineConfig/types';
3
+ declare const _default: (queryEngineEndpoint: QueryEngineEndpoint, accessToken: string, abortSignal?: AbortSignal) => Promise<DataSet[]>;
4
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { QueryEngineEndpoint } from '../../QueryEngineConfig/types';
2
+ import { RawDashboard } from '../../Dashboard';
3
+ export type Response = {
4
+ found: RawDashboard[];
5
+ not_found: string[];
6
+ };
7
+ export declare const multiGetDashboards: (queryEngineEndpoint: QueryEngineEndpoint) => (dashboardAccessTokens: string[], abortSignal: AbortSignal) => Promise<Response>;
@@ -0,0 +1,13 @@
1
+ import * as Dashboard from '../../Dashboard/Dashboard';
2
+ import { RawDashboard, SaveableDashboardDefinition } from '../../Dashboard';
3
+ import { QueryEngineEndpoint } from '../../QueryEngineConfig/types';
4
+ export type Response = {
5
+ dashboard: RawDashboard<Dashboard.RawDefinition>;
6
+ };
7
+ export type UpdateDashboardParams = {
8
+ dashboardSessionToken: string;
9
+ definition?: SaveableDashboardDefinition;
10
+ meta?: any;
11
+ deleted?: boolean;
12
+ };
13
+ export declare const updateDashboardViaQueryEngine: (queryEngineEndpoint: QueryEngineEndpoint) => (params: UpdateDashboardParams) => Promise<Response>;
@@ -21,4 +21,5 @@ export type NoBody = undefined;
21
21
  export type HttpClient = <ResponseBody>(request: Request<any>) => Promise<{
22
22
  status: number;
23
23
  body: ResponseBody;
24
+ headers: Headers | null;
24
25
  }>;
@@ -0,0 +1,2 @@
1
+ import { Component } from '../../../Component/types';
2
+ export type AIAttributes = Partial<Component.Attributes>;
@@ -0,0 +1,5 @@
1
+ import { AIAttributes } from './types';
2
+ import { QueryEngineConfig } from '../../../QueryEngineConfig/types';
3
+ import { Component } from '../../../Component/types';
4
+ declare const validateAndUpcast: (aiAttributes: Partial<AIAttributes>, queryEngineConfig: QueryEngineConfig) => Component.Attributes;
5
+ export default validateAndUpcast;
@@ -0,0 +1,12 @@
1
+ import { HttpClient } from '../types';
2
+ import { DataSet } from '../../DataSet/types';
3
+ import { QueryEngineConfig } from '../../QueryEngineConfig/types';
4
+ import { Component } from '../../Component/types';
5
+ import { ConversationState } from '../../AI/types';
6
+ type AskAiReponse = {
7
+ conversationId: ConversationState['conversationId'];
8
+ attributes: Component.Attributes;
9
+ messageHistory: ConversationState['messageHistory'];
10
+ };
11
+ export declare const askAi: (httpClient: HttpClient) => (conversationId: string | undefined, currentAttributes: Partial<Component.Attributes>, question: string, dashboardAccessToken: string, dataSets: DataSet[], queryEngineConfig: QueryEngineConfig) => Promise<AskAiReponse>;
12
+ export {};
@@ -0,0 +1,18 @@
1
+ import { RawDashboard, SaveableDashboardDefinition } from '../../Dashboard';
2
+ import { RawDashboardPermission } from '../../DashboardPermission/types';
3
+ import { HttpClient } from '../types';
4
+ export type Response = {
5
+ dashboard: RawDashboard;
6
+ permissions: Array<RawDashboardPermission>;
7
+ };
8
+ export type CreateDashboardParams = {
9
+ dashboardAccessToken: string;
10
+ definition: SaveableDashboardDefinition;
11
+ meta: any;
12
+ parentDashboardId: string | null;
13
+ permissions: Array<any>;
14
+ };
15
+ export declare const createDashboard: (httpClient: HttpClient) => (params: CreateDashboardParams) => Promise<{
16
+ dashboard: RawDashboard;
17
+ permissions: Array<RawDashboardPermission>;
18
+ }>;
@@ -0,0 +1,8 @@
1
+ import { HttpClient } from '../types';
2
+ import { DashboardPermission, RawDashboardPermission } from '../../DashboardPermission/types';
3
+ export type Response = {
4
+ permissions: Array<RawDashboardPermission>;
5
+ };
6
+ export declare const createDashboardAccess: (httpClient: HttpClient) => (dashboardAccessToken: string, dashboardAdminOverrideToken: string | undefined, abortSignal: AbortSignal) => Promise<{
7
+ permissions: Array<DashboardPermission>;
8
+ }>;
@@ -0,0 +1,2 @@
1
+ import { HttpClient } from '../types';
2
+ export declare const createProjectApiKey: (httpClient: HttpClient) => (projectId: string) => Promise<string>;
@@ -0,0 +1,2 @@
1
+ import { HttpClient } from '../types';
2
+ export declare const createQueryEngineUser: (httpClient: HttpClient) => (projectId: string, email: string, password: string) => Promise<boolean>;
@@ -0,0 +1,3 @@
1
+ import { Project } from '../../Project/types';
2
+ import { HttpClient } from '../types';
3
+ export declare const createSelfHostedDynamicQueryEngineProject: (httpClient: HttpClient) => (appSessionToken?: string) => Promise<Project | undefined>;
@@ -0,0 +1,3 @@
1
+ import { Project } from '../../Project/types';
2
+ import { HttpClient } from '../types';
3
+ export declare const createSelfHostedInBrowserQueryEngineProject: (httpClient: HttpClient) => (appSessionToken?: string) => Promise<Project | undefined>;
@@ -0,0 +1,3 @@
1
+ import { Project } from '../../Project/types';
2
+ import { HttpClient } from '../types';
3
+ export declare const createSelfHostedQueryEngineProject: (httpClient: HttpClient) => (appSessionToken?: string) => Promise<Project | undefined>;
@@ -0,0 +1,2 @@
1
+ import { HttpClient } from '../types';
2
+ export declare const createVizzlyConfigVersion: (httpClient: HttpClient) => (projectId: string, encryptedVizzlyConfig: string) => Promise<boolean>;
@@ -0,0 +1,7 @@
1
+ import { HttpClient } from '../types';
2
+ export declare const getConnection: (httpClient: HttpClient) => (projectId: string) => Promise<{
3
+ status: number;
4
+ encryptedCredentials: string;
5
+ } | {
6
+ status: number;
7
+ }>;
@@ -0,0 +1,5 @@
1
+ import { HttpClient } from '../types';
2
+ export declare const getManagedQueryEngineKeyPair: (httpClient: HttpClient) => (managedProjectId: string, keyPairId: string, appSessionToken?: string) => Promise<{
3
+ publicKey: string;
4
+ privateKey: string | null;
5
+ } | undefined>;
@@ -0,0 +1,9 @@
1
+ import { HttpClient } from '../types';
2
+ type MinimalDashboard = {
3
+ id: string;
4
+ created_at: string;
5
+ updated_at: string;
6
+ webhook_id: string | null;
7
+ };
8
+ export declare const getParentDashboards: (httpClient: HttpClient) => () => Promise<MinimalDashboard[] | undefined>;
9
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Project } from '../../Project/types';
2
+ import { HttpClient } from '../types';
3
+ export declare const getProject: (httpClient: HttpClient) => (projectId: string) => Promise<Project | null>;
@@ -0,0 +1,3 @@
1
+ import { Project } from '../../Project/types';
2
+ import { HttpClient } from '../types';
3
+ export declare const getQueryEngineUser: (httpClient: HttpClient) => (projectId: string, email: string) => Promise<Project['query_engine_users'][number] | undefined>;
@@ -0,0 +1,11 @@
1
+ import { HttpClient } from '../types';
2
+ export type TeamMember = {
3
+ id: string;
4
+ organisation_name: string;
5
+ user_id: string;
6
+ email: string;
7
+ first_name: string;
8
+ last_name: string;
9
+ status: 'pending' | 'active' | 'removed';
10
+ };
11
+ export declare const getProjectTeamMembers: (httpClient: HttpClient) => (projectId: string) => Promise<Array<TeamMember> | undefined>;
@@ -0,0 +1,4 @@
1
+ import { HttpClient } from '../types';
2
+ export declare const getVizzlyConfig: (httpClient: HttpClient) => (projectId: string) => Promise<{
3
+ encryptedConfig: string | null;
4
+ } | undefined>;
@@ -0,0 +1,7 @@
1
+ import { RawDashboard } from '../../Dashboard';
2
+ import { HttpClient } from '../types';
3
+ export type Response = {
4
+ found: RawDashboard[];
5
+ not_found: string[];
6
+ };
7
+ export declare const multiGetDashboards: (httpClient: HttpClient) => (dashboardAccessTokens: string[], abortSignal: AbortSignal) => Promise<Response>;
@@ -0,0 +1,7 @@
1
+ import { RawDashboard, RawDefinition } from '../../Dashboard';
2
+ import { HttpClient } from '../types';
3
+ export type Response = {
4
+ found: RawDashboard<string | RawDefinition>[];
5
+ not_found: string[];
6
+ };
7
+ export declare const multiGetEncryptedDashboards: (httpClient: HttpClient) => (dashboardAccessTokens: string[]) => Promise<Response>;
@@ -0,0 +1,2 @@
1
+ import { HttpClient } from '../types';
2
+ export declare const saveConnection: (httpClient: HttpClient) => (projectId: string, encryptedConnection: string, encryptedConfig: string) => Promise<boolean>;
@@ -0,0 +1,2 @@
1
+ import { HttpClient } from '../types';
2
+ export declare const saveEncryptedProjectEncryptionSecret: (httpClient: HttpClient) => (projectId: string, encryptedProjectEncryptionSecret: string, allowRotation?: boolean) => Promise<boolean>;
@@ -0,0 +1,6 @@
1
+ import { HttpClient } from '../types';
2
+ export declare const saveScheduledReport: (httpClient: HttpClient) => (params: {
3
+ dashboardAccessToken: string;
4
+ scheduledReportId: string;
5
+ cronSchedule: string | null;
6
+ }) => Promise<boolean>;