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
16
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.6.0 to 1.7.0

dist/esm/queryRelated.d.ts

3

dist/esm/helpers.d.ts

@@ -7,2 +7,3 @@ import { esriGeometryType, SpatialRelationship, IGeometry, ISpatialReference } from "@esri/arcgis-rest-common-types";

import { IDeleteFeaturesRequestOptions } from "./delete";
import { IQueryRelatedRequestOptions } from "./queryRelated";
export interface ISharedQueryParams {

@@ -43,2 +44,2 @@ where?: string;

*/
export declare function appendCustomParams(oldOptions: IQueryFeaturesRequestOptions | IAddFeaturesRequestOptions | IUpdateFeaturesRequestOptions | IDeleteFeaturesRequestOptions, newOptions: IRequestOptions): void;
export declare function appendCustomParams(oldOptions: IQueryFeaturesRequestOptions | IAddFeaturesRequestOptions | IUpdateFeaturesRequestOptions | IDeleteFeaturesRequestOptions | IQueryRelatedRequestOptions, newOptions: IRequestOptions): void;

@@ -9,1 +9,2 @@ export * from "./query";

export * from "./deleteAttachments";
export * from "./queryRelated";

@@ -9,2 +9,3 @@ export * from "./query";

export * from "./deleteAttachments";
export * from "./queryRelated";
//# sourceMappingURL=index.js.map

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

tslib_1.__exportStar(require("./deleteAttachments"), exports);
tslib_1.__exportStar(require("./queryRelated"), exports);
//# sourceMappingURL=index.js.map
/* @preserve
* @esri/arcgis-rest-feature-service - v1.6.0 - Fri Jul 27 2018 15:12:35 GMT-0700 (PDT)
* Copyright (c) 2017 - 2018 Environmental Systems Research Institute, Inc.
* Apache-2.0
* @esri/arcgis-rest-feature-service - v1.7.0 - Apache-2.0
* Copyright (c) 2017-2018 Esri, Inc.
* Wed Aug 08 2018 00:07:13 GMT-0700 (PDT)
*/

@@ -314,2 +314,40 @@ (function (global, factory) {

/* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
* Apache-2.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.
*
* ```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,
* relationshipId: 1,
* params: { returnCountOnly: true }
* })
* .then(response => {
* console.log(response.relatedRecords)
* })
* ```
*
* @param requestOptions
* @returns A Promise that will resolve with the query response
*/
function queryRelated(requestOptions) {
var options = __assign({ params: {}, httpMethod: "GET", url: requestOptions.url }, requestOptions);
appendCustomParams(requestOptions, options);
if (!options.params.definitionExpression) {
options.params.definitionExpression = "1=1";
}
if (!options.params.outFields) {
options.params.outFields = "*";
}
if (!options.params.relationshipId) {
options.params.relationshipId = 0;
}
return arcgisRestRequest.request(options.url + "/queryRelatedRecords", options);
}
exports.getFeature = getFeature;

@@ -324,2 +362,3 @@ exports.queryFeatures = queryFeatures;

exports.deleteAttachments = deleteAttachments;
exports.queryRelated = queryRelated;

@@ -326,0 +365,0 @@ Object.defineProperty(exports, '__esModule', { value: true });

/* @preserve
* @esri/arcgis-rest-feature-service - v1.6.0 - Fri Jul 27 2018 15:12:37 GMT-0700 (PDT)
* Copyright (c) 2017 - 2018 Environmental Systems Research Institute, Inc.
* Apache-2.0
* @esri/arcgis-rest-feature-service - v1.7.0 - Apache-2.0
* Copyright (c) 2017-2018 Esri, Inc.
* Wed Aug 08 2018 00:07:19 GMT-0700 (PDT)
*/
!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=Object.assign||function(e){for(var t,a=1,r=arguments.length;a<r;a++)for(var u in t=arguments[a])Object.prototype.hasOwnProperty.call(t,u)&&(e[u]=t[u]);return e};function r(e,t){Object.keys(e).forEach(function(a){"url"!==a&&"params"!==a&&"authentication"!==a&&"httpMethod"!==a&&"fetch"!==a&&"portal"!==a&&"maxUrlLength"!==a&&(t.params[a]=e[a])})}e.getFeature=function(e){var r=e.url+"/"+e.id,u=a({httpMethod:"GET"},e);return t.request(r,u).then(function(e){return e.feature})},e.queryFeatures=function(e){var u=a({params:{},httpMethod:"GET",url:e.url},e);return r(e,u),u.params.where||(u.params.where="1=1"),u.params.outFields||(u.params.outFields="*"),t.request(u.url+"/query",u)},e.addFeatures=function(e){var u=e.url+"/addFeatures",s=a({params:{}},e);return r(e,s),s.params.features=e.adds,delete s.params.adds,t.request(u,s)},e.updateFeatures=function(e){var u=e.url+"/updateFeatures",s=a({params:{}},e);return r(e,s),s.params.features=e.updates,delete s.params.updates,t.request(u,s)},e.deleteFeatures=function(e){var u=e.url+"/deleteFeatures",s=a({params:{}},e);return r(e,s),s.params.objectIds=e.deletes,delete s.params.deletes,t.request(u,s)},e.getAttachments=function(e){return t.request(e.url+"/"+e.featureId+"/attachments",e)},e.addAttachment=function(e){var r=a({params:{}},e);return r.params.attachment=e.attachment,t.request(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(r.url+"/"+r.featureId+"/updateAttachment",r)},e.deleteAttachments=function(e){var r=a({params:{}},e);return r.params.attachmentIds=e.attachmentIds,t.request(r.url+"/"+r.featureId+"/deleteAttachments",r)},Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@esri/arcgis-rest-request")):"function"==typeof define&&define.amd?define(["exports","@esri/arcgis-rest-request"],t):t(e.arcgisRest=e.arcgisRest||{},e.arcgisRest)}(this,function(e,t){"use strict";var r=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e};function a(e,t){Object.keys(e).forEach(function(r){"url"!==r&&"params"!==r&&"authentication"!==r&&"httpMethod"!==r&&"fetch"!==r&&"portal"!==r&&"maxUrlLength"!==r&&(t.params[r]=e[r])})}e.getFeature=function(e){var a=e.url+"/"+e.id,s=r({httpMethod:"GET"},e);return t.request(a,s).then(function(e){return e.feature})},e.queryFeatures=function(e){var s=r({params:{},httpMethod:"GET",url:e.url},e);return a(e,s),s.params.where||(s.params.where="1=1"),s.params.outFields||(s.params.outFields="*"),t.request(s.url+"/query",s)},e.addFeatures=function(e){var s=e.url+"/addFeatures",u=r({params:{}},e);return a(e,u),u.params.features=e.adds,delete u.params.adds,t.request(s,u)},e.updateFeatures=function(e){var s=e.url+"/updateFeatures",u=r({params:{}},e);return a(e,u),u.params.features=e.updates,delete u.params.updates,t.request(s,u)},e.deleteFeatures=function(e){var s=e.url+"/deleteFeatures",u=r({params:{}},e);return a(e,u),u.params.objectIds=e.deletes,delete u.params.deletes,t.request(s,u)},e.getAttachments=function(e){return t.request(e.url+"/"+e.featureId+"/attachments",e)},e.addAttachment=function(e){var a=r({params:{}},e);return a.params.attachment=e.attachment,t.request(a.url+"/"+a.featureId+"/addAttachment",a)},e.updateAttachment=function(e){var a=r({params:{}},e);return a.params.attachment=e.attachment,a.params.attachmentId=e.attachmentId,t.request(a.url+"/"+a.featureId+"/updateAttachment",a)},e.deleteAttachments=function(e){var a=r({params:{}},e);return a.params.attachmentIds=e.attachmentIds,t.request(a.url+"/"+a.featureId+"/deleteAttachments",a)},e.queryRelated=function(e){var s=r({params:{},httpMethod:"GET",url:e.url},e);return a(e,s),s.params.definitionExpression||(s.params.definitionExpression="1=1"),s.params.outFields||(s.params.outFields="*"),s.params.relationshipId||(s.params.relationshipId=0),t.request(s.url+"/queryRelatedRecords",s)},Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=feature-service.umd.min.js.map
{
"name": "@esri/arcgis-rest-feature-service",
"version": "1.6.0",
"version": "1.7.0",
"description": "Feature service helpers for @esri/arcgis-rest-request",

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

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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