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

@esri/arcgis-rest-feature-service

Package Overview
Dependencies
Maintainers
17
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 1.14.2 to 1.14.3

12

dist/esm/add.d.ts

@@ -35,11 +35,7 @@ import { IFeature } from "@esri/arcgis-rest-common-types";

/**
* Add features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-features.htm) for more information.
*
* ```js
* import { addFeatures } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* //
* addFeatures({
* url,
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
* features: [{

@@ -49,4 +45,6 @@ * geometry: { x: -120, y: 45, spatialReference: { wkid: 4326 } },

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

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

@@ -6,11 +6,7 @@ /* 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
* import { addFeatures } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* //
* addFeatures({
* url,
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
* features: [{

@@ -20,4 +16,6 @@ * geometry: { x: -120, y: 45, spatialReference: { wkid: 4326 } },

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

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

@@ -31,7 +31,5 @@ import { IRequestOptions } from "@esri/arcgis-rest-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
* import { addAttachment } from '@esri/arcgis-rest-feature-service';
*
* //
* addAttachment({

@@ -41,4 +39,6 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

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

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

@@ -6,7 +6,5 @@ /* 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
* import { addAttachment } from '@esri/arcgis-rest-feature-service';
*
* //
* addAttachment({

@@ -16,4 +14,6 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

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

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

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

*/
url: string;
url?: string;
/**

@@ -36,9 +36,6 @@ * Unique identifier of the feature.

/**
* Replaces the raw coded domain values in a query response with descriptions (for legibility).
*
* ```js
* import { queryFeatures, decodeValues } from '@esri/arcgis-rest-feature-service';
*
* //
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* queryFeatures({ url })

@@ -53,2 +50,3 @@ * .then(queryResponse => {

* ```
* Replaces the raw coded domain values in a query response with descriptions (for legibility).
*

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

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

/**
* Replaces the raw coded domain values in a query response with descriptions (for legibility).
*
* ```js
* import { queryFeatures, decodeValues } from '@esri/arcgis-rest-feature-service';
*
* //
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* queryFeatures({ url })

@@ -23,2 +20,3 @@ * .then(queryResponse => {

* ```
* Replaces the raw coded domain values in a query response with descriptions (for legibility).
*

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

@@ -39,14 +39,11 @@ import { IRequestOptions } from "@esri/arcgis-rest-request";

/**
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*
* ```js
* import { deleteFeatures } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* //
* deleteFeatures({
* url,
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
* objectIds: [1,2,3]
* });
* ```
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*

@@ -53,0 +50,0 @@ * @param deleteFeaturesRequestOptions - Options for the request.

@@ -6,14 +6,11 @@ /* 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
* import { deleteFeatures } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* //
* deleteFeatures({
* url,
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
* objectIds: [1,2,3]
* });
* ```
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*

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

@@ -31,7 +31,5 @@ import { IRequestOptions } from "@esri/arcgis-rest-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
* import { deleteAttachments } from '@esri/arcgis-rest-feature-service';
*
* //
* deleteAttachments({

@@ -43,2 +41,3 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

* ```
* 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.
*

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

@@ -6,7 +6,5 @@ /* 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
* import { deleteAttachments } from '@esri/arcgis-rest-feature-service';
*
* //
* deleteAttachments({

@@ -18,2 +16,3 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

* ```
* 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.
*

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

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

/**
* 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
* import { getAttachments } from '@esri/arcgis-rest-feature-service';
*
* //
* getAttachments({

@@ -46,2 +44,3 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

* ```
* 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.
*

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

@@ -5,7 +5,5 @@ /* 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
* import { getAttachments } from '@esri/arcgis-rest-feature-service';
*
* //
* getAttachments({

@@ -16,2 +14,3 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

* ```
* 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.
*

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

import { IRequestOptions } from "@esri/arcgis-rest-request";
import { ILayerDefinition } from "@esri/arcgis-rest-common-types";
/**
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*
* ```js
* import { getLayer } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* getLayer(url)
* //
* getLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0")
* .then(response) // { name: "311", id: 0, ... }
* ```
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*

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

@@ -5,12 +5,9 @@ /* 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
* import { getLayer } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* getLayer(url)
* //
* getLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0")
* .then(response) // { name: "311", id: 0, ... }
* ```
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*

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

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

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

@@ -95,2 +93,3 @@ * import { getFeature } from '@esri/arcgis-rest-feature-service';

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

@@ -102,16 +101,12 @@ * @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';
*
* const url = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3";
*
* //
* queryFeatures({
* url,
* url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3",
* where: "STATE_NAME = 'Alaska'"
* }).then(result => {
* console.log(result.features); // array of features
* });
* })
* .then(result)
* ```
* Query a feature service. See [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) for more information.
*

@@ -118,0 +113,0 @@ * @param requestOptions - Options for the request

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

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

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

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

@@ -33,16 +32,12 @@ * @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';
*
* const url = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3";
*
* //
* queryFeatures({
* url,
* url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3",
* where: "STATE_NAME = 'Alaska'"
* }).then(result => {
* console.log(result.features); // array of features
* });
* })
* .then(result)
* ```
* Query a feature service. See [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) for more information.
*

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

@@ -31,18 +31,14 @@ import { IRequestOptions } from "@esri/arcgis-rest-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'
*
* const url = "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0"
*
* //
* queryRelated({
* url: url,
* url: "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0",
* relationshipId: 1,
* params: { returnCountOnly: true }
* })
* .then(response => {
* console.log(response.relatedRecords)
* })
* .then(response) // response.relatedRecords
* ```
* 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.
*

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

@@ -6,18 +6,14 @@ /* 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'
*
* const url = "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0"
*
* //
* queryRelated({
* url: url,
* url: "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0",
* relationshipId: 1,
* params: { returnCountOnly: true }
* })
* .then(response => {
* console.log(response.relatedRecords)
* })
* .then(response) // response.relatedRecords
* ```
* 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.
*

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

@@ -35,11 +35,8 @@ import { IFeature } from "@esri/arcgis-rest-common-types";

/**
* Update features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-features.htm) for more information.
*
* ```js
* import { updateFeatures } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* //
* updateFeatures({
* url,
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
* features: [{

@@ -51,2 +48,3 @@ * geometry: { x: -120, y: 45, spatialReference: { wkid: 4326 } },

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

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

@@ -6,11 +6,8 @@ /* 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.
*
* ```js
* import { updateFeatures } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* //
* updateFeatures({
* url,
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
* features: [{

@@ -22,2 +19,3 @@ * geometry: { x: -120, y: 45, spatialReference: { wkid: 4326 } },

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

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

@@ -35,7 +35,6 @@ import { IRequestOptions } from "@esri/arcgis-rest-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.
*
* ```js
* import { updateAttachment } from '@esri/arcgis-rest-feature-service';
*
* //
* updateAttachment({

@@ -48,2 +47,3 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

* ```
* 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.
*

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

@@ -6,7 +6,6 @@ /* 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.
*
* ```js
* import { updateAttachment } from '@esri/arcgis-rest-feature-service';
*
* //
* updateAttachment({

@@ -19,2 +18,3 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

* ```
* 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.
*

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

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

/**
* Add features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-features.htm) for more information.
*
* ```js
* import { addFeatures } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* //
* addFeatures({
* url,
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
* features: [{

@@ -22,4 +18,6 @@ * geometry: { x: -120, y: 45, spatialReference: { wkid: 4326 } },

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

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

@@ -8,7 +8,5 @@ "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
* import { addAttachment } from '@esri/arcgis-rest-feature-service';
*
* //
* addAttachment({

@@ -18,4 +16,6 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

* attachment: myFileInput.files[0]
* });
* })
* .then(response)
* ```
* 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 +22,0 @@ * @param requestOptions - Options for the request.

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

/**
* Replaces the raw coded domain values in a query response with descriptions (for legibility).
*
* ```js
* import { queryFeatures, decodeValues } from '@esri/arcgis-rest-feature-service';
*
* //
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* queryFeatures({ url })

@@ -25,2 +22,3 @@ * .then(queryResponse => {

* ```
* Replaces the raw coded domain values in a query response with descriptions (for legibility).
*

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

@@ -8,14 +8,11 @@ "use strict";

/**
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*
* ```js
* import { deleteFeatures } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* //
* deleteFeatures({
* url,
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
* objectIds: [1,2,3]
* });
* ```
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*

@@ -22,0 +19,0 @@ * @param deleteFeaturesRequestOptions - Options for the request.

@@ -8,7 +8,5 @@ "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
* import { deleteAttachments } from '@esri/arcgis-rest-feature-service';
*
* //
* deleteAttachments({

@@ -20,2 +18,3 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

* ```
* 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.
*

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

@@ -7,7 +7,5 @@ "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
* import { getAttachments } from '@esri/arcgis-rest-feature-service';
*
* //
* getAttachments({

@@ -18,2 +16,3 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

* ```
* 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 +19,0 @@ * @param requestOptions - Options for the request.

@@ -7,12 +7,9 @@ "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
* import { getLayer } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* getLayer(url)
* //
* getLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0")
* .then(response) // { name: "311", id: 0, ... }
* ```
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*

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

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

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

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

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

@@ -36,16 +35,12 @@ * @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';
*
* const url = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3";
*
* //
* queryFeatures({
* url,
* url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3",
* where: "STATE_NAME = 'Alaska'"
* }).then(result => {
* console.log(result.features); // array of features
* });
* })
* .then(result)
* ```
* Query a feature service. See [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) for more information.
*

@@ -52,0 +47,0 @@ * @param requestOptions - Options for the request

@@ -8,18 +8,14 @@ "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'
*
* const url = "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0"
*
* //
* queryRelated({
* url: url,
* url: "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0",
* relationshipId: 1,
* params: { returnCountOnly: true }
* })
* .then(response => {
* console.log(response.relatedRecords)
* })
* .then(response) // response.relatedRecords
* ```
* 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.
*

@@ -26,0 +22,0 @@ * @param requestOptions

@@ -8,11 +8,8 @@ "use strict";

/**
* Update features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-features.htm) for more information.
*
* ```js
* import { updateFeatures } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* //
* updateFeatures({
* url,
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
* features: [{

@@ -24,2 +21,3 @@ * geometry: { x: -120, y: 45, spatialReference: { wkid: 4326 } },

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

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

@@ -8,7 +8,6 @@ "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.
*
* ```js
* import { updateAttachment } from '@esri/arcgis-rest-feature-service';
*
* //
* updateAttachment({

@@ -21,2 +20,3 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

* ```
* 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.

/* @preserve
* @esri/arcgis-rest-feature-service - v1.14.2 - Apache-2.0
* @esri/arcgis-rest-feature-service - v1.14.3 - Apache-2.0
* Copyright (c) 2017-2018 Esri, Inc.
* Tue Nov 27 2018 11:20:01 GMT-0800 (Pacific Standard Time)
* Mon Dec 03 2018 12:21:29 GMT-0800 (Pacific Standard Time)
*/

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

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

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

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

