@esri/arcgis-rest-feature-service
Advanced tools
Comparing version 1.14.4 to 1.15.0
@@ -38,3 +38,3 @@ import { IRequestOptions } from "@esri/arcgis-rest-request"; | ||
* // | ||
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0"; | ||
* const url = `https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0` | ||
* queryFeatures({ url }) | ||
@@ -41,0 +41,0 @@ * .then(queryResponse => { |
@@ -9,3 +9,3 @@ /* Copyright (c) 2018 Environmental Systems Research Institute, Inc. | ||
* // | ||
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0"; | ||
* const url = `https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0` | ||
* queryFeatures({ url }) | ||
@@ -12,0 +12,0 @@ * .then(queryResponse => { |
@@ -11,3 +11,3 @@ "use strict"; | ||
* // | ||
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0"; | ||
* const url = `https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0` | ||
* queryFeatures({ url }) | ||
@@ -14,0 +14,0 @@ * .then(queryResponse => { |
/* @preserve | ||
* @esri/arcgis-rest-feature-service - v1.14.4 - Apache-2.0 | ||
* @esri/arcgis-rest-feature-service - v1.15.0 - Apache-2.0 | ||
* Copyright (c) 2017-2019 Esri, Inc. | ||
* Fri Jan 11 2019 13:02:58 GMT-0800 (Pacific Standard Time) | ||
* Wed Jan 16 2019 23:47:49 GMT-0800 (Pacific Standard Time) | ||
*/ | ||
@@ -345,3 +345,3 @@ (function (global, factory) { | ||
* // | ||
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0"; | ||
* const url = `https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0` | ||
* queryFeatures({ url }) | ||
@@ -348,0 +348,0 @@ * .then(queryResponse => { |
/* @preserve | ||
* @esri/arcgis-rest-feature-service - v1.14.4 - Apache-2.0 | ||
* @esri/arcgis-rest-feature-service - v1.15.0 - Apache-2.0 | ||
* Copyright (c) 2017-2019 Esri, Inc. | ||
* Fri Jan 11 2019 13:03:04 GMT-0800 (Pacific Standard Time) | ||
* Wed Jan 16 2019 23:47:57 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})}); | ||
//# sourceMappingURL=feature-service.umd.min.js.map |
{ | ||
"name": "@esri/arcgis-rest-feature-service", | ||
"version": "1.14.4", | ||
"version": "1.15.0", | ||
"description": "Feature service helpers for @esri/arcgis-rest-request", | ||
@@ -18,11 +18,12 @@ "main": "dist/node/index.js", | ||
"devDependencies": { | ||
"@esri/arcgis-rest-common-types": "^1.15.0", | ||
"@esri/arcgis-rest-request": "^1.15.0" | ||
}, | ||
"peerDependencies": { | ||
"@esri/arcgis-rest-common-types": "^1.14.4", | ||
"@esri/arcgis-rest-request": "^1.14.4" | ||
}, | ||
"peerDependencies": { | ||
"@esri/arcgis-rest-common-types": "^1.14.1", | ||
"@esri/arcgis-rest-request": "^1.14.1" | ||
}, | ||
"scripts": { | ||
"prepare": "npm run build", | ||
"prebuild": "rimraf dist", | ||
"build": "npm run build:node && npm run build:umd && npm run build:esm", | ||
@@ -29,0 +30,0 @@ "build:esm": "tsc -p ./tsconfig.json --module es2015 --outDir ./dist/esm --declaration", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171835