Esri / arcgis-rest-js

compact, modular JavaScript wrappers for the ArcGIS REST API
https://developers.arcgis.com/arcgis-rest-js/
Apache License 2.0
353 stars 121 forks source link

"aggregate" types missing from the IStatisticDefinition #1043

Closed pemberdom closed 1 year ago

pemberdom commented 1 year ago

Describe the bug

The three "aggregate" types envelope-aggregate, centroid-aggregate and convex-hull-aggregate which are part of the StatisticDefinition.statisticType enum are missing from the typings @esri/arcgis-rest-types:

    /**
     * Statistical operation to perform (count, sum, min, max, avg, stddev, var, percentile_cont, percentile_disc).
     */
    statisticType: "count" | "sum" | "min" | "max" | "avg" | "stddev" | "var" | "percentile_cont" | "percentile_disc";

Is it possible to add them? Thanks!

Reproduction

Pull the latest version @esri/arcgis-rest-types, see the IStatisticDefinition.statisticType not matching the latest StatisticDefinition.statisticType

Logs

No response

System Info

v3.5.1

Additional Information

No response

gavinr commented 1 year ago

Thanks for the report! I think those are listed here: https://github.com/Esri/arcgis-rest-js/blob/86c1e60301065528cd9d21485e8a9d6c8aca8882/packages/arcgis-rest-feature-service/src/helpers.ts#L120-L129

I see the new ones (envelope-aggregate, centroid-aggregate and convex-hull-aggregate) listed in the JS API documentation that you referenced (thanks!), but I don't see them listed in the REST API documentation:

https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer-.htm

image

... I wonder if that's something we need to get added to the REST doc.

pemberdom commented 1 year ago

Hey there, any news regarding adding the missing aggregation types in IStatisticDefinition? Thanks!

gavinr commented 1 year ago

@pemberdom thanks for the reminder. We're working to get the REST API documentation updated.

gavinr-maps commented 1 year ago

These have been added in #1114 and will be included in the next release.

pemberdom commented 12 months ago

Hi @gavinr @gavinr-maps I still don't see them in the v3.7.0 of @esri/arcgis-rest-types, is it coming up soon?

gavinr-maps commented 12 months ago

Hm, it looks like v3.7.0 was released on 9/7 (https://www.npmjs.com/package/@esri/arcgis-rest-types?activeTab=versions), and the PR #1114 was merged on 8/8, so I would think it should be in there. Where are you looking (which file and line number)?

pemberdom commented 12 months ago

Hm, it looks like v3.7.0 was released on 9/7 (https://www.npmjs.com/package/@esri/arcgis-rest-types?activeTab=versions), and the PR #1114 was merged on 8/8, so I would think it should be in there. Where are you looking (which file and line number)?

I look at it through VSC in the node_modules but it's also visible on npm via the Code tab, following this path: /@esri/arcgis-rest-types/dist/types/statisticDefinition.d.ts

export interface IStatisticDefinition {
    /**
     * Statistical operation to perform (count, sum, min, max, avg, stddev, var, percentile_cont, percentile_disc).
     */
    statisticType: "count" | "sum" | "min" | "max" | "avg" | "stddev" | "var" | "percentile_cont" | "percentile_disc";
gavinr-maps commented 6 months ago

As of ArcGIS REST JS v4, the package @esri/arcgis-rest-types has been deprecated. See here: https://developers.arcgis.com/arcgis-rest-js/release-notes/upgrade-v3-v4/#streamlining-packages image

For this issue #1043, have made this change for ArcGIS REST JS v4, you can see the change if you look at line 127 here: https://unpkg.com/browse/@esri/arcgis-rest-feature-service@4.0.5/dist/esm/helpers.d.ts