bways-report 0.1.8 → 0.2.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/README.md +463 -316
- package/esm2022/lib/core/config/bways-report-config.mjs +31 -32
- package/esm2022/lib/core/models/index.mjs +1 -1
- package/esm2022/lib/core/models/report-api-endpoint.model.mjs +8 -0
- package/esm2022/lib/core/models/report-component.model.mjs +1 -1
- package/esm2022/lib/core/models/report-datasource.model.mjs +1 -1
- package/esm2022/lib/core/services/index.mjs +2 -1
- package/esm2022/lib/core/services/report-api-execution.service.mjs +210 -0
- package/esm2022/lib/core/services/report-data-discovery.service.mjs +76 -4
- package/esm2022/lib/core/services/report-session-context.service.mjs +72 -3
- package/esm2022/lib/core/tokens/designer-config.token.mjs +4 -0
- package/esm2022/lib/core/tokens/reporting-config.token.mjs +1 -1
- package/esm2022/lib/core/utils/report-endpoint.util.mjs +22 -0
- package/esm2022/lib/core/utils/report-request-scope.mjs +48 -0
- package/esm2022/lib/data-access/adapters/endpoint-datasource.adapter.mjs +31 -1
- package/esm2022/lib/data-access/adapters/endpoint-lookup.adapter.mjs +27 -2
- package/esm2022/lib/data-access/adapters/endpoint-masterdata.adapter.mjs +5 -2
- package/esm2022/lib/data-access/adapters/endpoint-persistence.adapter.mjs +30 -14
- package/esm2022/lib/data-access/adapters/endpoint-schema-discovery.adapter.mjs +32 -28
- package/esm2022/lib/data-access/adapters/endpoint-tokens.mjs +1 -1
- package/esm2022/lib/data-access/adapters/http-datasource.adapter.mjs +4 -37
- package/esm2022/lib/data-access/adapters/http-lookup.adapter.mjs +28 -51
- package/esm2022/lib/data-access/adapters/http-persistence.adapter.mjs +43 -194
- package/esm2022/lib/data-access/adapters/http-schema-discovery.adapter.mjs +17 -65
- package/esm2022/lib/data-access/adapters/index.mjs +1 -1
- package/esm2022/lib/data-access/adapters/local-storage-persistence.adapter.mjs +13 -4
- package/esm2022/lib/data-access/adapters/report-id-availability.mjs +20 -0
- package/esm2022/lib/data-access/adapters/session-headers.mjs +11 -0
- package/esm2022/lib/data-access/contracts/index.mjs +1 -1
- package/esm2022/lib/data-access/contracts/lookup.contract.mjs +1 -1
- package/esm2022/lib/data-access/contracts/report-persistence.contract.mjs +13 -1
- package/esm2022/lib/features/designer/components/component-palette/component-palette.component.mjs +536 -6
- package/esm2022/lib/features/designer/components/design-canvas/design-canvas.component.mjs +55 -17
- package/esm2022/lib/features/designer/components/dialogs/report-saved-dialog.component.mjs +546 -119
- package/esm2022/lib/features/designer/components/property-editor/parameter-binding-editor.component.mjs +3 -3
- package/esm2022/lib/features/designer/components/property-editor/property-editor-action.component.mjs +3 -3
- package/esm2022/lib/features/designer/components/property-editor/property-editor-datasource.component.mjs +142 -8
- package/esm2022/lib/features/designer/components/property-editor/property-editor-general.component.mjs +3 -3
- package/esm2022/lib/features/designer/components/property-editor/property-editor-grid.component.mjs +129 -28
- package/esm2022/lib/features/designer/components/property-editor/property-editor-layout.component.mjs +3 -3
- package/esm2022/lib/features/designer/components/property-editor/property-editor-report.component.mjs +3 -3
- package/esm2022/lib/features/designer/components/property-editor/property-editor-validation.component.mjs +3 -3
- package/esm2022/lib/features/designer/components/property-editor/property-editor.component.mjs +27 -13
- package/esm2022/lib/features/designer/components/toolbar/designer-toolbar.component.mjs +54 -32
- package/esm2022/lib/features/designer/designer.component.mjs +109 -75
- package/esm2022/lib/features/designer/rpt-report-designer.component.mjs +10 -4
- package/esm2022/lib/features/designer/services/designer-config.service.mjs +56 -0
- package/esm2022/lib/features/designer/services/designer-endpoints.service.mjs +155 -0
- package/esm2022/lib/features/designer/services/designer-state.service.mjs +3 -2
- package/esm2022/lib/features/designer/utilities/canvas-layout.util.mjs +2 -1
- package/esm2022/lib/features/embed/bways-report-builder.component.mjs +3 -3
- package/esm2022/lib/features/export/services/report-export.service.mjs +11 -6
- package/esm2022/lib/features/persistence/services/report-store.service.mjs +78 -23
- package/esm2022/lib/features/persistence/services/schema-validator.service.mjs +59 -3
- package/esm2022/lib/features/routing/components/routed-report-designer.component.mjs +12 -17
- package/esm2022/lib/features/routing/components/routed-report-runtime.component.mjs +6 -4
- package/esm2022/lib/features/routing/report-routes.mjs +6 -6
- package/esm2022/lib/features/routing/resolvers/report-route-identifier.mjs +5 -0
- package/esm2022/lib/features/routing/resolvers/report.resolver.mjs +3 -2
- package/esm2022/lib/features/runtime/dynamic-renderer.component.mjs +23 -4
- package/esm2022/lib/features/runtime/report-execution.service.mjs +36 -6
- package/esm2022/lib/features/runtime/report-grid-bridge.component.mjs +54 -11
- package/esm2022/lib/features/runtime/report-runtime.component.mjs +105 -68
- package/esm2022/lib/features/runtime/rpt-report.component.mjs +50 -42
- package/esm2022/lib/primitives/components/chart-bridge/report-chart-bridge.component.mjs +7 -2
- package/esm2022/lib/primitives/components/dropdown/rpt-dropdown.component.mjs +16 -7
- package/esm2022/lib/primitives/components/icon/rpt-icon.component.mjs +53 -1
- package/esm2022/lib/primitives/components/index.mjs +2 -1
- package/esm2022/lib/primitives/components/radio/rpt-radio.component.mjs +428 -0
- package/esm2022/lib/primitives/register-builtins.mjs +51 -2
- package/esm2022/lib/provide-reporting.mjs +11 -29
- package/fesm2022/bways-report.mjs +3745 -1281
- package/fesm2022/bways-report.mjs.map +1 -1
- package/lib/core/config/bways-report-config.d.ts +27 -5
- package/lib/core/models/index.d.ts +2 -1
- package/lib/core/models/report-api-endpoint.model.d.ts +30 -0
- package/lib/core/models/report-component.model.d.ts +16 -4
- package/lib/core/models/report-datasource.model.d.ts +21 -2
- package/lib/core/services/index.d.ts +1 -0
- package/lib/core/services/report-api-execution.service.d.ts +41 -0
- package/lib/core/services/report-data-discovery.service.d.ts +23 -1
- package/lib/core/services/report-session-context.service.d.ts +9 -0
- package/lib/core/tokens/designer-config.token.d.ts +4 -0
- package/lib/core/tokens/reporting-config.token.d.ts +4 -0
- package/lib/core/utils/report-endpoint.util.d.ts +12 -0
- package/lib/core/utils/report-request-scope.d.ts +14 -0
- package/lib/data-access/adapters/endpoint-datasource.adapter.d.ts +2 -0
- package/lib/data-access/adapters/endpoint-lookup.adapter.d.ts +1 -0
- package/lib/data-access/adapters/endpoint-persistence.adapter.d.ts +6 -2
- package/lib/data-access/adapters/endpoint-schema-discovery.adapter.d.ts +4 -2
- package/lib/data-access/adapters/endpoint-tokens.d.ts +7 -0
- package/lib/data-access/adapters/http-datasource.adapter.d.ts +1 -3
- package/lib/data-access/adapters/http-lookup.adapter.d.ts +3 -4
- package/lib/data-access/adapters/http-persistence.adapter.d.ts +11 -16
- package/lib/data-access/adapters/http-schema-discovery.adapter.d.ts +3 -5
- package/lib/data-access/adapters/index.d.ts +1 -1
- package/lib/data-access/adapters/local-storage-persistence.adapter.d.ts +2 -2
- package/lib/data-access/adapters/report-id-availability.d.ts +6 -0
- package/lib/data-access/adapters/session-headers.d.ts +3 -0
- package/lib/data-access/contracts/index.d.ts +1 -0
- package/lib/data-access/contracts/lookup.contract.d.ts +3 -0
- package/lib/data-access/contracts/report-persistence.contract.d.ts +16 -1
- package/lib/features/designer/components/component-palette/component-palette.component.d.ts +16 -0
- package/lib/features/designer/components/design-canvas/design-canvas.component.d.ts +2 -0
- package/lib/features/designer/components/dialogs/report-saved-dialog.component.d.ts +37 -5
- package/lib/features/designer/components/property-editor/property-editor-datasource.component.d.ts +21 -3
- package/lib/features/designer/components/property-editor/property-editor-grid.component.d.ts +20 -7
- package/lib/features/designer/components/property-editor/property-editor.component.d.ts +2 -1
- package/lib/features/designer/components/toolbar/designer-toolbar.component.d.ts +7 -1
- package/lib/features/designer/designer.component.d.ts +16 -2
- package/lib/features/designer/rpt-report-designer.component.d.ts +5 -1
- package/lib/features/designer/services/designer-config.service.d.ts +13 -0
- package/lib/features/designer/services/designer-endpoints.service.d.ts +25 -0
- package/lib/features/persistence/services/report-store.service.d.ts +15 -1
- package/lib/features/persistence/services/schema-validator.service.d.ts +2 -0
- package/lib/features/routing/resolvers/report-route-identifier.d.ts +2 -0
- package/lib/features/runtime/report-execution.service.d.ts +4 -0
- package/lib/features/runtime/report-grid-bridge.component.d.ts +4 -1
- package/lib/features/runtime/report-runtime.component.d.ts +14 -1
- package/lib/features/runtime/rpt-report.component.d.ts +5 -0
- package/lib/primitives/components/chart-bridge/report-chart-bridge.component.d.ts +3 -1
- package/lib/primitives/components/index.d.ts +2 -0
- package/lib/primitives/components/radio/rpt-radio.component.d.ts +77 -0
- package/package.json +2 -1
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { Type } from '@angular/core';
|
|
10
10
|
import { SessionContextProvider, SessionContextSource } from '../tokens/session-context.token';
|
|
11
|
+
import { ReportApiEndpointDefinition } from '../models/report-api-endpoint.model';
|
|
11
12
|
/**
|
|
12
13
|
* Palette component category names the developer can use
|
|
13
14
|
* when restricting the designer component palette.
|
|
@@ -46,18 +47,18 @@ export interface BwaysReportConfig {
|
|
|
46
47
|
* GET endpoint returning the list of stored procedures with their parameters.
|
|
47
48
|
* Response: `[{ name, schema, parameters: [{ name, sqlType, required, defaultValue? }] }]`
|
|
48
49
|
*/
|
|
49
|
-
spEndpoint
|
|
50
|
+
spEndpoint?: string;
|
|
50
51
|
/**
|
|
51
52
|
* GET endpoint returning the list of tables/views with their columns.
|
|
52
53
|
* Response: `[{ name, schema, type: 'table'|'view', columns: [{ name, sqlType }] }]`
|
|
53
54
|
*/
|
|
54
|
-
tablesEndpoint
|
|
55
|
+
tablesEndpoint?: string;
|
|
55
56
|
/**
|
|
56
57
|
* POST endpoint that runs a stored procedure or table query and returns rows.
|
|
57
58
|
* Body: `{ kind: 'procedure'|'table', name, schema, parameters, columns?, top? }`
|
|
58
59
|
* Response: `rows[]`
|
|
59
60
|
*/
|
|
60
|
-
executeEndpoint
|
|
61
|
+
executeEndpoint?: string;
|
|
61
62
|
/**
|
|
62
63
|
* Optional POST endpoint for fetching dropdown master data and lookup options.
|
|
63
64
|
* Defaults to replacing `/execute` with `/lookup` if omitted.
|
|
@@ -65,13 +66,24 @@ export interface BwaysReportConfig {
|
|
|
65
66
|
lookupEndpoint?: string;
|
|
66
67
|
/**
|
|
67
68
|
* Optional CRUD endpoint for saving/loading report page definitions.
|
|
68
|
-
* When omitted,
|
|
69
|
+
* When omitted, uses the reporting service base inferred from the configured endpoints.
|
|
70
|
+
* Defaults to /api/reporting/reports; the backend stores definitions in dbo.CNFREPORTDEF.
|
|
69
71
|
* - GET → list saved reports
|
|
70
72
|
* - GET /:id → load a specific report
|
|
71
73
|
* - POST → save a new or updated report
|
|
72
74
|
* - DELETE /:id → delete a report
|
|
73
75
|
*/
|
|
74
76
|
reportsEndpoint?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Optional GET endpoint returning the catalog of registered REST APIs.
|
|
79
|
+
* Response: ReportApiEndpointDefinition[]
|
|
80
|
+
*/
|
|
81
|
+
apisEndpoint?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Optional static/in-memory API endpoints registered directly in the host application.
|
|
84
|
+
* Merged with backend-discovered APIs in the Visual Designer.
|
|
85
|
+
*/
|
|
86
|
+
apiEndpoints?: ReportApiEndpointDefinition[];
|
|
75
87
|
/**
|
|
76
88
|
* Component palette groups to show in the designer.
|
|
77
89
|
* Defaults to all groups when not specified.
|
|
@@ -125,6 +137,10 @@ export interface BwaysReportConfig {
|
|
|
125
137
|
dateFormat?: string;
|
|
126
138
|
/** Timeout in ms for lookup/execute queries. @default 300000 */
|
|
127
139
|
lookupTimeoutMs?: number;
|
|
140
|
+
/** Maximum duration of an execution request (defaults to lookupTimeoutMs). */
|
|
141
|
+
executionTimeoutMs?: number;
|
|
142
|
+
/** Exact HTTP(S) origins permitted to receive API credentials and custom headers. Same-origin is trusted by default. */
|
|
143
|
+
trustedApiOrigins?: string[];
|
|
128
144
|
}
|
|
129
145
|
/**
|
|
130
146
|
* Result of normalizing a `BwaysReportConfig` for internal use.
|
|
@@ -136,6 +152,8 @@ export interface NormalizedBwaysConfig {
|
|
|
136
152
|
executeEndpoint: string;
|
|
137
153
|
lookupEndpoint: string | null;
|
|
138
154
|
reportsEndpoint: string | null;
|
|
155
|
+
apisEndpoint: string | null;
|
|
156
|
+
apiEndpoints: ReportApiEndpointDefinition[];
|
|
139
157
|
/** Resolved internal category IDs (e.g. ['input', 'action', 'display']) */
|
|
140
158
|
allowedCategories: string[] | null;
|
|
141
159
|
/** Whether auto-parameter binding is enabled */
|
|
@@ -153,9 +171,13 @@ export interface NormalizedBwaysConfig {
|
|
|
153
171
|
defaultPageSize: number;
|
|
154
172
|
dateFormat: string;
|
|
155
173
|
lookupTimeoutMs: number;
|
|
174
|
+
/** Maximum duration of an execution request (defaults to lookupTimeoutMs). */
|
|
175
|
+
executionTimeoutMs?: number;
|
|
176
|
+
/** Exact HTTP(S) origins permitted to receive API credentials and custom headers. Same-origin is trusted by default. */
|
|
177
|
+
trustedApiOrigins?: string[];
|
|
156
178
|
}
|
|
157
179
|
/**
|
|
158
180
|
* Normalizes a `BwaysReportConfig` into the internal format.
|
|
159
|
-
* Validates
|
|
181
|
+
* Validates supplied endpoints and maps friendly names to internal IDs.
|
|
160
182
|
*/
|
|
161
183
|
export declare function normalizeBwaysConfig(config: BwaysReportConfig): NormalizedBwaysConfig;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Barrel export for all core domain models.
|
|
3
3
|
*/
|
|
4
4
|
export type { ReportDefinition, ReportSummary, ReportPermissionDefinition, } from './report-definition.model';
|
|
5
|
-
export type { ReportComponentDefinition, ComponentBindingDefinition, ComponentDataSourceDefinition, VisibilityDefinition, } from './report-component.model';
|
|
5
|
+
export type { ReportComponentDefinition, ComponentBindingDefinition, ComponentDataSourceDefinition, DropdownSourceType, VisibilityDefinition, } from './report-component.model';
|
|
6
|
+
export type { ReportApiEndpointDefinition, ReportApiParameterDefinition, } from './report-api-endpoint.model';
|
|
6
7
|
export type { ReportParameterDefinition, } from './report-parameter.model';
|
|
7
8
|
export type { ReportDataSourceDefinition, DataSourceCacheDefinition, } from './report-datasource.model';
|
|
8
9
|
export type { ReportGridDefinition, GridColumnDefinition, GridOptionsDefinition, } from './report-grid.model';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Definitions for API-based data retrieval endpoints.
|
|
3
|
+
*
|
|
4
|
+
* Enables reports and form components to consume REST / HTTP APIs
|
|
5
|
+
* with parameter interpolation, custom headers, and data path resolution.
|
|
6
|
+
*/
|
|
7
|
+
export interface ReportApiParameterDefinition {
|
|
8
|
+
name: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
type: 'string' | 'number' | 'boolean' | 'date' | 'array';
|
|
11
|
+
in: 'query' | 'path' | 'body' | 'header';
|
|
12
|
+
required?: boolean;
|
|
13
|
+
defaultValue?: unknown;
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ReportApiEndpointDefinition {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
url?: string;
|
|
20
|
+
endpoint?: string;
|
|
21
|
+
method?: 'GET' | 'POST' | 'PUT';
|
|
22
|
+
description?: string;
|
|
23
|
+
category?: string;
|
|
24
|
+
dataPath?: string;
|
|
25
|
+
totalPath?: string;
|
|
26
|
+
parameters?: ReportApiParameterDefinition[];
|
|
27
|
+
headers?: Record<string, string>;
|
|
28
|
+
responseSample?: Record<string, unknown>[];
|
|
29
|
+
useProxy?: boolean;
|
|
30
|
+
}
|
|
@@ -20,13 +20,13 @@ export interface ComponentBindingDefinition {
|
|
|
20
20
|
/** The parameter key this component writes to (for input components). */
|
|
21
21
|
parameterKey?: string;
|
|
22
22
|
}
|
|
23
|
-
export type DropdownSourceType = 'static' | 'table' | 'procedure' | 'master';
|
|
23
|
+
export type DropdownSourceType = 'static' | 'table' | 'procedure' | 'master' | 'api';
|
|
24
24
|
/**
|
|
25
25
|
* Data source configuration for components that load their own data
|
|
26
|
-
* (e.g., dropdowns loading options from database tables, stored procedures, or
|
|
26
|
+
* (e.g., dropdowns loading options from database tables, stored procedures, master data, or REST APIs).
|
|
27
27
|
*/
|
|
28
28
|
export interface ComponentDataSourceDefinition {
|
|
29
|
-
/** Source type: 'static' | 'table' | 'procedure' | 'master' */
|
|
29
|
+
/** Source type: 'static' | 'table' | 'procedure' | 'master' | 'api' */
|
|
30
30
|
sourceType?: DropdownSourceType;
|
|
31
31
|
/** Database schema, e.g. 'dbo' (defaults to 'dbo'). */
|
|
32
32
|
schema?: string;
|
|
@@ -40,12 +40,24 @@ export interface ComponentDataSourceDefinition {
|
|
|
40
40
|
valueField?: string;
|
|
41
41
|
/** Optional static filter parameters (e.g. { isActive: 1 }). */
|
|
42
42
|
filter?: Record<string, unknown>;
|
|
43
|
-
/**
|
|
43
|
+
/** Parameter mappings (e.g. { '@BranchId': '{{branchSelect}}', '@ActiveOnly': true }). */
|
|
44
44
|
parameterMappings?: Record<string, string | number | boolean>;
|
|
45
45
|
/** Keys of other form components whose values this data source depends on (for Cascading Dropdowns). */
|
|
46
46
|
dependsOn?: string[];
|
|
47
47
|
/** Cache time-to-live in seconds (default 300s). */
|
|
48
48
|
cacheTtl?: number;
|
|
49
|
+
/** Registered API endpoint ID or raw URL path (e.g. 'api-customers' or '/api/v1/customers') */
|
|
50
|
+
apiEndpoint?: string;
|
|
51
|
+
/** HTTP method to use (defaults to 'GET') */
|
|
52
|
+
apiMethod?: 'GET' | 'POST';
|
|
53
|
+
/** Dot-notation path to the array of items in the response JSON (e.g. 'data.items' or 'rows') */
|
|
54
|
+
dataPath?: string;
|
|
55
|
+
/** Custom query parameters or payload mappings for the API request */
|
|
56
|
+
apiParams?: Record<string, unknown>;
|
|
57
|
+
/** Optional custom headers (e.g. { 'X-Custom-Tenant': '{{session.tenantId}}' }) */
|
|
58
|
+
apiHeaders?: Record<string, string>;
|
|
59
|
+
/** Whether request should be proxied via backend reporting gateway */
|
|
60
|
+
useProxy?: boolean;
|
|
49
61
|
}
|
|
50
62
|
/**
|
|
51
63
|
* Controls when a component is visible based on other component values.
|
|
@@ -19,10 +19,15 @@ export interface ReportDataSourceDefinition {
|
|
|
19
19
|
method?: 'GET' | 'POST' | 'STORED_PROCEDURE' | 'CUSTOM';
|
|
20
20
|
/** Database schema (defaults to 'dbo'). */
|
|
21
21
|
schema?: string;
|
|
22
|
+
/** Optional table/view column projection and maximum result rows. */
|
|
23
|
+
columns?: string[];
|
|
24
|
+
top?: number;
|
|
25
|
+
/** Explicit table equality filters. Values can reference form/session tokens. */
|
|
26
|
+
filter?: Record<string, string | number | boolean>;
|
|
22
27
|
/** Backend execution type. */
|
|
23
|
-
type?: 'stored_procedure' | 'table' | 'view' | 'sql' | string;
|
|
28
|
+
type?: 'stored_procedure' | 'table' | 'view' | 'sql' | 'api' | string;
|
|
24
29
|
/**
|
|
25
|
-
*
|
|
30
|
+
* Parameter mappings. Values may be fixed, or tokens:
|
|
26
31
|
* `{{session.branchId}}`, `{{context.today}}`, `{{fieldKey}}` (canvas field).
|
|
27
32
|
*/
|
|
28
33
|
parameterMappings?: Record<string, string | number | boolean>;
|
|
@@ -36,6 +41,20 @@ export interface ReportDataSourceDefinition {
|
|
|
36
41
|
autoExecute?: boolean;
|
|
37
42
|
/** Caching strategy. */
|
|
38
43
|
cache?: DataSourceCacheDefinition;
|
|
44
|
+
/** Base URL override (if calling an external service outside apiBaseUrl) */
|
|
45
|
+
baseUrl?: string;
|
|
46
|
+
/** Dot-notation path to the array of records in the response (e.g. 'data.items' or 'rows') */
|
|
47
|
+
dataPath?: string;
|
|
48
|
+
/** Dot-notation path to total count for server-side pagination (e.g. 'result.total') */
|
|
49
|
+
totalPath?: string;
|
|
50
|
+
/** Parameter placement: 'query' | 'body' | 'auto' */
|
|
51
|
+
paramPlacement?: 'query' | 'body' | 'auto';
|
|
52
|
+
/** Request body template for POST requests */
|
|
53
|
+
bodyTemplate?: Record<string, unknown>;
|
|
54
|
+
/** Custom HTTP headers to include with the API request */
|
|
55
|
+
headers?: Record<string, string>;
|
|
56
|
+
/** Whether to route through the backend proxy gateway */
|
|
57
|
+
useProxy?: boolean;
|
|
39
58
|
}
|
|
40
59
|
/**
|
|
41
60
|
* Caching configuration for a data source.
|
|
@@ -3,3 +3,4 @@ export { ReportSessionContextService } from './report-session-context.service';
|
|
|
3
3
|
export type { SessionParamMatch, DerivedParametersResult, } from './report-session-context.service';
|
|
4
4
|
export { ReportStorageService } from './report-storage.service';
|
|
5
5
|
export { ReportDataDiscoveryService } from './report-data-discovery.service';
|
|
6
|
+
export { ReportApiExecutionService } from './report-api-execution.service';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ReportApiEndpointDefinition } from '../models/report-api-endpoint.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface ApiExecutionOptions {
|
|
5
|
+
url?: string;
|
|
6
|
+
endpoint?: string;
|
|
7
|
+
method?: string;
|
|
8
|
+
dataPath?: string;
|
|
9
|
+
totalPath?: string;
|
|
10
|
+
headers?: Record<string, string>;
|
|
11
|
+
useProxy?: boolean;
|
|
12
|
+
bodyTemplate?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Service responsible for executing API-based data retrieval requests.
|
|
16
|
+
*
|
|
17
|
+
* Supports URL path parameter interpolation (:id, {{id}}), query string parameter
|
|
18
|
+
* placement, JSON payload mapping, session header substitution, proxy routing,
|
|
19
|
+
* and dot-path response data extraction.
|
|
20
|
+
*/
|
|
21
|
+
export declare class ReportApiExecutionService {
|
|
22
|
+
private readonly http;
|
|
23
|
+
private readonly session;
|
|
24
|
+
private readonly reportingConfig;
|
|
25
|
+
private readonly endpoints;
|
|
26
|
+
getRegisteredEndpoints(): ReportApiEndpointDefinition[];
|
|
27
|
+
/**
|
|
28
|
+
* Executes a parameterized REST API request and extracts the result array.
|
|
29
|
+
*
|
|
30
|
+
* @param options Target endpoint configuration, URL, method, and data path.
|
|
31
|
+
* @param formValues Active parameter and filter values from the form/context.
|
|
32
|
+
* @param customMappings Additional fixed or mapped parameter values.
|
|
33
|
+
*/
|
|
34
|
+
executeApi(options: ApiExecutionOptions | Partial<ReportApiEndpointDefinition>, formValues?: Record<string, unknown>, customMappings?: Record<string, unknown>): Observable<unknown[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Dot-notation extractor: 'data.items' -> response.data.items
|
|
37
|
+
*/
|
|
38
|
+
extractDataArray(response: any, dataPath?: string): unknown[];
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReportApiExecutionService, never>;
|
|
40
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ReportApiExecutionService>;
|
|
41
|
+
}
|
|
@@ -16,6 +16,7 @@ export declare class ReportDataDiscoveryService {
|
|
|
16
16
|
private readonly discoveryAdapter;
|
|
17
17
|
private readonly lookupAdapter;
|
|
18
18
|
private readonly sessionService;
|
|
19
|
+
private readonly apiExecutionService;
|
|
19
20
|
/**
|
|
20
21
|
* Retrieves all database tables, views, and stored procedures.
|
|
21
22
|
*/
|
|
@@ -29,8 +30,29 @@ export declare class ReportDataDiscoveryService {
|
|
|
29
30
|
* 1. Attempts static schema discovery via ReportSchemaDiscoveryAdapter.
|
|
30
31
|
* 2. If static discovery returns 0 columns or throws an error (e.g. SQL Error 11526 with #temp tables),
|
|
31
32
|
* automatically runs dynamic sample query via ReportLookupAdapter using resolved parameters.
|
|
33
|
+
* 3. For REST APIs, executes a dynamic test sample and extracts columns from the result array.
|
|
32
34
|
*/
|
|
33
|
-
autoDetectColumns(entityName: string, entityType?: 'table' | 'stored_procedure', mappings?: Record<string, unknown>, schema?: string
|
|
35
|
+
autoDetectColumns(entityName: string, entityType?: 'table' | 'stored_procedure' | 'api', mappings?: Record<string, unknown>, schema?: string, apiOptions?: {
|
|
36
|
+
dataPath?: string;
|
|
37
|
+
method?: string;
|
|
38
|
+
headers?: Record<string, string>;
|
|
39
|
+
useProxy?: boolean;
|
|
40
|
+
}): Observable<GridColumnDefinition[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Executes a sample API call and infers grid column definitions from the response records.
|
|
43
|
+
*/
|
|
44
|
+
autoDetectApiColumns(urlOrOptions: string | {
|
|
45
|
+
endpoint?: string;
|
|
46
|
+
url?: string;
|
|
47
|
+
method?: string;
|
|
48
|
+
dataPath?: string;
|
|
49
|
+
headers?: Record<string, string>;
|
|
50
|
+
useProxy?: boolean;
|
|
51
|
+
}, dataPathOrParams?: string | Record<string, unknown>, params?: Record<string, unknown>, options?: {
|
|
52
|
+
method?: string;
|
|
53
|
+
headers?: Record<string, string>;
|
|
54
|
+
useProxy?: boolean;
|
|
55
|
+
}): Observable<GridColumnDefinition[]>;
|
|
34
56
|
private mapStaticColumnsToGrid;
|
|
35
57
|
private fallbackDynamicDetection;
|
|
36
58
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReportDataDiscoveryService, never>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BwaysReportConfig } from '../config/bways-report-config';
|
|
1
2
|
import { OnDestroy, Signal } from '@angular/core';
|
|
2
3
|
import { Observable } from 'rxjs';
|
|
3
4
|
import { SessionContextMap, SessionParamPrimitive } from '../tokens/session-context.token';
|
|
@@ -25,6 +26,12 @@ export interface DerivedParametersResult {
|
|
|
25
26
|
* eliminating silent failures or thread crashes in host integrations.
|
|
26
27
|
*/
|
|
27
28
|
export declare class ReportSessionContextService implements OnDestroy {
|
|
29
|
+
private readonly injector;
|
|
30
|
+
private readonly inheritedSession;
|
|
31
|
+
private readonly localReader;
|
|
32
|
+
private readonly localAsync;
|
|
33
|
+
private localCleanup?;
|
|
34
|
+
private configuredSource;
|
|
28
35
|
private readonly rawSource;
|
|
29
36
|
private readonly sessionProvider;
|
|
30
37
|
private readonly reportingConfig;
|
|
@@ -46,6 +53,8 @@ export declare class ReportSessionContextService implements OnDestroy {
|
|
|
46
53
|
readonly sessionContext$: Observable<SessionContextMap>;
|
|
47
54
|
constructor();
|
|
48
55
|
ngOnDestroy(): void;
|
|
56
|
+
/** Internal: changes only the session owned by an embedded designer. */
|
|
57
|
+
configureDesignerSession(config: BwaysReportConfig | null | undefined): void;
|
|
49
58
|
private initSubscriptions;
|
|
50
59
|
/**
|
|
51
60
|
* Sets or replaces the runtime session context.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InjectionToken, Signal } from '@angular/core';
|
|
2
|
+
import { BwaysReportConfig } from '../config/bways-report-config';
|
|
3
|
+
/** Internal reactive configuration owned by one embedded designer. */
|
|
4
|
+
export declare const DESIGNER_LOCAL_CONFIG: InjectionToken<Signal<BwaysReportConfig | null>>;
|
|
@@ -23,6 +23,10 @@ export interface ReportingConfig {
|
|
|
23
23
|
enableSchemaDiscovery?: boolean;
|
|
24
24
|
/** Optional timeout in milliseconds for dropdown lookup queries (defaults to 300000ms / 5 minutes). */
|
|
25
25
|
lookupTimeoutMs?: number;
|
|
26
|
+
/** Maximum duration of an execution request (defaults to lookupTimeoutMs). */
|
|
27
|
+
executionTimeoutMs?: number;
|
|
28
|
+
/** Exact HTTP(S) origins permitted to receive API credentials and custom headers. Same-origin is trusted by default. */
|
|
29
|
+
trustedApiOrigins?: string[];
|
|
26
30
|
/**
|
|
27
31
|
* Internal category IDs to show in the designer palette.
|
|
28
32
|
* When null/undefined, all categories are shown.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface ReportingEndpointSource {
|
|
2
|
+
reportsEndpoint?: string | null;
|
|
3
|
+
apiBaseUrl?: string | null;
|
|
4
|
+
executeEndpoint?: string | null;
|
|
5
|
+
spEndpoint?: string | null;
|
|
6
|
+
tablesEndpoint?: string | null;
|
|
7
|
+
lookupEndpoint?: string | null;
|
|
8
|
+
apisEndpoint?: string | null;
|
|
9
|
+
}
|
|
10
|
+
/** Built-in report storage uses the same reporting service; no separate save URL is required. */
|
|
11
|
+
export declare function resolveReportsEndpoint(source: ReportingEndpointSource): string;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
/** One owner per component. Replacing a channel cancels its previous request. */
|
|
3
|
+
export declare class ReportRequestScope {
|
|
4
|
+
private readonly session;
|
|
5
|
+
private readonly endpoints;
|
|
6
|
+
private readonly config;
|
|
7
|
+
private readonly active;
|
|
8
|
+
constructor();
|
|
9
|
+
context(): string;
|
|
10
|
+
cancel(channel: string, settle?: boolean): void;
|
|
11
|
+
isActive(channel: string): boolean;
|
|
12
|
+
cancelAll(): void;
|
|
13
|
+
run<T>(channel: string, factory: () => Observable<T>, next: (value: T) => void, error: (error: Error) => void, settled?: () => void): void;
|
|
14
|
+
}
|
|
@@ -6,8 +6,10 @@ export declare class EndpointDataSourceAdapter extends ReportDataSourceAdapter {
|
|
|
6
6
|
private readonly http;
|
|
7
7
|
private readonly endpoints;
|
|
8
8
|
private readonly sessionService;
|
|
9
|
+
private readonly apiExecutionService;
|
|
9
10
|
execute(dataSource: ReportDataSourceDefinition, parameters: Record<string, unknown>): Observable<unknown[]>;
|
|
10
11
|
private resolveKind;
|
|
12
|
+
private isApiSource;
|
|
11
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<EndpointDataSourceAdapter, never>;
|
|
12
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<EndpointDataSourceAdapter>;
|
|
13
15
|
}
|
|
@@ -5,6 +5,7 @@ export declare class EndpointLookupAdapter extends ReportLookupAdapter {
|
|
|
5
5
|
private readonly http;
|
|
6
6
|
private readonly endpoints;
|
|
7
7
|
private readonly sessionService;
|
|
8
|
+
private readonly apiExecutionService;
|
|
8
9
|
private readonly cache;
|
|
9
10
|
private readonly inFlight;
|
|
10
11
|
fetchOptions(request: LookupQueryRequest): Observable<LookupOptionItem[]>;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { ReportDefinition, ReportSummary } from '../../core/models/report-definition.model';
|
|
3
|
-
import { ReportPersistenceAdapter } from '../contracts/report-persistence.contract';
|
|
3
|
+
import { ReportPersistenceAdapter, ReportSaveOptions, ReportIdStatus } from '../contracts/report-persistence.contract';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class EndpointPersistenceAdapter extends ReportPersistenceAdapter {
|
|
6
|
+
private readonly session;
|
|
7
|
+
private get headers();
|
|
6
8
|
private readonly http;
|
|
7
9
|
private readonly endpoints;
|
|
10
|
+
checkId(reportId: string): Observable<boolean>;
|
|
11
|
+
inspectId(reportId: string): Observable<ReportIdStatus>;
|
|
8
12
|
load(reportId: string): Observable<ReportDefinition>;
|
|
9
|
-
save(report: ReportDefinition): Observable<ReportDefinition>;
|
|
13
|
+
save(report: ReportDefinition, options?: ReportSaveOptions): Observable<ReportDefinition>;
|
|
10
14
|
list(): Observable<ReportSummary[]>;
|
|
11
15
|
delete(reportId: string): Observable<void>;
|
|
12
16
|
publish(reportId: string, version: number): Observable<void>;
|
|
@@ -7,8 +7,10 @@ export declare class EndpointSchemaDiscoveryAdapter extends ReportSchemaDiscover
|
|
|
7
7
|
/** Cached list responses so we don't re-fetch on every getColumns/getParameters call */
|
|
8
8
|
private spCache$;
|
|
9
9
|
private tableCache$;
|
|
10
|
-
private
|
|
11
|
-
private
|
|
10
|
+
private readonly session;
|
|
11
|
+
private spCacheKey;
|
|
12
|
+
private tableCacheKey;
|
|
13
|
+
private context;
|
|
12
14
|
getEntities(types?: DatabaseEntityType[]): Observable<DatabaseEntityMetadata[]>;
|
|
13
15
|
getColumns(entityName: string, schema?: string, type?: DatabaseEntityType): Observable<EntityColumnMetadata[]>;
|
|
14
16
|
getParameters(entityName: string, schema?: string): Observable<ProcedureParameterMetadata[]>;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* are populated with the endpoint URLs so adapters can inject them.
|
|
6
6
|
*/
|
|
7
7
|
import { InjectionToken } from '@angular/core';
|
|
8
|
+
import { ReportApiEndpointDefinition } from '../../core/models/report-api-endpoint.model';
|
|
8
9
|
/**
|
|
9
10
|
* Endpoint URLs used by the endpoint-based adapters.
|
|
10
11
|
*/
|
|
@@ -14,7 +15,13 @@ export interface BwaysReportEndpoints {
|
|
|
14
15
|
executeEndpoint: string;
|
|
15
16
|
lookupEndpoint?: string | null;
|
|
16
17
|
reportsEndpoint: string | null;
|
|
18
|
+
apisEndpoint?: string | null;
|
|
19
|
+
apiEndpoints?: ReportApiEndpointDefinition[];
|
|
17
20
|
}
|
|
21
|
+
/** Per-designer URL overrides. Omitted/undefined properties inherit app defaults. */
|
|
22
|
+
export type BwaysReportApiUrls = {
|
|
23
|
+
[Key in 'spEndpoint' | 'tablesEndpoint' | 'executeEndpoint' | 'lookupEndpoint' | 'reportsEndpoint' | 'apisEndpoint']?: string;
|
|
24
|
+
};
|
|
18
25
|
/**
|
|
19
26
|
* Injection token for the endpoint URLs.
|
|
20
27
|
*/
|
|
@@ -5,16 +5,14 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
/**
|
|
6
6
|
* Built-in HTTP adapter for executing report data sources against the reporting backend.
|
|
7
7
|
* Automatically injects active multi-tenant session headers (X-Company-Id, X-Branch-Id)
|
|
8
|
-
* and
|
|
8
|
+
* and propagates execution errors to the caller.
|
|
9
9
|
*/
|
|
10
10
|
export declare class HttpReportDataSourceAdapter extends ReportDataSourceAdapter {
|
|
11
11
|
private readonly http;
|
|
12
12
|
private readonly config;
|
|
13
13
|
private readonly sessionService;
|
|
14
14
|
execute(dataSource: ReportDataSourceDefinition, parameters: Record<string, unknown>): Observable<unknown[]>;
|
|
15
|
-
private getMockExecutionData;
|
|
16
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<HttpReportDataSourceAdapter, never>;
|
|
17
16
|
static ɵprov: i0.ɵɵInjectableDeclaration<HttpReportDataSourceAdapter>;
|
|
18
17
|
}
|
|
19
|
-
/** Convenience alias */
|
|
20
18
|
export declare const HttpDataSourceAdapter: typeof HttpReportDataSourceAdapter;
|
|
@@ -2,20 +2,19 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { LookupOptionItem, LookupQueryRequest, ReportLookupAdapter } from '../contracts/lookup.contract';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
|
-
* Built-in HTTP adapter for fetching dropdown options from backend database tables and
|
|
6
|
-
* Includes in-memory caching with TTL, in-flight request deduplication, and
|
|
5
|
+
* Built-in HTTP adapter for fetching dropdown options from backend database tables, SPs, and REST APIs.
|
|
6
|
+
* Includes in-memory caching with TTL, in-flight request deduplication, and explicit request errors.
|
|
7
7
|
*/
|
|
8
8
|
export declare class HttpReportLookupAdapter extends ReportLookupAdapter {
|
|
9
9
|
private readonly http;
|
|
10
10
|
private readonly config;
|
|
11
11
|
private readonly sessionService;
|
|
12
|
+
private readonly apiExecutionService;
|
|
12
13
|
private readonly cache;
|
|
13
14
|
private readonly inFlight;
|
|
14
|
-
private readonly mockDataStore;
|
|
15
15
|
fetchOptions(request: LookupQueryRequest): Observable<LookupOptionItem[]>;
|
|
16
16
|
private setCache;
|
|
17
17
|
private generateCacheKey;
|
|
18
|
-
private resolveMockOptions;
|
|
19
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<HttpReportLookupAdapter, never>;
|
|
20
19
|
static ɵprov: i0.ɵɵInjectableDeclaration<HttpReportLookupAdapter>;
|
|
21
20
|
}
|
|
@@ -1,27 +1,22 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { ReportDefinition, ReportSummary } from '../../core/models/report-definition.model';
|
|
3
|
-
import { ReportPersistenceAdapter } from '../contracts/report-persistence.contract';
|
|
3
|
+
import { ReportPersistenceAdapter, ReportSaveOptions, ReportIdStatus } from '../contracts/report-persistence.contract';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* Built-in HTTP adapter for report definitions persistence.
|
|
7
|
-
* Connects to NestJS `/api/reporting/reports` endpoints.
|
|
8
|
-
* Includes in-memory mock fallback when the remote backend is unreachable.
|
|
9
|
-
*/
|
|
5
|
+
/** HTTP-only persistence. Use withLocalStorage() explicitly for offline demos. */
|
|
10
6
|
export declare class HttpReportPersistenceAdapter extends ReportPersistenceAdapter {
|
|
7
|
+
private readonly session;
|
|
8
|
+
private get headers();
|
|
11
9
|
private readonly http;
|
|
12
10
|
private readonly config;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
load(
|
|
16
|
-
save(report: ReportDefinition): Observable<ReportDefinition>;
|
|
11
|
+
checkId(reportId: string): Observable<boolean>;
|
|
12
|
+
inspectId(reportId: string): Observable<ReportIdStatus>;
|
|
13
|
+
load(id: string): Observable<ReportDefinition>;
|
|
14
|
+
save(report: ReportDefinition, options?: ReportSaveOptions): Observable<ReportDefinition>;
|
|
17
15
|
list(): Observable<ReportSummary[]>;
|
|
18
|
-
delete(
|
|
19
|
-
publish(
|
|
20
|
-
private
|
|
21
|
-
private getMockSummaries;
|
|
22
|
-
private seedDefaultMockReports;
|
|
16
|
+
delete(id: string): Observable<void>;
|
|
17
|
+
publish(id: string, version: number): Observable<void>;
|
|
18
|
+
private request;
|
|
23
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<HttpReportPersistenceAdapter, never>;
|
|
24
20
|
static ɵprov: i0.ɵɵInjectableDeclaration<HttpReportPersistenceAdapter>;
|
|
25
21
|
}
|
|
26
|
-
/** Convenience alias */
|
|
27
22
|
export declare const HttpPersistenceAdapter: typeof HttpReportPersistenceAdapter;
|
|
@@ -3,18 +3,16 @@ import { DatabaseEntityMetadata, DatabaseEntityType, EntityColumnMetadata, Proce
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* Built-in HTTP adapter for backend database schema discovery.
|
|
6
|
-
* Connects to NestJS / REST backend endpoints,
|
|
6
|
+
* Connects to NestJS / REST backend endpoints, without fabricating metadata when requests fail.
|
|
7
7
|
*/
|
|
8
8
|
export declare class HttpReportSchemaDiscoveryAdapter extends ReportSchemaDiscoveryAdapter {
|
|
9
|
+
private readonly session;
|
|
10
|
+
private get headers();
|
|
9
11
|
private readonly http;
|
|
10
12
|
private readonly config;
|
|
11
|
-
private readonly mockEntities;
|
|
12
|
-
private readonly mockColumns;
|
|
13
|
-
private readonly mockParameters;
|
|
14
13
|
getEntities(types?: DatabaseEntityType[]): Observable<DatabaseEntityMetadata[]>;
|
|
15
14
|
getColumns(entityName: string, schema?: string, type?: DatabaseEntityType): Observable<EntityColumnMetadata[]>;
|
|
16
15
|
getParameters(entityName: string, schema?: string): Observable<ProcedureParameterMetadata[]>;
|
|
17
|
-
private filterMockEntities;
|
|
18
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<HttpReportSchemaDiscoveryAdapter, never>;
|
|
19
17
|
static ɵprov: i0.ɵɵInjectableDeclaration<HttpReportSchemaDiscoveryAdapter>;
|
|
20
18
|
}
|
|
@@ -11,4 +11,4 @@ export { EndpointLookupAdapter } from './endpoint-lookup.adapter';
|
|
|
11
11
|
export { EndpointPersistenceAdapter } from './endpoint-persistence.adapter';
|
|
12
12
|
export { EndpointMasterDataAdapter } from './endpoint-masterdata.adapter';
|
|
13
13
|
export { BWAYS_REPORT_ENDPOINTS } from './endpoint-tokens';
|
|
14
|
-
export type { BwaysReportEndpoints } from './endpoint-tokens';
|
|
14
|
+
export type { BwaysReportEndpoints, BwaysReportApiUrls } from './endpoint-tokens';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { ReportPersistenceAdapter } from '../contracts/report-persistence.contract';
|
|
2
|
+
import { ReportPersistenceAdapter, ReportSaveOptions } from '../contracts/report-persistence.contract';
|
|
3
3
|
import { ReportDefinition, ReportSummary } from '../../core/models/report-definition.model';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class LocalStorageReportPersistenceAdapter extends ReportPersistenceAdapter {
|
|
@@ -11,7 +11,7 @@ export declare class LocalStorageReportPersistenceAdapter extends ReportPersiste
|
|
|
11
11
|
private saveIndex;
|
|
12
12
|
private saveDirect;
|
|
13
13
|
load(reportId: string): Observable<ReportDefinition>;
|
|
14
|
-
save(report: ReportDefinition): Observable<ReportDefinition>;
|
|
14
|
+
save(report: ReportDefinition, options?: ReportSaveOptions): Observable<ReportDefinition>;
|
|
15
15
|
list(): Observable<ReportSummary[]>;
|
|
16
16
|
delete(reportId: string): Observable<void>;
|
|
17
17
|
publish(reportId: string, version: number): Observable<void>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReportIdStatus } from '../contracts/report-persistence.contract';
|
|
2
|
+
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
export declare function reportIdAvailability(http: HttpClient, url: string, headers: HttpHeaders, fallback: () => Observable<boolean>): Observable<boolean>;
|
|
5
|
+
/** Version/name are optional for compatibility with earlier availability endpoints. */
|
|
6
|
+
export declare function reportIdInspection(http: HttpClient, url: string, headers: HttpHeaders, fallback: () => Observable<ReportIdStatus>): Observable<ReportIdStatus>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { ReportDataSourceAdapter } from './data-source.contract';
|
|
2
2
|
export { MasterDataProvider } from './master-data.provider';
|
|
3
3
|
export type { MasterDataOptions, MasterDataItem } from './master-data.provider';
|
|
4
|
+
export type { ReportSaveOptions, ReportIdStatus } from './report-persistence.contract';
|
|
4
5
|
export { ReportPersistenceAdapter } from './report-persistence.contract';
|
|
5
6
|
export { ReportTranslationAdapter } from './translation.contract';
|
|
6
7
|
export { ReportSchemaDiscoveryAdapter } from './schema-discovery.contract';
|
|
@@ -12,6 +12,9 @@ export interface LookupQueryRequest {
|
|
|
12
12
|
filter?: Record<string, unknown>;
|
|
13
13
|
parameters?: Record<string, unknown>;
|
|
14
14
|
limit?: number;
|
|
15
|
+
apiEndpoint?: string;
|
|
16
|
+
dataPath?: string;
|
|
17
|
+
useProxy?: boolean;
|
|
15
18
|
}
|
|
16
19
|
/**
|
|
17
20
|
* Normalized option item for dropdowns and selectors
|