@@ -68,16 +67,12 @@ * @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';
*
* const url = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3";
*
* //
* queryFeatures({
* url,
* url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3",
* where: "STATE_NAME = 'Alaska'"
* }).then(result => {
* console.log(result.features); // array of features
* });
* })
* .then(result)
* ```
* Query a feature service. See [REST Documentation](https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm) for more information.
*

@@ -103,11 +98,7 @@ * @param requestOptions - Options for the request

/**
* Add features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/add-features.htm) for more information.
*
* ```js
* import { addFeatures } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* //
* addFeatures({
* url,
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
* features: [{

@@ -117,4 +108,6 @@ * geometry: { x: -120, y: 45, spatialReference: { wkid: 4326 } },

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

@@ -141,11 +134,8 @@ * @param requestOptions - Options for the request.

/**
* Update features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/update-features.htm) for more information.
*
* ```js
* import { updateFeatures } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* //
* updateFeatures({
* url,
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
* features: [{

@@ -157,2 +147,3 @@ * geometry: { x: -120, y: 45, spatialReference: { wkid: 4326 } },

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

@@ -179,14 +170,11 @@ * @param requestOptions - 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
* import { deleteFeatures } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* //
* deleteFeatures({
* url,
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",
* objectIds: [1,2,3]
* });
* ```
* Delete features request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/delete-features.htm) for more information.
*

@@ -213,7 +201,5 @@ * @param deleteFeaturesRequestOptions - Options for the request.

/**
* 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
* import { getAttachments } from '@esri/arcgis-rest-feature-service';
*
* //
* getAttachments({

@@ -224,2 +210,3 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

* ```
* 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.
*

@@ -237,7 +224,5 @@ * @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
* import { addAttachment } from '@esri/arcgis-rest-feature-service';
*
* //
* addAttachment({

@@ -247,4 +232,6 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

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

@@ -264,7 +251,6 @@ * @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.
*
* ```js
* import { updateAttachment } from '@esri/arcgis-rest-feature-service';
*
* //
* updateAttachment({

@@ -277,2 +263,3 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

* ```
* 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.
*

@@ -293,7 +280,5 @@ * @param requestOptions - 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
* import { deleteAttachments } from '@esri/arcgis-rest-feature-service';
*
* //
* deleteAttachments({

@@ -305,2 +290,3 @@ * url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0",

* ```
* 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.
*

@@ -320,18 +306,14 @@ * @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'
*
* const url = "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0"
*
* //
* queryRelated({
* url: url,
* url: "http://services.myserver/OrgID/ArcGIS/rest/services/Petroleum/KSPetro/FeatureServer/0",
* relationshipId: 1,
* params: { returnCountOnly: true }
* })
* .then(response => {
* console.log(response.relatedRecords)
* })
* .then(response) // response.relatedRecords
* ```
* 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.
*

@@ -359,12 +341,9 @@ * @param requestOptions

/**
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*
* ```js
* import { getLayer } from '@esri/arcgis-rest-feature-service';
*
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* getLayer(url)
* //
* getLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0")
* .then(response) // { name: "311", id: 0, ... }
* ```
* Layer (Feature Service) request. See the [REST Documentation](https://developers.arcgis.com/rest/services-reference/layer-feature-service-.htm) for more information.
*

@@ -381,9 +360,6 @@ * @param requestOptions - Options for the request.

/**
* Replaces the raw coded domain values in a query response with descriptions (for legibility).
*
* ```js
* import { queryFeatures, decodeValues } from '@esri/arcgis-rest-feature-service';
*
* //
* const url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ServiceRequest/FeatureServer/0";
*
* queryFeatures({ url })

@@ -398,2 +374,3 @@ * .then(queryResponse => {

* ```
* Replaces the raw coded domain values in a query response with descriptions (for legibility).
*

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

/* @preserve
* @esri/arcgis-rest-feature-service - v1.14.2 - Apache-2.0
* @esri/arcgis-rest-feature-service - v1.14.3 - Apache-2.0
* Copyright (c) 2017-2018 Esri, Inc.
* Tue Nov 27 2018 11:20:03 GMT-0800 (Pacific Standard Time)
* Mon Dec 03 2018 12:21:32 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.2",
"version": "1.14.3",
"description": "Feature service helpers for @esri/arcgis-rest-request",

@@ -18,4 +18,4 @@ "main": "dist/node/index.js",

"devDependencies": {
"@esri/arcgis-rest-common-types": "^1.14.2",
"@esri/arcgis-rest-request": "^1.14.2"
"@esri/arcgis-rest-common-types": "^1.14.3",
"@esri/arcgis-rest-request": "^1.14.3"
},

@@ -22,0 +22,0 @@ "peerDependencies": {

[![npm version][npm-img]][npm-url]
[![build status][travis-img]][travis-url]
[![gzip bundle size][gzip-image]][npm-url]
[![Coverage Status][coverage-img]][coverage-url]

@@ -10,2 +11,3 @@ [![apache licensed](https://img.shields.io/badge/license-Apache-green.svg?style=flat-square)](https://raw.githubusercontent.com/Esri/arcgis-rest-js/master/LICENSE)

[travis-url]: https://travis-ci.org/Esri/arcgis-rest-js
[gzip-image]: https://img.badgesize.io/https://unpkg.com/@esri/arcgis-rest-feature-service/dist/umd/feature-service.umd.min.js?compression=gzip
[coverage-img]: https://coveralls.io/repos/github/Esri/arcgis-rest-js/badge.svg

@@ -58,2 +60,4 @@ [coverage-url]: https://coveralls.io/github/Esri/arcgis-rest-js

### [Changelog](https://github.com/Esri/arcgis-rest-js/blob/master/CHANGELOG.md)
### License

@@ -60,0 +64,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

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