Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@esri/arcgis-rest-feature-service

Package Overview
Dependencies
Maintainers
17
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@esri/arcgis-rest-feature-service - npm Package Compare versions

Comparing version 1.16.1 to 1.17.0

6

dist/esm/query.d.ts

@@ -82,5 +82,5 @@ import { IRequestOptions } from "@esri/arcgis-rest-request";

* import { getFeature } from '@esri/arcgis-rest-feature-service';
*
* //
* const url = "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0";
*
* //
* getFeature({

@@ -96,3 +96,3 @@ * url,

* @param requestOptions - Options for the request
* @returns A Promise that will resolve with the feature.
* @returns A Promise that will resolve with the feature or the [response](https://developer.mozilla.org/en-US/docs/Web/API/Response) itself if `rawResponse: true` was passed in.
*/

@@ -99,0 +99,0 @@ export declare function getFeature(requestOptions: IFeatureRequestOptions): Promise<IFeature>;

@@ -8,5 +8,5 @@ /* Copyright (c) 2017-2018 Environmental Systems Research Institute, Inc.

* import { getFeature } from '@esri/arcgis-rest-feature-service';
*
* //
* const url = "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0";
*
* //
* getFeature({

@@ -22,3 +22,3 @@ * url,

* @param requestOptions - Options for the request
* @returns A Promise that will resolve with the feature.
* @returns A Promise that will resolve with the feature or the [response](https://developer.mozilla.org/en-US/docs/Web/API/Response) itself if `rawResponse: true` was passed in.
*/

@@ -29,3 +29,8 @@ export function getFeature(requestOptions) {

var options = tslib_1.__assign({ httpMethod: "GET" }, requestOptions);
return request(url, options).then(function (response) { return response.feature; });
return request(url, options).then(function (response) {
if (options.rawResponse) {
return response;
}
return response.feature;
});
}

@@ -32,0 +37,0 @@ /**

@@ -10,5 +10,5 @@ "use strict";

* import { getFeature } from '@esri/arcgis-rest-feature-service';
*
* //
* const url = "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0";
*
* //
* getFeature({

@@ -24,3 +24,3 @@ * url,

* @param requestOptions - Options for the request
* @returns A Promise that will resolve with the feature.
* @returns A Promise that will resolve with the feature or the [response](https://developer.mozilla.org/en-US/docs/Web/API/Response) itself if `rawResponse: true` was passed in.
*/

@@ -31,3 +31,8 @@ function getFeature(requestOptions) {

var options = tslib_1.__assign({ httpMethod: "GET" }, requestOptions);
return arcgis_rest_request_1.request(url, options).then(function (response) { return response.feature; });
return arcgis_rest_request_1.request(url, options).then(function (response) {
if (options.rawResponse) {
return response;
}
return response.feature;
});
}

@@ -34,0 +39,0 @@ exports.getFeature = getFeature;

/* @preserve
* @esri/arcgis-rest-feature-service - v1.16.1 - Apache-2.0
* @esri/arcgis-rest-feature-service - v1.17.0 - Apache-2.0
* Copyright (c) 2017-2019 Esri, Inc.
* Wed Jan 30 2019 11:33:33 GMT-0800 (Pacific Standard Time)
* Mon Feb 25 2019 11:04:56 GMT-0800 (Pacific Standard Time)
*/

@@ -43,5 +43,5 @@ (function (global, factory) {

* import { getFeature } from '@esri/arcgis-rest-feature-service';
*
* //
* const url = "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0";
*
* //
* getFeature({

@@ -57,3 +57,3 @@ * url,

* @param requestOptions - Options for the request
* @returns A Promise that will resolve with the feature.
* @returns A Promise that will resolve with the feature or the [response](https://developer.mozilla.org/en-US/docs/Web/API/Response) itself if `rawResponse: true` was passed in.
*/

@@ -64,3 +64,8 @@ function getFeature(requestOptions) {

var options = __assign({ httpMethod: "GET" }, requestOptions);
return arcgisRestRequest.request(url, options).then(function (response) { return response.feature; });
return arcgisRestRequest.request(url, options).then(function (response) {
if (options.rawResponse) {
return response;
}
return response.feature;
});
}

@@ -67,0 +72,0 @@ /**

/* @preserve
* @esri/arcgis-rest-feature-service - v1.16.1 - Apache-2.0
* @esri/arcgis-rest-feature-service - v1.17.0 - Apache-2.0
* Copyright (c) 2017-2019 Esri, Inc.
* Wed Jan 30 2019 11:33:39 GMT-0800 (Pacific Standard Time)
* Mon Feb 25 2019 11:04:59 GMT-0800 (Pacific Standard Time)
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@esri/arcgis-rest-request")):"function"==typeof define&&define.amd?define(["exports","@esri/arcgis-rest-request"],t):t(e.arcgisRest=e.arcgisRest||{},e.arcgisRest)}(this,function(e,t){"use strict";var a=function(){return(a=Object.assign||function(e){for(var t,a=1,r=arguments.length;a<r;a++)for(var s in t=arguments[a])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function r(e,a){return t.request(t.cleanUrl(e),a)}function s(e,t){var a=t.codedValues.find(function(t){return e===t.code});return a?a.name:e}e.getFeature=function(e){var r=t.cleanUrl(e.url)+"/"+e.id,s=a({httpMethod:"GET"},e);return t.request(r,s).then(function(e){return e.feature})},e.queryFeatures=function(e){var r=a({params:{},httpMethod:"GET",url:e.url},e);return t.appendCustomParams(e,r),r.params.where||(r.params.where="1=1"),r.params.outFields||(r.params.outFields="*"),t.request(t.cleanUrl(r.url)+"/query",r)},e.addFeatures=function(e){var r=t.cleanUrl(e.url)+"/addFeatures",s=a({params:{}},e);return t.appendCustomParams(e,s),s.params.adds&&s.params.adds.length&&(s.params.features=e.adds,delete s.params.adds,t.warn("The `adds` parameter is deprecated and will be removed in a future release. Please use `features` instead.")),t.request(r,s)},e.updateFeatures=function(e){var r=t.cleanUrl(e.url)+"/updateFeatures",s=a({params:{}},e);return t.appendCustomParams(e,s),s.params.updates&&s.params.updates.length&&(s.params.features=e.updates,delete s.params.updates,t.warn("The `updates` parameter is deprecated and will be removed in a future release. Please use `features` instead.")),t.request(r,s)},e.deleteFeatures=function(e){var r=t.cleanUrl(e.url)+"/deleteFeatures",s=a({params:{}},e);return t.appendCustomParams(e,s),s.params.deletes&&s.params.deletes.length&&(s.params.objectIds=e.deletes,delete s.params.deletes,t.warn("The `deletes` parameter is deprecated and will be removed in a future release. Please use `objectIds` instead.")),t.request(r,s)},e.getAttachments=function(e){return t.request(t.cleanUrl(e.url)+"/"+e.featureId+"/attachments",e)},e.addAttachment=function(e){var r=a({params:{}},e);return r.params.attachment=e.attachment,t.request(t.cleanUrl(r.url)+"/"+r.featureId+"/addAttachment",r)},e.updateAttachment=function(e){var r=a({params:{}},e);return r.params.attachment=e.attachment,r.params.attachmentId=e.attachmentId,t.request(t.cleanUrl(r.url)+"/"+r.featureId+"/updateAttachment",r)},e.deleteAttachments=function(e){var r=a({params:{}},e);return r.params.attachmentIds=e.attachmentIds,t.request(t.cleanUrl(r.url)+"/"+r.featureId+"/deleteAttachments",r)},e.queryRelated=function(e){var r=a({params:{},httpMethod:"GET",url:e.url},e);return t.appendCustomParams(e,r),r.params.definitionExpression||(r.params.definitionExpression="1=1"),r.params.outFields||(r.params.outFields="*"),r.params.relationshipId||(r.params.relationshipId=0),t.request(t.cleanUrl(r.url)+"/queryRelatedRecords",r)},e.getLayer=r,e.decodeValues=function(e){return new Promise(function(t){if(!e.fields)return r(e.url,e).then(function(a){t(e.fields=a.fields)});t(e.fields)}).then(function(t){var r=function(e){return e.reduce(function(e,t){var a=t.domain;return a&&"codedValue"===a.type&&(e[t.name]=a),e},{})}(t);if(Object.keys(r).length<1)return e.queryResponse;var n=e.queryResponse.features.map(function(e){var t={};for(var n in e.attributes)if(e.attributes.hasOwnProperty(n)){var u=e.attributes[n],d=r[n];t[n]=null!==u&&d?s(u,d):u}return a({},e,{attributes:t})});return a({},e.queryResponse,{features:n})})},Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@esri/arcgis-rest-request")):"function"==typeof define&&define.amd?define(["exports","@esri/arcgis-rest-request"],t):t(e.arcgisRest=e.arcgisRest||{},e.arcgisRest)}(this,function(e,t){"use strict";var a=function(){return(a=Object.assign||function(e){for(var t,a=1,r=arguments.length;a<r;a++)for(var s in t=arguments[a])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function r(e,a){return t.request(t.cleanUrl(e),a)}function s(e,t){var a=t.codedValues.find(function(t){return e===t.code});return a?a.name:e}e.getFeature=function(e){var r=t.cleanUrl(e.url)+"/"+e.id,s=a({httpMethod:"GET"},e);return t.request(r,s).then(function(e){return s.rawResponse?e:e.feature})},e.queryFeatures=function(e){var r=a({params:{},httpMethod:"GET",url:e.url},e);return t.appendCustomParams(e,r),r.params.where||(r.params.where="1=1"),r.params.outFields||(r.params.outFields="*"),t.request(t.cleanUrl(r.url)+"/query",r)},e.addFeatures=function(e){var r=t.cleanUrl(e.url)+"/addFeatures",s=a({params:{}},e);return t.appendCustomParams(e,s),s.params.adds&&s.params.adds.length&&(s.params.features=e.adds,delete s.params.adds,t.warn("The `adds` parameter is deprecated and will be removed in a future release. Please use `features` instead.")),t.request(r,s)},e.updateFeatures=function(e){var r=t.cleanUrl(e.url)+"/updateFeatures",s=a({params:{}},e);return t.appendCustomParams(e,s),s.params.updates&&s.params.updates.length&&(s.params.features=e.updates,delete s.params.updates,t.warn("The `updates` parameter is deprecated and will be removed in a future release. Please use `features` instead.")),t.request(r,s)},e.deleteFeatures=function(e){var r=t.cleanUrl(e.url)+"/deleteFeatures",s=a({params:{}},e);return t.appendCustomParams(e,s),s.params.deletes&&s.params.deletes.length&&(s.params.objectIds=e.deletes,delete s.params.deletes,t.warn("The `deletes` parameter is deprecated and will be removed in a future release. Please use `objectIds` instead.")),t.request(r,s)},e.getAttachments=function(e){return t.request(t.cleanUrl(e.url)+"/"+e.featureId+"/attachments",e)},e.addAttachment=function(e){var r=a({params:{}},e);return r.params.attachment=e.attachment,t.request(t.cleanUrl(r.url)+"/"+r.featureId+"/addAttachment",r)},e.updateAttachment=function(e){var r=a({params:{}},e);return r.params.attachment=e.attachment,r.params.attachmentId=e.attachmentId,t.request(t.cleanUrl(r.url)+"/"+r.featureId+"/updateAttachment",r)},e.deleteAttachments=function(e){var r=a({params:{}},e);return r.params.attachmentIds=e.attachmentIds,t.request(t.cleanUrl(r.url)+"/"+r.featureId+"/deleteAttachments",r)},e.queryRelated=function(e){var r=a({params:{},httpMethod:"GET",url:e.url},e);return t.appendCustomParams(e,r),r.params.definitionExpression||(r.params.definitionExpression="1=1"),r.params.outFields||(r.params.outFields="*"),r.params.relationshipId||(r.params.relationshipId=0),t.request(t.cleanUrl(r.url)+"/queryRelatedRecords",r)},e.getLayer=r,e.decodeValues=function(e){return new Promise(function(t){if(!e.fields)return r(e.url,e).then(function(a){t(e.fields=a.fields)});t(e.fields)}).then(function(t){var r=function(e){return e.reduce(function(e,t){var a=t.domain;return a&&"codedValue"===a.type&&(e[t.name]=a),e},{})}(t);if(Object.keys(r).length<1)return e.queryResponse;var n=e.queryResponse.features.map(function(e){var t={};for(var n in e.attributes)if(e.attributes.hasOwnProperty(n)){var u=e.attributes[n],d=r[n];t[n]=null!==u&&d?s(u,d):u}return a({},e,{attributes:t})});return a({},e.queryResponse,{features:n})})},Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=feature-service.umd.min.js.map
{
"name": "@esri/arcgis-rest-feature-service",
"version": "1.16.1",
"version": "1.17.0",
"description": "Feature service helpers for @esri/arcgis-rest-request",

@@ -15,11 +15,11 @@ "main": "dist/node/index.js",

"dependencies": {
"tslib": "^1.7.1"
"tslib": "^1.9.3"
},
"devDependencies": {
"@esri/arcgis-rest-common-types": "^1.16.1",
"@esri/arcgis-rest-request": "^1.16.1"
"@esri/arcgis-rest-common-types": "^1.17.0",
"@esri/arcgis-rest-request": "^1.17.0"
},
"peerDependencies": {
"@esri/arcgis-rest-common-types": "^1.16.0",
"@esri/arcgis-rest-request": "^1.16.0"
"@esri/arcgis-rest-common-types": "^1.17.0",
"@esri/arcgis-rest-request": "^1.17.0"
},

@@ -26,0 +26,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc