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
6
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 4.0.0-beta.3 to 4.0.0-beta.4

65

dist/bundled/feature-service.esm.js
/* @preserve
* @esri/arcgis-rest-feature-service - v4.0.0-beta.2 - Apache-2.0
* @esri/arcgis-rest-feature-service - v4.0.0-beta.5 - Apache-2.0
* Copyright (c) 2017-2022 Esri, Inc.
* Thu Mar 10 2022 23:21:10 GMT+0000 (Coordinated Universal Time)
* Tue May 10 2022 02:53:32 GMT+0000 (Coordinated Universal Time)
*/

@@ -12,2 +12,4 @@ import { cleanUrl, appendCustomParams, request } from '@esri/arcgis-rest-request';

/**
* Add features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-features.htm) for more information.
*
* ```js

@@ -25,3 +27,2 @@ * import { addFeatures } from '@esri/arcgis-rest-feature-service';

* ```
* Add features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-features.htm) for more information.
*

@@ -41,2 +42,4 @@ * @param requestOptions - Options for the request.

/**
* Attach a file to a feature by id. See [Add Attachment](https://developers.arcgis.com/rest/services-reference/add-attachment.htm) for more information.
*
* ```js

@@ -52,3 +55,2 @@ * import { addAttachment } from '@esri/arcgis-rest-feature-service';

* ```
* Attach a file to a feature by id. See [Add Attachment](https://developers.arcgis.com/rest/services-reference/add-attachment.htm) for more information.
*

@@ -68,3 +70,5 @@ * @param requestOptions - Options for the request.

/**
* ```js
* Add layer(s) and/or table(s) to a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-to-definition-feature-service-.htm) for more information.
*
* ```js
* import { addToServiceDefinition } from '@esri/arcgis-rest-service-admin';

@@ -78,3 +82,2 @@ * //

* ```
* Add layer(s) and/or table(s) to a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-to-definition-feature-service-.htm) for more information.
*

@@ -101,2 +104,4 @@ * @param url - URL of feature service

/**
* Apply edits request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/apply-edits-feature-service-layer-.htm) for more information.
*
* ```js

@@ -118,3 +123,2 @@ * import { applyEdits } from '@esri/arcgis-rest-feature-service';

* ```
* Apply edits request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/apply-edits-feature-service-layer-.htm) for more information.
*

@@ -144,2 +148,4 @@ * @param requestOptions - Options for the request.

/**
* Create a new [hosted feature service](https://developers.arcgis.com/rest/users-groups-and-items/create-service.htm). After the service has been created, call [`addToServiceDefinition()`](../addToServiceDefinition/) if you'd like to update it's schema.
*
* ```js

@@ -159,3 +165,3 @@ * import {

* ```
* Create a new [hosted feature service](https://developers.arcgis.com/rest/users-groups-and-items/create-service.htm). After the service has been created, call [`addToServiceDefinition()`](../addToServiceDefinition/) if you'd like to update it's schema.
*
* @param requestOptions - Options for the request. NOTE: `rawResponse` is not supported by this operation.

@@ -181,2 +187,4 @@ * @returns A Promise that resolves with service details once the service has been created

/**
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*
* ```js

@@ -190,3 +198,2 @@ * import { getLayer } from '@esri/arcgis-rest-feature-service';

* ```
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*

@@ -277,2 +284,4 @@ * @param options - Options for the request.

/**
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*
* ```js

@@ -286,3 +295,2 @@ * import { deleteFeatures } from '@esri/arcgis-rest-feature-service';

* ```
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*

@@ -308,2 +316,4 @@ * @param deleteFeaturesRequestOptions - Options for the request.

/**
* Delete existing attachment files of a feature by id. See [Delete Attachments](https://developers.arcgis.com/rest/services-reference/delete-attachments.htm) for more information.
*
* ```js

@@ -318,3 +328,2 @@ * import { deleteAttachments } from '@esri/arcgis-rest-feature-service';

* ```
* Delete existing attachment files of a feature by id. See [Delete Attachments](https://developers.arcgis.com/rest/services-reference/delete-attachments.htm) for more information.
*

@@ -379,2 +388,5 @@ * @param requestOptions - Options for the request.

/**
* * Fetches all the layers and tables associated with a given layer service.
* Wrapper for https://developers.arcgis.com/rest/services-reference/all-layers-and-tables.htm
*
* ```js

@@ -387,4 +399,2 @@ * import { getAllLayersAndTables } from '@esri/arcgis-rest-feature-service';

* ```
* Fetches all the layers and tables associated with a given layer service.
* Wrapper for https://developers.arcgis.com/rest/services-reference/all-layers-and-tables.htm
*

@@ -404,2 +414,4 @@ * @param options - Request options, including the url for the layer service

/**
* Request `attachmentInfos` of a feature by id. See [Attachment Infos](https://developers.arcgis.com/rest/services-reference/attachment-infos-feature-service-.htm) for more information.
*
* ```js

@@ -413,3 +425,2 @@ * import { getAttachments } from '@esri/arcgis-rest-feature-service';

* ```
* Request `attachmentInfos` of a feature by id. See [Attachment Infos](https://developers.arcgis.com/rest/services-reference/attachment-infos-feature-service-.htm) for more information.
*

@@ -428,2 +439,4 @@ * @param requestOptions - Options for the request.

/**
* Feature Service request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/feature-service.htm) for more information.
*
* ```js

@@ -437,3 +450,2 @@ * import { getService } from '@esri/arcgis-rest-feature-service';

* ```
* Feature Service request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/feature-service.htm) for more information.
*

@@ -486,7 +498,9 @@ * @param options - Options for the request.

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

@@ -499,3 +513,2 @@ * url,

* ```
* Get a feature by id.
*

@@ -517,5 +530,7 @@ * @param requestOptions - Options for the request

/**
* Query a feature service. See [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) for more information.
*
* ```js
* import { queryFeatures } from '@esri/arcgis-rest-feature-service';
* //
*
* queryFeatures({

@@ -527,3 +542,2 @@ * url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3",

* ```
* Query a feature service. See [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) for more information.
*

@@ -583,6 +597,7 @@ * @param requestOptions - Options for the request

/**
* Query the related records for a feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-related-records-feature-service-.htm) for more information.
*
* ```js
* import { queryRelated } from '@esri/arcgis-rest-feature-service'
* //
*
* queryRelated({

@@ -595,3 +610,2 @@ * url: "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0",

* ```
* Query the related records for a feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-related-records-feature-service-.htm) for more information.
*

@@ -614,2 +628,3 @@ * @param requestOptions

/**
* Update features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-features.htm) for more information.
*

@@ -627,3 +642,2 @@ * ```js

* ```
* Update features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-features.htm) for more information.
*

@@ -649,2 +663,3 @@ * @param requestOptions - Options for the request.

/**
* Update a related attachment to a feature by id. See [Update Attachment](https://developers.arcgis.com/rest/services-reference/update-attachment.htm) for more information.
*

@@ -661,3 +676,2 @@ * ```js

* ```
* Update a related attachment to a feature by id. See [Update Attachment](https://developers.arcgis.com/rest/services-reference/update-attachment.htm) for more information.
*

@@ -678,2 +692,4 @@ * @param requestOptions - Options for the request.

/**
* Update a definition property in a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-definition-feature-service-.htm) for more information.
*
* ```js

@@ -687,3 +703,2 @@ * import { updateServiceDefinition } from '@esri/arcgis-rest-service-admin';

* ```
* Update a definition property in a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-definition-feature-service-.htm) for more information.
*

@@ -690,0 +705,0 @@ * @param url - URL of feature service

/* @preserve
* @esri/arcgis-rest-feature-service - v4.0.0-beta.2 - Apache-2.0
* @esri/arcgis-rest-feature-service - v4.0.0-beta.5 - Apache-2.0
* Copyright (c) 2017-2022 Esri, Inc.
* Thu Mar 10 2022 23:21:10 GMT+0000 (Coordinated Universal Time)
* Tue May 10 2022 02:53:32 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.0-beta.2 - Apache-2.0
* @esri/arcgis-rest-feature-service - v4.0.0-beta.5 - Apache-2.0
* Copyright (c) 2017-2022 Esri, Inc.
* Thu Mar 10 2022 23:21:10 GMT+0000 (Coordinated Universal Time)
* Tue May 10 2022 02:53:32 GMT+0000 (Coordinated Universal Time)
*/

