jmapserver-ng-core-types 2.0.1 → 2.0.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/index.ts CHANGED
@@ -841,6 +841,7 @@ export interface JLayerService {
841
841
  exists(layerId: JId): boolean
842
842
  attributeExists(layerId: JId, attributeName: string): boolean
843
843
  getById(layerId: JId): JLayerTreeElement
844
+ getLayerAttributesWithStatistics(layerId: JId): Promise<JLayerAttribute[]>
844
845
  getSelfOrChildren(layerId: JId): JLayer[]
845
846
  getName(layerId: JId): string
846
847
  getDescription(layerId: JId): string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmapserver-ng-core-types",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "JMap Server specific version of JMap Server NG Core types and interfaces",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/public/core.d.ts CHANGED
@@ -1789,6 +1789,21 @@ declare namespace JMap {
1789
1789
  */
1790
1790
  function getById(layerId: JId): JLayerTreeElement
1791
1791
 
1792
+ /**
1793
+ * **JMap.Layer.getLayerAttributesWithStatistics**
1794
+ *
1795
+ * Returns the layer's attributes with their statistics.
1796
+ *
1797
+ * @throws Error if no layer found for the id
1798
+ * @param layerId The JMap layer id
1799
+ * @example ```ts
1800
+ *
1801
+ * // returns the attributes of layer id=3 with their statistics
1802
+ * JMap.Layer.getLayerAttributesWithStatistics(3)
1803
+ * ```
1804
+ */
1805
+ function getLayerAttributesWithStatistics(layerId: JId): Promise<JLayerAttribute[]>
1806
+
1792
1807
  /**
1793
1808
  * **JMap.Layer.getSelfOrChildren**
1794
1809
  *
@@ -6399,9 +6414,7 @@ declare namespace JMap {
6399
6414
  * /*
6400
6415
  * ```
6401
6416
  */
6402
- function getPasswordPolicyCompliance(
6403
- password: string
6404
- ): JJMapPasswordPolicyCompliance
6417
+ function getPasswordPolicyCompliance(password: string): JJMapPasswordPolicyCompliance
6405
6418
 
6406
6419
  /**
6407
6420
  * ***JMap.User.isPseudoUser***
@@ -347,8 +347,18 @@ declare interface JLayerAttribute {
347
347
  name: string
348
348
  label: string
349
349
  type: JLAYER_ATTRIBUTE_TYPES
350
+ attributeStatistics: JLayerAttributeStatistics | null
350
351
  }
351
352
 
353
+ declare interface JLayerAttributeStatistics {
354
+ tooManyUniqueValues: boolean
355
+ uniqueValues?: any[]
356
+ minimumValue?: number
357
+ maximumValue?: number
358
+ sum?: number
359
+ average?: number
360
+ standardDeviation?: number
361
+ }
352
362
  declare interface JLayerTreeElement {
353
363
  id: JId
354
364
  name: string