jmapcloud-types 0.0.1 → 2.0.23-qa.9

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