@@ -15,2 +15,4 @@ (function (global, factory) {

/**
* Add features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-features.htm) for more information.
*
* ```js

@@ -28,3 +30,2 @@ * import { addFeatures } from '@esri/arcgis-rest-feature-service';

* ```
* Add features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-features.htm) for more information.
*

@@ -44,2 +45,4 @@ * @param requestOptions - Options for the request.

/**
* Attach a file to a feature by id. See [Add Attachment](https://developers.arcgis.com/rest/services-reference/add-attachment.htm) for more information.
*
* ```js

@@ -55,3 +58,2 @@ * import { addAttachment } from '@esri/arcgis-rest-feature-service';

* ```
* Attach a file to a feature by id. See [Add Attachment](https://developers.arcgis.com/rest/services-reference/add-attachment.htm) for more information.
*

@@ -71,3 +73,5 @@ * @param requestOptions - Options for the request.

/**
* ```js
* Add layer(s) and/or table(s) to a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-to-definition-feature-service-.htm) for more information.
*
* ```js
* import { addToServiceDefinition } from '@esri/arcgis-rest-service-admin';

@@ -81,3 +85,2 @@ * //

* ```
* Add layer(s) and/or table(s) to a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-to-definition-feature-service-.htm) for more information.
*

@@ -104,2 +107,4 @@ * @param url - URL of feature service

/**
* Apply edits request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/apply-edits-feature-service-layer-.htm) for more information.
*
* ```js

@@ -121,3 +126,2 @@ * import { applyEdits } from '@esri/arcgis-rest-feature-service';

* ```
* Apply edits request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/apply-edits-feature-service-layer-.htm) for more information.
*

@@ -147,2 +151,4 @@ * @param requestOptions - Options for the request.

/**
* Create a new [hosted feature service](https://developers.arcgis.com/rest/users-groups-and-items/create-service.htm). After the service has been created, call [`addToServiceDefinition()`](../addToServiceDefinition/) if you'd like to update it's schema.
*
* ```js

@@ -162,3 +168,3 @@ * import {

* ```
* Create a new [hosted feature service](https://developers.arcgis.com/rest/users-groups-and-items/create-service.htm). After the service has been created, call [`addToServiceDefinition()`](../addToServiceDefinition/) if you'd like to update it's schema.
*
* @param requestOptions - Options for the request. NOTE: `rawResponse` is not supported by this operation.

@@ -184,2 +190,4 @@ * @returns A Promise that resolves with service details once the service has been created

/**
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*
* ```js

@@ -193,3 +201,2 @@ * import { getLayer } from '@esri/arcgis-rest-feature-service';

* ```
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*

@@ -280,2 +287,4 @@ * @param options - Options for the request.

/**
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*
* ```js

@@ -289,3 +298,2 @@ * import { deleteFeatures } from '@esri/arcgis-rest-feature-service';

* ```
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*

@@ -311,2 +319,4 @@ * @param deleteFeaturesRequestOptions - Options for the request.

/**
* Delete existing attachment files of a feature by id. See [Delete Attachments](https://developers.arcgis.com/rest/services-reference/delete-attachments.htm) for more information.
*
* ```js

@@ -321,3 +331,2 @@ * import { deleteAttachments } from '@esri/arcgis-rest-feature-service';

* ```
* Delete existing attachment files of a feature by id. See [Delete Attachments](https://developers.arcgis.com/rest/services-reference/delete-attachments.htm) for more information.
*

@@ -382,2 +391,5 @@ * @param requestOptions - Options for the request.

/**
* * Fetches all the layers and tables associated with a given layer service.
* Wrapper for https://developers.arcgis.com/rest/services-reference/all-layers-and-tables.htm
*
* ```js

@@ -390,4 +402,2 @@ * import { getAllLayersAndTables } from '@esri/arcgis-rest-feature-service';

* ```
* Fetches all the layers and tables associated with a given layer service.
* Wrapper for https://developers.arcgis.com/rest/services-reference/all-layers-and-tables.htm
*

@@ -407,2 +417,4 @@ * @param options - Request options, including the url for the layer service

/**
* Request `attachmentInfos` of a feature by id. See [Attachment Infos](https://developers.arcgis.com/rest/services-reference/attachment-infos-feature-service-.htm) for more information.
*
* ```js

@@ -416,3 +428,2 @@ * import { getAttachments } from '@esri/arcgis-rest-feature-service';

* ```
* Request `attachmentInfos` of a feature by id. See [Attachment Infos](https://developers.arcgis.com/rest/services-reference/attachment-infos-feature-service-.htm) for more information.
*

@@ -431,2 +442,4 @@ * @param requestOptions - Options for the request.

/**
* Feature Service request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/feature-service.htm) for more information.
*
* ```js

@@ -440,3 +453,2 @@ * import { getService } from '@esri/arcgis-rest-feature-service';

* ```
* Feature Service request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/feature-service.htm) for more information.
*

@@ -489,7 +501,9 @@ * @param options - Options for the request.

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

@@ -502,3 +516,2 @@ * url,

* ```
* Get a feature by id.
*

@@ -520,5 +533,7 @@ * @param requestOptions - Options for the request

/**
* Query a feature service. See [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) for more information.
*
* ```js
* import { queryFeatures } from '@esri/arcgis-rest-feature-service';
* //
*
* queryFeatures({

@@ -530,3 +545,2 @@ * url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3",

* ```
* Query a feature service. See [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) for more information.
*

@@ -586,6 +600,7 @@ * @param requestOptions - Options for the request

/**
* Query the related records for a feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-related-records-feature-service-.htm) for more information.
*
* ```js
* import { queryRelated } from '@esri/arcgis-rest-feature-service'
* //
*
* queryRelated({

@@ -598,3 +613,2 @@ * url: "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0",

* ```
* Query the related records for a feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-related-records-feature-service-.htm) for more information.
*

@@ -617,2 +631,3 @@ * @param requestOptions

/**
* Update features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-features.htm) for more information.
*

@@ -630,3 +645,2 @@ * ```js

* ```
* Update features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-features.htm) for more information.
*

@@ -652,2 +666,3 @@ * @param requestOptions - Options for the request.

/**
* Update a related attachment to a feature by id. See [Update Attachment](https://developers.arcgis.com/rest/services-reference/update-attachment.htm) for more information.
*

@@ -664,3 +679,2 @@ * ```js

* ```
* Update a related attachment to a feature by id. See [Update Attachment](https://developers.arcgis.com/rest/services-reference/update-attachment.htm) for more information.
*

@@ -681,2 +695,4 @@ * @param requestOptions - Options for the request.

/**
* Update a definition property in a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-definition-feature-service-.htm) for more information.
*
* ```js

@@ -690,3 +706,2 @@ * import { updateServiceDefinition } from '@esri/arcgis-rest-service-admin';

* ```
* Update a definition property in a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-definition-feature-service-.htm) for more information.
*

@@ -693,0 +708,0 @@ * @param url - URL of feature service

/* @preserve
* @esri/arcgis-rest-feature-service - v4.0.0-beta.2 - Apache-2.0
* @esri/arcgis-rest-feature-service - v4.0.0-beta.5 - Apache-2.0
* Copyright (c) 2017-2022 Esri, Inc.
* Thu Mar 10 2022 23:21:10 GMT+0000 (Coordinated Universal Time)
* Tue May 10 2022 02:53:32 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

@@ -8,2 +8,4 @@ "use strict";

/**
* Add features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-features.htm) for more information.
*
* ```js

@@ -21,3 +23,2 @@ * import { addFeatures } from '@esri/arcgis-rest-feature-service';

* ```
* Add features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-features.htm) for more information.
*

@@ -24,0 +25,0 @@ * @param requestOptions - Options for the request.

@@ -8,2 +8,4 @@ "use strict";

/**
* Attach a file to a feature by id. See [Add Attachment](https://developers.arcgis.com/rest/services-reference/add-attachment.htm) for more information.
*
* ```js

@@ -19,3 +21,2 @@ * import { addAttachment } from '@esri/arcgis-rest-feature-service';

* ```
* Attach a file to a feature by id. See [Add Attachment](https://developers.arcgis.com/rest/services-reference/add-attachment.htm) for more information.
*

@@ -22,0 +23,0 @@ * @param requestOptions - Options for the request.

@@ -8,3 +8,5 @@ "use strict";

/**
* ```js
* Add layer(s) and/or table(s) to a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-to-definition-feature-service-.htm) for more information.
*
* ```js
* import { addToServiceDefinition } from '@esri/arcgis-rest-service-admin';

@@ -18,3 +20,2 @@ * //

* ```
* Add layer(s) and/or table(s) to a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-to-definition-feature-service-.htm) for more information.
*

@@ -21,0 +22,0 @@ * @param url - URL of feature service

@@ -8,2 +8,4 @@ "use strict";

/**
* Apply edits request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/apply-edits-feature-service-layer-.htm) for more information.
*
* ```js

@@ -25,3 +27,2 @@ * import { applyEdits } from '@esri/arcgis-rest-feature-service';

* ```
* Apply edits request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/apply-edits-feature-service-layer-.htm) for more information.
*

@@ -28,0 +29,0 @@ * @param requestOptions - Options for the request.

@@ -9,2 +9,4 @@ "use strict";

/**
* Create a new [hosted feature service](https://developers.arcgis.com/rest/users-groups-and-items/create-service.htm). After the service has been created, call [`addToServiceDefinition()`](../addToServiceDefinition/) if you'd like to update it's schema.
*
* ```js

@@ -24,3 +26,3 @@ * import {

* ```
* Create a new [hosted feature service](https://developers.arcgis.com/rest/users-groups-and-items/create-service.htm). After the service has been created, call [`addToServiceDefinition()`](../addToServiceDefinition/) if you'd like to update it's schema.
*
* @param requestOptions - Options for the request. NOTE: `rawResponse` is not supported by this operation.

@@ -27,0 +29,0 @@ * @returns A Promise that resolves with service details once the service has been created

@@ -8,2 +8,4 @@ "use strict";

/**
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*
* ```js

@@ -17,3 +19,2 @@ * import { deleteFeatures } from '@esri/arcgis-rest-feature-service';

* ```
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*

@@ -20,0 +21,0 @@ * @param deleteFeaturesRequestOptions - Options for the request.

@@ -8,2 +8,4 @@ "use strict";

/**
* Delete existing attachment files of a feature by id. See [Delete Attachments](https://developers.arcgis.com/rest/services-reference/delete-attachments.htm) for more information.
*
* ```js

@@ -18,3 +20,2 @@ * import { deleteAttachments } from '@esri/arcgis-rest-feature-service';

* ```
* Delete existing attachment files of a feature by id. See [Delete Attachments](https://developers.arcgis.com/rest/services-reference/delete-attachments.htm) for more information.
*

@@ -21,0 +22,0 @@ * @param requestOptions - Options for the request.

@@ -8,2 +8,5 @@ "use strict";

/**
* * Fetches all the layers and tables associated with a given layer service.
* Wrapper for https://developers.arcgis.com/rest/services-reference/all-layers-and-tables.htm
*
* ```js

@@ -16,4 +19,2 @@ * import { getAllLayersAndTables } from '@esri/arcgis-rest-feature-service';

* ```
* Fetches all the layers and tables associated with a given layer service.
* Wrapper for https://developers.arcgis.com/rest/services-reference/all-layers-and-tables.htm
*

@@ -20,0 +21,0 @@ * @param options - Request options, including the url for the layer service

@@ -8,2 +8,4 @@ "use strict";

/**
* Request `attachmentInfos` of a feature by id. See [Attachment Infos](https://developers.arcgis.com/rest/services-reference/attachment-infos-feature-service-.htm) for more information.
*
* ```js

@@ -17,3 +19,2 @@ * import { getAttachments } from '@esri/arcgis-rest-feature-service';

* ```
* Request `attachmentInfos` of a feature by id. See [Attachment Infos](https://developers.arcgis.com/rest/services-reference/attachment-infos-feature-service-.htm) for more information.
*

@@ -20,0 +21,0 @@ * @param requestOptions - Options for the request.

@@ -8,2 +8,4 @@ "use strict";

/**
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*
* ```js

@@ -17,3 +19,2 @@ * import { getLayer } from '@esri/arcgis-rest-feature-service';

* ```
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*

@@ -20,0 +21,0 @@ * @param options - Options for the request.

@@ -8,2 +8,4 @@ "use strict";

/**
* Feature Service request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/feature-service.htm) for more information.
*
* ```js

@@ -17,3 +19,2 @@ * import { getService } from '@esri/arcgis-rest-feature-service';

* ```
* Feature Service request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/feature-service.htm) for more information.
*

@@ -20,0 +21,0 @@ * @param options - Options for the request.

@@ -8,7 +8,9 @@ "use strict";

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

@@ -21,3 +23,2 @@ * url,

* ```
* Get a feature by id.
*

@@ -40,5 +41,7 @@ * @param requestOptions - Options for the request

/**
* Query a feature service. See [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) for more information.
*
* ```js
* import { queryFeatures } from '@esri/arcgis-rest-feature-service';
* //
*
* queryFeatures({

@@ -50,3 +53,2 @@ * url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3",

* ```
* Query a feature service. See [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) for more information.
*

@@ -53,0 +55,0 @@ * @param requestOptions - Options for the request

@@ -8,6 +8,7 @@ "use strict";

/**
* Query the related records for a feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-related-records-feature-service-.htm) for more information.
*
* ```js
* import { queryRelated } from '@esri/arcgis-rest-feature-service'
* //
*
* queryRelated({

@@ -20,3 +21,2 @@ * url: "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0",

* ```
* Query the related records for a feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-related-records-feature-service-.htm) for more information.
*

@@ -23,0 +23,0 @@ * @param requestOptions

@@ -8,2 +8,3 @@ "use strict";

/**
* Update features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-features.htm) for more information.
*

@@ -21,3 +22,2 @@ * ```js

* ```
* Update features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-features.htm) for more information.
*

@@ -24,0 +24,0 @@ * @param requestOptions - Options for the request.

@@ -8,2 +8,3 @@ "use strict";

/**
* Update a related attachment to a feature by id. See [Update Attachment](https://developers.arcgis.com/rest/services-reference/update-attachment.htm) for more information.
*

@@ -20,3 +21,2 @@ * ```js

* ```
* Update a related attachment to a feature by id. See [Update Attachment](https://developers.arcgis.com/rest/services-reference/update-attachment.htm) for more information.
*

@@ -23,0 +23,0 @@ * @param requestOptions - Options for the request.

@@ -8,2 +8,4 @@ "use strict";

/**
* Update a definition property in a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-definition-feature-service-.htm) for more information.
*
* ```js

@@ -17,3 +19,2 @@ * import { updateServiceDefinition } from '@esri/arcgis-rest-service-admin';

* ```
* Update a definition property in a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-definition-feature-service-.htm) for more information.
*

@@ -20,0 +21,0 @@ * @param url - URL of feature service

@@ -14,2 +14,4 @@ import { IFeature } from "@esri/arcgis-rest-request";

/**
* Add features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-features.htm) for more information.
*
* ```js

@@ -27,3 +29,2 @@ * import { addFeatures } from '@esri/arcgis-rest-feature-service';

* ```
* Add features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-features.htm) for more information.
*

@@ -30,0 +31,0 @@ * @param requestOptions - Options for the request.

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

/**
* Add features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-features.htm) for more information.
*
* ```js

@@ -18,3 +20,2 @@ * import { addFeatures } from '@esri/arcgis-rest-feature-service';

* ```
* Add features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-features.htm) for more information.
*

@@ -21,0 +22,0 @@ * @param requestOptions - Options for the request.

@@ -17,2 +17,4 @@ import { IGetLayerOptions, IEditFeatureResult } from "./helpers.js";

/**
* Attach a file to a feature by id. See [Add Attachment](https://developers.arcgis.com/rest/services-reference/add-attachment.htm) for more information.
*
* ```js

@@ -28,3 +30,2 @@ * import { addAttachment } from '@esri/arcgis-rest-feature-service';

* ```
* Attach a file to a feature by id. See [Add Attachment](https://developers.arcgis.com/rest/services-reference/add-attachment.htm) for more information.
*

@@ -31,0 +32,0 @@ * @param requestOptions - Options for the request.

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

/**
* Attach a file to a feature by id. See [Add Attachment](https://developers.arcgis.com/rest/services-reference/add-attachment.htm) for more information.
*
* ```js

@@ -16,3 +18,2 @@ * import { addAttachment } from '@esri/arcgis-rest-feature-service';

* ```
* Attach a file to a feature by id. See [Add Attachment](https://developers.arcgis.com/rest/services-reference/add-attachment.htm) for more information.
*

@@ -19,0 +20,0 @@ * @param requestOptions - Options for the request.

@@ -23,3 +23,5 @@ import { IUserRequestOptions } from "@esri/arcgis-rest-request";

/**
* ```js
* Add layer(s) and/or table(s) to a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-to-definition-feature-service-.htm) for more information.
*
* ```js
* import { addToServiceDefinition } from '@esri/arcgis-rest-service-admin';

@@ -33,3 +35,2 @@ * //

* ```
* Add layer(s) and/or table(s) to a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-to-definition-feature-service-.htm) for more information.
*

@@ -36,0 +37,0 @@ * @param url - URL of feature service

/* Copyright (c) 2018-2019 Environmental Systems Research Institute, Inc.
* Apache-2.0 */
import { request, cleanUrl, } from "@esri/arcgis-rest-request";
import { request, cleanUrl } from "@esri/arcgis-rest-request";
/**
* ```js
* Add layer(s) and/or table(s) to a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-to-definition-feature-service-.htm) for more information.
*
* ```js
* import { addToServiceDefinition } from '@esri/arcgis-rest-service-admin';

@@ -14,3 +16,2 @@ * //

* ```
* Add layer(s) and/or table(s) to a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-to-definition-feature-service-.htm) for more information.
*

@@ -17,0 +18,0 @@ * @param url - URL of feature service

@@ -39,2 +39,4 @@ import { IFeature } from "@esri/arcgis-rest-request";

/**
* Apply edits request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/apply-edits-feature-service-layer-.htm) for more information.
*
* ```js

@@ -56,3 +58,2 @@ * import { applyEdits } from '@esri/arcgis-rest-feature-service';

* ```
* Apply edits request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/apply-edits-feature-service-layer-.htm) for more information.
*

@@ -59,0 +60,0 @@ * @param requestOptions - Options for the request.

@@ -5,2 +5,4 @@ /* Copyright (c) 2017-2019 Environmental Systems Research Institute, Inc.

/**
* Apply edits request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/apply-edits-feature-service-layer-.htm) for more information.
*
* ```js

@@ -22,3 +24,2 @@ * import { applyEdits } from '@esri/arcgis-rest-feature-service';

* ```
* Apply edits request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/apply-edits-feature-service-layer-.htm) for more information.
*

@@ -25,0 +26,0 @@ * @param requestOptions - Options for the request.

@@ -128,2 +128,4 @@ import { IExtent, ISpatialReference } from "@esri/arcgis-rest-request";

/**
* Create a new [hosted feature service](https://developers.arcgis.com/rest/users-groups-and-items/create-service.htm). After the service has been created, call [`addToServiceDefinition()`](../addToServiceDefinition/) if you'd like to update it's schema.
*
* ```js

@@ -143,3 +145,3 @@ * import {

* ```
* Create a new [hosted feature service](https://developers.arcgis.com/rest/users-groups-and-items/create-service.htm). After the service has been created, call [`addToServiceDefinition()`](../addToServiceDefinition/) if you'd like to update it's schema.
*
* @param requestOptions - Options for the request. NOTE: `rawResponse` is not supported by this operation.

@@ -146,0 +148,0 @@ * @returns A Promise that resolves with service details once the service has been created

@@ -6,2 +6,4 @@ /* Copyright (c) 2018-2019 Environmental Systems Research Institute, Inc.

/**
* Create a new [hosted feature service](https://developers.arcgis.com/rest/users-groups-and-items/create-service.htm). After the service has been created, call [`addToServiceDefinition()`](../addToServiceDefinition/) if you'd like to update it's schema.
*
* ```js

@@ -21,3 +23,3 @@ * import {

* ```
* Create a new [hosted feature service](https://developers.arcgis.com/rest/users-groups-and-items/create-service.htm). After the service has been created, call [`addToServiceDefinition()`](../addToServiceDefinition/) if you'd like to update it's schema.
*
* @param requestOptions - Options for the request. NOTE: `rawResponse` is not supported by this operation.

@@ -24,0 +26,0 @@ * @returns A Promise that resolves with service details once the service has been created

@@ -13,2 +13,4 @@ import { ISharedEditOptions, IEditFeatureResult, ISharedQueryOptions } from "./helpers.js";

/**
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*
* ```js

@@ -22,3 +24,2 @@ * import { deleteFeatures } from '@esri/arcgis-rest-feature-service';

* ```
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*

@@ -25,0 +26,0 @@ * @param deleteFeaturesRequestOptions - Options for the request.

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

/**
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*
* ```js

@@ -14,3 +16,2 @@ * import { deleteFeatures } from '@esri/arcgis-rest-feature-service';

* ```
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*

@@ -17,0 +18,0 @@ * @param deleteFeaturesRequestOptions - Options for the request.

@@ -17,2 +17,4 @@ import { IGetLayerOptions, IEditFeatureResult } from "./helpers.js";

/**
* Delete existing attachment files of a feature by id. See [Delete Attachments](https://developers.arcgis.com/rest/services-reference/delete-attachments.htm) for more information.
*
* ```js

@@ -27,3 +29,2 @@ * import { deleteAttachments } from '@esri/arcgis-rest-feature-service';

* ```
* Delete existing attachment files of a feature by id. See [Delete Attachments](https://developers.arcgis.com/rest/services-reference/delete-attachments.htm) for more information.
*

@@ -30,0 +31,0 @@ * @param requestOptions - Options for the request.

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

/**
* Delete existing attachment files of a feature by id. See [Delete Attachments](https://developers.arcgis.com/rest/services-reference/delete-attachments.htm) for more information.
*
* ```js

@@ -15,3 +17,2 @@ * import { deleteAttachments } from '@esri/arcgis-rest-feature-service';

* ```
* Delete existing attachment files of a feature by id. See [Delete Attachments](https://developers.arcgis.com/rest/services-reference/delete-attachments.htm) for more information.
*

@@ -18,0 +19,0 @@ * @param requestOptions - Options for the request.

@@ -7,2 +7,5 @@ import { IGetLayerOptions, ILayerDefinition } from "./helpers.js";

/**
* * Fetches all the layers and tables associated with a given layer service.
* Wrapper for https://developers.arcgis.com/rest/services-reference/all-layers-and-tables.htm
*
* ```js

@@ -15,4 +18,2 @@ * import { getAllLayersAndTables } from '@esri/arcgis-rest-feature-service';

* ```
* Fetches all the layers and tables associated with a given layer service.
* Wrapper for https://developers.arcgis.com/rest/services-reference/all-layers-and-tables.htm
*

@@ -19,0 +20,0 @@ * @param options - Request options, including the url for the layer service

@@ -5,2 +5,5 @@ import { __rest } from "tslib";

/**
* * Fetches all the layers and tables associated with a given layer service.
* Wrapper for https://developers.arcgis.com/rest/services-reference/all-layers-and-tables.htm
*
* ```js

@@ -13,4 +16,2 @@ * import { getAllLayersAndTables } from '@esri/arcgis-rest-feature-service';

* ```
* Fetches all the layers and tables associated with a given layer service.
* Wrapper for https://developers.arcgis.com/rest/services-reference/all-layers-and-tables.htm
*

@@ -17,0 +18,0 @@ * @param options - Request options, including the url for the layer service

@@ -22,2 +22,4 @@ import { IGetLayerOptions } from "./helpers.js";

/**
* Request `attachmentInfos` of a feature by id. See [Attachment Infos](https://developers.arcgis.com/rest/services-reference/attachment-infos-feature-service-.htm) for more information.
*
* ```js

@@ -31,3 +33,2 @@ * import { getAttachments } from '@esri/arcgis-rest-feature-service';

* ```
* Request `attachmentInfos` of a feature by id. See [Attachment Infos](https://developers.arcgis.com/rest/services-reference/attachment-infos-feature-service-.htm) for more information.
*

@@ -34,0 +35,0 @@ * @param requestOptions - Options for the request.

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

/**
* Request `attachmentInfos` of a feature by id. See [Attachment Infos](https://developers.arcgis.com/rest/services-reference/attachment-infos-feature-service-.htm) for more information.
*
* ```js

@@ -14,3 +16,2 @@ * import { getAttachments } from '@esri/arcgis-rest-feature-service';

* ```
* Request `attachmentInfos` of a feature by id. See [Attachment Infos](https://developers.arcgis.com/rest/services-reference/attachment-infos-feature-service-.htm) for more information.
*

@@ -17,0 +18,0 @@ * @param requestOptions - Options for the request.

import { IGetLayerOptions, ILayerDefinition } from "./helpers.js";
/**
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*
* ```js

@@ -11,3 +13,2 @@ * import { getLayer } from '@esri/arcgis-rest-feature-service';

* ```
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*

@@ -14,0 +15,0 @@ * @param options - Options for the request.

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

/**
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*
* ```js

@@ -14,3 +16,2 @@ * import { getLayer } from '@esri/arcgis-rest-feature-service';

* ```
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*

@@ -17,0 +18,0 @@ * @param options - Options for the request.

import { IGetLayerOptions, IFeatureServiceDefinition } from "./helpers.js";
/**
* Feature Service request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/feature-service.htm) for more information.
*
* ```js

@@ -11,3 +13,2 @@ * import { getService } from '@esri/arcgis-rest-feature-service';

* ```
* Feature Service request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/feature-service.htm) for more information.
*

@@ -14,0 +15,0 @@ * @param options - Options for the request.

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

/**
* Feature Service request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/feature-service.htm) for more information.
*
* ```js

@@ -14,3 +16,2 @@ * import { getService } from '@esri/arcgis-rest-feature-service';

* ```
* Feature Service request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/feature-service.htm) for more information.
*

@@ -17,0 +18,0 @@ * @param options - Options for the request.

@@ -67,7 +67,9 @@ import { ISpatialReference, IFeatureSet, IFeature, Units, IExtent } from "@esri/arcgis-rest-request";

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

@@ -80,3 +82,2 @@ * url,

* ```
* Get a feature by id.
*

@@ -88,5 +89,7 @@ * @param requestOptions - Options for the request

/**
* Query a feature service. See [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) for more information.
*
* ```js
* import { queryFeatures } from '@esri/arcgis-rest-feature-service';
* //
*
* queryFeatures({

@@ -98,3 +101,2 @@ * url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3",

* ```
* Query a feature service. See [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) for more information.
*

@@ -101,0 +103,0 @@ * @param requestOptions - Options for the request

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

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

@@ -18,3 +20,2 @@ * url,

* ```
* Get a feature by id.
*

@@ -36,5 +37,7 @@ * @param requestOptions - Options for the request

/**
* Query a feature service. See [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) for more information.
*
* ```js
* import { queryFeatures } from '@esri/arcgis-rest-feature-service';
* //
*
* queryFeatures({

@@ -46,3 +49,2 @@ * url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3",

* ```
* Query a feature service. See [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) for more information.
*

@@ -49,0 +51,0 @@ * @param requestOptions - Options for the request

import { ISpatialReference, IFeature, IHasZM, GeometryType, IField } from "@esri/arcgis-rest-request";
import { IGetLayerOptions } from "./helpers.js";
/**
* Related record query request options. Additional arguments can be passed via the [params](/arcgis-rest-js/api/feature-service/IQueryRelatedOptions/#params) property. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-related-feature-service-.htm) for more information and a full list of parameters.
* Related record query request options. Additional arguments can be passed via the {@linkcode IQueryRelatedOptions.params} property. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-related-feature-service-.htm) for more information and a full list of parameters.
*/

@@ -30,6 +30,7 @@ export interface IQueryRelatedOptions extends IGetLayerOptions {

/**
* Query the related records for a feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-related-records-feature-service-.htm) for more information.
*
* ```js
* import { queryRelated } from '@esri/arcgis-rest-feature-service'
* //
*
* queryRelated({

@@ -42,3 +43,2 @@ * url: "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0",

* ```
* Query the related records for a feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-related-records-feature-service-.htm) for more information.
*

@@ -45,0 +45,0 @@ * @param requestOptions

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

/**
* Query the related records for a feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-related-records-feature-service-.htm) for more information.
*
* ```js
* import { queryRelated } from '@esri/arcgis-rest-feature-service'
* //
*
* queryRelated({

@@ -17,3 +18,2 @@ * url: "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0",

* ```
* Query the related records for a feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-related-records-feature-service-.htm) for more information.
*

@@ -20,0 +20,0 @@ * @param requestOptions

@@ -18,2 +18,3 @@ import { IFeature } from "@esri/arcgis-rest-request";

/**
* Update features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-features.htm) for more information.
*

@@ -31,3 +32,2 @@ * ```js

* ```
* Update features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-features.htm) for more information.
*

@@ -34,0 +34,0 @@ * @param requestOptions - Options for the request.

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

/**
* Update features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-features.htm) for more information.
*

@@ -18,3 +19,2 @@ * ```js

* ```
* Update features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-features.htm) for more information.
*

@@ -21,0 +21,0 @@ * @param requestOptions - Options for the request.

@@ -21,2 +21,3 @@ import { IGetLayerOptions, IEditFeatureResult } from "./helpers.js";

/**
* Update a related attachment to a feature by id. See [Update Attachment](https://developers.arcgis.com/rest/services-reference/update-attachment.htm) for more information.
*

@@ -33,3 +34,2 @@ * ```js

* ```
* Update a related attachment to a feature by id. See [Update Attachment](https://developers.arcgis.com/rest/services-reference/update-attachment.htm) for more information.
*

@@ -36,0 +36,0 @@ * @param requestOptions - Options for the request.

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

/**
* Update a related attachment to a feature by id. See [Update Attachment](https://developers.arcgis.com/rest/services-reference/update-attachment.htm) for more information.
*

@@ -17,3 +18,2 @@ * ```js

* ```
* Update a related attachment to a feature by id. See [Update Attachment](https://developers.arcgis.com/rest/services-reference/update-attachment.htm) for more information.
*

@@ -20,0 +20,0 @@ * @param requestOptions - Options for the request.

@@ -10,2 +10,4 @@ import { IUserRequestOptions } from "@esri/arcgis-rest-request";

/**
* Update a definition property in a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-definition-feature-service-.htm) for more information.
*
* ```js

@@ -19,3 +21,2 @@ * import { updateServiceDefinition } from '@esri/arcgis-rest-service-admin';

* ```
* Update a definition property in a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-definition-feature-service-.htm) for more information.
*

@@ -22,0 +23,0 @@ * @param url - URL of feature service

@@ -5,2 +5,4 @@ /* Copyright (c) 2018-2019 Environmental Systems Research Institute, Inc.

/**
* Update a definition property in a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-definition-feature-service-.htm) for more information.
*
* ```js

@@ -14,3 +16,2 @@ * import { updateServiceDefinition } from '@esri/arcgis-rest-service-admin';

* ```
* Update a definition property in a hosted feature service. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-definition-feature-service-.htm) for more information.
*

@@ -17,0 +18,0 @@ * @param url - URL of feature service

{
"name": "@esri/arcgis-rest-feature-service",
"version": "4.0.0-beta.3",
"version": "4.0.0-beta.4",
"description": "Feature layer query and edit helpers for @esri/arcgis-rest-js",

@@ -49,8 +49,8 @@ "license": "Apache-2.0",

"peerDependencies": {
"@esri/arcgis-rest-portal": "4.0.0-beta.3",
"@esri/arcgis-rest-request": "4.0.0-beta.3"
"@esri/arcgis-rest-portal": "4.0.0-beta.7",
"@esri/arcgis-rest-request": "4.0.0-beta.10"
},
"devDependencies": {
"@esri/arcgis-rest-portal": "4.0.0-beta.3",
"@esri/arcgis-rest-request": "4.0.0-beta.3"
"@esri/arcgis-rest-portal": "4.0.0-beta.7",
"@esri/arcgis-rest-request": "4.0.0-beta.10"
},

@@ -72,3 +72,9 @@ "contributors": [

"access": "public"
},
"esri": {
"keyExports": [
"queryFeatures",
"applyEdits"
]
}
}

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

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

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

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