@vizzly/services 0.11.0 → 0.12.0-dev-e9cb501d005236550d32fd4ffe3eaeb1307996b1
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/{CellServices.d.ts → Cell.d.ts} +4 -4
- package/dist/services/src/Services/{DashboardServices.d.ts → Dashboard.d.ts} +6 -6
- package/dist/services/src/Services/{HeaderServices.d.ts → Header.d.ts} +1 -1
- package/dist/services/src/Services/{ComponentLibraryServices.d.ts → Library.d.ts} +8 -8
- package/dist/services/src/Services/{RowServices.d.ts → Row.d.ts} +1 -1
- package/dist/services/src/Services/View.d.ts +65 -0
- package/dist/services/src/VizzlyLoader.d.ts +44 -0
- package/dist/services/src/errors/TimeoutWaitingForVizzlyInstance.d.ts +3 -0
- package/dist/services/src/errors/VizzlyInstanceNotLoaded.d.ts +3 -0
- package/dist/services/src/index.d.ts +124 -31
- package/dist/services/src/schemaValidations/dashboard.d.ts +3 -3
- package/dist/services/src/schemaValidations/filters.d.ts +1 -1
- package/dist/services/src/schemaValidations/library.d.ts +2 -2
- package/dist/shared-logic/src/Callbacks/types.d.ts +2 -0
- package/dist/shared-logic/src/Component/sharedSchemas.d.ts +1 -1
- package/dist/shared-logic/src/Dashboard/fromRaw.d.ts +4 -0
- package/dist/shared-logic/src/Dashboard/types.d.ts +8 -0
- package/dist/shared-logic/src/DashboardAPI/dataSets.d.ts +2 -5
- package/dist/shared-logic/src/GlobalLibrary/GlobalLibrary.d.ts +1 -0
- package/dist/shared-logic/src/GlobalLibrary/fromRaw.d.ts +10 -0
- package/dist/shared-logic/src/GlobalLibrary/index.d.ts +2 -0
- package/dist/shared-logic/src/GlobalLibrary/types.d.ts +16 -0
- package/dist/shared-logic/src/QueryEngineConfig/loadQueryEngineConfig.d.ts +2 -2
- package/dist/shared-logic/src/QueryEngineConfig/supportedConstants.d.ts +125 -0
- package/dist/shared-logic/src/Theme/types.d.ts +1 -0
- package/dist/shared-logic/src/Translations/translateQueryEngineConfig.d.ts +3 -0
- package/dist/shared-logic/src/Translations/translation.types.d.ts +43 -8
- package/dist/shared-logic/src/ViewConfiguration/types.d.ts +4 -0
- package/dist/shared-logic/src/errors/InvalidIdentityPropType.d.ts +4 -0
- package/dist/shared-logic/src/getVizzly.d.ts +5 -0
- package/package.json +13 -4
- package/dist/services/src/Services/APIServices.d.ts +0 -155
- package/dist/services/src/Services/ViewServices.d.ts +0 -61
- package/dist/shared-logic/src/AI/types.d.ts +0 -31
- package/dist/shared-logic/src/ApiResource/index.d.ts +0 -7
- package/dist/shared-logic/src/DashboardAPI/clientDashboardSchema.d.ts +0 -3
- package/dist/shared-logic/src/DashboardAPI/dashboardAPI/creating.d.ts +0 -19
- package/dist/shared-logic/src/DashboardAPI/dashboardAPI/updating.d.ts +0 -19
- package/dist/shared-logic/src/DashboardAPI/dashboardAPI.d.ts +0 -17
- package/dist/shared-logic/src/DashboardAPI/dashboardManager.d.ts +0 -9
- package/dist/shared-logic/src/DashboardPermission/index.d.ts +0 -7
- package/dist/shared-logic/src/DashboardPermission/types.d.ts +0 -12
- package/dist/shared-logic/src/Project/types.d.ts +0 -74
- package/dist/shared-logic/src/api/index.d.ts +0 -66
- package/dist/shared-logic/src/api/queryEngine/createDashboard.d.ts +0 -20
- package/dist/shared-logic/src/api/queryEngine/multiGetDashboards.d.ts +0 -7
- package/dist/shared-logic/src/api/queryEngine/updateDashboard.d.ts +0 -13
- package/dist/shared-logic/src/api/vizzly/aiActions.d.ts +0 -18
- package/dist/shared-logic/src/api/vizzly/aiHelpers/buildAIResponse.d.ts +0 -5
- package/dist/shared-logic/src/api/vizzly/aiHelpers/buildDataSets.d.ts +0 -4
- package/dist/shared-logic/src/api/vizzly/aiHelpers/checkAiResponseStatus.d.ts +0 -3
- package/dist/shared-logic/src/api/vizzly/aiHelpers/types.d.ts +0 -23
- package/dist/shared-logic/src/api/vizzly/aiHelpers/validateAndUpcastAIAttributes.d.ts +0 -4
- package/dist/shared-logic/src/api/vizzly/aiHelpers/view.d.ts +0 -10
- package/dist/shared-logic/src/api/vizzly/askAi.d.ts +0 -6
- package/dist/shared-logic/src/api/vizzly/askAiForQuestionSuggestions.d.ts +0 -4
- package/dist/shared-logic/src/api/vizzly/createDashboard.d.ts +0 -20
- package/dist/shared-logic/src/api/vizzly/createDashboardAccess.d.ts +0 -8
- package/dist/shared-logic/src/api/vizzly/createProjectApiKey.d.ts +0 -2
- package/dist/shared-logic/src/api/vizzly/createQueryEngineUser.d.ts +0 -2
- package/dist/shared-logic/src/api/vizzly/createSelfHostedDynamicQueryEngine.d.ts +0 -3
- package/dist/shared-logic/src/api/vizzly/createSelfHostedInBrowserQueryEngineProject.d.ts +0 -3
- package/dist/shared-logic/src/api/vizzly/createSelfHostedQueryEngineProject.d.ts +0 -3
- package/dist/shared-logic/src/api/vizzly/createVizzlyConfigVersion.d.ts +0 -2
- package/dist/shared-logic/src/api/vizzly/getConnection.d.ts +0 -7
- package/dist/shared-logic/src/api/vizzly/getManagedQueryEngineKeyPair.d.ts +0 -5
- package/dist/shared-logic/src/api/vizzly/getParentDashboards.d.ts +0 -9
- package/dist/shared-logic/src/api/vizzly/getProject.d.ts +0 -3
- package/dist/shared-logic/src/api/vizzly/getQueryEngineUser.d.ts +0 -3
- package/dist/shared-logic/src/api/vizzly/getTeamMembers.d.ts +0 -11
- package/dist/shared-logic/src/api/vizzly/getVizzlyConfig.d.ts +0 -4
- package/dist/shared-logic/src/api/vizzly/multiGetDashboards.d.ts +0 -7
- package/dist/shared-logic/src/api/vizzly/multiGetEncryptedDashboards.d.ts +0 -7
- package/dist/shared-logic/src/api/vizzly/saveConnection.d.ts +0 -2
- package/dist/shared-logic/src/api/vizzly/saveEncryptedProjectEncryptionSecret.d.ts +0 -2
- package/dist/shared-logic/src/api/vizzly/saveScheduledReport.d.ts +0 -6
- package/dist/shared-logic/src/api/vizzly/updateDashboard.d.ts +0 -20
- package/dist/shared-logic/src/api/vizzly/updateProjectApiKey.d.ts +0 -6
- package/dist/shared-logic/src/api/vizzly/updateQueryEngineUser.d.ts +0 -2
- package/dist/shared-logic/src/errors/AIAborted.d.ts +0 -4
- package/dist/shared-logic/src/errors/AIContainsErrors.d.ts +0 -4
- package/dist/shared-logic/src/errors/AIFailedToFetch.d.ts +0 -4
- package/dist/shared-logic/src/errors/AIUsageLimitReached.d.ts +0 -4
- package/dist/shared-logic/src/errors/DashboardQuotaReached.d.ts +0 -4
- package/dist/shared-logic/src/errors/EncryptedProjectSecretAlreadyExists.d.ts +0 -4
- package/dist/shared-logic/src/errors/FailedToCreateDashboard.d.ts +0 -4
- package/dist/shared-logic/src/errors/FailedToCreateDashboardAccess.d.ts +0 -4
- package/dist/shared-logic/src/errors/FailedToGetDashboard.d.ts +0 -4
- package/dist/shared-logic/src/errors/FailedToSaveVizzlyConfigVersion.d.ts +0 -3
- package/dist/shared-logic/src/errors/FailedToUpdateDashboard.d.ts +0 -4
- package/dist/shared-logic/src/errors/ProjectEncryptedSecretAlreadySaved.d.ts +0 -4
- package/dist/shared-logic/src/errors/ReadOnlyPermissionNotFound.d.ts +0 -4
- package/dist/shared-logic/src/errors/ReadPermissionNotFound.d.ts +0 -4
- package/dist/shared-logic/src/errors/VizzlyApiCallErrorFailedToSetupProject.d.ts +0 -4
- package/dist/shared-logic/src/errors/WritePermissionNotFound.d.ts +0 -4
- package/dist/shared-logic/src/errors/index.d.ts +0 -5
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
export declare const ALL_SUPPORTED_CONSTANTS: ({
|
|
2
|
+
namespace: string;
|
|
3
|
+
constants: {
|
|
4
|
+
'>': {
|
|
5
|
+
publicName: string;
|
|
6
|
+
validDataTypes: string[];
|
|
7
|
+
};
|
|
8
|
+
'<': {
|
|
9
|
+
publicName: string;
|
|
10
|
+
validDataTypes: string[];
|
|
11
|
+
};
|
|
12
|
+
'<=': {
|
|
13
|
+
publicName: string;
|
|
14
|
+
validDataTypes: string[];
|
|
15
|
+
};
|
|
16
|
+
'>=': {
|
|
17
|
+
publicName: string;
|
|
18
|
+
validDataTypes: string[];
|
|
19
|
+
};
|
|
20
|
+
'!=': {
|
|
21
|
+
publicName: string;
|
|
22
|
+
validDataTypes: string[];
|
|
23
|
+
};
|
|
24
|
+
is_one_of: {
|
|
25
|
+
publicName: string;
|
|
26
|
+
validDataTypes: string[];
|
|
27
|
+
};
|
|
28
|
+
'=': {
|
|
29
|
+
publicName: string;
|
|
30
|
+
validDataTypes: string[];
|
|
31
|
+
};
|
|
32
|
+
is_not_one_of: {
|
|
33
|
+
publicName: string;
|
|
34
|
+
validDataTypes: string[];
|
|
35
|
+
};
|
|
36
|
+
starts_with: {
|
|
37
|
+
publicName: string;
|
|
38
|
+
validDataTypes: string[];
|
|
39
|
+
};
|
|
40
|
+
ends_with: {
|
|
41
|
+
publicName: string;
|
|
42
|
+
validDataTypes: string[];
|
|
43
|
+
};
|
|
44
|
+
contains_substring: {
|
|
45
|
+
publicName: string;
|
|
46
|
+
validDataTypes: string[];
|
|
47
|
+
};
|
|
48
|
+
does_not_contain_substring: {
|
|
49
|
+
publicName: string;
|
|
50
|
+
validDataTypes: string[];
|
|
51
|
+
};
|
|
52
|
+
array_contains: {
|
|
53
|
+
publicName: string;
|
|
54
|
+
validDataTypes: string[];
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
} | {
|
|
58
|
+
namespace: string;
|
|
59
|
+
constants: {
|
|
60
|
+
mean: {
|
|
61
|
+
publicName: string;
|
|
62
|
+
validDataTypes: string[];
|
|
63
|
+
};
|
|
64
|
+
sum: {
|
|
65
|
+
publicName: string;
|
|
66
|
+
validDataTypes: string[];
|
|
67
|
+
};
|
|
68
|
+
min: {
|
|
69
|
+
publicName: string;
|
|
70
|
+
validDataTypes: string[];
|
|
71
|
+
};
|
|
72
|
+
max: {
|
|
73
|
+
publicName: string;
|
|
74
|
+
validDataTypes: string[];
|
|
75
|
+
};
|
|
76
|
+
count: {
|
|
77
|
+
publicName: string;
|
|
78
|
+
validDataTypes: string[];
|
|
79
|
+
};
|
|
80
|
+
countDistinct: {
|
|
81
|
+
publicName: string;
|
|
82
|
+
validDataTypes: string[];
|
|
83
|
+
};
|
|
84
|
+
median: {
|
|
85
|
+
publicName: string;
|
|
86
|
+
validDataTypes: string[];
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
} | {
|
|
90
|
+
namespace: string;
|
|
91
|
+
constants: {
|
|
92
|
+
month: {
|
|
93
|
+
publicName: string;
|
|
94
|
+
dateFormat: string;
|
|
95
|
+
};
|
|
96
|
+
year: {
|
|
97
|
+
publicName: string;
|
|
98
|
+
dateFormat: string;
|
|
99
|
+
};
|
|
100
|
+
quarter: {
|
|
101
|
+
publicName: string;
|
|
102
|
+
dateFormat: string;
|
|
103
|
+
};
|
|
104
|
+
week: {
|
|
105
|
+
publicName: string;
|
|
106
|
+
dateFormat: string;
|
|
107
|
+
};
|
|
108
|
+
day: {
|
|
109
|
+
publicName: string;
|
|
110
|
+
dateFormat: string;
|
|
111
|
+
};
|
|
112
|
+
second: {
|
|
113
|
+
publicName: string;
|
|
114
|
+
dateFormat: string;
|
|
115
|
+
};
|
|
116
|
+
hour: {
|
|
117
|
+
publicName: string;
|
|
118
|
+
dateFormat: string;
|
|
119
|
+
};
|
|
120
|
+
minute: {
|
|
121
|
+
publicName: string;
|
|
122
|
+
dateFormat: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
})[];
|
|
@@ -192,6 +192,13 @@ export declare type VizzlyTranslations = {
|
|
|
192
192
|
* String containing the translation.
|
|
193
193
|
*/
|
|
194
194
|
multi_select: string;
|
|
195
|
+
/**
|
|
196
|
+
* @default 'Number comparison'
|
|
197
|
+
*
|
|
198
|
+
* @returns
|
|
199
|
+
* String containing the translation.
|
|
200
|
+
*/
|
|
201
|
+
numeric_filter: string;
|
|
195
202
|
/**
|
|
196
203
|
* @default 'Date picker'
|
|
197
204
|
*
|
|
@@ -330,6 +337,13 @@ export declare type VizzlyTranslations = {
|
|
|
330
337
|
* String containing the translation.
|
|
331
338
|
*/
|
|
332
339
|
close: string;
|
|
340
|
+
/**
|
|
341
|
+
* @default 'Clear Filter'
|
|
342
|
+
*
|
|
343
|
+
* @returns
|
|
344
|
+
* String containing the translation.
|
|
345
|
+
*/
|
|
346
|
+
clear_filter: string;
|
|
333
347
|
/**
|
|
334
348
|
* @default 'Click Settings'
|
|
335
349
|
*
|
|
@@ -431,6 +445,13 @@ export declare type VizzlyTranslations = {
|
|
|
431
445
|
* String containing the translation.
|
|
432
446
|
*/
|
|
433
447
|
are_you_sure: string;
|
|
448
|
+
/**
|
|
449
|
+
* @default 'You are adding a View to the Template Library.'
|
|
450
|
+
*
|
|
451
|
+
* @returns
|
|
452
|
+
* String containing the translation.
|
|
453
|
+
*/
|
|
454
|
+
add_view_to_the_library: string;
|
|
434
455
|
/**
|
|
435
456
|
* @default 'Delete'
|
|
436
457
|
*
|
|
@@ -470,7 +491,21 @@ export declare type VizzlyTranslations = {
|
|
|
470
491
|
*/
|
|
471
492
|
view_data_set_description: string;
|
|
472
493
|
/**
|
|
473
|
-
* @default '
|
|
494
|
+
* @default 'View as PNG'
|
|
495
|
+
*
|
|
496
|
+
* @returns
|
|
497
|
+
* String containing the translation.
|
|
498
|
+
*/
|
|
499
|
+
view_as_png: string;
|
|
500
|
+
/**
|
|
501
|
+
* @default 'Download the view as an image.'
|
|
502
|
+
*
|
|
503
|
+
* @returns
|
|
504
|
+
* String containing the translation.
|
|
505
|
+
*/
|
|
506
|
+
view_as_png_description: string;
|
|
507
|
+
/**
|
|
508
|
+
* @default 'View download'
|
|
474
509
|
*
|
|
475
510
|
* @returns
|
|
476
511
|
* String containing the translation.
|
|
@@ -811,6 +846,13 @@ export declare type VizzlyTranslations = {
|
|
|
811
846
|
* String containing the translation.
|
|
812
847
|
*/
|
|
813
848
|
manage_reports: string;
|
|
849
|
+
/**
|
|
850
|
+
* @default 'Add to Library'
|
|
851
|
+
*
|
|
852
|
+
* @returns
|
|
853
|
+
* String containing the translation.
|
|
854
|
+
*/
|
|
855
|
+
add_to_library: string;
|
|
814
856
|
/**
|
|
815
857
|
* @default 'JSON Results'
|
|
816
858
|
*
|
|
@@ -1455,13 +1497,6 @@ export declare type VizzlyTranslations = {
|
|
|
1455
1497
|
* String containing the translation.
|
|
1456
1498
|
*/
|
|
1457
1499
|
ask_ai: string;
|
|
1458
|
-
/**
|
|
1459
|
-
* @default 'Add to Library'
|
|
1460
|
-
*
|
|
1461
|
-
* @returns
|
|
1462
|
-
* String containing the translation.
|
|
1463
|
-
*/
|
|
1464
|
-
add_to_library: string;
|
|
1465
1500
|
/**
|
|
1466
1501
|
* @default 'There are no Views in your template library'
|
|
1467
1502
|
*
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Vizzly } from '@vizzly/api-client';
|
|
2
|
+
import { ApiConfig } from './ApiConfig';
|
|
3
|
+
import { DashboardStorageStrategy } from './DashboardAPI/types';
|
|
4
|
+
import { IdentityConfig } from './IdentityConfig/types';
|
|
5
|
+
export declare const getVizzlyAPIClient: (identityConfig: IdentityConfig | undefined, dashboardStorageStrategy: DashboardStorageStrategy, apiConfig: ApiConfig) => Vizzly;
|
package/package.json
CHANGED
|
@@ -7,20 +7,29 @@
|
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"esbuild": "^0.18.11",
|
|
11
10
|
"jest": "^29.6.0",
|
|
11
|
+
"nock": "^13.5.4",
|
|
12
12
|
"ts-jest": "^29.1.1",
|
|
13
13
|
"ts-loader": "^9.5.1",
|
|
14
|
+
"tsc-alias": "^1.8.8",
|
|
14
15
|
"typescript": "^5.3.2",
|
|
16
|
+
"vite": "^5.1.5",
|
|
15
17
|
"webpack": "^5.89.0",
|
|
16
18
|
"webpack-cli": "^5.1.4"
|
|
17
19
|
},
|
|
18
20
|
"scripts": {
|
|
19
21
|
"validate-ts": "tsc -p ./validate.tsconfig.json --noEmit",
|
|
20
|
-
"build": "rm -rf ./dist && webpack --mode=production",
|
|
21
22
|
"set-version": "node ./scripts/setVersion.js",
|
|
22
|
-
"test": "jest",
|
|
23
|
+
"test": "jest --forceExit",
|
|
24
|
+
"build-umd": "rm -rf ./dist && vite build --config ./umdBuild/vite.config.js && rm -rf ./dist/*.mjs",
|
|
25
|
+
"build": "rm -rf ./dist && webpack --mode=production",
|
|
26
|
+
"fix-type-alias": "tsc-alias -p tsconfig.json",
|
|
23
27
|
"prepare": "yarn build"
|
|
24
28
|
},
|
|
25
|
-
"version": "0.
|
|
29
|
+
"version": "0.12.0-dev-e9cb501d005236550d32fd4ffe3eaeb1307996b1",
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@vizzly/api-client": "^0.0.28",
|
|
32
|
+
"@vizzly/joi": "^17.11.0",
|
|
33
|
+
"lodash": "^4.17.21"
|
|
34
|
+
}
|
|
26
35
|
}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { identityCallback } from 'shared-logic/src/Callbacks/types';
|
|
2
|
-
import { Dashboard as DashboardType } from 'shared-logic/src/Dashboard';
|
|
3
|
-
import * as Dashboard from 'shared-logic/src/Dashboard';
|
|
4
|
-
import { ApiConfig } from 'shared-logic/src/ApiConfig';
|
|
5
|
-
import { DashboardStorageStrategy } from 'shared-logic/src/DashboardAPI/types';
|
|
6
|
-
import * as dataSetsProperty from 'shared-logic/src/DashboardAPI/dataSets';
|
|
7
|
-
/**
|
|
8
|
-
* Represents a Vizzly dashboard.
|
|
9
|
-
*/
|
|
10
|
-
export declare type VizzlyDashboard = {
|
|
11
|
-
id: DashboardType['id'];
|
|
12
|
-
parentDashboardId: DashboardType['parentDashboardId'] | undefined;
|
|
13
|
-
display: DashboardType['display'];
|
|
14
|
-
componentLibrary: DashboardType['componentLibrary'];
|
|
15
|
-
createdAt: DashboardType['createdAt'];
|
|
16
|
-
updatedAt: DashboardType['updatedAt'];
|
|
17
|
-
metadata: DashboardType['metadata'];
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Represents the payload for creating a dashboard.
|
|
21
|
-
*/
|
|
22
|
-
export declare type CreateDashboard = {
|
|
23
|
-
definition: Dashboard.SaveableDashboardDefinition;
|
|
24
|
-
/** @deprecated - use `metadata` instead */
|
|
25
|
-
meta?: Object;
|
|
26
|
-
/**
|
|
27
|
-
* The metadata for the dashboard.
|
|
28
|
-
*
|
|
29
|
-
* @property {any} meta - The metadata for the dashboard can be set to anything you require.
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
metadata?: Object;
|
|
33
|
-
/**
|
|
34
|
-
* The ID of the parent dashboard.
|
|
35
|
-
*
|
|
36
|
-
* @property {string} parentDashboardId - The ID of the parent dashboard.
|
|
37
|
-
* @default The default parent dashboard ID.
|
|
38
|
-
*/
|
|
39
|
-
parentDashboardId?: string;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Options for updating a dashboard.
|
|
43
|
-
*
|
|
44
|
-
* @property {VizzlyDashboard['metadata']} metadata - The metadata to update the dashboard with.
|
|
45
|
-
*/
|
|
46
|
-
export declare type UpdateDashboardOptions = {
|
|
47
|
-
metadata?: VizzlyDashboard['metadata'];
|
|
48
|
-
};
|
|
49
|
-
declare type APIOptions = {
|
|
50
|
-
/**
|
|
51
|
-
* The parent dashboard ID to use when creating a child dashboard.
|
|
52
|
-
*/
|
|
53
|
-
parentDashboardId?: string;
|
|
54
|
-
/**
|
|
55
|
-
* The API config to use when making requests to the Vizzly API.
|
|
56
|
-
*
|
|
57
|
-
* @default { host: 'https://api.vizzly.co' }
|
|
58
|
-
*/
|
|
59
|
-
vizzlyAPIConfig?: ApiConfig;
|
|
60
|
-
/**
|
|
61
|
-
* The function to use when loading the data sets.
|
|
62
|
-
*/
|
|
63
|
-
dataSets?: dataSetsProperty.DataSetsCallback;
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Represents an API class for interacting with the services.
|
|
67
|
-
*/
|
|
68
|
-
export declare class API {
|
|
69
|
-
private abortController;
|
|
70
|
-
private identity;
|
|
71
|
-
private identityTokens;
|
|
72
|
-
private permissions;
|
|
73
|
-
private identityConfig;
|
|
74
|
-
private dashboardStorageStrategy;
|
|
75
|
-
private loadDataSetsCallback;
|
|
76
|
-
private dashboards;
|
|
77
|
-
private vizzlyAPI;
|
|
78
|
-
private parentDashboardId;
|
|
79
|
-
/**
|
|
80
|
-
* Whether the API is currently loading.
|
|
81
|
-
* @default false
|
|
82
|
-
*/
|
|
83
|
-
loading: boolean;
|
|
84
|
-
/**
|
|
85
|
-
*
|
|
86
|
-
* @param identity The identity callback to use when retrieving the identity.
|
|
87
|
-
* @param loadQueryEngineConfig The function to use when loading the query engine config.
|
|
88
|
-
* @param options The options for the API.
|
|
89
|
-
*/
|
|
90
|
-
constructor(identity: identityCallback, options?: APIOptions);
|
|
91
|
-
/**
|
|
92
|
-
* Retrieves the dashboards from the API.
|
|
93
|
-
*
|
|
94
|
-
* @returns A promise that resolves to an array of client-facing dashboards.
|
|
95
|
-
* @throws {Error} If an error occurs during the retrieval process.
|
|
96
|
-
*/
|
|
97
|
-
getDashboards(): Promise<import("shared-logic/src/DashboardAPI/types").VizzlyDashboard[] | undefined>;
|
|
98
|
-
/**
|
|
99
|
-
* Retrieves all child dashboards.
|
|
100
|
-
*
|
|
101
|
-
* @returns A promise that resolves to an array of child dashboards.
|
|
102
|
-
* @throws {Error} If an error occurs while retrieving the child dashboards.
|
|
103
|
-
*/
|
|
104
|
-
getAllChildDashboards(): Promise<import("shared-logic/src/DashboardAPI/types").VizzlyDashboard[]>;
|
|
105
|
-
getDataSets(): Promise<import("shared-logic/src/DataSet/types").DataSet[] | undefined>;
|
|
106
|
-
/**
|
|
107
|
-
* Retrieves the parent dashboards.
|
|
108
|
-
* @returns A promise that resolves to an array of parent dashboards.
|
|
109
|
-
*/
|
|
110
|
-
getParentDashboards(): Promise<import("shared-logic/src/DashboardAPI/types").VizzlyDashboard[] | undefined>;
|
|
111
|
-
/**
|
|
112
|
-
* Retrieves the child dashboards for a given parent dashboard.
|
|
113
|
-
* @param parentDashboardId The ID of the parent dashboard.
|
|
114
|
-
* @returns An array of child dashboards.
|
|
115
|
-
*/
|
|
116
|
-
getChildDashboards(parentDashboardId: string): Promise<import("shared-logic/src/DashboardAPI/types").VizzlyDashboard[] | undefined>;
|
|
117
|
-
/**
|
|
118
|
-
* Creates a dashboard with the specified parameters.
|
|
119
|
-
*
|
|
120
|
-
* @param params - The parameters for creating the dashboard.
|
|
121
|
-
* @returns The created dashboard.
|
|
122
|
-
* @throws If there is an error during the creation process.
|
|
123
|
-
*/
|
|
124
|
-
createDashboard(params: CreateDashboard): Promise<DashboardType | undefined>;
|
|
125
|
-
/**
|
|
126
|
-
* Updates a dashboard with the specified ID using the provided options.
|
|
127
|
-
* @param dashboardId - The ID of the dashboard to update.
|
|
128
|
-
* @param options - The options for updating the dashboard.
|
|
129
|
-
* @returns The updated dashboard.
|
|
130
|
-
*/
|
|
131
|
-
updateDashboard(dashboardId: string, options: UpdateDashboardOptions): Promise<DashboardType | undefined>;
|
|
132
|
-
/**
|
|
133
|
-
* Deletes a dashboard.
|
|
134
|
-
* @param dashboardId The ID of the dashboard to delete.
|
|
135
|
-
* @returns The updated dashboard after deletion.
|
|
136
|
-
*/
|
|
137
|
-
deleteDashboard(dashboardId: string): Promise<DashboardType | undefined>;
|
|
138
|
-
/**
|
|
139
|
-
* Checks if the user is an admin.
|
|
140
|
-
* @returns A promise that resolves to a string representing the user's access level ('admin' or 'user').
|
|
141
|
-
*/
|
|
142
|
-
isAdmin(): Promise<"admin" | "standard" | undefined>;
|
|
143
|
-
/**
|
|
144
|
-
* Retrieves the default parent dashboard ID.
|
|
145
|
-
*
|
|
146
|
-
* @returns {Promise<string>} A promise that resolves to the default parent dashboard ID.
|
|
147
|
-
*/
|
|
148
|
-
getDefaultParentDashboardId(): Promise<string>;
|
|
149
|
-
private checkPermissionsAndIdentityDefined;
|
|
150
|
-
private fetchIdentityConfig;
|
|
151
|
-
private setPermissions;
|
|
152
|
-
private getDefaultParentDashboardIdBase;
|
|
153
|
-
getDashboardStorageStrategy(): DashboardStorageStrategy;
|
|
154
|
-
}
|
|
155
|
-
export {};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { Component as VizzlyComponentType } from 'shared-logic/src/Component/types';
|
|
2
|
-
import type { DataSet } from 'shared-logic/src/DataSet/types';
|
|
3
|
-
interface ViewAttributes {
|
|
4
|
-
areaChart: VizzlyComponentType.AreaChartAttributes;
|
|
5
|
-
lineChart: VizzlyComponentType.LineChartAttributes;
|
|
6
|
-
barChart: VizzlyComponentType.BarChartAttributes;
|
|
7
|
-
pieChart: VizzlyComponentType.PieChartAttributes;
|
|
8
|
-
scatterChart: VizzlyComponentType.ScatterChartAttributes;
|
|
9
|
-
comboChart: VizzlyComponentType.ComboChartAttributes;
|
|
10
|
-
dataTable: VizzlyComponentType.DataTableAttributes;
|
|
11
|
-
basicTable: VizzlyComponentType.BasicTableAttributes;
|
|
12
|
-
horizontalBarChart: VizzlyComponentType.HorizontalBarChartAttributes;
|
|
13
|
-
mercatorMap: VizzlyComponentType.MercatorMapAttributes;
|
|
14
|
-
singleStat: VizzlyComponentType.SingleStatAttributes;
|
|
15
|
-
progress: VizzlyComponentType.ProgressAttributes;
|
|
16
|
-
}
|
|
17
|
-
export declare class ViewServices<T extends keyof ViewAttributes> {
|
|
18
|
-
componentType: T;
|
|
19
|
-
attributes: ViewAttributes[T] | undefined;
|
|
20
|
-
private dataSet;
|
|
21
|
-
constructor(componentType: T, dataSet: DataSet, attributes?: Partial<ViewAttributes[T]>);
|
|
22
|
-
updateAttributes(newAttributes: Partial<ViewAttributes[T]>): void;
|
|
23
|
-
}
|
|
24
|
-
export declare type View = AreaChart | LineChart | BarChart | PieChart | ScatterChart | ComboChart | PivotTable | BasicTable | HorizontalBarChart | MercatorMap | SingleStat | Progress;
|
|
25
|
-
export declare class AreaChart extends ViewServices<'areaChart'> {
|
|
26
|
-
constructor(dataSet: DataSet, attributes?: Partial<ViewAttributes['areaChart']>);
|
|
27
|
-
}
|
|
28
|
-
export declare class LineChart extends ViewServices<'lineChart'> {
|
|
29
|
-
constructor(dataSet: DataSet, attributes?: Partial<ViewAttributes['lineChart']>);
|
|
30
|
-
}
|
|
31
|
-
export declare class BarChart extends ViewServices<'barChart'> {
|
|
32
|
-
constructor(dataSet: DataSet, attributes?: Partial<ViewAttributes['barChart']>);
|
|
33
|
-
}
|
|
34
|
-
export declare class PieChart extends ViewServices<'pieChart'> {
|
|
35
|
-
constructor(dataSet: DataSet, attributes?: Partial<ViewAttributes['pieChart']>);
|
|
36
|
-
}
|
|
37
|
-
export declare class ScatterChart extends ViewServices<'scatterChart'> {
|
|
38
|
-
constructor(dataSet: DataSet, attributes?: Partial<ViewAttributes['scatterChart']>);
|
|
39
|
-
}
|
|
40
|
-
export declare class ComboChart extends ViewServices<'comboChart'> {
|
|
41
|
-
constructor(dataSet: DataSet, attributes?: Partial<ViewAttributes['comboChart']>);
|
|
42
|
-
}
|
|
43
|
-
export declare class PivotTable extends ViewServices<'dataTable'> {
|
|
44
|
-
constructor(dataSet: DataSet, attributes?: Partial<ViewAttributes['dataTable']>);
|
|
45
|
-
}
|
|
46
|
-
export declare class BasicTable extends ViewServices<'basicTable'> {
|
|
47
|
-
constructor(dataSet: DataSet, attributes?: Partial<ViewAttributes['basicTable']>);
|
|
48
|
-
}
|
|
49
|
-
export declare class HorizontalBarChart extends ViewServices<'horizontalBarChart'> {
|
|
50
|
-
constructor(dataSet: DataSet, attributes?: Partial<ViewAttributes['horizontalBarChart']>);
|
|
51
|
-
}
|
|
52
|
-
export declare class MercatorMap extends ViewServices<'mercatorMap'> {
|
|
53
|
-
constructor(dataSet: DataSet, attributes?: Partial<ViewAttributes['mercatorMap']>);
|
|
54
|
-
}
|
|
55
|
-
export declare class SingleStat extends ViewServices<'singleStat'> {
|
|
56
|
-
constructor(dataSet: DataSet, attributes?: Partial<ViewAttributes['singleStat']>);
|
|
57
|
-
}
|
|
58
|
-
export declare class Progress extends ViewServices<'progress'> {
|
|
59
|
-
constructor(dataSet: DataSet, attributes?: Partial<ViewAttributes['progress']>);
|
|
60
|
-
}
|
|
61
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export declare enum SenderType {
|
|
2
|
-
User = "user",
|
|
3
|
-
AI = "ai"
|
|
4
|
-
}
|
|
5
|
-
export declare enum MessageState {
|
|
6
|
-
WaitingForMessage = "waitingForMessage",
|
|
7
|
-
Thinking = "thinking"
|
|
8
|
-
}
|
|
9
|
-
export declare enum AIReaction {
|
|
10
|
-
ThumbsUp = "thumbs_up",
|
|
11
|
-
ThumbsDown = "thumbs_down"
|
|
12
|
-
}
|
|
13
|
-
export declare type Message = {
|
|
14
|
-
content: string;
|
|
15
|
-
sender_type: SenderType;
|
|
16
|
-
status: 'active';
|
|
17
|
-
id: string;
|
|
18
|
-
sent_at: Date;
|
|
19
|
-
reaction: AIReaction | null;
|
|
20
|
-
};
|
|
21
|
-
export declare type ConversationState = {
|
|
22
|
-
message: string;
|
|
23
|
-
conversationId: string | undefined;
|
|
24
|
-
messageState: MessageState;
|
|
25
|
-
messageHistory: Message[];
|
|
26
|
-
};
|
|
27
|
-
export declare enum AIFeedback {
|
|
28
|
-
Warning = "warning",
|
|
29
|
-
Critical = "critical",
|
|
30
|
-
Info = "info"
|
|
31
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { DataSet } from '../../DataSet/types';
|
|
2
|
-
import * as Dashboard from 'shared-logic/src/Dashboard';
|
|
3
|
-
import { api } from '../../api';
|
|
4
|
-
import { IdentityConfig as IdentityConfigType } from 'shared-logic/src/IdentityConfig/types';
|
|
5
|
-
import { CreateDashboardParams } from '../../api/vizzly/createDashboard';
|
|
6
|
-
import { DashboardPermission as DashboardPermissionType, RawDashboardPermission } from 'shared-logic/src/DashboardPermission/types';
|
|
7
|
-
import { DashboardStorageStrategy } from '../types';
|
|
8
|
-
import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
9
|
-
export declare function prepareCreateResponseForAdding(createdDashboardResponse: {
|
|
10
|
-
dashboard: Dashboard.RawDashboard;
|
|
11
|
-
permissions: RawDashboardPermission[];
|
|
12
|
-
}, dataSets: DataSet[], queryEngineConfig: QueryEngineConfig | undefined): {
|
|
13
|
-
createdDashboard: Dashboard.Dashboard;
|
|
14
|
-
formattedPermissions: DashboardPermissionType[];
|
|
15
|
-
};
|
|
16
|
-
export declare function postCreateDashboard(params: Omit<CreateDashboardParams, 'dashboardAccessToken'>, identityConfig: IdentityConfigType, dashboardStorageStrategy: DashboardStorageStrategy, vizzlyAPI: ReturnType<typeof api>): Promise<{
|
|
17
|
-
dashboard: Dashboard.RawDashboard<Dashboard.RawDefinition>;
|
|
18
|
-
permissions: RawDashboardPermission[];
|
|
19
|
-
}>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { DataSet } from '../../DataSet/types';
|
|
2
|
-
import { Dashboard as DashboardType } from 'shared-logic/src/Dashboard/types';
|
|
3
|
-
import * as Dashboard from 'shared-logic/src/Dashboard';
|
|
4
|
-
import { api } from '../../api';
|
|
5
|
-
import { UnEncryptedDashboardUpdateResponse, UpdateDashboardParams } from '../../api/vizzly/updateDashboard';
|
|
6
|
-
import { DashboardStorageStrategy } from '../types';
|
|
7
|
-
import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
8
|
-
export declare function postUpdateDashboard(dashboardStorageStrategy: DashboardStorageStrategy, vizzlyAPI: ReturnType<typeof api>, updateParams: {
|
|
9
|
-
dashboardSessionToken: string;
|
|
10
|
-
definition?: Dashboard.SaveableDashboardDefinition;
|
|
11
|
-
/** @deprecated - use `metadata` instead */
|
|
12
|
-
meta?: any;
|
|
13
|
-
metadata?: any;
|
|
14
|
-
deleted?: boolean;
|
|
15
|
-
}): Promise<UnEncryptedDashboardUpdateResponse>;
|
|
16
|
-
export declare function updateDashboardFromUpdateResponse(updatedDashboardResponse: UnEncryptedDashboardUpdateResponse, dataSets: DataSet[], dashboards: DashboardType[], params: Omit<UpdateDashboardParams, 'dashboardSessionToken'>, queryEngineConfig: QueryEngineConfig | undefined): {
|
|
17
|
-
newDashboards: DashboardType[];
|
|
18
|
-
updatedDashboard: DashboardType;
|
|
19
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { DataSet } from '../DataSet/types';
|
|
2
|
-
import { DashboardPermission as DashboardPermissionType } from 'shared-logic/src/DashboardPermission/types';
|
|
3
|
-
import { Dashboard as DashboardType } from 'shared-logic/src/Dashboard/types';
|
|
4
|
-
import { QueryEngineConfig, QueryEngineEndpoint } from '../QueryEngineConfig/types';
|
|
5
|
-
import { api } from '../api';
|
|
6
|
-
import { IdentityConfig as IdentityConfigType } from 'shared-logic/src/IdentityConfig/types';
|
|
7
|
-
import { DashboardStorageStrategy } from './types';
|
|
8
|
-
export * from './dashboardAPI/creating';
|
|
9
|
-
export * from './dashboardAPI/updating';
|
|
10
|
-
export declare function getDashboards<T extends {
|
|
11
|
-
found?: any[];
|
|
12
|
-
}>(dashboardsResponse: T, dataSets: DataSet[], queryEngineConfig: QueryEngineConfig | undefined): DashboardType[];
|
|
13
|
-
export declare function fetchDashboards(dashboardStorageStrategy: DashboardStorageStrategy, vizzlyAPI: ReturnType<typeof api>, dashboardAccessTokens: string[], abortController: AbortController): Promise<import("../api/vizzly/multiGetDashboards").Response>;
|
|
14
|
-
export declare const DEFAULT_STRATEGY: DashboardStorageStrategy;
|
|
15
|
-
export declare const getDashboardStorageStrategy: (queryEngineEndpoint: Function | QueryEngineEndpoint | undefined, queryEngineConfig: QueryEngineConfig | undefined) => DashboardStorageStrategy;
|
|
16
|
-
export declare const getDefaultParentDashboardId: (parentDashboardId: string | undefined, parentDashboardIdOnDashboardAccessToken: IdentityConfigType['dashboardAccess']['dashboardId'], dashboards: Array<DashboardType>) => string;
|
|
17
|
-
export declare function buildDashboardAccessTokens(permissions: DashboardPermissionType[]): string[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Dashboard } from '../Dashboard/types';
|
|
2
|
-
import { QueryEngineConfig } from '../QueryEngineConfig/types';
|
|
3
|
-
import { VizzlyDashboard } from './types';
|
|
4
|
-
import { JoiOptions } from '../validations';
|
|
5
|
-
export declare const joiOptions: JoiOptions;
|
|
6
|
-
export declare function buildClientFacingDashboards(dashboards: Dashboard[], queryEngineConfig: QueryEngineConfig | undefined): VizzlyDashboard[];
|
|
7
|
-
export declare const getChildDashboards: (parentDashboardId: string, clientFacingDash: VizzlyDashboard[]) => VizzlyDashboard[];
|
|
8
|
-
export declare function getAllClientFacingChildDashboards(clientFacingDash: VizzlyDashboard[]): VizzlyDashboard[];
|
|
9
|
-
export declare function getParentDashboards(clientFacingDash: VizzlyDashboard[]): VizzlyDashboard[];
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare type RawDashboardPermission = {
|
|
2
|
-
dashboard_id: string;
|
|
3
|
-
scope: 'read' | 'read_write';
|
|
4
|
-
token: string;
|
|
5
|
-
user_reference: '*' | string;
|
|
6
|
-
};
|
|
7
|
-
export declare type DashboardPermission = {
|
|
8
|
-
dashboardId: string;
|
|
9
|
-
scope: 'read' | 'read_write';
|
|
10
|
-
token: string;
|
|
11
|
-
userReference: '*' | string;
|
|
12
|
-
};
|