@esri/arcgis-rest-feature-service
Advanced tools
Comparing version 4.0.6 to 4.1.0
/* @preserve | ||
* @esri/arcgis-rest-feature-service - v4.0.5 - Apache-2.0 | ||
* @esri/arcgis-rest-feature-service - v4.0.6 - Apache-2.0 | ||
* Copyright (c) 2017-2024 Esri, Inc. | ||
* Sat Jun 15 2024 00:37:55 GMT+0000 (Coordinated Universal Time) | ||
* Tue Dec 17 2024 16:59:01 GMT+0000 (Coordinated Universal Time) | ||
*/ | ||
@@ -69,3 +69,3 @@ import { cleanUrl, appendCustomParams, request } from '@esri/arcgis-rest-request'; | ||
* ```js | ||
* import { addToServiceDefinition } from '@esri/arcgis-rest-service-admin'; | ||
* import { addToServiceDefinition } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -147,3 +147,3 @@ * addToServiceDefinition(serviceurl, { | ||
* addToServiceDefinition | ||
* } from '@esri/arcgis-rest-service-admin'; | ||
* } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -665,3 +665,3 @@ * createFeatureService({ | ||
* ```js | ||
* import { updateServiceDefinition } from '@esri/arcgis-rest-service-admin'; | ||
* import { updateServiceDefinition } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -668,0 +668,0 @@ * updateServiceDefinition(serviceurl, { |
/* @preserve | ||
* @esri/arcgis-rest-feature-service - v4.0.5 - Apache-2.0 | ||
* @esri/arcgis-rest-feature-service - v4.0.6 - Apache-2.0 | ||
* Copyright (c) 2017-2024 Esri, Inc. | ||
* Sat Jun 15 2024 00:37:55 GMT+0000 (Coordinated Universal Time) | ||
* Tue Dec 17 2024 16:59:01 GMT+0000 (Coordinated Universal Time) | ||
*/ | ||
import{cleanUrl as e,appendCustomParams as t,request as r}from"@esri/arcgis-rest-request";import{determineOwner as n,getPortalUrl as s}from"@esri/arcgis-rest-portal";function a(n){const s=`${e(n.url)}/addFeatures`,a=t(n,["features","gdbVersion","returnEditMoment","rollbackOnFailure"],{params:Object.assign({},n.params)});return r(s,a)}function i(t){const n=Object.assign({params:{}},t);return n.params.attachment=t.attachment,r(`${e(n.url)}/${n.featureId}/addAttachment`,n)}function o(t,n){const s=`${e(t).replace("/rest/services","/rest/admin/services")}/addToDefinition`;return n.params=Object.assign({addToDefinition:{}},n.params),n.layers&&n.layers.length>0&&(n.params.addToDefinition.layers=n.layers),n.tables&&n.tables.length>0&&(n.params.addToDefinition.tables=n.tables),r(s,n)}function u(n){const s=`${e(n.url)}/applyEdits`,a=t(n,["adds","updates","deletes","useGlobalIds","attachments","gdbVersion","returnEditMoment","rollbackOnFailure","trueCurveClient"],{params:Object.assign({},n.params)});return r(s,a)}function c(e){return n(e).then((t=>{const n=Object.assign(Object.assign({},e),{rawResponse:!1}),a=`${`${s(e)}/content/users/${t}`}${n.folderId&&"/"!==n.folderId?"/"+n.folderId:""}/createService`;return n.params=Object.assign({createParameters:n.item,outputType:"featureService"},n.params),r(a,n)}))}function l(t){return r(e(t.url),t)}function d(e){let t;return t=e.fields?Promise.resolve(e.fields):l({url:e.url}).then((e=>e.fields)),t.then((t=>{const r=function(e){return e.reduce(((e,t)=>{const r=t.domain;return r&&"codedValue"===r.type&&(e[t.name]=r),e}),{})}(t);if(Object.keys(r).length<1)return e.queryResponse;const n=e.queryResponse.features.map((e=>{const t={};for(const n in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,n))continue;const s=e.attributes[n],a=r[n];t[n]=null!==s&&a?p(s,a):s}return Object.assign(Object.assign({},e),{attributes:t})}));return Object.assign(Object.assign({},e.queryResponse),{features:n})}))}function p(e,t){const r=t.codedValues.find((t=>e===t.code));return r?r.name:e}function m(n){const s=`${e(n.url)}/deleteFeatures`,a=t(n,["where","objectIds","gdbVersion","returnEditMoment","rollbackOnFailure"],{params:Object.assign({},n.params)});return r(s,a)}function f(t){const n=Object.assign({params:{}},t);return n.params.attachmentIds=t.attachmentIds,r(`${e(n.url)}/${n.featureId}/deleteAttachments`,n)}const b=new RegExp(/.+(?:map|feature|image)server/i);function O(t){const r=t.match(b);return r?r[0]:function(t){const r=t.split("?")[0];return e(r)}(t)}function h(e){const{url:t}=e,n=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]])}return r}(e,["url"]),s=`${O(t)}/layers`;return r(s,n)}function g(t){const n=Object.assign({httpMethod:"GET"},t);return r(`${e(n.url)}/${n.featureId}/attachments`,n)}function y(t){return r(e(t.url),t)}function j(e,t){const n=e.replace("/rest/services","/rest/admin/services");return r(n,{authentication:t,params:{f:"json"}})}function $(e,t){return r(`${e}/sources`,{authentication:t})}function I(t){const n=`${e(t.url)}/${t.id}`,s=Object.assign({httpMethod:"GET"},t);return r(n,s).then((e=>s.rawResponse?e:e.feature))}function v(n){const s=t(n,["where","objectIds","relationParam","time","distance","units","outFields","geometry","geometryType","spatialRel","returnGeometry","maxAllowableOffset","geometryPrecision","inSR","outSR","gdbVersion","returnDistinctValues","returnIdsOnly","returnCountOnly","returnExtentOnly","orderByFields","groupByFieldsForStatistics","outStatistics","returnZ","returnM","multipatchOption","resultOffset","resultRecordCount","quantizationParameters","returnCentroid","resultType","historicMoment","returnTrueCurves","sqlFormat","returnExceededLimitFeatures","f"],{httpMethod:"GET",params:Object.assign({where:"1=1",outFields:"*"},n.params)});return r(`${e(n.url)}/query`,s)}function F(n){const s=t(n,["objectIds","relationshipId","definitionExpression","outFields"],{httpMethod:"GET",params:Object.assign({definitionExpression:"1=1",outFields:"*",relationshipId:0},n.params)});return r(`${e(n.url)}/queryRelatedRecords`,s)}function E(n){const s=`${e(n.url)}/updateFeatures`,a=t(n,["features","gdbVersion","returnEditMoment","rollbackOnFailure","trueCurveClient"],{params:Object.assign({},n.params)});return r(s,a)}function R(t){const n=Object.assign({params:{}},t);return n.params.attachment=t.attachment,n.params.attachmentId=t.attachmentId,r(`${e(n.url)}/${n.featureId}/updateAttachment`,n)}function T(t,n){const s=`${e(t).replace("/rest/services","/rest/admin/services")}/updateDefinition`;return n.params=Object.assign({updateDefinition:{}},n.params),n.updateDefinition&&(n.params.updateDefinition=n.updateDefinition),r(s,n)}export{i as addAttachment,a as addFeatures,o as addToServiceDefinition,u as applyEdits,c as createFeatureService,d as decodeValues,f as deleteAttachments,m as deleteFeatures,h as getAllLayersAndTables,g as getAttachments,I as getFeature,l as getLayer,y as getService,j as getServiceAdminInfo,$ as getViewSources,O as parseServiceUrl,v as queryFeatures,F as queryRelated,R as updateAttachment,E as updateFeatures,T as updateServiceDefinition}; | ||
//# sourceMappingURL=feature-service.esm.min.js.map |
/* @preserve | ||
* @esri/arcgis-rest-feature-service - v4.0.5 - Apache-2.0 | ||
* @esri/arcgis-rest-feature-service - v4.0.6 - Apache-2.0 | ||
* Copyright (c) 2017-2024 Esri, Inc. | ||
* Sat Jun 15 2024 00:37:55 GMT+0000 (Coordinated Universal Time) | ||
* Tue Dec 17 2024 16:59:01 GMT+0000 (Coordinated Universal Time) | ||
*/ | ||
@@ -72,3 +72,3 @@ (function (global, factory) { | ||
* ```js | ||
* import { addToServiceDefinition } from '@esri/arcgis-rest-service-admin'; | ||
* import { addToServiceDefinition } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -150,3 +150,3 @@ * addToServiceDefinition(serviceurl, { | ||
* addToServiceDefinition | ||
* } from '@esri/arcgis-rest-service-admin'; | ||
* } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -668,3 +668,3 @@ * createFeatureService({ | ||
* ```js | ||
* import { updateServiceDefinition } from '@esri/arcgis-rest-service-admin'; | ||
* import { updateServiceDefinition } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -671,0 +671,0 @@ * updateServiceDefinition(serviceurl, { |
/* @preserve | ||
* @esri/arcgis-rest-feature-service - v4.0.5 - Apache-2.0 | ||
* @esri/arcgis-rest-feature-service - v4.0.6 - Apache-2.0 | ||
* Copyright (c) 2017-2024 Esri, Inc. | ||
* Sat Jun 15 2024 00:37:55 GMT+0000 (Coordinated Universal Time) | ||
* Tue Dec 17 2024 16:59:01 GMT+0000 (Coordinated Universal Time) | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@esri/arcgis-rest-request"),require("@esri/arcgis-rest-portal")):"function"==typeof define&&define.amd?define(["exports","@esri/arcgis-rest-request","@esri/arcgis-rest-portal"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).arcgisRest=e.arcgisRest||{},e.arcgisRest,e.arcgisRest)}(this,(function(e,t,r){"use strict";function n(e){return t.request(t.cleanUrl(e.url),e)}function s(e,t){const r=t.codedValues.find((t=>e===t.code));return r?r.name:e}const a=new RegExp(/.+(?:map|feature|image)server/i);function i(e){const r=e.match(a);return r?r[0]:function(e){const r=e.split("?")[0];return t.cleanUrl(r)}(e)}e.addAttachment=function(e){const r=Object.assign({params:{}},e);return r.params.attachment=e.attachment,t.request(`${t.cleanUrl(r.url)}/${r.featureId}/addAttachment`,r)},e.addFeatures=function(e){const r=`${t.cleanUrl(e.url)}/addFeatures`,n=t.appendCustomParams(e,["features","gdbVersion","returnEditMoment","rollbackOnFailure"],{params:Object.assign({},e.params)});return t.request(r,n)},e.addToServiceDefinition=function(e,r){const n=`${t.cleanUrl(e).replace("/rest/services","/rest/admin/services")}/addToDefinition`;return r.params=Object.assign({addToDefinition:{}},r.params),r.layers&&r.layers.length>0&&(r.params.addToDefinition.layers=r.layers),r.tables&&r.tables.length>0&&(r.params.addToDefinition.tables=r.tables),t.request(n,r)},e.applyEdits=function(e){const r=`${t.cleanUrl(e.url)}/applyEdits`,n=t.appendCustomParams(e,["adds","updates","deletes","useGlobalIds","attachments","gdbVersion","returnEditMoment","rollbackOnFailure","trueCurveClient"],{params:Object.assign({},e.params)});return t.request(r,n)},e.createFeatureService=function(e){return r.determineOwner(e).then((n=>{const s=Object.assign(Object.assign({},e),{rawResponse:!1}),a=`${`${r.getPortalUrl(e)}/content/users/${n}`}${s.folderId&&"/"!==s.folderId?"/"+s.folderId:""}/createService`;return s.params=Object.assign({createParameters:s.item,outputType:"featureService"},s.params),t.request(a,s)}))},e.decodeValues=function(e){let t;return t=e.fields?Promise.resolve(e.fields):n({url:e.url}).then((e=>e.fields)),t.then((t=>{const r=function(e){return e.reduce(((e,t)=>{const r=t.domain;return r&&"codedValue"===r.type&&(e[t.name]=r),e}),{})}(t);if(Object.keys(r).length<1)return e.queryResponse;const n=e.queryResponse.features.map((e=>{const t={};for(const n in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,n))continue;const a=e.attributes[n],i=r[n];t[n]=null!==a&&i?s(a,i):a}return Object.assign(Object.assign({},e),{attributes:t})}));return Object.assign(Object.assign({},e.queryResponse),{features:n})}))},e.deleteAttachments=function(e){const r=Object.assign({params:{}},e);return r.params.attachmentIds=e.attachmentIds,t.request(`${t.cleanUrl(r.url)}/${r.featureId}/deleteAttachments`,r)},e.deleteFeatures=function(e){const r=`${t.cleanUrl(e.url)}/deleteFeatures`,n=t.appendCustomParams(e,["where","objectIds","gdbVersion","returnEditMoment","rollbackOnFailure"],{params:Object.assign({},e.params)});return t.request(r,n)},e.getAllLayersAndTables=function(e){const{url:r}=e,n=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]])}return r}(e,["url"]),s=`${i(r)}/layers`;return t.request(s,n)},e.getAttachments=function(e){const r=Object.assign({httpMethod:"GET"},e);return t.request(`${t.cleanUrl(r.url)}/${r.featureId}/attachments`,r)},e.getFeature=function(e){const r=`${t.cleanUrl(e.url)}/${e.id}`,n=Object.assign({httpMethod:"GET"},e);return t.request(r,n).then((e=>n.rawResponse?e:e.feature))},e.getLayer=n,e.getService=function(e){return t.request(t.cleanUrl(e.url),e)},e.getServiceAdminInfo=function(e,r){const n=e.replace("/rest/services","/rest/admin/services");return t.request(n,{authentication:r,params:{f:"json"}})},e.getViewSources=function(e,r){return t.request(`${e}/sources`,{authentication:r})},e.parseServiceUrl=i,e.queryFeatures=function(e){const r=t.appendCustomParams(e,["where","objectIds","relationParam","time","distance","units","outFields","geometry","geometryType","spatialRel","returnGeometry","maxAllowableOffset","geometryPrecision","inSR","outSR","gdbVersion","returnDistinctValues","returnIdsOnly","returnCountOnly","returnExtentOnly","orderByFields","groupByFieldsForStatistics","outStatistics","returnZ","returnM","multipatchOption","resultOffset","resultRecordCount","quantizationParameters","returnCentroid","resultType","historicMoment","returnTrueCurves","sqlFormat","returnExceededLimitFeatures","f"],{httpMethod:"GET",params:Object.assign({where:"1=1",outFields:"*"},e.params)});return t.request(`${t.cleanUrl(e.url)}/query`,r)},e.queryRelated=function(e){const r=t.appendCustomParams(e,["objectIds","relationshipId","definitionExpression","outFields"],{httpMethod:"GET",params:Object.assign({definitionExpression:"1=1",outFields:"*",relationshipId:0},e.params)});return t.request(`${t.cleanUrl(e.url)}/queryRelatedRecords`,r)},e.updateAttachment=function(e){const r=Object.assign({params:{}},e);return r.params.attachment=e.attachment,r.params.attachmentId=e.attachmentId,t.request(`${t.cleanUrl(r.url)}/${r.featureId}/updateAttachment`,r)},e.updateFeatures=function(e){const r=`${t.cleanUrl(e.url)}/updateFeatures`,n=t.appendCustomParams(e,["features","gdbVersion","returnEditMoment","rollbackOnFailure","trueCurveClient"],{params:Object.assign({},e.params)});return t.request(r,n)},e.updateServiceDefinition=function(e,r){const n=`${t.cleanUrl(e).replace("/rest/services","/rest/admin/services")}/updateDefinition`;return r.params=Object.assign({updateDefinition:{}},r.params),r.updateDefinition&&(r.params.updateDefinition=r.updateDefinition),t.request(n,r)},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=feature-service.umd.min.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
* ```js | ||
* import { addToServiceDefinition } from '@esri/arcgis-rest-service-admin'; | ||
* import { addToServiceDefinition } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -14,0 +14,0 @@ * addToServiceDefinition(serviceurl, { |
@@ -15,3 +15,3 @@ "use strict"; | ||
* addToServiceDefinition | ||
* } from '@esri/arcgis-rest-service-admin'; | ||
* } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -18,0 +18,0 @@ * createFeatureService({ |
@@ -11,3 +11,3 @@ "use strict"; | ||
* ```js | ||
* import { updateServiceDefinition } from '@esri/arcgis-rest-service-admin'; | ||
* import { updateServiceDefinition } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -14,0 +14,0 @@ * updateServiceDefinition(serviceurl, { |
@@ -26,3 +26,3 @@ import { IUserRequestOptions } from "@esri/arcgis-rest-request"; | ||
* ```js | ||
* import { addToServiceDefinition } from '@esri/arcgis-rest-service-admin'; | ||
* import { addToServiceDefinition } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -29,0 +29,0 @@ * addToServiceDefinition(serviceurl, { |
@@ -8,3 +8,3 @@ /* Copyright (c) 2018-2019 Environmental Systems Research Institute, Inc. | ||
* ```js | ||
* import { addToServiceDefinition } from '@esri/arcgis-rest-service-admin'; | ||
* import { addToServiceDefinition } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -11,0 +11,0 @@ * addToServiceDefinition(serviceurl, { |
@@ -88,2 +88,11 @@ import { IExtent, ISpatialReference } from "@esri/arcgis-rest-request"; | ||
folderId?: string; | ||
/** | ||
* If true, the service is overwritten. The default value is false. | ||
*/ | ||
overwrite?: boolean; | ||
/** | ||
* Specifies if the request is generating a location tracking view. A view can only be | ||
* created if there is already a Location Tracking Service that has been created. | ||
*/ | ||
isView?: boolean; | ||
} | ||
@@ -135,3 +144,3 @@ export interface ICreateServiceResult { | ||
* addToServiceDefinition | ||
* } from '@esri/arcgis-rest-service-admin'; | ||
* } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -138,0 +147,0 @@ * createFeatureService({ |
@@ -12,3 +12,3 @@ /* Copyright (c) 2018-2019 Environmental Systems Research Institute, Inc. | ||
* addToServiceDefinition | ||
* } from '@esri/arcgis-rest-service-admin'; | ||
* } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -15,0 +15,0 @@ * createFeatureService({ |
@@ -210,3 +210,2 @@ import { IRequestOptions, GeometryType, IGeometry, ISpatialReference, IHasZM, IExtent, IField, IFeature } from "@esri/arcgis-rest-request"; | ||
* ```js | ||
* import { IFeatureServiceDefinition } from "@esri/arcgis-rest-service-admin"; | ||
* import { IFeatureServiceDefinition } from "@esri/arcgis-rest-feature-service"; | ||
@@ -316,8 +315,2 @@ * ``` | ||
* Root element in the web map specifying an array of table objects. | ||
* | ||
* `ITable` can also be imported from the following packages: | ||
* | ||
* ```js | ||
* import { ITable } from "@esri-arcgis-rest-service-admin" | ||
* ``` | ||
*/ | ||
@@ -548,10 +541,2 @@ export interface ITable { | ||
} | ||
/** | ||
* `ILayerDefinition` can also be imported from the following packages: | ||
* | ||
* ```js | ||
* import { ILayerDefinition } from "@esri/arcgis-rest-service-admin"; | ||
* import { ILayerDefinition } from "@esri/arcgis-rest-feature-service"; | ||
* ``` | ||
*/ | ||
export interface ILayerDefinition extends IHasZM { | ||
@@ -558,0 +543,0 @@ /** Boolean value indicating whether the geometry of the features in the layer can be edited. */ |
@@ -13,3 +13,3 @@ import { IUserRequestOptions } from "@esri/arcgis-rest-request"; | ||
* ```js | ||
* import { updateServiceDefinition } from '@esri/arcgis-rest-service-admin'; | ||
* import { updateServiceDefinition } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -16,0 +16,0 @@ * updateServiceDefinition(serviceurl, { |
@@ -8,3 +8,3 @@ /* Copyright (c) 2018-2019 Environmental Systems Research Institute, Inc. | ||
* ```js | ||
* import { updateServiceDefinition } from '@esri/arcgis-rest-service-admin'; | ||
* import { updateServiceDefinition } from '@esri/arcgis-rest-feature-service'; | ||
* // | ||
@@ -11,0 +11,0 @@ * updateServiceDefinition(serviceurl, { |
{ | ||
"name": "@esri/arcgis-rest-feature-service", | ||
"version": "4.0.6", | ||
"version": "4.1.0", | ||
"description": "Feature layer query and edit helpers for @esri/arcgis-rest-js", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
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
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
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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
700541
4336