@gooddata/sdk-backend-base 9.0.0-alpha.8 → 9.0.0-beta.0
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/esm/cachingBackend/index.js +14 -14
- package/esm/cachingBackend/index.js.map +1 -1
- package/esm/customBackend/config.d.ts +2 -2
- package/esm/customBackend/config.d.ts.map +1 -1
- package/esm/customBackend/execution.d.ts +2 -2
- package/esm/customBackend/execution.d.ts.map +1 -1
- package/esm/customBackend/execution.js +2 -2
- package/esm/customBackend/execution.js.map +1 -1
- package/esm/customBackend/index.d.ts +3 -3
- package/esm/customBackend/index.d.ts.map +1 -1
- package/esm/customBackend/index.js +2 -2
- package/esm/customBackend/index.js.map +1 -1
- package/esm/customBackend/workspace.d.ts +1 -1
- package/esm/customBackend/workspace.d.ts.map +1 -1
- package/esm/customBackend/workspace.js +1 -1
- package/esm/customBackend/workspace.js.map +1 -1
- package/esm/decoratedBackend/catalog.js +1 -1
- package/esm/decoratedBackend/catalog.js.map +1 -1
- package/esm/decoratedBackend/execution.js +1 -1
- package/esm/decoratedBackend/execution.js.map +1 -1
- package/esm/decoratedBackend/index.js +1 -1
- package/esm/decoratedBackend/index.js.map +1 -1
- package/esm/dummyBackend/index.js +3 -3
- package/esm/dummyBackend/index.js.map +1 -1
- package/esm/eventingBackend/index.js +3 -3
- package/esm/eventingBackend/index.js.map +1 -1
- package/esm/index.d.ts +37 -37
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +35 -35
- package/esm/index.js.map +1 -1
- package/esm/ldmFactories/catalog/attributeFactory.d.ts +4 -4
- package/esm/ldmFactories/catalog/attributeFactory.d.ts.map +1 -1
- package/esm/ldmFactories/catalog/attributeFactory.js +5 -5
- package/esm/ldmFactories/catalog/attributeFactory.js.map +1 -1
- package/esm/ldmFactories/catalog/dateDatasetFactory.d.ts +4 -4
- package/esm/ldmFactories/catalog/dateDatasetFactory.d.ts.map +1 -1
- package/esm/ldmFactories/catalog/dateDatasetFactory.js +5 -5
- package/esm/ldmFactories/catalog/dateDatasetFactory.js.map +1 -1
- package/esm/ldmFactories/catalog/factFactory.d.ts +3 -3
- package/esm/ldmFactories/catalog/factFactory.d.ts.map +1 -1
- package/esm/ldmFactories/catalog/factFactory.js +4 -4
- package/esm/ldmFactories/catalog/factFactory.js.map +1 -1
- package/esm/ldmFactories/catalog/groupFactory.d.ts +1 -1
- package/esm/ldmFactories/catalog/groupFactory.d.ts.map +1 -1
- package/esm/ldmFactories/catalog/groupFactory.js +2 -2
- package/esm/ldmFactories/catalog/groupFactory.js.map +1 -1
- package/esm/ldmFactories/catalog/measureFactory.d.ts +3 -3
- package/esm/ldmFactories/catalog/measureFactory.d.ts.map +1 -1
- package/esm/ldmFactories/catalog/measureFactory.js +4 -4
- package/esm/ldmFactories/catalog/measureFactory.js.map +1 -1
- package/esm/ldmFactories/dashboard/insightWidgetFactory.d.ts +2 -2
- package/esm/ldmFactories/dashboard/insightWidgetFactory.d.ts.map +1 -1
- package/esm/ldmFactories/dashboard/insightWidgetFactory.js +2 -2
- package/esm/ldmFactories/dashboard/insightWidgetFactory.js.map +1 -1
- package/esm/ldmFactories/dashboard/kpiWidgetFactory.d.ts +2 -2
- package/esm/ldmFactories/dashboard/kpiWidgetFactory.d.ts.map +1 -1
- package/esm/ldmFactories/dashboard/kpiWidgetFactory.js +3 -3
- package/esm/ldmFactories/dashboard/kpiWidgetFactory.js.map +1 -1
- package/esm/ldmFactories/dashboard/widgetFactory.d.ts +1 -1
- package/esm/ldmFactories/dashboard/widgetFactory.d.ts.map +1 -1
- package/esm/ldmFactories/dashboard/widgetFactory.js +1 -1
- package/esm/ldmFactories/dashboard/widgetFactory.js.map +1 -1
- package/esm/ldmFactories/metadata/attributeFactory.d.ts +2 -2
- package/esm/ldmFactories/metadata/attributeFactory.d.ts.map +1 -1
- package/esm/ldmFactories/metadata/attributeFactory.js +3 -3
- package/esm/ldmFactories/metadata/attributeFactory.js.map +1 -1
- package/esm/ldmFactories/metadata/dashboardFactory.d.ts +2 -2
- package/esm/ldmFactories/metadata/dashboardFactory.d.ts.map +1 -1
- package/esm/ldmFactories/metadata/dashboardFactory.js +3 -3
- package/esm/ldmFactories/metadata/dashboardFactory.js.map +1 -1
- package/esm/ldmFactories/metadata/dataSetFactory.d.ts +2 -2
- package/esm/ldmFactories/metadata/dataSetFactory.d.ts.map +1 -1
- package/esm/ldmFactories/metadata/dataSetFactory.js +3 -3
- package/esm/ldmFactories/metadata/dataSetFactory.js.map +1 -1
- package/esm/ldmFactories/metadata/displayFormFactory.d.ts +2 -2
- package/esm/ldmFactories/metadata/displayFormFactory.d.ts.map +1 -1
- package/esm/ldmFactories/metadata/displayFormFactory.js +3 -3
- package/esm/ldmFactories/metadata/displayFormFactory.js.map +1 -1
- package/esm/ldmFactories/metadata/factFactory.d.ts +2 -2
- package/esm/ldmFactories/metadata/factFactory.d.ts.map +1 -1
- package/esm/ldmFactories/metadata/factFactory.js +3 -3
- package/esm/ldmFactories/metadata/factFactory.js.map +1 -1
- package/esm/ldmFactories/metadata/factory.d.ts +1 -1
- package/esm/ldmFactories/metadata/factory.d.ts.map +1 -1
- package/esm/ldmFactories/metadata/factory.js +1 -1
- package/esm/ldmFactories/metadata/factory.js.map +1 -1
- package/esm/ldmFactories/metadata/measureFactory.d.ts +2 -2
- package/esm/ldmFactories/metadata/measureFactory.d.ts.map +1 -1
- package/esm/ldmFactories/metadata/measureFactory.js +3 -3
- package/esm/ldmFactories/metadata/measureFactory.js.map +1 -1
- package/esm/ldmFactories/metadata/variableFactory.d.ts +2 -2
- package/esm/ldmFactories/metadata/variableFactory.d.ts.map +1 -1
- package/esm/ldmFactories/metadata/variableFactory.js +3 -3
- package/esm/ldmFactories/metadata/variableFactory.js.map +1 -1
- package/esm/normalizingBackend/index.d.ts +1 -1
- package/esm/normalizingBackend/index.d.ts.map +1 -1
- package/esm/normalizingBackend/index.js +4 -4
- package/esm/normalizingBackend/index.js.map +1 -1
- package/esm/normalizingBackend/normalizer.d.ts +2 -0
- package/esm/normalizingBackend/normalizer.d.ts.map +1 -1
- package/esm/normalizingBackend/normalizer.js +18 -4
- package/esm/normalizingBackend/normalizer.js.map +1 -1
- package/{dist → esm}/sdk-backend-base.d.ts +2 -0
- package/esm/toolkit/execution.d.ts +1 -1
- package/esm/toolkit/execution.d.ts.map +1 -1
- package/esm/toolkit/execution.js +1 -1
- package/esm/toolkit/execution.js.map +1 -1
- package/esm/toolkit/paging.js +4 -4
- package/esm/toolkit/paging.js.map +1 -1
- package/esm/tsdoc-metadata.json +1 -1
- package/esm/workspaceSettingsBackend/index.js +3 -3
- package/esm/workspaceSettingsBackend/index.js.map +1 -1
- package/package.json +25 -35
- package/dist/cachingBackend/index.d.ts +0 -230
- package/dist/cachingBackend/index.d.ts.map +0 -1
- package/dist/cachingBackend/index.js +0 -579
- package/dist/cachingBackend/index.js.map +0 -1
- package/dist/convertors/fromBackend/afm/result.d.ts +0 -18
- package/dist/convertors/fromBackend/afm/result.d.ts.map +0 -1
- package/dist/convertors/fromBackend/afm/result.js +0 -28
- package/dist/convertors/fromBackend/afm/result.js.map +0 -1
- package/dist/customBackend/config.d.ts +0 -151
- package/dist/customBackend/config.d.ts.map +0 -1
- package/dist/customBackend/config.js +0 -3
- package/dist/customBackend/config.js.map +0 -1
- package/dist/customBackend/execution.d.ts +0 -14
- package/dist/customBackend/execution.d.ts.map +0 -1
- package/dist/customBackend/execution.js +0 -139
- package/dist/customBackend/execution.js.map +0 -1
- package/dist/customBackend/index.d.ts +0 -47
- package/dist/customBackend/index.d.ts.map +0 -1
- package/dist/customBackend/index.js +0 -150
- package/dist/customBackend/index.js.map +0 -1
- package/dist/customBackend/workspace.d.ts +0 -29
- package/dist/customBackend/workspace.d.ts.map +0 -1
- package/dist/customBackend/workspace.js +0 -78
- package/dist/customBackend/workspace.js.map +0 -1
- package/dist/decoratedBackend/attributes.d.ts +0 -19
- package/dist/decoratedBackend/attributes.d.ts.map +0 -1
- package/dist/decoratedBackend/attributes.js +0 -41
- package/dist/decoratedBackend/attributes.js.map +0 -1
- package/dist/decoratedBackend/catalog.d.ts +0 -46
- package/dist/decoratedBackend/catalog.d.ts.map +0 -1
- package/dist/decoratedBackend/catalog.js +0 -70
- package/dist/decoratedBackend/catalog.js.map +0 -1
- package/dist/decoratedBackend/dashboards.d.ts +0 -40
- package/dist/decoratedBackend/dashboards.d.ts.map +0 -1
- package/dist/decoratedBackend/dashboards.js +0 -101
- package/dist/decoratedBackend/dashboards.js.map +0 -1
- package/dist/decoratedBackend/elements.d.ts +0 -66
- package/dist/decoratedBackend/elements.d.ts.map +0 -1
- package/dist/decoratedBackend/elements.js +0 -81
- package/dist/decoratedBackend/elements.js.map +0 -1
- package/dist/decoratedBackend/execution.d.ts +0 -107
- package/dist/decoratedBackend/execution.d.ts.map +0 -1
- package/dist/decoratedBackend/execution.js +0 -152
- package/dist/decoratedBackend/execution.js.map +0 -1
- package/dist/decoratedBackend/index.d.ts +0 -54
- package/dist/decoratedBackend/index.d.ts.map +0 -1
- package/dist/decoratedBackend/index.js +0 -181
- package/dist/decoratedBackend/index.js.map +0 -1
- package/dist/decoratedBackend/securitySettings.d.ts +0 -12
- package/dist/decoratedBackend/securitySettings.d.ts.map +0 -1
- package/dist/decoratedBackend/securitySettings.js +0 -21
- package/dist/decoratedBackend/securitySettings.js.map +0 -1
- package/dist/decoratedBackend/workspaceSettings.d.ts +0 -12
- package/dist/decoratedBackend/workspaceSettings.d.ts.map +0 -1
- package/dist/decoratedBackend/workspaceSettings.js +0 -22
- package/dist/decoratedBackend/workspaceSettings.js.map +0 -1
- package/dist/dummyBackend/index.d.ts +0 -62
- package/dist/dummyBackend/index.d.ts.map +0 -1
- package/dist/dummyBackend/index.js +0 -729
- package/dist/dummyBackend/index.js.map +0 -1
- package/dist/eventingBackend/index.d.ts +0 -74
- package/dist/eventingBackend/index.d.ts.map +0 -1
- package/dist/eventingBackend/index.js +0 -84
- package/dist/eventingBackend/index.js.map +0 -1
- package/dist/index.d.ts +0 -48
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -117
- package/dist/index.js.map +0 -1
- package/dist/ldmFactories/builder.d.ts +0 -75
- package/dist/ldmFactories/builder.d.ts.map +0 -1
- package/dist/ldmFactories/builder.js +0 -59
- package/dist/ldmFactories/builder.js.map +0 -1
- package/dist/ldmFactories/catalog/attributeFactory.d.ts +0 -27
- package/dist/ldmFactories/catalog/attributeFactory.d.ts.map +0 -1
- package/dist/ldmFactories/catalog/attributeFactory.js +0 -63
- package/dist/ldmFactories/catalog/attributeFactory.js.map +0 -1
- package/dist/ldmFactories/catalog/dateDatasetFactory.d.ts +0 -44
- package/dist/ldmFactories/catalog/dateDatasetFactory.d.ts.map +0 -1
- package/dist/ldmFactories/catalog/dateDatasetFactory.js +0 -87
- package/dist/ldmFactories/catalog/dateDatasetFactory.js.map +0 -1
- package/dist/ldmFactories/catalog/factFactory.d.ts +0 -22
- package/dist/ldmFactories/catalog/factFactory.d.ts.map +0 -1
- package/dist/ldmFactories/catalog/factFactory.js +0 -38
- package/dist/ldmFactories/catalog/factFactory.js.map +0 -1
- package/dist/ldmFactories/catalog/groupFactory.d.ts +0 -38
- package/dist/ldmFactories/catalog/groupFactory.d.ts.map +0 -1
- package/dist/ldmFactories/catalog/groupFactory.js +0 -47
- package/dist/ldmFactories/catalog/groupFactory.js.map +0 -1
- package/dist/ldmFactories/catalog/measureFactory.d.ts +0 -23
- package/dist/ldmFactories/catalog/measureFactory.d.ts.map +0 -1
- package/dist/ldmFactories/catalog/measureFactory.js +0 -45
- package/dist/ldmFactories/catalog/measureFactory.js.map +0 -1
- package/dist/ldmFactories/dashboard/insightWidgetFactory.d.ts +0 -31
- package/dist/ldmFactories/dashboard/insightWidgetFactory.d.ts.map +0 -1
- package/dist/ldmFactories/dashboard/insightWidgetFactory.js +0 -45
- package/dist/ldmFactories/dashboard/insightWidgetFactory.js.map +0 -1
- package/dist/ldmFactories/dashboard/kpiWidgetFactory.d.ts +0 -34
- package/dist/ldmFactories/dashboard/kpiWidgetFactory.d.ts.map +0 -1
- package/dist/ldmFactories/dashboard/kpiWidgetFactory.js +0 -55
- package/dist/ldmFactories/dashboard/kpiWidgetFactory.js.map +0 -1
- package/dist/ldmFactories/dashboard/widgetFactory.d.ts +0 -31
- package/dist/ldmFactories/dashboard/widgetFactory.d.ts.map +0 -1
- package/dist/ldmFactories/dashboard/widgetFactory.js +0 -29
- package/dist/ldmFactories/dashboard/widgetFactory.js.map +0 -1
- package/dist/ldmFactories/metadata/attributeFactory.d.ts +0 -24
- package/dist/ldmFactories/metadata/attributeFactory.d.ts.map +0 -1
- package/dist/ldmFactories/metadata/attributeFactory.js +0 -44
- package/dist/ldmFactories/metadata/attributeFactory.js.map +0 -1
- package/dist/ldmFactories/metadata/dashboardFactory.d.ts +0 -21
- package/dist/ldmFactories/metadata/dashboardFactory.d.ts.map +0 -1
- package/dist/ldmFactories/metadata/dashboardFactory.js +0 -28
- package/dist/ldmFactories/metadata/dashboardFactory.js.map +0 -1
- package/dist/ldmFactories/metadata/dataSetFactory.d.ts +0 -21
- package/dist/ldmFactories/metadata/dataSetFactory.d.ts.map +0 -1
- package/dist/ldmFactories/metadata/dataSetFactory.js +0 -28
- package/dist/ldmFactories/metadata/dataSetFactory.js.map +0 -1
- package/dist/ldmFactories/metadata/displayFormFactory.d.ts +0 -24
- package/dist/ldmFactories/metadata/displayFormFactory.d.ts.map +0 -1
- package/dist/ldmFactories/metadata/displayFormFactory.js +0 -40
- package/dist/ldmFactories/metadata/displayFormFactory.js.map +0 -1
- package/dist/ldmFactories/metadata/factFactory.d.ts +0 -21
- package/dist/ldmFactories/metadata/factFactory.d.ts.map +0 -1
- package/dist/ldmFactories/metadata/factFactory.js +0 -28
- package/dist/ldmFactories/metadata/factFactory.js.map +0 -1
- package/dist/ldmFactories/metadata/factory.d.ts +0 -74
- package/dist/ldmFactories/metadata/factory.d.ts.map +0 -1
- package/dist/ldmFactories/metadata/factory.js +0 -43
- package/dist/ldmFactories/metadata/factory.js.map +0 -1
- package/dist/ldmFactories/metadata/measureFactory.d.ts +0 -24
- package/dist/ldmFactories/metadata/measureFactory.d.ts.map +0 -1
- package/dist/ldmFactories/metadata/measureFactory.js +0 -40
- package/dist/ldmFactories/metadata/measureFactory.js.map +0 -1
- package/dist/ldmFactories/metadata/variableFactory.d.ts +0 -21
- package/dist/ldmFactories/metadata/variableFactory.d.ts.map +0 -1
- package/dist/ldmFactories/metadata/variableFactory.js +0 -28
- package/dist/ldmFactories/metadata/variableFactory.js.map +0 -1
- package/dist/normalizingBackend/index.d.ts +0 -46
- package/dist/normalizingBackend/index.d.ts.map +0 -1
- package/dist/normalizingBackend/index.js +0 -174
- package/dist/normalizingBackend/index.js.map +0 -1
- package/dist/normalizingBackend/normalizer.d.ts +0 -131
- package/dist/normalizingBackend/normalizer.d.ts.map +0 -1
- package/dist/normalizingBackend/normalizer.js +0 -352
- package/dist/normalizingBackend/normalizer.js.map +0 -1
- package/dist/toolkit/auth.d.ts +0 -83
- package/dist/toolkit/auth.d.ts.map +0 -1
- package/dist/toolkit/auth.js +0 -106
- package/dist/toolkit/auth.js.map +0 -1
- package/dist/toolkit/backend.d.ts +0 -8
- package/dist/toolkit/backend.d.ts.map +0 -1
- package/dist/toolkit/backend.js +0 -3
- package/dist/toolkit/backend.js.map +0 -1
- package/dist/toolkit/execution.d.ts +0 -54
- package/dist/toolkit/execution.d.ts.map +0 -1
- package/dist/toolkit/execution.js +0 -88
- package/dist/toolkit/execution.js.map +0 -1
- package/dist/toolkit/paging.d.ts +0 -52
- package/dist/toolkit/paging.d.ts.map +0 -1
- package/dist/toolkit/paging.js +0 -109
- package/dist/toolkit/paging.js.map +0 -1
- package/dist/toolkit/pluginUrlValidation.d.ts +0 -9
- package/dist/toolkit/pluginUrlValidation.d.ts.map +0 -1
- package/dist/toolkit/pluginUrlValidation.js +0 -50
- package/dist/toolkit/pluginUrlValidation.js.map +0 -1
- package/dist/workspaceSettingsBackend/index.d.ts +0 -53
- package/dist/workspaceSettingsBackend/index.d.ts.map +0 -1
- package/dist/workspaceSettingsBackend/index.js +0 -42
- package/dist/workspaceSettingsBackend/index.js.map +0 -1
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import { IAnalyticalBackendConfig, IDataView, IExecutionResult, IPreparedExecution } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import { IDimensionDescriptor } from "@gooddata/sdk-model";
|
|
3
|
-
import { AuthenticatedCallGuard } from "../toolkit/auth";
|
|
4
|
-
import { TelemetryData } from "../toolkit/backend";
|
|
5
|
-
/**
|
|
6
|
-
* @beta
|
|
7
|
-
*/
|
|
8
|
-
export type ApiClientProvider = (config: CustomBackendConfig) => any;
|
|
9
|
-
/**
|
|
10
|
-
* @beta
|
|
11
|
-
*/
|
|
12
|
-
export type ResultProvider = (context: ResultProviderContext) => Promise<IExecutionResult>;
|
|
13
|
-
/**
|
|
14
|
-
* @beta
|
|
15
|
-
*/
|
|
16
|
-
export type DataProvider = (context: DataProviderContext) => Promise<IDataView>;
|
|
17
|
-
/**
|
|
18
|
-
* @beta
|
|
19
|
-
*/
|
|
20
|
-
export type ResultFactory = (dimensions: IDimensionDescriptor[], fingerprint: string) => IExecutionResult;
|
|
21
|
-
/**
|
|
22
|
-
* @beta
|
|
23
|
-
*/
|
|
24
|
-
export type CustomCallContext = {
|
|
25
|
-
/**
|
|
26
|
-
* Actual configuration of the backend.
|
|
27
|
-
*/
|
|
28
|
-
config: CustomBackendConfig;
|
|
29
|
-
/**
|
|
30
|
-
* Essential backend state of the custom backend is passed down to providers.
|
|
31
|
-
*/
|
|
32
|
-
state: CustomBackendState;
|
|
33
|
-
/**
|
|
34
|
-
* API client to use for backend communication. The custom backend obtains this
|
|
35
|
-
* instance using the `clientProvider` specified in the custom backend configuration.
|
|
36
|
-
*
|
|
37
|
-
* Use this instance to communicate with the backend. You SHOULD NOT use the clientProvider to obtain
|
|
38
|
-
* an instance of client. The custom backend implementation takes care of obtaining an instance
|
|
39
|
-
* of client and uses the same instance to drive authentication flow as needed.
|
|
40
|
-
*/
|
|
41
|
-
client: any;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* @beta
|
|
45
|
-
*/
|
|
46
|
-
export type ResultProviderContext = CustomCallContext & {
|
|
47
|
-
/**
|
|
48
|
-
* An execution that has been prepared and configured by the client code and describes what do compute
|
|
49
|
-
* and how the results should look like.
|
|
50
|
-
*/
|
|
51
|
-
execution: IPreparedExecution;
|
|
52
|
-
/**
|
|
53
|
-
* A factory function to create instances of IExecutionResult.
|
|
54
|
-
*
|
|
55
|
-
* When implementing custom backend, you may opt to use this factory to create a default implementation
|
|
56
|
-
* of execution result which implements all the boilerplate and defers readAll() and readWindow() functions
|
|
57
|
-
* to dataProviders OR create your own implementation of IExecutionResult from scratch.
|
|
58
|
-
*
|
|
59
|
-
*/
|
|
60
|
-
resultFactory: ResultFactory;
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* @beta
|
|
64
|
-
*/
|
|
65
|
-
export type DataProviderContext = CustomCallContext & {
|
|
66
|
-
/**
|
|
67
|
-
* Execution result from which to obtain data.
|
|
68
|
-
*/
|
|
69
|
-
result: IExecutionResult;
|
|
70
|
-
/**
|
|
71
|
-
* Indicates whether all data or just a window of data should be returned.
|
|
72
|
-
*
|
|
73
|
-
* If window is not defined, then all data are desired.
|
|
74
|
-
*/
|
|
75
|
-
window?: {
|
|
76
|
-
offset: number[];
|
|
77
|
-
size: number[];
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* @beta
|
|
82
|
-
*/
|
|
83
|
-
export type CustomBackendConfig = IAnalyticalBackendConfig & {
|
|
84
|
-
/**
|
|
85
|
-
* Provider which will be called to obtain an instance of API client to talk to the backend server.
|
|
86
|
-
*/
|
|
87
|
-
readonly clientProvider: ApiClientProvider;
|
|
88
|
-
/**
|
|
89
|
-
* Provider of execution results for particular execution definition - this triggers the actual
|
|
90
|
-
* computation on the backend.
|
|
91
|
-
*
|
|
92
|
-
* The UI.SDK separates between the execution result and the actual data. The execution result is an umbrella
|
|
93
|
-
* for the entire computation. It contains descriptors of the result dimensions and allows to obtain different
|
|
94
|
-
* views on the data - be it different data windows (pages) or all data for the computation.
|
|
95
|
-
*
|
|
96
|
-
* ---
|
|
97
|
-
*
|
|
98
|
-
* Given the execution context, trigger computation on the backend and return an IExecutionResult
|
|
99
|
-
* representing the result.
|
|
100
|
-
*
|
|
101
|
-
* The result provider must choose one of two approaches:
|
|
102
|
-
*
|
|
103
|
-
* 1. Use the resultFactory included in the context to create a default implementation of the IExecutionResult.
|
|
104
|
-
* The default implementation includes all the boilerplate and uses `dataProvider` to obtain DataViews for
|
|
105
|
-
* the {@link IExecutionResult#readAll} and {@link IExecutionResult#readWindow} methods.
|
|
106
|
-
*
|
|
107
|
-
* 2. Create its own implementation of IExecutionResult and instantiate as needed. In that case the the
|
|
108
|
-
* `dataProvider` does not have to be specified.
|
|
109
|
-
*
|
|
110
|
-
* ---
|
|
111
|
-
*
|
|
112
|
-
* Note: if the provider encounters problems during execution, it MUST raise exceptions from the `AnalyticalBackendError`
|
|
113
|
-
* error hierarchy.
|
|
114
|
-
*/
|
|
115
|
-
readonly resultProvider: ResultProvider;
|
|
116
|
-
/**
|
|
117
|
-
* Provider of data for particular execution result.
|
|
118
|
-
*
|
|
119
|
-
* ---
|
|
120
|
-
*
|
|
121
|
-
* This property MUST be specified when your implementation of `resultProvider` uses the default implementation
|
|
122
|
-
* of the IExecutionResult. Otherwise this property is optional. See description of `resultProvider` to learn more.
|
|
123
|
-
*
|
|
124
|
-
* ---
|
|
125
|
-
*
|
|
126
|
-
* Note: if the provider encounters problems during execution, it MUST raise exceptions from the `AnalyticalBackendError`
|
|
127
|
-
* error hierarchy.
|
|
128
|
-
*
|
|
129
|
-
*/
|
|
130
|
-
readonly dataProvider?: DataProvider;
|
|
131
|
-
};
|
|
132
|
-
/**
|
|
133
|
-
* @beta
|
|
134
|
-
*/
|
|
135
|
-
export type CustomBackendState = {
|
|
136
|
-
/**
|
|
137
|
-
* Telemetry available at the time of the provider call.
|
|
138
|
-
*/
|
|
139
|
-
telemetry?: TelemetryData;
|
|
140
|
-
/**
|
|
141
|
-
* Authentication call guard.
|
|
142
|
-
*
|
|
143
|
-
* Always wrap custom calls to authenticated APIs in the call guard. That way if the client is not yet authenticated the
|
|
144
|
-
* backend will trigger authentication flow and have authentication provider take care of the situation.
|
|
145
|
-
*
|
|
146
|
-
* Note that calls to `resultProvider` and `dataProvider` done by the custom backend infrastructure are already
|
|
147
|
-
* wrapped by this and provide the `client` as part of their respective call contexts. Use that instance of `client`
|
|
148
|
-
*/
|
|
149
|
-
authApiCall: AuthenticatedCallGuard;
|
|
150
|
-
};
|
|
151
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/customBackend/config.ts"],"names":[],"mappings":"AACA,OAAO,EACH,wBAAwB,EACxB,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,mBAAmB,KAAK,GAAG,CAAC;AACrE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,qBAAqB,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC3F;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;AAChF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,UAAU,EAAE,oBAAoB,EAAE,EAAE,WAAW,EAAE,MAAM,KAAK,gBAAgB,CAAC;AAC1G;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B;;OAEG;IACH,MAAM,EAAE,mBAAmB,CAAC;IAE5B;;OAEG;IACH,KAAK,EAAE,kBAAkB,CAAC;IAE1B;;;;;;;OAOG;IACH,MAAM,EAAE,GAAG,CAAC;CACf,CAAC;AACF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,GAAG;IACpD;;;OAGG;IACH,SAAS,EAAE,kBAAkB,CAAC;IAE9B;;;;;;;OAOG;IACH,aAAa,EAAE,aAAa,CAAC;CAChC,CAAC;AACF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GAAG;IAClD;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC;IAEzB;;;;OAIG;IACH,MAAM,CAAC,EAAE;QACL,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,IAAI,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;CACL,CAAC;AACF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,wBAAwB,GAAG;IACzD;;OAEG;IACH,QAAQ,CAAC,cAAc,EAAE,iBAAiB,CAAC;IAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAExC;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAE1B;;;;;;;;OAQG;IACH,WAAW,EAAE,sBAAsB,CAAC;CACvC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/customBackend/config.ts"],"names":[],"mappings":""}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AbstractExecutionFactory } from "../toolkit/execution";
|
|
2
|
-
import { IExecutionDefinition } from "@gooddata/sdk-model";
|
|
3
|
-
import { IPreparedExecution } from "@gooddata/sdk-backend-spi";
|
|
4
|
-
import { CustomBackendConfig, CustomBackendState } from "./config";
|
|
5
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare class CustomExecutionFactory extends AbstractExecutionFactory {
|
|
9
|
-
private readonly config;
|
|
10
|
-
private readonly state;
|
|
11
|
-
constructor(workspace: string, config: CustomBackendConfig, state: CustomBackendState);
|
|
12
|
-
forDefinition: (def: IExecutionDefinition) => IPreparedExecution;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=execution.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../src/customBackend/execution.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAEH,oBAAoB,EAUvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAIH,kBAAkB,EAQrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACH,mBAAmB,EACnB,kBAAkB,EAGrB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,wBAAwB;IAG5D,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAFtB,SAAS,EAAE,MAAM,EACA,MAAM,EAAE,mBAAmB,EAC3B,KAAK,EAAE,kBAAkB;IAKvC,aAAa,QAAS,oBAAoB,KAAG,kBAAkB,CAEpE;CACL"}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// (C) 2019-2023 GoodData Corporation
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.CustomExecutionFactory = void 0;
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
|
-
const execution_1 = require("../toolkit/execution");
|
|
7
|
-
const sdk_model_1 = require("@gooddata/sdk-model");
|
|
8
|
-
const sdk_backend_spi_1 = require("@gooddata/sdk-backend-spi");
|
|
9
|
-
const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
10
|
-
/**
|
|
11
|
-
* @internal
|
|
12
|
-
*/
|
|
13
|
-
class CustomExecutionFactory extends execution_1.AbstractExecutionFactory {
|
|
14
|
-
constructor(workspace, config, state) {
|
|
15
|
-
super(workspace);
|
|
16
|
-
this.config = config;
|
|
17
|
-
this.state = state;
|
|
18
|
-
this.forDefinition = (def) => {
|
|
19
|
-
return new CustomPreparedExecution(def, this, this.config, this.state);
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.CustomExecutionFactory = CustomExecutionFactory;
|
|
24
|
-
/**
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
class CustomPreparedExecution {
|
|
28
|
-
constructor(definition, executionFactory, config, state) {
|
|
29
|
-
this.definition = definition;
|
|
30
|
-
this.executionFactory = executionFactory;
|
|
31
|
-
this.config = config;
|
|
32
|
-
this.state = state;
|
|
33
|
-
this.execute = () => {
|
|
34
|
-
const { authApiCall } = this.state;
|
|
35
|
-
return authApiCall((client) => {
|
|
36
|
-
const context = {
|
|
37
|
-
config: this.config,
|
|
38
|
-
execution: this,
|
|
39
|
-
resultFactory: this.resultFactory,
|
|
40
|
-
state: this.state,
|
|
41
|
-
client,
|
|
42
|
-
};
|
|
43
|
-
return this.config.resultProvider(context);
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
this.explain = () => {
|
|
47
|
-
console.warn("Backend does not support explain mode");
|
|
48
|
-
return {
|
|
49
|
-
data: () => Promise.reject(new Error(`Backend does not support explain mode data call.`)),
|
|
50
|
-
download: () => Promise.resolve(),
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
this.withDimensions = (...dimsOrGen) => {
|
|
54
|
-
return this.executionFactory.forDefinition((0, sdk_model_1.defWithDimensions)(this.definition, ...dimsOrGen));
|
|
55
|
-
};
|
|
56
|
-
this.withSorting = (...items) => {
|
|
57
|
-
return this.executionFactory.forDefinition((0, sdk_model_1.defWithSorting)(this.definition, items));
|
|
58
|
-
};
|
|
59
|
-
this.withDateFormat = (dateFormat) => {
|
|
60
|
-
return this.executionFactory.forDefinition((0, sdk_model_1.defWithDateFormat)(this.definition, dateFormat));
|
|
61
|
-
};
|
|
62
|
-
this.withExecConfig = (config) => {
|
|
63
|
-
return this.executionFactory.forDefinition((0, sdk_model_1.defWithExecConfig)(this.definition, config));
|
|
64
|
-
};
|
|
65
|
-
this.equals = (other) => {
|
|
66
|
-
return (0, isEqual_1.default)(this.definition, other.definition);
|
|
67
|
-
};
|
|
68
|
-
this.fingerprint = () => {
|
|
69
|
-
if (!this._fingerprint) {
|
|
70
|
-
this._fingerprint = (0, sdk_model_1.defFingerprint)(this.definition);
|
|
71
|
-
}
|
|
72
|
-
return this._fingerprint;
|
|
73
|
-
};
|
|
74
|
-
this.resultFactory = (dimensions, fingerprint) => {
|
|
75
|
-
return new CustomExecutionResult(dimensions, fingerprint, this, this.config, this.state);
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* @internal
|
|
81
|
-
*/
|
|
82
|
-
class CustomExecutionResult {
|
|
83
|
-
constructor(dimensions, _fingerprint, execution, config, state) {
|
|
84
|
-
this.dimensions = dimensions;
|
|
85
|
-
this._fingerprint = _fingerprint;
|
|
86
|
-
this.execution = execution;
|
|
87
|
-
this.config = config;
|
|
88
|
-
this.state = state;
|
|
89
|
-
this.readAll = () => {
|
|
90
|
-
return this.state.authApiCall((client) => {
|
|
91
|
-
if (!this.config.dataProvider) {
|
|
92
|
-
throw new sdk_backend_spi_1.NotImplemented("custom backend does not specify dataProvider");
|
|
93
|
-
}
|
|
94
|
-
const context = {
|
|
95
|
-
config: this.config,
|
|
96
|
-
state: this.state,
|
|
97
|
-
result: this,
|
|
98
|
-
client,
|
|
99
|
-
};
|
|
100
|
-
return this.config.dataProvider(context);
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
this.readWindow = (offset, size) => {
|
|
104
|
-
return this.state.authApiCall((client) => {
|
|
105
|
-
if (!this.config.dataProvider) {
|
|
106
|
-
throw new sdk_backend_spi_1.NotImplemented("custom backend does not specify dataProvider");
|
|
107
|
-
}
|
|
108
|
-
const context = {
|
|
109
|
-
config: this.config,
|
|
110
|
-
state: this.state,
|
|
111
|
-
result: this,
|
|
112
|
-
window: {
|
|
113
|
-
offset,
|
|
114
|
-
size,
|
|
115
|
-
},
|
|
116
|
-
client,
|
|
117
|
-
};
|
|
118
|
-
return this.config.dataProvider(context);
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
this.transform = () => {
|
|
122
|
-
return this.execution;
|
|
123
|
-
};
|
|
124
|
-
this.equals = (other) => {
|
|
125
|
-
return this._fingerprint === other.fingerprint();
|
|
126
|
-
};
|
|
127
|
-
this.fingerprint = () => {
|
|
128
|
-
return this._fingerprint;
|
|
129
|
-
};
|
|
130
|
-
this.export = (_options) => {
|
|
131
|
-
throw new sdk_backend_spi_1.NotSupported("exports from custom backend are not supported");
|
|
132
|
-
};
|
|
133
|
-
this.exportToBlob = (_options) => {
|
|
134
|
-
throw new sdk_backend_spi_1.NotSupported("exports from custom backend are not supported");
|
|
135
|
-
};
|
|
136
|
-
this.definition = execution.definition;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
//# sourceMappingURL=execution.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../../src/customBackend/execution.ts"],"names":[],"mappings":";AAAA,qCAAqC;;;;AAErC,oDAAgE;AAChE,mDAY6B;AAC7B,+DAYmC;AACnC,qEAAqC;AAQrC;;GAEG;AACH,MAAa,sBAAuB,SAAQ,oCAAwB;IAChE,YACI,SAAiB,EACA,MA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,EAAE,IAAI,CAAC,KAAK;oBACjB,MAAM,EAAE,IAAI;oBACZ,MAAM,EAAE;wBACJ,MAAM;wBACN,IAAI;qBACP;oBACD,MAAM;iBACT,CAAC;gBAEF,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;YAC7C,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;QAEK,cAAS,GAAG,GAAuB,EAAE;YACxC,OAAO,IAAI,CAAC,SAAS,CAAC;QAC1B,CAAC,CAAC;QAEK,WAAM,GAAG,CAAC,KAAuB,EAAW,EAAE;YACjD,OAAO,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC;QACrD,CAAC,CAAC;QAEK,gBAAW,GAAG,GAAW,EAAE;YAC9B,OAAO,IAAI,CAAC,YAAY,CAAC;QAC7B,CAAC,CAAC;QAEK,WAAM,GAAG,CAAC,QAAuB,EAA0B,EAAE;YAChE,MAAM,IAAI,8BAAY,CAAC,+CAA+C,CAAC,CAAC;QAC5E,CAAC,CAAC;QAEK,iBAAY,GAAG,CAAC,QAAuB,EAA8B,EAAE;YAC1E,MAAM,IAAI,8BAAY,CAAC,+CAA+C,CAAC,CAAC;QAC5E,CAAC,CAAC;QA3DE,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC,UAAU,CAAC;IAC3C,CAAC;CA2DJ"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { IAuthenticatedPrincipal, IBackendCapabilities, IAnalyticalBackend, IAnalyticalWorkspace, IAuthenticationProvider, IUserService, IWorkspacesQueryFactory, IOrganization, IOrganizations, IEntitlements } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import { TelemetryData } from "../toolkit/backend";
|
|
3
|
-
import { IAuthProviderCallGuard } from "../toolkit/auth";
|
|
4
|
-
import { CustomBackendConfig } from "./config";
|
|
5
|
-
/**
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare class CustomBackend implements IAnalyticalBackend {
|
|
9
|
-
private readonly telemetryData?;
|
|
10
|
-
readonly capabilities: IBackendCapabilities;
|
|
11
|
-
readonly config: CustomBackendConfig;
|
|
12
|
-
private readonly authProvider;
|
|
13
|
-
constructor(config: CustomBackendConfig, authProvider?: IAuthProviderCallGuard, telemetryData?: TelemetryData | undefined);
|
|
14
|
-
onHostname: (hostname: string) => IAnalyticalBackend;
|
|
15
|
-
withAuthentication: (provider: IAuthenticationProvider) => IAnalyticalBackend;
|
|
16
|
-
authenticate: (force?: boolean) => Promise<IAuthenticatedPrincipal>;
|
|
17
|
-
deauthenticate: () => Promise<void>;
|
|
18
|
-
isAuthenticated: () => Promise<IAuthenticatedPrincipal | null>;
|
|
19
|
-
withTelemetry: (componentName: string, props: object) => IAnalyticalBackend;
|
|
20
|
-
workspace: (id: string) => IAnalyticalWorkspace;
|
|
21
|
-
workspaces: () => IWorkspacesQueryFactory;
|
|
22
|
-
currentUser: () => IUserService;
|
|
23
|
-
organization: (_organizationId: string) => IOrganization;
|
|
24
|
-
organizations: () => IOrganizations;
|
|
25
|
-
entitlements: () => IEntitlements;
|
|
26
|
-
private getAuthenticationContext;
|
|
27
|
-
private authApiCall;
|
|
28
|
-
private triggerAuthentication;
|
|
29
|
-
private getAsyncCallContext;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Creates an instance of backend which uses custom functions to calculate results. See {@link CustomBackendConfig}
|
|
33
|
-
* to learn more on what and how should be customized.
|
|
34
|
-
*
|
|
35
|
-
* ---
|
|
36
|
-
*
|
|
37
|
-
* Authentication is handled according to the specification described in the IAnalyticalBackend SPI. The custom backend
|
|
38
|
-
* can be set up with authentication provider which will realize the desired authentication mechanism.
|
|
39
|
-
*
|
|
40
|
-
* Unless explicitly told via forced authentication (see {@link IAnalyticalBackend#authenticate}), the custom backend
|
|
41
|
-
* will defer authentication until it is actually needed. In order for the custom backend to recognize that authentication
|
|
42
|
-
* is needed, the different providers must throw the `NotAuthenticated` error.
|
|
43
|
-
*
|
|
44
|
-
* @beta
|
|
45
|
-
*/
|
|
46
|
-
export declare function customBackend(config: CustomBackendConfig): IAnalyticalBackend;
|
|
47
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/customBackend/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,uBAAuB,EAEvB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EAEvB,YAAY,EACZ,uBAAuB,EAGvB,aAAa,EACb,cAAc,EACd,aAAa,EAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAKH,sBAAsB,EACzB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAM/C;;GAEG;AACH,qBAAa,aAAc,YAAW,kBAAkB;IAShD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC;IARnC,SAAgB,YAAY,EAAE,oBAAoB,CAAC;IACnD,SAAgB,MAAM,EAAE,mBAAmB,CAAC;IAE5C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAyB;gBAGlD,MAAM,EAAE,mBAAmB,EAC3B,YAAY,CAAC,EAAE,sBAAsB,EACpB,aAAa,CAAC,2BAAe;IAQ3C,UAAU,aAAc,MAAM,KAAG,kBAAkB,CAOxD;IAEK,kBAAkB,aAAc,uBAAuB,KAAG,kBAAkB,CAIjF;IAEK,YAAY,WAAY,OAAO,KAAG,QAAQ,uBAAuB,CAAC,CAYvE;IAEK,cAAc,QAAO,QAAQ,IAAI,CAAC,CAEvC;IAEK,eAAe,QAAO,QAAQ,uBAAuB,GAAG,IAAI,CAAC,CAElE;IAEK,aAAa,kBAAmB,MAAM,SAAS,MAAM,KAAG,kBAAkB,CAK/E;IAEK,SAAS,OAAQ,MAAM,KAAG,oBAAoB,CAKnD;IAEK,UAAU,QAAO,uBAAuB,CAE7C;IAEK,WAAW,QAAO,YAAY,CAEnC;IAEK,YAAY,oBAAqB,MAAM,KAAG,aAAa,CAE5D;IAEK,aAAa,QAAO,cAAc,CAEvC;IAEK,YAAY,QAAO,aAAa,CAErC;IAEF,OAAO,CAAC,wBAAwB,CAK9B;IAEF,OAAO,CAAC,WAAW,CA0BjB;IAEF,OAAO,CAAC,qBAAqB,CAY3B;IAEF,OAAO,CAAC,mBAAmB,CAiBzB;CACL;AAMD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,kBAAkB,CAE7E"}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// (C) 2019-2023 GoodData Corporation
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.customBackend = exports.CustomBackend = void 0;
|
|
5
|
-
const sdk_backend_spi_1 = require("@gooddata/sdk-backend-spi");
|
|
6
|
-
const auth_1 = require("../toolkit/auth");
|
|
7
|
-
const workspace_1 = require("./workspace");
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
/**
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
class CustomBackend {
|
|
15
|
-
constructor(config, authProvider, telemetryData) {
|
|
16
|
-
this.telemetryData = telemetryData;
|
|
17
|
-
this.onHostname = (hostname) => {
|
|
18
|
-
const newConfig = Object.assign(Object.assign({}, this.config), { hostname });
|
|
19
|
-
return new CustomBackend(newConfig);
|
|
20
|
-
};
|
|
21
|
-
this.withAuthentication = (provider) => {
|
|
22
|
-
const guardedAuthProvider = new auth_1.AuthProviderCallGuard(provider);
|
|
23
|
-
return new CustomBackend(this.config, guardedAuthProvider);
|
|
24
|
-
};
|
|
25
|
-
this.authenticate = (force) => {
|
|
26
|
-
if (!this.authProvider) {
|
|
27
|
-
return Promise.reject(new sdk_backend_spi_1.NotAuthenticated("Backend is not set up with authentication provider."));
|
|
28
|
-
}
|
|
29
|
-
if (force) {
|
|
30
|
-
this.authProvider.reset();
|
|
31
|
-
}
|
|
32
|
-
return this.authProvider.authenticate(this.getAuthenticationContext());
|
|
33
|
-
};
|
|
34
|
-
this.deauthenticate = () => {
|
|
35
|
-
return this.authProvider.deauthenticate(this.getAuthenticationContext());
|
|
36
|
-
};
|
|
37
|
-
this.isAuthenticated = () => {
|
|
38
|
-
return this.authProvider.getCurrentPrincipal(this.getAuthenticationContext());
|
|
39
|
-
};
|
|
40
|
-
this.withTelemetry = (componentName, props) => {
|
|
41
|
-
return new CustomBackend(this.config, this.authProvider, {
|
|
42
|
-
componentName,
|
|
43
|
-
props: Object.keys(props),
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
this.workspace = (id) => {
|
|
47
|
-
return new workspace_1.CustomWorkspace(id, this.config, {
|
|
48
|
-
telemetry: this.telemetryData,
|
|
49
|
-
authApiCall: this.authApiCall,
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
this.workspaces = () => {
|
|
53
|
-
throw new sdk_backend_spi_1.NotSupported("workspace listing is not supported");
|
|
54
|
-
};
|
|
55
|
-
this.currentUser = () => {
|
|
56
|
-
throw new sdk_backend_spi_1.NotSupported("user service is not supported");
|
|
57
|
-
};
|
|
58
|
-
this.organization = (_organizationId) => {
|
|
59
|
-
throw new sdk_backend_spi_1.NotSupported("organization is not supported");
|
|
60
|
-
};
|
|
61
|
-
this.organizations = () => {
|
|
62
|
-
throw new sdk_backend_spi_1.NotSupported("organizations is not supported");
|
|
63
|
-
};
|
|
64
|
-
this.entitlements = () => {
|
|
65
|
-
throw new sdk_backend_spi_1.NotSupported("entitlements are not supported");
|
|
66
|
-
};
|
|
67
|
-
this.getAuthenticationContext = (useClient) => {
|
|
68
|
-
return {
|
|
69
|
-
client: useClient || this.config.clientProvider(this.config),
|
|
70
|
-
backend: this,
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
this.authApiCall = async (call) => {
|
|
74
|
-
// first, try it "normally"
|
|
75
|
-
let result;
|
|
76
|
-
const client = this.config.clientProvider(this.config);
|
|
77
|
-
try {
|
|
78
|
-
result = await call(client, await this.getAsyncCallContext(client));
|
|
79
|
-
}
|
|
80
|
-
catch (err) {
|
|
81
|
-
if (!(0, sdk_backend_spi_1.isNotAuthenticated)(err)) {
|
|
82
|
-
throw err;
|
|
83
|
-
}
|
|
84
|
-
// in case there was a NotAuthenticated error, trigger auth and try once again
|
|
85
|
-
try {
|
|
86
|
-
await this.triggerAuthentication(true, client);
|
|
87
|
-
result = await call(client, await this.getAsyncCallContext(client));
|
|
88
|
-
}
|
|
89
|
-
catch (err) {
|
|
90
|
-
if (!(0, sdk_backend_spi_1.isNotAuthenticated)(err)) {
|
|
91
|
-
throw err;
|
|
92
|
-
}
|
|
93
|
-
throw new sdk_backend_spi_1.NotAuthenticated("Current session is not authenticated.", err);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return result;
|
|
97
|
-
};
|
|
98
|
-
this.triggerAuthentication = (reset = false, useClient) => {
|
|
99
|
-
if (!this.authProvider) {
|
|
100
|
-
return Promise.reject(new sdk_backend_spi_1.NotAuthenticated("Backend is not set up with authentication provider."));
|
|
101
|
-
}
|
|
102
|
-
if (reset) {
|
|
103
|
-
this.authProvider.reset();
|
|
104
|
-
}
|
|
105
|
-
return this.authProvider.authenticate(this.getAuthenticationContext(useClient));
|
|
106
|
-
};
|
|
107
|
-
this.getAsyncCallContext = async (client) => {
|
|
108
|
-
const getPrincipal = async () => {
|
|
109
|
-
if (!this.authProvider) {
|
|
110
|
-
throw new sdk_backend_spi_1.NotAuthenticated("Cannot obtain principal without an authProvider.");
|
|
111
|
-
}
|
|
112
|
-
const principal = await this.authProvider.getCurrentPrincipal({ client, backend: this });
|
|
113
|
-
if (principal) {
|
|
114
|
-
return principal;
|
|
115
|
-
}
|
|
116
|
-
return this.authProvider.authenticate(this.getAuthenticationContext(client));
|
|
117
|
-
};
|
|
118
|
-
return {
|
|
119
|
-
getPrincipal,
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
this.config = config;
|
|
123
|
-
this.capabilities = {};
|
|
124
|
-
this.authProvider = authProvider || new auth_1.AnonymousAuthProvider();
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
exports.CustomBackend = CustomBackend;
|
|
128
|
-
//
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
/**
|
|
132
|
-
* Creates an instance of backend which uses custom functions to calculate results. See {@link CustomBackendConfig}
|
|
133
|
-
* to learn more on what and how should be customized.
|
|
134
|
-
*
|
|
135
|
-
* ---
|
|
136
|
-
*
|
|
137
|
-
* Authentication is handled according to the specification described in the IAnalyticalBackend SPI. The custom backend
|
|
138
|
-
* can be set up with authentication provider which will realize the desired authentication mechanism.
|
|
139
|
-
*
|
|
140
|
-
* Unless explicitly told via forced authentication (see {@link IAnalyticalBackend#authenticate}), the custom backend
|
|
141
|
-
* will defer authentication until it is actually needed. In order for the custom backend to recognize that authentication
|
|
142
|
-
* is needed, the different providers must throw the `NotAuthenticated` error.
|
|
143
|
-
*
|
|
144
|
-
* @beta
|
|
145
|
-
*/
|
|
146
|
-
function customBackend(config) {
|
|
147
|
-
return new CustomBackend(config);
|
|
148
|
-
}
|
|
149
|
-
exports.customBackend = customBackend;
|
|
150
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/customBackend/index.ts"],"names":[],"mappings":";AAAA,qCAAqC;;;AAErC,+DAemC;AAEnC,0CAMyB;AACzB,2CAA8C;AAG9C,EAAE;AACF,EAAE;AACF,EAAE;AAEF;;GAEG;AACH,MAAa,aAAa;IAMtB,YACI,MAA2B,EAC3B,YAAqC,EACpB,aAA6B;QAA7B,kBAAa,GAAb,aAAa,CAAgB;QAQ3C,eAAU,GAAG,CAAC,QAAgB,EAAsB,EAAE;YACzD,MAAM,SAAS,mCACR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OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;gBACzF,IAAI,SAAS,EAAE;oBACX,OAAO,SAAS,CAAC;iBACpB;gBAED,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC,CAAC;YACjF,CAAC,CAAC;YAEF,OAAO;gBACH,YAAY;aACf,CAAC;QACN,CAAC,CAAC;QA/IE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QAEvB,IAAI,CAAC,YAAY,GAAG,YAAY,IAAI,IAAI,4BAAqB,EAAE,CAAC;IACpE,CAAC;CA4IJ;AA3JD,sCA2JC;AAED,EAAE;AACF,EAAE;AACF,EAAE;AAEF;;;;;;;;;;;;;;GAcG;AACH,SAAgB,aAAa,CAAC,MAA2B;IACrD,OAAO,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;AACrC,CAAC;AAFD,sCAEC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { IAnalyticalWorkspace, IExecutionFactory, IWorkspaceCatalogFactory, IWorkspaceDashboardsService, IWorkspaceDatasetsService, IWorkspaceInsightsService, IWorkspaceAttributesService, IWorkspaceMeasuresService, IWorkspaceFactsService, IWorkspacePermissionsService, IWorkspaceSettingsService, IWorkspaceStylingService, IWorkspaceUsersQuery, IDateFilterConfigsQuery, IWorkspaceDescriptor, IWorkspaceUserGroupsQuery, IWorkspaceAccessControlService } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import { CustomBackendConfig, CustomBackendState } from "./config";
|
|
3
|
-
/**
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export declare class CustomWorkspace implements IAnalyticalWorkspace {
|
|
7
|
-
readonly workspace: string;
|
|
8
|
-
private readonly config;
|
|
9
|
-
private readonly state;
|
|
10
|
-
constructor(workspace: string, config: CustomBackendConfig, state: CustomBackendState);
|
|
11
|
-
getDescriptor(): Promise<IWorkspaceDescriptor>;
|
|
12
|
-
getParentWorkspace(): Promise<IAnalyticalWorkspace | undefined>;
|
|
13
|
-
execution(): IExecutionFactory;
|
|
14
|
-
attributes(): IWorkspaceAttributesService;
|
|
15
|
-
settings(): IWorkspaceSettingsService;
|
|
16
|
-
styling(): IWorkspaceStylingService;
|
|
17
|
-
permissions(): IWorkspacePermissionsService;
|
|
18
|
-
catalog(): IWorkspaceCatalogFactory;
|
|
19
|
-
measures(): IWorkspaceMeasuresService;
|
|
20
|
-
facts(): IWorkspaceFactsService;
|
|
21
|
-
datasets(): IWorkspaceDatasetsService;
|
|
22
|
-
insights(): IWorkspaceInsightsService;
|
|
23
|
-
dashboards(): IWorkspaceDashboardsService;
|
|
24
|
-
users(): IWorkspaceUsersQuery;
|
|
25
|
-
dateFilterConfigs(): IDateFilterConfigsQuery;
|
|
26
|
-
userGroups(): IWorkspaceUserGroupsQuery;
|
|
27
|
-
accessControl(): IWorkspaceAccessControlService;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/customBackend/workspace.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,sBAAsB,EACtB,4BAA4B,EAC5B,yBAAyB,EACzB,wBAAwB,EAExB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,8BAA8B,EACjC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnE;;GAEG;AACH,qBAAa,eAAgB,YAAW,oBAAoB;aAEpC,SAAS,EAAE,MAAM;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAFN,SAAS,EAAE,MAAM,EAChB,MAAM,EAAE,mBAAmB,EAC3B,KAAK,EAAE,kBAAkB;IAGvC,aAAa,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAI9C,kBAAkB,IAAI,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC;IAI/D,SAAS,IAAI,iBAAiB;IAS9B,UAAU,IAAI,2BAA2B;IAKzC,QAAQ,IAAI,yBAAyB;IAKrC,OAAO,IAAI,wBAAwB;IAOnC,WAAW,IAAI,4BAA4B;IAI3C,OAAO,IAAI,wBAAwB;IAInC,QAAQ,IAAI,yBAAyB;IAIrC,KAAK,IAAI,sBAAsB;IAI/B,QAAQ,IAAI,yBAAyB;IAIrC,QAAQ,IAAI,yBAAyB;IAIrC,UAAU,IAAI,2BAA2B;IAIzC,KAAK,IAAI,oBAAoB;IAI7B,iBAAiB,IAAI,uBAAuB;IAI5C,UAAU,IAAI,yBAAyB;IAIvC,aAAa,IAAI,8BAA8B;CAGzD"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// (C) 2019-2021 GoodData Corporation
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.CustomWorkspace = void 0;
|
|
5
|
-
const sdk_backend_spi_1 = require("@gooddata/sdk-backend-spi");
|
|
6
|
-
const execution_1 = require("./execution");
|
|
7
|
-
/**
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
class CustomWorkspace {
|
|
11
|
-
constructor(workspace, config, state) {
|
|
12
|
-
this.workspace = workspace;
|
|
13
|
-
this.config = config;
|
|
14
|
-
this.state = state;
|
|
15
|
-
}
|
|
16
|
-
getDescriptor() {
|
|
17
|
-
throw new sdk_backend_spi_1.NotSupported("getting workspace descriptor is not supported");
|
|
18
|
-
}
|
|
19
|
-
getParentWorkspace() {
|
|
20
|
-
throw new sdk_backend_spi_1.NotSupported("getting parent workspace is not supported");
|
|
21
|
-
}
|
|
22
|
-
execution() {
|
|
23
|
-
return new execution_1.CustomExecutionFactory(this.workspace, this.config, this.state);
|
|
24
|
-
}
|
|
25
|
-
//
|
|
26
|
-
// Should implement
|
|
27
|
-
//
|
|
28
|
-
// used by attribute filters
|
|
29
|
-
attributes() {
|
|
30
|
-
throw new sdk_backend_spi_1.NotSupported("attributes service is not supported");
|
|
31
|
-
}
|
|
32
|
-
// used in InsightView - implement if custom backend should support persisted insights
|
|
33
|
-
settings() {
|
|
34
|
-
throw new sdk_backend_spi_1.NotSupported("settings not supported");
|
|
35
|
-
}
|
|
36
|
-
// used in InsightView - implement if custom backend should support persisted insights
|
|
37
|
-
styling() {
|
|
38
|
-
throw new sdk_backend_spi_1.NotSupported("styling is not supported");
|
|
39
|
-
}
|
|
40
|
-
//
|
|
41
|
-
// Services for 'advanced' use cases - used in AD and KD.
|
|
42
|
-
//
|
|
43
|
-
permissions() {
|
|
44
|
-
throw new sdk_backend_spi_1.NotSupported("permissions are not supported");
|
|
45
|
-
}
|
|
46
|
-
catalog() {
|
|
47
|
-
throw new sdk_backend_spi_1.NotSupported("catalog is not supported");
|
|
48
|
-
}
|
|
49
|
-
measures() {
|
|
50
|
-
throw new sdk_backend_spi_1.NotSupported("measures service is not supported");
|
|
51
|
-
}
|
|
52
|
-
facts() {
|
|
53
|
-
throw new sdk_backend_spi_1.NotSupported("measures service is not supported");
|
|
54
|
-
}
|
|
55
|
-
datasets() {
|
|
56
|
-
throw new sdk_backend_spi_1.NotSupported("data sets service is not supported");
|
|
57
|
-
}
|
|
58
|
-
insights() {
|
|
59
|
-
throw new sdk_backend_spi_1.NotSupported("insights are not supported");
|
|
60
|
-
}
|
|
61
|
-
dashboards() {
|
|
62
|
-
throw new sdk_backend_spi_1.NotSupported("dashboards are not supported");
|
|
63
|
-
}
|
|
64
|
-
users() {
|
|
65
|
-
throw new sdk_backend_spi_1.NotSupported("users are not supported");
|
|
66
|
-
}
|
|
67
|
-
dateFilterConfigs() {
|
|
68
|
-
throw new sdk_backend_spi_1.NotSupported("dateFilterConfigs are not supported");
|
|
69
|
-
}
|
|
70
|
-
userGroups() {
|
|
71
|
-
throw new sdk_backend_spi_1.NotSupported("user groups are not supported");
|
|
72
|
-
}
|
|
73
|
-
accessControl() {
|
|
74
|
-
throw new sdk_backend_spi_1.NotSupported("access control is not supported");
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
exports.CustomWorkspace = CustomWorkspace;
|
|
78
|
-
//# sourceMappingURL=workspace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../src/customBackend/workspace.ts"],"names":[],"mappings":";AAAA,qCAAqC;;;AAErC,+DAmBmC;AACnC,2CAAqD;AAGrD;;GAEG;AACH,MAAa,eAAe;IACxB,YACoB,SAAiB,EAChB,MAA2B,EAC3B,KAAyB;QAF1B,cAAS,GAAT,SAAS,CAAQ;QAChB,WAAM,GAAN,MAAM,CAAqB;QAC3B,UAAK,GAAL,KAAK,CAAoB;IAC3C,CAAC;IAEG,aAAa;QAChB,MAAM,IAAI,8BAAY,CAAC,+CAA+C,CAAC,CAAC;IAC5E,CAAC;IAEM,kBAAkB;QACrB,MAAM,IAAI,8BAAY,CAAC,2CAA2C,CAAC,CAAC;IACxE,CAAC;IAEM,SAAS;QACZ,OAAO,IAAI,kCAAsB,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/E,CAAC;IAED,EAAE;IACF,mBAAmB;IACnB,EAAE;IAEF,4BAA4B;IACrB,UAAU;QACb,MAAM,IAAI,8BAAY,CAAC,qCAAqC,CAAC,CAAC;IAClE,CAAC;IAED,sFAAsF;IAC/E,QAAQ;QACX,MAAM,IAAI,8BAAY,CAAC,wBAAwB,CAAC,CAAC;IACrD,CAAC;IAED,sFAAsF;IAC/E,OAAO;QACV,MAAM,IAAI,8BAAY,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