jmapcloud-types 0.0.1 → 2.0.23-qa.10

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/mcs.d.ts CHANGED
@@ -1,31 +1,52 @@
1
+ // The JSON Forms 3.8.0 root also loads store declarations that assume Symbol.observable exists.
2
+ // Import the models directly so standalone consumers can compile with skipLibCheck disabled.
3
+ // Recheck the root import on upgrade (https://github.com/eclipsesource/jsonforms/issues/1988).
4
+ import type { BaseUISchemaElement, JsonSchema7, Layout, Scoped } from "@jsonforms/core/lib/models"
1
5
  import { JMultiLocaleTranslationValue, LOCALES } from "."
2
- import { JMAP_SERVER_DISTANCE_UNITS, JServerExtent } from "./geography"
3
- import { JTranslateParamValues } from "./language"
6
+ import { components } from "./generated/mcs-generated"
7
+ import { JServerExtent } from "./geography"
4
8
  declare type JLAYER_ELEMENT_TYPES = "POINT" | "LINE" | "POLYGON" | "TEXT" | "IMAGE" | "LABEL" | "ELLIPSE" | "MIXED"
5
9
  declare type JLAYER_LAYER_TYPES = "VECTOR" | "RASTER" | "OGC_API_FEATURES" | "WMS" | "WMTS"
