@lssm/lib.contracts 1.43.0 → 1.43.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-config/app-config.feature.d.ts +2 -1
- package/dist/app-config/contracts.d.ts +51 -51
- package/dist/app-config/events.d.ts +27 -27
- package/dist/app-config/lifecycle-contracts.d.ts +55 -55
- package/dist/app-config/runtime.d.ts +7 -4
- package/dist/app-config/spec.d.ts +3 -2
- package/dist/app-config/validation.d.ts +1 -1
- package/dist/client/react/feature-render.d.ts +3 -1
- package/dist/data-views/data-views.d.ts +5 -138
- package/dist/data-views/data-views.js +3 -57
- package/dist/data-views/index.d.ts +4 -4
- package/dist/data-views/index.js +3 -4
- package/dist/data-views/query-generator.d.ts +1 -1
- package/dist/data-views/registry.d.ts +51 -0
- package/dist/data-views/registry.js +82 -0
- package/dist/data-views/runtime.d.ts +2 -1
- package/dist/data-views/spec.d.ts +32 -0
- package/dist/data-views/spec.js +10 -0
- package/dist/data-views/types.d.ts +157 -0
- package/dist/data-views/types.js +0 -0
- package/dist/experiments/spec-resolver.d.ts +1 -1
- package/dist/features/index.d.ts +5 -0
- package/dist/features/index.js +5 -0
- package/dist/features/install.d.ts +22 -0
- package/dist/features/install.js +36 -0
- package/dist/features/registry.d.ts +26 -0
- package/dist/features/registry.js +49 -0
- package/dist/features/types.d.ts +88 -0
- package/dist/features/types.js +0 -0
- package/dist/features/validation.d.ts +8 -0
- package/dist/features/validation.js +14 -0
- package/dist/index.d.ts +16 -12
- package/dist/index.js +7 -6
- package/dist/install.d.ts +1 -1
- package/dist/integrations/integrations.feature.d.ts +2 -1
- package/dist/integrations/openbanking/contracts/accounts.d.ts +67 -67
- package/dist/integrations/openbanking/contracts/balances.d.ts +35 -35
- package/dist/integrations/openbanking/contracts/transactions.d.ts +49 -49
- package/dist/integrations/openbanking/models.d.ts +55 -55
- package/dist/integrations/openbanking/openbanking.feature.d.ts +2 -1
- package/dist/integrations/operations.d.ts +103 -103
- package/dist/jsonschema.d.ts +1 -1
- package/dist/knowledge/knowledge.feature.d.ts +2 -1
- package/dist/knowledge/operations.d.ts +67 -67
- package/dist/llm/exporters.d.ts +3 -2
- package/dist/llm/prompts.d.ts +1 -1
- package/dist/llm/types.d.ts +3 -2
- package/dist/markdown.d.ts +2 -2
- package/dist/tests/runner.js +1 -1
- package/dist/tests/spec.d.ts +2 -10
- package/dist/workflow/runner.d.ts +2 -1
- package/dist/workflow/spec.d.ts +3 -2
- package/dist/workspace-config/contractsrc-schema.d.ts +43 -2
- package/dist/workspace-config/contractsrc-schema.js +23 -2
- package/dist/workspace-config/index.d.ts +2 -2
- package/dist/workspace-config/index.js +2 -2
- package/package.json +13 -6
- package/dist/features.d.ts +0 -104
- package/dist/features.js +0 -91
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import "../operations/index.js";
|
|
2
1
|
import { EventSpecMeta } from "../events.js";
|
|
3
2
|
import { OperationSpec } from "../operations/operation.js";
|
|
4
3
|
import { OperationSpecRegistry } from "../operations/registry.js";
|
|
4
|
+
import "../operations/index.js";
|
|
5
5
|
import "../index.js";
|
|
6
|
-
import * as
|
|
6
|
+
import * as _lssm_lib_schema268 from "@lssm/lib.schema";
|
|
7
7
|
import { SchemaModel } from "@lssm/lib.schema";
|
|
8
8
|
|
|
9
9
|
//#region src/app-config/lifecycle-contracts.d.ts
|
|
10
10
|
declare const CreateTenantConfigDraftCommand: OperationSpec<SchemaModel<{
|
|
11
11
|
tenantId: {
|
|
12
|
-
type:
|
|
12
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
13
13
|
isOptional: false;
|
|
14
14
|
};
|
|
15
15
|
appId: {
|
|
16
|
-
type:
|
|
16
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
17
17
|
isOptional: false;
|
|
18
18
|
};
|
|
19
19
|
blueprintName: {
|
|
20
|
-
type:
|
|
20
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
21
21
|
isOptional: false;
|
|
22
22
|
};
|
|
23
23
|
blueprintVersion: {
|
|
24
|
-
type:
|
|
24
|
+
type: _lssm_lib_schema268.FieldType<number, number>;
|
|
25
25
|
isOptional: false;
|
|
26
26
|
};
|
|
27
27
|
environment: {
|
|
28
|
-
type:
|
|
28
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
29
29
|
isOptional: true;
|
|
30
30
|
};
|
|
31
31
|
fromVersion: {
|
|
32
|
-
type:
|
|
32
|
+
type: _lssm_lib_schema268.FieldType<number, number>;
|
|
33
33
|
isOptional: true;
|
|
34
34
|
};
|
|
35
35
|
createdBy: {
|
|
36
|
-
type:
|
|
36
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
37
37
|
isOptional: false;
|
|
38
38
|
};
|
|
39
39
|
}>, SchemaModel<{
|
|
40
40
|
version: {
|
|
41
|
-
type:
|
|
41
|
+
type: _lssm_lib_schema268.FieldType<number, number>;
|
|
42
42
|
isOptional: false;
|
|
43
43
|
};
|
|
44
44
|
status: {
|
|
45
|
-
type:
|
|
45
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
46
46
|
isOptional: false;
|
|
47
47
|
};
|
|
48
48
|
createdAt: {
|
|
49
|
-
type:
|
|
49
|
+
type: _lssm_lib_schema268.FieldType<Date, string>;
|
|
50
50
|
isOptional: false;
|
|
51
51
|
};
|
|
52
52
|
}>, {
|
|
@@ -55,32 +55,32 @@ declare const CreateTenantConfigDraftCommand: OperationSpec<SchemaModel<{
|
|
|
55
55
|
}[]>;
|
|
56
56
|
declare const PromoteTenantConfigToPreviewCommand: OperationSpec<SchemaModel<{
|
|
57
57
|
tenantId: {
|
|
58
|
-
type:
|
|
58
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
59
59
|
isOptional: false;
|
|
60
60
|
};
|
|
61
61
|
appId: {
|
|
62
|
-
type:
|
|
62
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
63
63
|
isOptional: false;
|
|
64
64
|
};
|
|
65
65
|
version: {
|
|
66
|
-
type:
|
|
66
|
+
type: _lssm_lib_schema268.FieldType<number, number>;
|
|
67
67
|
isOptional: false;
|
|
68
68
|
};
|
|
69
69
|
promotedBy: {
|
|
70
|
-
type:
|
|
70
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
71
71
|
isOptional: false;
|
|
72
72
|
};
|
|
73
73
|
}>, SchemaModel<{
|
|
74
74
|
version: {
|
|
75
|
-
type:
|
|
75
|
+
type: _lssm_lib_schema268.FieldType<number, number>;
|
|
76
76
|
isOptional: false;
|
|
77
77
|
};
|
|
78
78
|
status: {
|
|
79
|
-
type:
|
|
79
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
80
80
|
isOptional: false;
|
|
81
81
|
};
|
|
82
82
|
warnings: {
|
|
83
|
-
type:
|
|
83
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
84
84
|
isOptional: true;
|
|
85
85
|
isArray: true;
|
|
86
86
|
};
|
|
@@ -90,44 +90,44 @@ declare const PromoteTenantConfigToPreviewCommand: OperationSpec<SchemaModel<{
|
|
|
90
90
|
}[]>;
|
|
91
91
|
declare const PublishTenantConfigCommand: OperationSpec<SchemaModel<{
|
|
92
92
|
tenantId: {
|
|
93
|
-
type:
|
|
93
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
94
94
|
isOptional: false;
|
|
95
95
|
};
|
|
96
96
|
appId: {
|
|
97
|
-
type:
|
|
97
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
98
98
|
isOptional: false;
|
|
99
99
|
};
|
|
100
100
|
version: {
|
|
101
|
-
type:
|
|
101
|
+
type: _lssm_lib_schema268.FieldType<number, number>;
|
|
102
102
|
isOptional: false;
|
|
103
103
|
};
|
|
104
104
|
environment: {
|
|
105
|
-
type:
|
|
105
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
106
106
|
isOptional: true;
|
|
107
107
|
};
|
|
108
108
|
publishedBy: {
|
|
109
|
-
type:
|
|
109
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
110
110
|
isOptional: false;
|
|
111
111
|
};
|
|
112
112
|
changeSummary: {
|
|
113
|
-
type:
|
|
113
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
114
114
|
isOptional: true;
|
|
115
115
|
};
|
|
116
116
|
}>, SchemaModel<{
|
|
117
117
|
version: {
|
|
118
|
-
type:
|
|
118
|
+
type: _lssm_lib_schema268.FieldType<number, number>;
|
|
119
119
|
isOptional: false;
|
|
120
120
|
};
|
|
121
121
|
status: {
|
|
122
|
-
type:
|
|
122
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
123
123
|
isOptional: false;
|
|
124
124
|
};
|
|
125
125
|
previousVersion: {
|
|
126
|
-
type:
|
|
126
|
+
type: _lssm_lib_schema268.FieldType<number, number>;
|
|
127
127
|
isOptional: true;
|
|
128
128
|
};
|
|
129
129
|
publishedAt: {
|
|
130
|
-
type:
|
|
130
|
+
type: _lssm_lib_schema268.FieldType<Date, string>;
|
|
131
131
|
isOptional: false;
|
|
132
132
|
};
|
|
133
133
|
}>, {
|
|
@@ -136,40 +136,40 @@ declare const PublishTenantConfigCommand: OperationSpec<SchemaModel<{
|
|
|
136
136
|
}[]>;
|
|
137
137
|
declare const RollbackTenantConfigCommand: OperationSpec<SchemaModel<{
|
|
138
138
|
tenantId: {
|
|
139
|
-
type:
|
|
139
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
140
140
|
isOptional: false;
|
|
141
141
|
};
|
|
142
142
|
appId: {
|
|
143
|
-
type:
|
|
143
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
144
144
|
isOptional: false;
|
|
145
145
|
};
|
|
146
146
|
toVersion: {
|
|
147
|
-
type:
|
|
147
|
+
type: _lssm_lib_schema268.FieldType<number, number>;
|
|
148
148
|
isOptional: false;
|
|
149
149
|
};
|
|
150
150
|
environment: {
|
|
151
|
-
type:
|
|
151
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
152
152
|
isOptional: true;
|
|
153
153
|
};
|
|
154
154
|
rolledBackBy: {
|
|
155
|
-
type:
|
|
155
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
156
156
|
isOptional: false;
|
|
157
157
|
};
|
|
158
158
|
reason: {
|
|
159
|
-
type:
|
|
159
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
160
160
|
isOptional: false;
|
|
161
161
|
};
|
|
162
162
|
}>, SchemaModel<{
|
|
163
163
|
newVersion: {
|
|
164
|
-
type:
|
|
164
|
+
type: _lssm_lib_schema268.FieldType<number, number>;
|
|
165
165
|
isOptional: false;
|
|
166
166
|
};
|
|
167
167
|
status: {
|
|
168
|
-
type:
|
|
168
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
169
169
|
isOptional: false;
|
|
170
170
|
};
|
|
171
171
|
rolledBackFrom: {
|
|
172
|
-
type:
|
|
172
|
+
type: _lssm_lib_schema268.FieldType<number, number>;
|
|
173
173
|
isOptional: false;
|
|
174
174
|
};
|
|
175
175
|
}>, {
|
|
@@ -178,22 +178,22 @@ declare const RollbackTenantConfigCommand: OperationSpec<SchemaModel<{
|
|
|
178
178
|
}[]>;
|
|
179
179
|
declare const ListTenantConfigVersionsQuery: OperationSpec<SchemaModel<{
|
|
180
180
|
tenantId: {
|
|
181
|
-
type:
|
|
181
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
182
182
|
isOptional: false;
|
|
183
183
|
};
|
|
184
184
|
appId: {
|
|
185
|
-
type:
|
|
185
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
186
186
|
isOptional: false;
|
|
187
187
|
};
|
|
188
188
|
}>, SchemaModel<{
|
|
189
189
|
versions: {
|
|
190
190
|
type: SchemaModel<{
|
|
191
191
|
meta: {
|
|
192
|
-
type:
|
|
192
|
+
type: _lssm_lib_schema268.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
193
193
|
isOptional: false;
|
|
194
194
|
};
|
|
195
195
|
config: {
|
|
196
|
-
type:
|
|
196
|
+
type: _lssm_lib_schema268.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
197
197
|
isOptional: false;
|
|
198
198
|
};
|
|
199
199
|
}>;
|
|
@@ -203,35 +203,35 @@ declare const ListTenantConfigVersionsQuery: OperationSpec<SchemaModel<{
|
|
|
203
203
|
transitions: {
|
|
204
204
|
type: SchemaModel<{
|
|
205
205
|
tenantId: {
|
|
206
|
-
type:
|
|
206
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
207
207
|
isOptional: false;
|
|
208
208
|
};
|
|
209
209
|
appId: {
|
|
210
|
-
type:
|
|
210
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
211
211
|
isOptional: false;
|
|
212
212
|
};
|
|
213
213
|
fromStatus: {
|
|
214
|
-
type:
|
|
214
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
215
215
|
isOptional: false;
|
|
216
216
|
};
|
|
217
217
|
toStatus: {
|
|
218
|
-
type:
|
|
218
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
219
219
|
isOptional: false;
|
|
220
220
|
};
|
|
221
221
|
version: {
|
|
222
|
-
type:
|
|
222
|
+
type: _lssm_lib_schema268.FieldType<number, number>;
|
|
223
223
|
isOptional: false;
|
|
224
224
|
};
|
|
225
225
|
timestamp: {
|
|
226
|
-
type:
|
|
226
|
+
type: _lssm_lib_schema268.FieldType<Date, string>;
|
|
227
227
|
isOptional: false;
|
|
228
228
|
};
|
|
229
229
|
actor: {
|
|
230
|
-
type:
|
|
230
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
231
231
|
isOptional: false;
|
|
232
232
|
};
|
|
233
233
|
reason: {
|
|
234
|
-
type:
|
|
234
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
235
235
|
isOptional: true;
|
|
236
236
|
};
|
|
237
237
|
}>;
|
|
@@ -241,26 +241,26 @@ declare const ListTenantConfigVersionsQuery: OperationSpec<SchemaModel<{
|
|
|
241
241
|
}>, undefined>;
|
|
242
242
|
declare const GetTenantConfigVersionQuery: OperationSpec<SchemaModel<{
|
|
243
243
|
tenantId: {
|
|
244
|
-
type:
|
|
244
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
245
245
|
isOptional: false;
|
|
246
246
|
};
|
|
247
247
|
appId: {
|
|
248
|
-
type:
|
|
248
|
+
type: _lssm_lib_schema268.FieldType<string, string>;
|
|
249
249
|
isOptional: false;
|
|
250
250
|
};
|
|
251
251
|
version: {
|
|
252
|
-
type:
|
|
252
|
+
type: _lssm_lib_schema268.FieldType<number, number>;
|
|
253
253
|
isOptional: false;
|
|
254
254
|
};
|
|
255
255
|
}>, SchemaModel<{
|
|
256
256
|
version: {
|
|
257
257
|
type: SchemaModel<{
|
|
258
258
|
meta: {
|
|
259
|
-
type:
|
|
259
|
+
type: _lssm_lib_schema268.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
260
260
|
isOptional: false;
|
|
261
261
|
};
|
|
262
262
|
config: {
|
|
263
|
-
type:
|
|
263
|
+
type: _lssm_lib_schema268.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
264
264
|
isOptional: false;
|
|
265
265
|
};
|
|
266
266
|
}>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { PolicyRef, PolicySpec } from "../policy/spec.js";
|
|
2
|
-
import { TelemetryRegistry, TelemetrySpec } from "../telemetry/spec.js";
|
|
3
1
|
import { CapabilityRef, CapabilityRegistry, CapabilitySpec } from "../capabilities/capabilities.js";
|
|
4
2
|
import "../capabilities/index.js";
|
|
3
|
+
import { PolicyRef, PolicySpec } from "../policy/spec.js";
|
|
4
|
+
import { TelemetryRegistry, TelemetrySpec } from "../telemetry/spec.js";
|
|
5
5
|
import { ExperimentRef, ExperimentRegistry, ExperimentSpec } from "../experiments/spec.js";
|
|
6
|
-
import {
|
|
6
|
+
import { DataViewSpec } from "../data-views/spec.js";
|
|
7
|
+
import { DataViewRegistry } from "../data-views/registry.js";
|
|
7
8
|
import "../data-views/index.js";
|
|
8
9
|
import { WorkflowRegistry, WorkflowSpec } from "../workflow/spec.js";
|
|
9
10
|
import { PolicyRegistry } from "../policy/registry.js";
|
|
@@ -17,7 +18,9 @@ import { AppKnowledgeBinding } from "../knowledge/binding.js";
|
|
|
17
18
|
import { ResolvedBranding } from "./branding.js";
|
|
18
19
|
import { Locale, TranslationEntry } from "../translations/catalog.js";
|
|
19
20
|
import { AppBlueprintSpec, AppIntegrationSlot, AppRouteConfig, AppThemeBinding, FeatureFlagState, SpecPointer, TelemetryBinding, TenantAppConfig, TranslationCatalogPointer } from "./spec.js";
|
|
20
|
-
import { FeatureModuleSpec, FeatureRef
|
|
21
|
+
import { FeatureModuleSpec, FeatureRef } from "../features/types.js";
|
|
22
|
+
import { FeatureRegistry } from "../features/registry.js";
|
|
23
|
+
import "../features/index.js";
|
|
21
24
|
|
|
22
25
|
//#region src/app-config/runtime.d.ts
|
|
23
26
|
interface ResolvedIntegration {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OwnerShipMeta } from "../ownership.js";
|
|
2
|
-
import { PolicyRef } from "../policy/spec.js";
|
|
3
2
|
import { CapabilityRef } from "../capabilities/capabilities.js";
|
|
4
3
|
import "../capabilities/index.js";
|
|
4
|
+
import { PolicyRef } from "../policy/spec.js";
|
|
5
5
|
import { ExperimentRef } from "../experiments/spec.js";
|
|
6
6
|
import { ThemeRef } from "../themes.js";
|
|
7
7
|
import { IntegrationCategory, IntegrationOwnershipMode } from "../integrations/spec.js";
|
|
@@ -10,7 +10,8 @@ import { AppKnowledgeBinding } from "../knowledge/binding.js";
|
|
|
10
10
|
import { BrandingDefaults, TenantBrandingConfig } from "./branding.js";
|
|
11
11
|
import { Locale, TranslationEntry } from "../translations/catalog.js";
|
|
12
12
|
import { ConfigStatus } from "./lifecycle.js";
|
|
13
|
-
import { FeatureRef } from "../features.js";
|
|
13
|
+
import { FeatureRef } from "../features/types.js";
|
|
14
|
+
import "../features/index.js";
|
|
14
15
|
|
|
15
16
|
//#region src/app-config/spec.d.ts
|
|
16
17
|
interface SpecPointer {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CapabilityRegistry } from "../capabilities/capabilities.js";
|
|
2
2
|
import "../capabilities/index.js";
|
|
3
|
-
import { DataViewRegistry } from "../data-views/
|
|
3
|
+
import { DataViewRegistry } from "../data-views/registry.js";
|
|
4
4
|
import "../data-views/index.js";
|
|
5
5
|
import { WorkflowRegistry } from "../workflow/spec.js";
|
|
6
6
|
import { IntegrationSpecRegistry } from "../integrations/spec.js";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { PresentationSpec, PresentationTarget } from "../../presentations/presentations.js";
|
|
2
|
+
import { FeatureModuleSpec } from "../../features/types.js";
|
|
3
|
+
import { FeatureRegistry } from "../../features/registry.js";
|
|
2
4
|
import { ComponentMap, TransformEngine } from "../../presentations/transform-engine.js";
|
|
3
5
|
import "../../presentations/index.js";
|
|
4
|
-
import
|
|
6
|
+
import "../../features/index.js";
|
|
5
7
|
import React from "react";
|
|
6
8
|
import { BlockConfig } from "@blocknote/core";
|
|
7
9
|
|
|
@@ -1,138 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
//#region src/data-views/data-views.d.ts
|
|
7
|
-
type DataViewKind = 'list' | 'detail' | 'table' | 'grid';
|
|
8
|
-
interface DataViewMeta extends OwnerShipMeta {
|
|
9
|
-
/** Canonical entity slug (e.g., "space", "resident"). */
|
|
10
|
-
entity: string;
|
|
11
|
-
}
|
|
12
|
-
interface DataViewSource {
|
|
13
|
-
/** Primary query used to fetch items for this view. */
|
|
14
|
-
primary: OpRef;
|
|
15
|
-
/** Optional operation used to fetch a single item (detail views). */
|
|
16
|
-
item?: OpRef;
|
|
17
|
-
/** Optional record mutation operations (used for inline editing or actions). */
|
|
18
|
-
mutations?: {
|
|
19
|
-
create?: OpRef;
|
|
20
|
-
update?: OpRef;
|
|
21
|
-
delete?: OpRef;
|
|
22
|
-
};
|
|
23
|
-
/** Events that should trigger refresh when emitted. */
|
|
24
|
-
refreshEvents?: EventRef[];
|
|
25
|
-
}
|
|
26
|
-
type DataViewFieldFormat = 'text' | 'number' | 'currency' | 'percentage' | 'date' | 'dateTime' | 'boolean' | 'badge';
|
|
27
|
-
interface DataViewField {
|
|
28
|
-
/** Unique identifier for the field within the view. */
|
|
29
|
-
key: string;
|
|
30
|
-
/** Human-friendly label for headers/tooltips. */
|
|
31
|
-
label: string;
|
|
32
|
-
/** Dot-path into the data item (e.g., "address.city"). */
|
|
33
|
-
dataPath: string;
|
|
34
|
-
/** Optional description surfaced in tooltips or docs. */
|
|
35
|
-
description?: string;
|
|
36
|
-
/** Optional formatting hint for renderers. */
|
|
37
|
-
format?: DataViewFieldFormat;
|
|
38
|
-
/** When true, the field can be used for sorting. */
|
|
39
|
-
sortable?: boolean;
|
|
40
|
-
/** When true, the field can be used for filtering. */
|
|
41
|
-
filterable?: boolean;
|
|
42
|
-
/** Optional width hint for table layouts. */
|
|
43
|
-
width?: 'auto' | 'xs' | 'sm' | 'md' | 'lg';
|
|
44
|
-
/** Optional presentation override (e.g., card component). */
|
|
45
|
-
presentation?: PresentationRef;
|
|
46
|
-
}
|
|
47
|
-
interface DataViewFilter {
|
|
48
|
-
key: string;
|
|
49
|
-
label: string;
|
|
50
|
-
field: string;
|
|
51
|
-
type: 'search' | 'enum' | 'number' | 'date' | 'boolean';
|
|
52
|
-
options?: {
|
|
53
|
-
value: string;
|
|
54
|
-
label: string;
|
|
55
|
-
}[];
|
|
56
|
-
}
|
|
57
|
-
interface DataViewAction {
|
|
58
|
-
key: string;
|
|
59
|
-
label: string;
|
|
60
|
-
kind: 'navigation' | 'operation';
|
|
61
|
-
/** Operation invoked when kind === 'operation'. */
|
|
62
|
-
operation?: OpRef;
|
|
63
|
-
/** Optional feature flag gating the action. */
|
|
64
|
-
requiresFlag?: string;
|
|
65
|
-
}
|
|
66
|
-
interface DataViewSections {
|
|
67
|
-
title?: string;
|
|
68
|
-
description?: string;
|
|
69
|
-
fields: string[];
|
|
70
|
-
}
|
|
71
|
-
interface DataViewBaseConfig {
|
|
72
|
-
kind: DataViewKind;
|
|
73
|
-
fields: DataViewField[];
|
|
74
|
-
primaryField?: string;
|
|
75
|
-
secondaryFields?: string[];
|
|
76
|
-
filters?: DataViewFilter[];
|
|
77
|
-
actions?: DataViewAction[];
|
|
78
|
-
}
|
|
79
|
-
interface DataViewListConfig extends DataViewBaseConfig {
|
|
80
|
-
kind: 'list';
|
|
81
|
-
layout?: 'card' | 'compact';
|
|
82
|
-
}
|
|
83
|
-
interface DataViewDetailConfig extends DataViewBaseConfig {
|
|
84
|
-
kind: 'detail';
|
|
85
|
-
sections?: DataViewSections[];
|
|
86
|
-
}
|
|
87
|
-
interface DataViewTableColumn {
|
|
88
|
-
field: string;
|
|
89
|
-
label?: string;
|
|
90
|
-
width?: 'auto' | 'xs' | 'sm' | 'md' | 'lg';
|
|
91
|
-
align?: 'left' | 'center' | 'right';
|
|
92
|
-
}
|
|
93
|
-
interface DataViewTableConfig extends DataViewBaseConfig {
|
|
94
|
-
kind: 'table';
|
|
95
|
-
columns?: DataViewTableColumn[];
|
|
96
|
-
rowSelectable?: boolean;
|
|
97
|
-
density?: 'comfortable' | 'compact';
|
|
98
|
-
}
|
|
99
|
-
interface DataViewGridConfig extends DataViewBaseConfig {
|
|
100
|
-
kind: 'grid';
|
|
101
|
-
columns?: number;
|
|
102
|
-
}
|
|
103
|
-
type DataViewConfig = DataViewListConfig | DataViewDetailConfig | DataViewTableConfig | DataViewGridConfig;
|
|
104
|
-
interface DataViewStates {
|
|
105
|
-
empty?: PresentationRef;
|
|
106
|
-
error?: PresentationRef;
|
|
107
|
-
loading?: PresentationRef;
|
|
108
|
-
}
|
|
109
|
-
interface DataViewSpec {
|
|
110
|
-
meta: DataViewMeta;
|
|
111
|
-
source: DataViewSource;
|
|
112
|
-
view: DataViewConfig;
|
|
113
|
-
states?: DataViewStates;
|
|
114
|
-
policy?: {
|
|
115
|
-
flags?: string[];
|
|
116
|
-
pii?: string[];
|
|
117
|
-
};
|
|
118
|
-
experiments?: ExperimentRef[];
|
|
119
|
-
}
|
|
120
|
-
declare class DataViewRegistry {
|
|
121
|
-
private readonly items;
|
|
122
|
-
register(spec: DataViewSpec): this;
|
|
123
|
-
list(): DataViewSpec[];
|
|
124
|
-
get(name: string, version?: number): DataViewSpec | undefined;
|
|
125
|
-
/** Filter data views by criteria. */
|
|
126
|
-
filter(criteria: RegistryFilter): DataViewSpec[];
|
|
127
|
-
/** List data views with specific tag. */
|
|
128
|
-
listByTag(tag: string): DataViewSpec[];
|
|
129
|
-
/** List data views by owner. */
|
|
130
|
-
listByOwner(owner: string): DataViewSpec[];
|
|
131
|
-
/** Group data views by key function. */
|
|
132
|
-
groupBy(keyFn: GroupKeyFn<DataViewSpec>): Map<string, DataViewSpec[]>;
|
|
133
|
-
/** Get unique tags from all data views. */
|
|
134
|
-
getUniqueTags(): string[];
|
|
135
|
-
}
|
|
136
|
-
declare function dataViewKey(spec: DataViewSpec): string;
|
|
137
|
-
//#endregion
|
|
138
|
-
export { DataViewAction, DataViewBaseConfig, DataViewConfig, DataViewDetailConfig, DataViewField, DataViewFieldFormat, DataViewFilter, DataViewGridConfig, DataViewKind, DataViewListConfig, DataViewMeta, DataViewRegistry, DataViewSections, DataViewSource, DataViewSpec, DataViewStates, DataViewTableColumn, DataViewTableConfig, dataViewKey };
|
|
1
|
+
import { DataViewAction, DataViewBaseConfig, DataViewConfig, DataViewDetailConfig, DataViewField, DataViewFieldFormat, DataViewFilter, DataViewGridConfig, DataViewKind, DataViewListConfig, DataViewMeta, DataViewSections, DataViewSource, DataViewStates, DataViewTableColumn, DataViewTableConfig } from "./types.js";
|
|
2
|
+
import { DataViewRef, DataViewSpec, defineDataView } from "./spec.js";
|
|
3
|
+
import { DataViewRegistry, dataViewKey } from "./registry.js";
|
|
4
|
+
import "./index.js";
|
|
5
|
+
export { DataViewAction, DataViewBaseConfig, DataViewConfig, DataViewDetailConfig, DataViewField, DataViewFieldFormat, DataViewFilter, DataViewGridConfig, DataViewKind, DataViewListConfig, DataViewMeta, DataViewRef, DataViewRegistry, DataViewSections, DataViewSource, DataViewSpec, DataViewStates, DataViewTableColumn, DataViewTableConfig, dataViewKey, defineDataView };
|
|
@@ -1,58 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineDataView } from "./spec.js";
|
|
2
|
+
import { DataViewRegistry, dataViewKey } from "./registry.js";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
init_registry_utils();
|
|
5
|
-
function keyOf(spec) {
|
|
6
|
-
return `${spec.meta.key}.v${spec.meta.version}`;
|
|
7
|
-
}
|
|
8
|
-
var DataViewRegistry = class {
|
|
9
|
-
items = /* @__PURE__ */ new Map();
|
|
10
|
-
register(spec) {
|
|
11
|
-
const key = keyOf(spec);
|
|
12
|
-
if (this.items.has(key)) throw new Error(`Duplicate data view ${key}`);
|
|
13
|
-
this.items.set(key, spec);
|
|
14
|
-
return this;
|
|
15
|
-
}
|
|
16
|
-
list() {
|
|
17
|
-
return [...this.items.values()];
|
|
18
|
-
}
|
|
19
|
-
get(name, version) {
|
|
20
|
-
if (version != null) return this.items.get(`${name}.v${version}`);
|
|
21
|
-
let candidate;
|
|
22
|
-
let max = -Infinity;
|
|
23
|
-
for (const spec of this.items.values()) {
|
|
24
|
-
if (spec.meta.key !== name) continue;
|
|
25
|
-
if (spec.meta.version > max) {
|
|
26
|
-
max = spec.meta.version;
|
|
27
|
-
candidate = spec;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return candidate;
|
|
31
|
-
}
|
|
32
|
-
/** Filter data views by criteria. */
|
|
33
|
-
filter(criteria) {
|
|
34
|
-
return filterBy(this.list(), criteria);
|
|
35
|
-
}
|
|
36
|
-
/** List data views with specific tag. */
|
|
37
|
-
listByTag(tag) {
|
|
38
|
-
return this.list().filter((d) => d.meta.tags?.includes(tag));
|
|
39
|
-
}
|
|
40
|
-
/** List data views by owner. */
|
|
41
|
-
listByOwner(owner) {
|
|
42
|
-
return this.list().filter((d) => d.meta.owners?.includes(owner));
|
|
43
|
-
}
|
|
44
|
-
/** Group data views by key function. */
|
|
45
|
-
groupBy(keyFn) {
|
|
46
|
-
return groupBy(this.list(), keyFn);
|
|
47
|
-
}
|
|
48
|
-
/** Get unique tags from all data views. */
|
|
49
|
-
getUniqueTags() {
|
|
50
|
-
return getUniqueTags(this.list());
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
function dataViewKey(spec) {
|
|
54
|
-
return keyOf(spec);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
//#endregion
|
|
58
|
-
export { DataViewRegistry, dataViewKey };
|
|
4
|
+
export { DataViewRegistry, dataViewKey, defineDataView };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataViewAction, DataViewBaseConfig, DataViewConfig, DataViewDetailConfig, DataViewField, DataViewFieldFormat, DataViewFilter, DataViewGridConfig, DataViewKind, DataViewListConfig, DataViewMeta,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export { DataViewAction, DataViewBaseConfig, DataViewConfig, DataViewDetailConfig, DataViewField, DataViewFieldFormat, DataViewFilter, DataViewGridConfig, DataViewKind, DataViewListConfig, DataViewMeta,
|
|
1
|
+
import { DataViewAction, DataViewBaseConfig, DataViewConfig, DataViewDetailConfig, DataViewField, DataViewFieldFormat, DataViewFilter, DataViewGridConfig, DataViewKind, DataViewListConfig, DataViewMeta, DataViewSections, DataViewSource, DataViewStates, DataViewTableColumn, DataViewTableConfig } from "./types.js";
|
|
2
|
+
import { DataViewRef, DataViewSpec, defineDataView } from "./spec.js";
|
|
3
|
+
import { DataViewRegistry, dataViewKey } from "./registry.js";
|
|
4
|
+
export { type DataViewAction, type DataViewBaseConfig, type DataViewConfig, type DataViewDetailConfig, type DataViewField, type DataViewFieldFormat, type DataViewFilter, type DataViewGridConfig, type DataViewKind, type DataViewListConfig, type DataViewMeta, type DataViewRef, DataViewRegistry, type DataViewSections, type DataViewSource, type DataViewSpec, type DataViewStates, type DataViewTableColumn, type DataViewTableConfig, dataViewKey, defineDataView };
|
package/dist/data-views/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { DataViewRuntime } from "./runtime.js";
|
|
1
|
+
import { defineDataView } from "./spec.js";
|
|
2
|
+
import { DataViewRegistry, dataViewKey } from "./registry.js";
|
|
4
3
|
|
|
5
|
-
export {
|
|
4
|
+
export { DataViewRegistry, dataViewKey, defineDataView };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { GroupKeyFn, RegistryFilter } from "../registry-utils.js";
|
|
2
|
+
import { DataViewSpec } from "./spec.js";
|
|
3
|
+
|
|
4
|
+
//#region src/data-views/registry.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Generate a unique key for a data view spec.
|
|
8
|
+
*/
|
|
9
|
+
declare function dataViewKey(spec: DataViewSpec): string;
|
|
10
|
+
/**
|
|
11
|
+
* Registry for managing data view specifications.
|
|
12
|
+
*/
|
|
13
|
+
declare class DataViewRegistry {
|
|
14
|
+
private readonly items;
|
|
15
|
+
/**
|
|
16
|
+
* Register a data view spec.
|
|
17
|
+
* @throws Error if a spec with the same key already exists.
|
|
18
|
+
*/
|
|
19
|
+
register(spec: DataViewSpec): this;
|
|
20
|
+
/**
|
|
21
|
+
* List all registered data view specs.
|
|
22
|
+
*/
|
|
23
|
+
list(): DataViewSpec[];
|
|
24
|
+
/**
|
|
25
|
+
* Get a data view by key and optional version.
|
|
26
|
+
* If version is not specified, returns the latest version.
|
|
27
|
+
*/
|
|
28
|
+
get(name: string, version?: number): DataViewSpec | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Filter data views by criteria.
|
|
31
|
+
*/
|
|
32
|
+
filter(criteria: RegistryFilter): DataViewSpec[];
|
|
33
|
+
/**
|
|
34
|
+
* List data views with specific tag.
|
|
35
|
+
*/
|
|
36
|
+
listByTag(tag: string): DataViewSpec[];
|
|
37
|
+
/**
|
|
38
|
+
* List data views by owner.
|
|
39
|
+
*/
|
|
40
|
+
listByOwner(owner: string): DataViewSpec[];
|
|
41
|
+
/**
|
|
42
|
+
* Group data views by key function.
|
|
43
|
+
*/
|
|
44
|
+
groupBy(keyFn: GroupKeyFn<DataViewSpec>): Map<string, DataViewSpec[]>;
|
|
45
|
+
/**
|
|
46
|
+
* Get unique tags from all data views.
|
|
47
|
+
*/
|
|
48
|
+
getUniqueTags(): string[];
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
export { DataViewRegistry, dataViewKey };
|