6
- declare type JTYPEFACE = "AVERIA_SANS_LIBRE" | "BARLOW" | "IBM_PLEX_MONO" | "NOTO_SERIF" | "OPEN_SANS" | "ROBOTO"
7
- export interface JProject extends JCreationInfo {
10
+ export type JTYPEFACE = NonNullable<S["TextStyleDTO"]["typeface"]>
11
+
12
+ type S = components["schemas"]
13
+
14
+ export interface JProject<TText extends LocalizedText = JMultiLocaleTranslationValue> extends JCreationInfo {
8
15
  id: string
9
16
  defaultLanguage: LOCALES
10
- name: JMultiLocaleTranslationValue
11
- description: JMultiLocaleTranslationValue
17
+ languages: LOCALES[]
18
+ name: TText
19
+ description?: TText
20
+ presentationPage?: TText
12
21
  organizationId: string
13
22
  mapCrs: string
14
- measurementCrs: string
15
- mapUnit: JMAP_SERVER_DISTANCE_UNITS
16
- distanceUnit: JMAP_SERVER_DISTANCE_UNITS
17
- displayUnit: JMAP_SERVER_DISTANCE_UNITS
23
+ distanceUnit: NonNullable<components["schemas"]["ProjectDTO"]["distanceUnit"]>
18
24
  initialExtent: JServerExtent | null
19
25
  maximumExtent: JServerExtent | null
26
+ owners: string[]
20
27
  backgroundColor: string
21
28
  defaultSelectionColor: string
22
29
  rotation: number
23
30
  tags: JTag[]
24
31
  public: boolean
25
- layerCount: number
32
+ links?: S["ProjectDTO"]["links"]
33
+ listed: boolean
34
+ terrainRasterDataSourceId?: string
35
+ terrain?: JTerrain
26
36
  }
27
37
 
28
- export type JMapUnit = "MILLIMETER" | "CENTIMETER" | "METER" | "FOOT" | "INCH" | "KILOMETER" | "MILE" | "NAUTICAL_MILE" | "YARD" | "DEGREE"
38
+ // The generated TerrainDTO declares java.awt colour objects, but the wire uses
39
+ // lowercase #rrggbb strings in both requests and responses.
40
+ export type JTerrain = Omit<S["TerrainDTO"], "hillshadeAccentColor" | "hillshadeHighlightColor" | "hillshadeShadowColor"> & {
41
+ hillshadeAccentColor?: string
42
+ hillshadeHighlightColor?: string
43
+ hillshadeShadowColor?: string
44
+ }
45
+
46
+ export interface JProjectLayersCount {
47
+ layerCount: number
48
+ tableCount: number
49
+ }
29
50
 
30
51
  interface JCreationInfo {
31
52
  createdBy: string
@@ -34,28 +55,50 @@ interface JCreationInfo {
34
55
  lastModificationDate: string
35
56
  }
36
57
 
37
- export type JGeneralizationLevel = "HIGH" | "MEDIUM" | "LOW" | "NONE"
58
+ export type GeneralizationLevel = NonNullable<S["VectorLayerDTO"]["generalizationLevel"]>
59
+
60
+ export type JElementType = NonNullable<components["schemas"]["LayerDTO"]["elementType"]>
38
61
 
39
- export type JElementType = "POINT" | "LINE" | "POLYGON" | "TEXT" | "IMAGE"
62
+ /** Common field definition; no resource identity, source indexing or display configuration. */
63
+ export type AttributeDefinition<TText extends LocalizedText = JMultiLocaleTranslationValue> = Pick<S["AttributeDTO"], "name" | "type" | "minimumFractionDigits" | "maximumFractionDigits"> & {
64
+ title?: TText | (TText extends string ? null : never)
65
+ valueDomain?: JValueDomain<TText>
66
+ }
40
67
 
41
- interface JAttribute {
68
+ export interface DataSourceAttribute<TText extends LocalizedText = JMultiLocaleTranslationValue> extends Omit<S["AttributeDTO"], "title" | "valueDomain">, AttributeDefinition<TText> {
69
+ /** Data-source attribute ID, not a layer/table attribute ID. */
42
70
  id: string
43
- name: string
44
- title: JMultiLocaleTranslationValue
45
71
  indexed: boolean
46
- type: JAttributeType
47
- valueDomain?: JValueDomain
48
72
  }
49
73
 
50
- export type JValueDomain = JValueDomainEntry[]
51
- export type JValueDomainEntry =
74
+ export interface LayerAttribute<TText extends LocalizedText = JMultiLocaleTranslationValue> extends Omit<S["AttributeDTO"], "title" | "valueDomain">, AttributeDefinition<TText> {
75
+ /** Layer attribute ID, used by layer reorder writes. */
76
+ id: string
77
+ indexed?: boolean
78
+ visible: boolean
79
+ /** GraphQL only: whether vector tiles carry the attribute (the backend binds what saved configuration references). */
80
+ bound?: boolean
81
+ }
82
+
83
+ export interface TableAttribute<TText extends LocalizedText = JMultiLocaleTranslationValue> extends Omit<S["AttributeDTO"], "title" | "valueDomain">, AttributeDefinition<TText> {
84
+ /** Table attribute ID, used by table reorder writes. */
85
+ id: string
86
+ indexed?: boolean
87
+ visible: boolean
88
+ }
89
+
90
+ /** @deprecated Use DataSourceAttribute, LayerAttribute or TableAttribute at resource boundaries, or AttributeDefinition for shared consumers. */
91
+ export type JAttribute = DataSourceAttribute & { visible?: boolean }
92
+
93
+ export type JValueDomain<TText extends LocalizedText = JMultiLocaleTranslationValue> = JValueDomainEntry<TText>[]
94
+ export type JValueDomainEntry<TText extends LocalizedText = JMultiLocaleTranslationValue> =
52
95
  | {
53
96
  value: string | number
54
- title: JMultiLocaleTranslationValue
97
+ title: TText
55
98
  }
56
99
  | {
57
100
  nullValue: true
58
- title: JMultiLocaleTranslationValue
101
+ title: TText
59
102
  }
60
103
 
61
104
  interface JMouseOver {
@@ -115,26 +158,64 @@ interface JLabelUpdate extends Omit<JLabel, "rotationUnit" | "rotationOrigin" |
115
158
  offset: { x: number; y: number }
116
159
  }
117
160
 
118
- export type RotationDirection = "CW" | "CCW"
161
+ export type RotationDirection = NonNullable<S["VectorLayerDTO"]["rotationDirection"]>
119
162
 
120
163
  export type LabelAnchors = "CENTER" | "LEFT" | "RIGHT" | "TOP" | "BOTTOM" | "TOP_LEFT" | "TOP_RIGHT" | "BOTTOM_LEFT" | "BOTTOM_RIGHT"
121
164
 
122
165
  export type stringOffset = `POINT (${number} ${number})`
123
166
 
124
- export type JAttributeType = "BIT" | "BOOLEAN" | "SMALLINT" | "INTEGER" | "TINYINT" | "BIGINT" | "DECIMAL" | "FLOAT" | "DOUBLE" | "VARCHAR" | "DATE" | "TIME" | "TIMESTAMP"
167
+ export type AttributeType = S["AttributeDTO"]["type"]
125
168
 
126
- export type JDBCType = "numeric" | "string" | "datetime" | "boolean" | "object"
169
+ export type JAttributeCategory = "numeric" | "string" | "datetime" | "boolean" | "binary" | "other"
127
170
 
128
171
  export type JLayerType = "VECTOR" | "RASTER" | "OGC_API_FEATURES" | "WMS" | "WMTS"
129
172
 
130
- export type JLayerOrTable = JLayer | JTable
173
+ export type LocalizedText = string | JMultiLocaleTranslationValue
174
+
175
+ // `spatialDataSourceOrganizationId` is optional on the shared backend base DTO because it is absent
176
+ // on localized layers, but it is always present on non-localized layer responses — refine it to
177
+ // required here so call sites don't need null guards. It stays optional on `LocalizedLayer`.
178
+ //
179
+ // `attributes` is omitted by the backend (NON_NULL) whenever a layer has none, so it is optional on
180
+ // every generated variant. `attributes` uses the layer domain model, so we
181
+ // retype it as such on every variant. Vector-capable layers (VECTOR / OGC_API_FEATURES) are the only
182
+ // ones that carry feature attributes and the vector-edition flow iterates them unconditionally, so we
183
+ // also refine it to required there and guarantee it at the fetch boundary (`layerSVC.getById`
184
+ // normalizes a missing array to `[]`). WMS/WMTS/raster keep it optional.
185
+ //
186
+ // `baseFilter` is generated as the opaque `Filter` schema (`unknown`), but the app universally treats
187
+ // it as a parsed `JAnyFilterCondition | string` (see `layerSVC`), so we refine it on the two vector
188
+ // variants to match the hand-written `JTable.baseFilter`.
189
+ type WithVectorFields<T> = Omit<T, "attributes" | "baseFilter"> & { attributes: LayerAttribute[]; baseFilter?: JAnyFilterCondition | string }
190
+ type WithOptionalAttributes<T> = Omit<T, "attributes"> & { attributes?: LayerAttribute[] }
191
+ export type Layer = (
192
+ | WithVectorFields<S["VectorLayerDTO"]>
193
+ | WithVectorFields<S["ApiFeaturesLayerDTO"]>
194
+ | WithOptionalAttributes<S["RasterLayerDTO"]>
195
+ | WithOptionalAttributes<S["WmsLayerDTO"]>
196
+ | WithOptionalAttributes<S["WmtsLayerDTO"]>
197
+ ) & { spatialDataSourceOrganizationId: string }
198
+
199
+ // The layer variants that carry feature attributes (and the other vector-only fields like
200
+ // `selectable` / `generalizationLevel`). `attributes` is required on these — see `Layer` above.
201
+ export type VectorCapableLayer = Extract<Layer, { type: "VECTOR" | "OGC_API_FEATURES" }>
202
+
203
+ export type WmsLayer = Extract<Layer, { type: "WMS" }>
204
+
205
+ type WithLocalizedAttributes<T> = T extends unknown ? Omit<T, "attributes"> & { attributes?: LayerAttribute<string>[] } : never
206
+ export type LocalizedLayer = WithLocalizedAttributes<NonNullable<S["ResponseGetLocalizedLayer"]["result"]>>
131
207
 
132
- interface JLayer extends JCreationInfo {
208
+ /**
209
+ * @deprecated Use the generated discriminated union `Layer` (and `VectorCapableLayer`) instead.
210
+ * This hand-maintained flat interface is being retired (PRD: adopt server-generated layer types);
211
+ * it survives only for consumers not yet migrated off it.
212
+ */
213
+ interface JLayer<TText extends LocalizedText = JMultiLocaleTranslationValue> extends JCreationInfo {
133
214
  id: string
134
215
  organizationId: string
135
216
  projectId: string
136
- name: JMultiLocaleTranslationValue
137
- description: JMultiLocaleTranslationValue
217
+ name: TText
218
+ description: TText
138
219
  spatialDataSourceId: string
139
220
  elementType: JElementType
140
221
  visible: boolean
@@ -142,18 +223,23 @@ interface JLayer extends JCreationInfo {
142
223
  maximumZoom: number
143
224
  minimumZoom: number
144
225
  defaultStyleId: string
226
+ /** @deprecated Legacy mixed attribute view. Use Layer.attributes with LayerAttribute instead. */
145
227
  attributes: JAttribute[]
146
228
  allowClientSideEditing: boolean
229
+ selectable: boolean
147
230
  type: JLayerType
148
231
  rotationAttribute?: string
149
232
  rotationDirection?: RotationDirection
150
233
  labellingConfiguration?: JLabel
234
+ spatialDataSourceOrganizationId: string
151
235
  mouseOverConfiguration?: JMouseOver
152
- generalizationLevel: JGeneralizationLevel
236
+ generalizationLevel: GeneralizationLevel
153
237
  filter?: string
154
- baseFilter?: JAnyFilterCondition
238
+ baseFilter?: JAnyFilterCondition | string
239
+ referencingLayerId?: string
155
240
  }
156
241
 
242
+ /** @deprecated Use `Extract<Layer, { type: "WMS" }>` from the generated union instead. */
157
243
  interface WMSJLayer extends JLayer {
158
244
  layers: string[]
159
245
  styles: string[]
@@ -161,6 +247,7 @@ interface WMSJLayer extends JLayer {
161
247
  type: "WMS"
162
248
  }
163
249
 
250
+ /** @deprecated Use `Extract<Layer, { type: "WMTS" }>` from the generated union instead. */
164
251
  interface WMTSJLayer extends JLayer {
165
252
  layer: string
166
253
  style: string
@@ -168,18 +255,20 @@ interface WMTSJLayer extends JLayer {
168
255
  type: "WMTS"
169
256
  }
170
257
 
171
- interface JTable extends JCreationInfo {
258
+ interface JTable<TText extends LocalizedText = JMultiLocaleTranslationValue> extends JCreationInfo {
172
259
  id: string
173
260
  organizationId: string
174
261
  projectId: string
175
- name: JMultiLocaleTranslationValue
176
- description: JMultiLocaleTranslationValue
262
+ name: TText
263
+ description: TText
177
264
  dataSourceId: string
265
+ dataSourceOrganizationId: string
178
266
  allowClientSideEditing: boolean
267
+ formId?: string
179
268
  filter?: string
180
269
  listed: boolean
181
- attributes: JAttribute[]
182
- baseFilter?: JAnyFilterCondition
270
+ attributes: TableAttribute<TText>[]
271
+ baseFilter?: JAnyFilterCondition | string
183
272
  }
184
273
 
185
274
  declare interface JLanguageOptions {
@@ -194,7 +283,7 @@ export type JTabularDataSourceType = "TabularDataSource"
194
283
 
195
284
  export type JDataSourceType = JSpatialDataSourceType | JTabularDataSourceType
196
285
 
197
- export type JStyleType = "POINT" | "LINE" | "POLYGON" | "TEXT" | "IMAGE" | "COMPOUND"
286
+ export type JStyleType = NonNullable<S["StyleDTO"]["type"]>
198
287
 
199
288
  export interface JTag {
200
289
  id: string
@@ -202,18 +291,54 @@ export interface JTag {
202
291
  name: string
203
292
  }
204
293
 
205
- export type JAllStyleDTO = JCompoundStyleDTO | JPolygonStyle | JPointStyleDTO | JLineStyle | JImageStyle
294
+ type ApiStyleCommonOverrides<TStyleType extends NonNullable<S["StyleDTO"]["type"]>> = JStyleBase &
295
+ JCreationInfo & {
296
+ type: TStyleType
297
+ }
298
+
299
+ export type JLineStyleDTO = ApiStyleCommonOverrides<"LINE"> &
300
+ Omit<S["LineStyleDTO"], "id" | "organizationId" | "name" | "description" | "tags" | "type" | "transparency" | "lineColor" | "arrowColor" | "lineCap" | "lineJoin"> & {
301
+ arrowColor: string
302
+ lineCap: JLineCap
303
+ lineColor: string
304
+ lineJoin: JLineJoin
305
+ }
306
+
307
+ export type JPointStyleDTO = ApiStyleCommonOverrides<"POINT"> &
308
+ Omit<S["PointStyleDTO"], "id" | "organizationId" | "name" | "description" | "tags" | "type" | "transparency" | "symbolOffset" | "symbolMimeType"> & {
309
+ symbolMimeType: string
310
+ symbolOffset: string
311
+ }
312
+
313
+ export type JPolygonStyleDTO = ApiStyleCommonOverrides<"POLYGON"> &
314
+ Omit<S["PolygonStyleDTO"], "id" | "organizationId" | "name" | "description" | "tags" | "type" | "transparency" | "fillColor" | "borderColor" | "patternBackgroundColor"> & {
315
+ borderColor: string
316
+ fillColor: string
317
+ patternBackgroundColor?: string
318
+ transparentFill?: boolean
319
+ }
320
+
321
+ export type JTextAnnotationStyleDTO = ApiStyleCommonOverrides<"TEXT"> &
322
+ Omit<S["TextStyleDTO"], "id" | "organizationId" | "name" | "description" | "tags" | "type" | "transparency" | "textColor" | "outlineColor" | "typeface"> & {
323
+ outlineColor: string | undefined
324
+ textColor: string
325
+ typeface: JTYPEFACE
326
+ }
327
+
328
+ export type JImageStyleDTO = ApiStyleCommonOverrides<"IMAGE"> & Omit<S["ImageStyleDTO"], "id" | "organizationId" | "name" | "description" | "tags" | "type" | "transparency">
329
+
330
+ export type JAllStyleDTO = JCompoundStyleDTO | JPolygonStyleDTO | JPointStyleDTO | JLineStyleDTO | JImageStyleDTO | JTextAnnotationStyleDTO
206
331
 
207
332
  export type JAllStyleParams = JCompoundStyleParams | JPolygonStyleParams | JPointStyleParams | JLineStyleParams | JImageStyleParams | JTextAnnotationStyleParams
208
333
 
209
334
  export type JAllStyle = JCompoundStyle | JPolygonStyle | JPointStyle | JLineStyle | JImageStyle | JTextAnnotationStyle
210
335
 
211
336
  export interface JStyleBase {
212
- id: string
213
- organizationId: string
214
- name: string
337
+ id: NonNullable<S["StyleDTO"]["id"]>
338
+ organizationId: NonNullable<S["StyleDTO"]["organizationId"]>
339
+ name: NonNullable<S["StyleDTO"]["name"]>
215
340
  description?: string
216
- transparency: number
341
+ transparency: NonNullable<S["SimpleStyleDTO"]["transparency"]>
217
342
  tags: JTag[]
218
343
  }
219
344
 
@@ -226,13 +351,13 @@ export interface JStyleParamsBase {
226
351
  tags: string[]
227
352
  }
228
353
 
229
- export interface JCompoundStyleDTO extends JCreationInfo {
354
+ export interface JCompoundStyleDTO extends JCreationInfo, Omit<S["CompoundStyleDTO"], "id" | "organizationId" | "name" | "description" | "tags" | "type" | "styles" | keyof JCreationInfo> {
230
355
  type: "COMPOUND"
231
- id: string
232
- organizationId: string
233
- name: string
234
- description: string
235
- styles: Array<JPointStyleDTO | JLineStyle>
356
+ id: NonNullable<S["CompoundStyleDTO"]["id"]>
357
+ organizationId: NonNullable<S["CompoundStyleDTO"]["organizationId"]>
358
+ name: NonNullable<S["CompoundStyleDTO"]["name"]>
359
+ description: NonNullable<S["CompoundStyleDTO"]["description"]>
360
+ styles: Array<JPointStyleDTO | JLineStyleDTO>
236
361
  }
237
362
 
238
363
  export interface JCompoundStyleParams {
@@ -253,14 +378,7 @@ export interface JCompoundStyle extends JCreationInfo {
253
378
  styles: Array<JPointStyle | JLineStyle>
254
379
  }
255
380
 
256
- interface JTextAnnotationStyle extends JStyleBase, JCreationInfo {
257
- type: "TEXT"
258
- bold: boolean
259
- italic: boolean
260
- typeface: JTYPEFACE
261
- textColor: string
262
- outlineColor: string | undefined
263
- }
381
+ type JTextAnnotationStyle = JTextAnnotationStyleDTO
264
382
 
265
383
  interface JTextAnnotationStyleParams extends JStyleParamsBase {
266
384
  type: "TEXT"
@@ -271,17 +389,7 @@ interface JTextAnnotationStyleParams extends JStyleParamsBase {
271
389
  tags: string[]
272
390
  }
273
391
 
274
- interface JPolygonStyle extends JStyleBase, JCreationInfo {
275
- type: "POLYGON"
276
- fillColor: string
277
- borderColor: string
278
- transparentFill: boolean
279
- borderThickness: number
280
- borderTransparency: number
281
- patternData: string
282
- borderDashPattern?: number[]
283
- borderPatternData: string
284
- }
392
+ type JPolygonStyle = JPolygonStyleDTO
285
393
 
286
394
  interface JPolygonStyleParams extends JStyleParamsBase {
287
395
  type: "POLYGON"
@@ -291,50 +399,35 @@ interface JPolygonStyleParams extends JStyleParamsBase {
291
399
  borderThickness: number
292
400
  borderTransparency: number
293
401
  patternData: string
402
+ patternBackgroundColor?: string
403
+ showPatternBackgroundColor?: boolean
294
404
  borderDashPattern?: number[]
295
405
  borderPatternData: string
296
406
  tags: string[]
297
407
  }
298
408
 
299
- interface JLineStyle extends JStyleBase, JCreationInfo {
300
- type: "LINE"
301
- lineThickness: number
302
- lineColor: string
303
- arrowType: JArrowType
304
- arrowPosition: number
305
- lineCap: JLineCap
306
- lineJoin: JLineJoin
307
- lineMiterLimit: number
308
- lineRoundLimit: number
309
- dashPattern?: number[]
310
- patternData: string
311
- }
409
+ export type JLineStyle = JLineStyleDTO
312
410
 
313
411
  interface JLineStyleParams extends JStyleParamsBase {
314
412
  type: "LINE"
315
413
  lineThickness: number
316
414
  lineColor: string
317
- arrowType: JArrowType
318
- arrowPosition: number
415
+ arrowActive: boolean
416
+ arrowColor: string
417
+ arrowSize: number
418
+ arrowTransparency: number
319
419
  lineCap: JLineCap
320
420
  lineJoin: JLineJoin
321
421
  lineMiterLimit: number
322
422
  lineRoundLimit: number
323
423
  dashPattern?: number[]
324
424
  patternData?: string
425
+ linePatternData?: string
325
426
  tags: string[]
326
427
  }
327
428
 
328
- interface JPointStyle extends JStyleBase, JCreationInfo {
329
- type: "POINT"
330
- size: number
331
- rotation: number
332
- rotationLocked: boolean
333
- proportional: boolean
334
- proportionalScale: number
429
+ interface JPointStyle extends Omit<JPointStyleDTO, "symbolOffset"> {
335
430
  symbolOffset: { x: number; y: number }
336
- symbolData: string
337
- symbolMimeType: string
338
431
  }
339
432
 
340
433
  interface JPointStyleParams extends JStyleParamsBase {
@@ -350,50 +443,50 @@ interface JPointStyleParams extends JStyleParamsBase {
350
443
  tags: string[]
351
444
  }
352
445
 
353
- interface JPointStyleDTO extends JStyleBase, JCreationInfo {
354
- type: "POINT"
355
- size: number
356
- rotation: number
357
- rotationLocked: boolean
358
- proportional: boolean
359
- proportionalScale: number
360
- symbolOffset: string
361
- symbolData: string
362
- symbolMimeType: string
363
- }
364
-
365
- interface JImageStyle extends JStyleBase, JCreationInfo {
366
- type: "IMAGE"
367
- transparency: number
368
- }
446
+ type JImageStyle = JImageStyleDTO
369
447
 
370
448
  interface JImageStyleParams extends JStyleParamsBase {
371
449
  type: "IMAGE"
372
450
  tags: string[]
373
451
  }
374
452
 
375
- export type JLineJoin = "BEVEL" | "ROUND" | "MITER"
453
+ export type JLineJoin = NonNullable<S["LineStyleDTO"]["lineJoin"]>
376
454
 
377
- export type JArrowType = "NONE" | "FORWARD" | "BACKWARD"
455
+ // export type JArrowType = "NONE" | "FORWARD" | "BACKWARD"
378
456
 
379
- export type JLineCap = "BUTT" | "ROUND" | "SQUARE"
457
+ export type JLineCap = NonNullable<S["LineStyleDTO"]["lineCap"]>
380
458
 
381
459
  export type JDataSource = JSpatialDataSource | JTabularDataSource
382
460
 
383
461
  export type JSpatialDataSource = JRasterDataSource | JWmsWmtsDataSource | JFileDataSource | JVectorDataSource | JApiFeaturesDataSource | JCustomViewDataSource
384
462
 
463
+ export type IncludeMode = "all" | "myOrganization" | "otherOrganizations"
464
+
385
465
  interface JDataSourceBase extends JCreationInfo {
386
466
  id: string
387
467
  organizationId: string
388
468
  name: string
389
469
  description: string
390
- status: JStatus
391
- attributes: JAttribute[]
470
+ status: NonNullable<components["schemas"]["AbstractDataSourceDTO"]["status"]>
471
+ attributes: DataSourceAttribute[]
472
+ owners?: string[]
473
+ specs?: DataSourceSpecs
392
474
  tags: JTag[]
393
475
  type: JDataSourceType
476
+ userMetadata?: UserMetadata[]
394
477
  additionalInfo?: JDataSourceAdditionalInfo
395
478
  }
396
479
 
480
+ export type UserMetadataSystemPredefinedId = "DESCRIPTION" | "SOURCE" | "PRODUCTION_DATE" | "UPDATED_DATE" | "EXTERNAL_METADATA_URL"
481
+ export type UserMetadataId = UserMetadataSystemPredefinedId | (string & {})
482
+
483
+ export interface UserMetadata<TText extends LocalizedText = JMultiLocaleTranslationValue> {
484
+ id: UserMetadataId
485
+ type: "TEXT" | "DATE"
486
+ title?: TText
487
+ value?: TText | string
488
+ }
489
+
397
490
  interface JApiFeaturesDataSource extends JDataSourceBase {
398
491
  type: "ApiFeaturesDataSource"
399
492
  crs: string
@@ -405,7 +498,7 @@ interface JRasterDataSource extends JDataSourceBase {
405
498
  type: "RasterDataSource"
406
499
  crs: string
407
500
  fileIds: string[]
408
- rasterInfo: any
501
+ rasterInfo?: S["RasterInfoDTO"] | null
409
502
  }
410
503
 
411
504
  interface JWmsWmtsDataSource extends JDataSourceBase {
@@ -417,24 +510,77 @@ interface JWmsWmtsDataSource extends JDataSourceBase {
417
510
  interface JFileDataSource extends JDataSourceBase {
418
511
  type: "FileDataSource"
419
512
  crs: string
420
- linkAttribute?: JAttribute
513
+ linkAttribute?: DataSourceAttribute
421
514
  }
422
515
 
423
516
  interface JCustomViewDataSource extends JDataSourceBase {
424
517
  type: "CustomViewDataSource"
425
518
  crs: string
426
- linkAttribute?: JAttribute
519
+ linkAttribute?: DataSourceAttribute
427
520
  }
428
521
 
429
522
  interface JVectorDataSource extends JDataSourceBase {
430
523
  type: "VectorDataSource"
431
524
  crs: string
432
- linkAttribute?: JAttribute
525
+ linkAttribute?: DataSourceAttribute
433
526
  }
434
527
 
435
528
  interface JTabularDataSource extends JDataSourceBase {
436
529
  type: "TabularDataSource"
437
- linkAttribute?: JAttribute
530
+ linkAttribute?: DataSourceAttribute
531
+ }
532
+
533
+ export interface DataSourceSpecs {
534
+ files?: NonNullable<S["DataSourceSpecs"]["files"]>
535
+ layers?: NonNullable<S["DataSourceSpecs"]["layers"]>
536
+ }
537
+
538
+ export type JStyleResourceDTO = S["SymbologyResourceDTO"]
539
+
540
+ export type JStyleResourceTagDTO = S["TagDTO"]
541
+
542
+ export type JStyleResourceType = NonNullable<JStyleResourceDTO["resourceType"]>
543
+
544
+ export interface JStyleResourceFilters {
545
+ q?: string
546
+ type?: JStyleResourceType
547
+ }
548
+
549
+ export interface JStyleResourcePageDTO {
550
+ page?: {
551
+ number?: number
552
+ size?: number
553
+ totalElements?: number
554
+ totalPages?: number
555
+ }
556
+ result?: JStyleResourceDTO[]
557
+ }
558
+
559
+ export interface JStyleResourceTag {
560
+ id: string
561
+ name: string
562
+ }
563
+
564
+ export interface JStyleResource {
565
+ createdBy?: string
566
+ creationDate?: string
567
+ global: boolean
568
+ id: string
569
+ lastModificationDate?: string
570
+ lastModifiedBy?: string
571
+ name: string
572
+ organizationId?: string
573
+ resourceData: string
574
+ resourceType: JStyleResourceType
575
+ tags: JStyleResourceTag[]
576
+ }
577
+
578
+ export interface JStyleResourcePage {
579
+ pageNumber: number
580
+ pageSize: number
581
+ resources: JStyleResource[]
582
+ totalElements: number
583
+ totalPages: number
438
584
  }
439
585
 
440
586
  export interface JDataSourceAdditionalInfo {
@@ -454,32 +600,67 @@ export interface JDataSourceReference {
454
600
 
455
601
  export type JGEOMETRY_TYPES = "POINT" | "CURVE" | "SURFACE" | "ANNOTATION" | "COMPLEX" | "NONE"
456
602
 
457
- export type JStatus = "NOT_READY" | "READY" | "ERROR" | "UPDATING"
603
+ /** Style-rule family, as classified by the backend when the rule is created. */
604
+ export type StyleRuleSpecsType = NonNullable<S["StyleRuleSpecs"]["type"]>
605
+ /** Classification method used to compute class-breaks. */
606
+ export type StyleRuleSpecsMethod = NonNullable<S["StyleRuleSpecs"]["method"]>
607
+
608
+ /**
609
+ * Structured hints stored on the rule root describing how it was built.
610
+ * `type` is required whenever `specs` is present; legacy rules have no `specs`.
611
+ */
612
+ export interface StyleRuleSpecs {
613
+ type: StyleRuleSpecsType
614
+ method?: StyleRuleSpecsMethod
615
+ attributes?: string[]
616
+ }
458
617
 
459
- interface JStyleRule extends JCreationInfo {
618
+ export type StyleRule = JCreationInfo & {
460
619
  id: string
461
620
  name: JMultiLocaleTranslationValue
462
621
  active: boolean
463
- defaultRule: boolean
464
622
  conditions: JRuleCondition[]
623
+ specs?: StyleRuleSpecs
624
+ arrowType?: S["StyleRuleDTO"]["arrowType"]
625
+ arrowConfiguration?: ArrowConfiguration
626
+ extrusionConfiguration?: S["ExtrusionConfigurationDTO"]
627
+ }
628
+
629
+ export type ArrowStyleRule =
630
+ | {
631
+ arrowType: "NONE"
632
+ arrowConfiguration?: ArrowConfiguration
633
+ }
634
+ | {
635
+ arrowType: "FIXED_DIRECTION"
636
+ arrowConfiguration: ArrowConfiguration
637
+ }
638
+ | {
639
+ arrowType: "VARIABLE_DIRECTION"
640
+ arrowConfiguration: ArrowConfiguration
641
+ }
642
+
643
+ export type ArrowConfiguration = {
644
+ arrowDirection?: "FORWARD" | "BACKWARD"
645
+ directionAttribute?: string
646
+ forwardValue?: string | number | null
647
+ backwardValue?: string | number | null
465
648
  }
466
649
 
467
- interface JRuleCondition {
650
+ export interface JRuleCondition {
468
651
  id: string
469
652
  name: JMultiLocaleTranslationValue
470
653
  conditionExpressions: JConditionExpression[]
471
654
  styleMapScales: JStyleMapScale[]
472
655
  }
473
656
 
474
- interface JConditionExpression {
657
+ export interface JConditionExpression {
475
658
  id: string
476
- attribute: JAttribute
477
- operator: JLogicalOperator
659
+ attribute: AttributeDefinition & { id: string }
660
+ operator: NonNullable<components["schemas"]["ConditionExpressionDTO"]["operator"]>
478
661
  value: any
479
662
  }
480
663
 
481
- export type JLogicalOperator = "EMPTY" | "NOT_EMPTY" | "IS_NULL" | "IS_NOT_NULL" | "EQUALS" | "NOT_EQUALS" | "GREATER_THAN" | "GREATER_OR_EQUALS_TO" | "LOWER_THAN" | "LOWER_OR_EQUALS_TO"
482
-
483
664
  interface JStyleMapScale {
484
665
  id: string
485
666
  minimumZoom: number
@@ -487,6 +668,19 @@ interface JStyleMapScale {
487
668
  styleId: string
488
669
  }
489
670
 
671
+ /** Write payload for creating a style rule (full aggregate body). */
672
+ export type StyleRuleWrite = S["ParamCreateStyleRule"]
673
+ /** Write payload for patching a style rule's scalars, incl. `specs`. */
674
+ export type StyleRuleUpdate = S["ParamUpdateStyleRule"]
675
+ /** Write payload for a single rule condition. */
676
+ export type RuleConditionWrite = S["ParamCreateRuleCondition"]
677
+ /** Write payload for replacing the whole condition tree (bulk PUT). */
678
+ export type RuleConditionsWrite = S["ParamReplaceRuleConditions"]
679
+ /** Write payload for patching one rule condition (name-only by design). */
680
+ export type RuleConditionUpdate = S["ParamUpdateRuleCondition"]
681
+ /** Write payload for creating or updating one condition expression. */
682
+ export type ConditionExpressionWrite = S["ParamCreateOrUpdateConditionExpression"]
683
+
490
684
  export type JCardinality = "ONE_TO_ONE" | "ONE_TO_MANY"
491
685
 
492
686
  declare interface JExtent {
@@ -506,13 +700,16 @@ declare interface JRelationshipParams {
506
700
 
507
701
  declare interface JRelationship {
508
702
  id: string
703
+ /** organizationId is the organization id of the referencedDataSourceId */
704
+ organizationId: string
509
705
  referencedDataSourceId: string
510
706
  referencedAttributeName: string
511
707
  referencingDataSourceId: string
708
+ referencingOrganizationId: string
512
709
  referencingAttributeName: string
513
710
  cardinality: JCardinality
514
711
  referencingPrefix: string
515
- referencingAttributes?: JAttribute[]
712
+ referencingAttributes?: DataSourceAttribute[]
516
713
  }
517
714
 
518
715
  /**
@@ -521,9 +718,12 @@ declare interface JRelationship {
521
718
  *
522
719
  */
523
720
 
524
- export type FormComponentKeys = "Label" | "Text" | "Number" | "Boolean" | "Date" | "List" | "Column" | "Row" | "Group" | "Tabs" | "Tab" | "Space" | "Attachment"
721
+ export type FormComponentKeys = "Label" | "Text" | "Number" | "Boolean" | "Date" | "List" | "Column" | "Row" | "Group" | "Tabs" | "Tab" | "Space" | "Attachment" | "Table"
525
722
 
526
- export interface FormSchema {
723
+ // The form's data schema is a narrowed JSON Schema 7 (the exact shape `<JsonForms schema>` consumes).
724
+ // We extend the library type so these stay structurally valid JSON Schema and inherit its field
725
+ // contracts, while pinning the keywords the builder actually edits.
726
+ export interface FormSchema extends JsonSchema7 {
527
727
  type: "object"
528
728
  properties: {
529
729
  [key: string]: FormSchemaProperty
@@ -531,13 +731,8 @@ export interface FormSchema {
531
731
  required: string[]
532
732
  }
533
733
 
534
- export interface FormSchemaProperty {
734
+ export interface FormSchemaProperty extends Pick<JsonSchema7, "format" | "title" | "default" | "minimum" | "maximum"> {
535
735
  type: FORMSCHEMA_TYPES | FORMSCHEMA_TYPES[]
536
- format?: string
537
- title?: string
538
- default?: any
539
- minimum?: number
540
- maximum?: number
541
736
  oneOf?: Array<{ const: string | number | null; title?: string }>
542
737
  }
543
738
 
@@ -546,16 +741,19 @@ export interface JDragPosition {
546
741
  index: number
547
742
  }
548
743
 
549
- interface FormNodeBase {
744
+ // Every node extends JSON Forms' BaseUISchemaElement, so the whole tree is assignable to
745
+ // UISchemaElement (valid `<JsonForms uischema>` input) and inherits `rule` (conditional
746
+ // show/hide) and the `options` bag. We keep the discriminated `type`/`designComponent` and
747
+ // narrow `options` per component, which the form builder relies on.
748
+ interface FormNodeBase extends BaseUISchemaElement {
550
749
  type: string
551
750
  designComponent: FormComponentKeys
552
751
  id: string
553
752
  }
554
753
 
555
- export interface FormNodeControl extends FormNodeBase {
754
+ export interface FormNodeControl extends FormNodeBase, Scoped {
556
755
  type: "Control"
557
756
  title?: string
558
- scope: string
559
757
  options: {
560
758
  readonly: boolean
561
759
  }
@@ -567,6 +765,20 @@ export interface FormNodeAttachment extends FormNodeBase {
567
765
  title?: string
568
766
  }
569
767
 
768
+ export interface FormNodeTable extends FormNodeBase {
769
+ designComponent: "Table"
770
+ type: "Table"
771
+ title?: string
772
+ options: {
773
+ table?: {
774
+ relationshipId: string
775
+ attributeNames: string[]
776
+ attributeNameSorted?: string
777
+ formId?: string
778
+ }
779
+ }
780
+ }
781
+
570
782
  export interface FormNodeLabel extends FormNodeBase {
571
783
  designComponent: "Label"
572
784
  type: "Label"
@@ -590,8 +802,8 @@ export interface FormNodeBoolean extends FormNodeControl {
590
802
  options: FormNodeControl["options"] & {
591
803
  toggle: boolean
592
804
  asBoolean: boolean
593
- checkedValue: string | number | null
594
- uncheckedValue: string | number | null
805
+ checkedValue: string | number | boolean | null
806
+ uncheckedValue: string | number | boolean | null
595
807
  }
596
808
  }
597
809
  export interface FormNodeDate extends FormNodeControl {
@@ -604,7 +816,7 @@ export interface FormNodeList extends FormNodeControl {
604
816
  }
605
817
  }
606
818
 
607
- export interface FormNodeLayout extends FormNodeBase {
819
+ export interface FormNodeLayout extends FormNodeBase, Layout {
608
820
  type: string
609
821
  elements: FormNode[]
610
822
  }
@@ -649,11 +861,11 @@ export interface FormNodeSpace extends FormNodeLayout {
649
861
  export type FormNodesControl = FormNodeText | FormNodeNumber | FormNodeBoolean | FormNodeDate | FormNodeList
650
862
  export type FormNodesLayout = FormNodeVertical | FormNodeHorizontal | FormNodeGroup | FormNodeTabs | FormNodeTab | FormNodeSpace
651
863
 
652
- export type FormNode = FormNodesControl | FormNodesLayout | FormNodeLabel | FormNodeAttachment
864
+ export type FormNode = FormNodesControl | FormNodesLayout | FormNodeLabel | FormNodeAttachment | FormNodeTable
653
865
 
654
866
  export interface JForm extends JCreationInfo {
655
867
  id: string
656
- name: JTranslateParamValues
868
+ name: JMultiLocaleTranslationValue
657
869
  organizationId: string
658
870
  uiSchema: FormNodeVertical
659
871
  formSchema: FormSchema
@@ -661,6 +873,23 @@ export interface JForm extends JCreationInfo {
661
873
  dataSourceId: string
662
874
  }
663
875
 
876
+ export type ReportType = "SIMPLE" | "MULTIPLE"
877
+ export type JReportAssignment = S["ReportAssignmentDTO"] & Required<Pick<S["ReportAssignmentDTO"], "id" | "name">> & { type: ReportType }
878
+
879
+ // MCS report entity: list responses omit the template; the datasource-scoped GET includes it.
880
+ // Repositories choose the type argument to match the endpoint's response.
881
+ export type Report<WithTemplate extends boolean = false> = {
882
+ mapComponent?: S["ReportDTO"]["mapComponent"]
883
+ type: ReportType
884
+ id: string
885
+ name: JMultiLocaleTranslationValue
886
+ organizationId: string
887
+ dataSourceId: string
888
+ creationDate: string
889
+ lastModificationDate: string
890
+ tags: JTag[]
891
+ } & (WithTemplate extends true ? { template: Record<string, unknown> } : { template?: never })
892
+
664
893
  /**
665
894
  *
666
895
 
@@ -768,6 +997,9 @@ export type JAnyFilterCondition =
768
997
  | JBaseFilterConditionAnd
769
998
  | JBaseFilterConditionNot
770
999
 
1000
+ export type JAnyFilterConditionFrontend = Exclude<JAnyFilterCondition, JBaseFilterConditionLike>
1001
+ export type JAnyFilterConditionBackend = Exclude<JAnyFilterCondition, JBaseFilterConditionContains | JBaseFilterConditionStartsWith | JBaseFilterConditionEndsWith>
1002
+
771
1003
  // -----------------------------------------------------------------------------
772
1004
  // Filter composition
773
1005
  // -----------------------------------------------------------------------------
@@ -800,15 +1032,24 @@ export type JDynamicFilterType = "layer" | "table"
800
1032
  export interface JDynamicFilterParams {
801
1033
  id: string
802
1034
  active: boolean
1035
+ resourceId: string
803
1036
  name: JMultiLocaleTranslationValue
804
- filter: JAnyFilterCondition
1037
+ filter: JAnyFilterCondition | string
805
1038
  }
806
1039
 
807
- export interface JDynamicFilterBase<Type extends JDynamicFilterType = JDynamicFilterType> extends JDynamicFilterParams {
808
- type: Type
1040
+ export interface JDynamicFilter extends JDynamicFilterParams {}
1041
+
1042
+ export interface JDynamicFilterDTO {
1043
+ id: string
1044
+ active: boolean
1045
+ resourceId: string
1046
+ name: JMultiLocaleTranslationValue
1047
+ filter: JAnyFilterCondition | string
809
1048
  }
810
1049
 
811
- export type JLayerDynamicFilter = JDynamicFilterBase<"layer">
812
- export type JTableDynamicFilter = JDynamicFilterBase<"table">
1050
+ export interface JDynamicFilterGraphQL extends Omit<JDynamicFilterDTO, "name"> {
1051
+ name: string
1052
+ filter: JAnyFilterCondition | string
1053
+ }
813
1054
 
814
- export type JAnyDynamicFilter = JLayerDynamicFilter | JTableDynamicFilter
1055
+ export type JAnyDynamicFilter = JDynamicFilter | JDynamicFilterGraphQL