New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@esri/arcgis-rest-portal

Package Overview
Dependencies
Maintainers
8
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@esri/arcgis-rest-portal - npm Package Compare versions

Comparing version 3.1.2 to 3.2.0

dist/esm/services/get-unique-service-name.d.ts

2

dist/esm/groups/get.d.ts

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

*/
export declare function getGroupContent(id: string, requestOptions?: IGetGroupContentOptions): Promise<IGroup>;
export declare function getGroupContent(id: string, requestOptions?: IGetGroupContentOptions): Promise<IGroupContentResult>;
/**

@@ -59,0 +59,0 @@ * Get the usernames of the admins and members. Does not return actual 'User' objects. Those must be

@@ -39,8 +39,10 @@ export * from "./items/add";

export * from "./sharing/helpers";
export * from "./services/get-unique-service-name";
export * from "./services/is-service-name-available";
export * from "./util/get-portal";
export * from "./util/get-portal-settings";
export * from "./util/get-portal-url";
export * from './util/scrub-control-chars';
export * from "./util/scrub-control-chars";
export * from "./util/search";
export * from "./util/SearchQueryBuilder";
export { IPagingParams, IPagedResponse, IUser, IItemAdd, IItemUpdate, IItem, IFolder, IGroupAdd, IGroup, GroupMembership } from "@esri/arcgis-rest-types";
export { IPagingParams, IPagedResponse, IUser, IItemAdd, IItemUpdate, IItem, IFolder, IGroupAdd, IGroup, GroupMembership, } from "@esri/arcgis-rest-types";

@@ -41,8 +41,10 @@ /* Copyright (c) 2018-2019 Environmental Systems Research Institute, Inc.

export * from "./sharing/helpers";
export * from "./services/get-unique-service-name";
export * from "./services/is-service-name-available";
export * from "./util/get-portal";
export * from "./util/get-portal-settings";
export * from "./util/get-portal-url";
export * from './util/scrub-control-chars';
export * from "./util/scrub-control-chars";
export * from "./util/search";
export * from "./util/SearchQueryBuilder";
//# sourceMappingURL=index.js.map

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

export function genericSearch(search, searchType) {
var url;
var options;

@@ -48,3 +47,3 @@ if (typeof search === "string" || search instanceof SearchQueryBuilder) {

}
url = getPortalUrl(options) + path;
var url = getPortalUrl(options) + path;
// send the request

@@ -51,0 +50,0 @@ return request(url, options).then(function (r) {

import { IRequestOptions } from "@esri/arcgis-rest-request";
/**
* Helper that returns the appropriate portal url for a given request. `requestOptions.portal` is given
* precedence over `authentication.portal`. If neither are present, `www.arcgis.com/sharing/rest` is returned.
* precedence over `authentication.portal`. If neither `portal` nor `authentication` is present,
* `www.arcgis.com/sharing/rest` is returned.
*

@@ -6,0 +7,0 @@ * @param requestOptions - Request options that may have authentication manager

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

* Helper that returns the appropriate portal url for a given request. `requestOptions.portal` is given
* precedence over `authentication.portal`. If neither are present, `www.arcgis.com/sharing/rest` is returned.
* precedence over `authentication.portal`. If neither `portal` nor `authentication` is present,
* `www.arcgis.com/sharing/rest` is returned.
*

@@ -9,0 +10,0 @@ * @param requestOptions - Request options that may have authentication manager

@@ -0,1 +1,2 @@

// eslint-disable-next-line no-control-regex
var CONTROL_CHAR_MATCHER = /[\x00-\x1F\x7F-\x9F\xA0]/g;

@@ -2,0 +3,0 @@ /**

import { IParamBuilder } from "@esri/arcgis-rest-request";
/**
* `SearchQueryBuilder` can be used to construct the `q` param for [`searchItems`](/arcgis-rest-js/api/portal/searchItems#searchItems-search) or [`searchGroups`](/arcgis-rest-js/api/portal/searchGroups#searchGroups-search). By chaining methods, it helps build complex search queries.
* `SearchQueryBuilder` can be used to construct the `q` param for
* [`searchItems`](/arcgis-rest-js/api/portal/searchItems#searchItems-search) or
* [`searchGroups`](/arcgis-rest-js/api/portal/searchGroups#searchGroups-search).
* By chaining methods, it helps build complex search queries.
*
* ```js
* const startDate = new Date("2020-01-01");
* const endDate = new Date("2020-09-01");
* const query = new SearchQueryBuilder()

@@ -10,2 +15,6 @@ * .match("Patrick")

* .and()
* .from(startDate)
* .to(endDate)
* .in("created")
* .and()
* .startGroup()

@@ -31,3 +40,3 @@ * .match("Web Mapping Application")

* ```
* "owner: Patrick AND (type:"Web Mapping Application" OR type:"Mobile Application" OR type:Application) AND Demo App"
* "owner: Patrick AND created:[1577836800000 TO 1598918400000] AND (type:"Web Mapping Application" OR type:"Mobile Application" OR type:Application) AND Demo App"
* ```

@@ -149,5 +158,9 @@ */

* ```js
*
* const NEWYEARS = new Date("2020-01-01")
* const TODAY = new Date()
*
* const query = new SearchQueryBuilder()
* .from(yesterdaysDate)
* .to(todaysDate)
* .from(NEWYEARS)
* .to(TODAY)
* .in("created")

@@ -154,0 +167,0 @@ * ```

@@ -0,6 +1,13 @@

/* Copyright (c) 2018-2021 Environmental Systems Research Institute, Inc.
* Apache-2.0 */
import { warn } from "@esri/arcgis-rest-request";
/**
* `SearchQueryBuilder` can be used to construct the `q` param for [`searchItems`](/arcgis-rest-js/api/portal/searchItems#searchItems-search) or [`searchGroups`](/arcgis-rest-js/api/portal/searchGroups#searchGroups-search). By chaining methods, it helps build complex search queries.
* `SearchQueryBuilder` can be used to construct the `q` param for
* [`searchItems`](/arcgis-rest-js/api/portal/searchItems#searchItems-search) or
* [`searchGroups`](/arcgis-rest-js/api/portal/searchGroups#searchGroups-search).
* By chaining methods, it helps build complex search queries.
*
* ```js
* const startDate = new Date("2020-01-01");
* const endDate = new Date("2020-09-01");
* const query = new SearchQueryBuilder()

@@ -10,2 +17,6 @@ * .match("Patrick")

* .and()
* .from(startDate)
* .to(endDate)
* .in("created")
* .and()
* .startGroup()

@@ -31,3 +42,3 @@ * .match("Web Mapping Application")

* ```
* "owner: Patrick AND (type:"Web Mapping Application" OR type:"Mobile Application" OR type:Application) AND Demo App"
* "owner: Patrick AND created:[1577836800000 TO 1598918400000] AND (type:"Web Mapping Application" OR type:"Mobile Application" OR type:Application) AND Demo App"
* ```

@@ -79,3 +90,3 @@ */

warn(
// prettier-ignore
// apparently-p-rettier-ignore causes some
fn + " was called with no call to `match(...)` or `from(...)`/`to(...)`. Your query was not modified.");

@@ -193,5 +204,9 @@ return this;

* ```js
*
* const NEWYEARS = new Date("2020-01-01")
* const TODAY = new Date()
*
* const query = new SearchQueryBuilder()
* .from(yesterdaysDate)
* .to(todaysDate)
* .from(NEWYEARS)
* .to(TODAY)
* .in("created")

@@ -203,4 +218,4 @@ * ```

warn(
// prettier-ignore
"`from(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Your query was not modified.");
// apparently-p*rettier-ignore causes prettier to strip *all* comments O_o
"`from(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date(\"2020-01-01\"). Your query was not modified.");
return this;

@@ -224,4 +239,4 @@ }

warn(
// prettier-ignore
"`to(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Your query was not modified.");
// apparently-p*rettier-ignore causes prettier to strip *all* comments O_o
"`to(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date(\"2020-01-01\"). Your query was not modified.");
return this;

@@ -269,3 +284,3 @@ }

warn(
// prettier-ignore
// apparently-p*rettier-ignore causes prettier to strip *all* comments O_o
"You have called `" + this.currentModifer + "()` after `" + modifier + "()`. Your current query was not modified.");

@@ -331,3 +346,3 @@ return this;

warn(
// prettier-ignore
// apparently-p*rettier-ignore causes prettier to strip *all* comments O_o
"Automatically closing " + this.openGroups + " group(s). You can use `endGroup(...)` to remove this warning.");

@@ -334,0 +349,0 @@ while (this.openGroups > 0) {

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

tslib_1.__exportStar(require("./sharing/helpers"), exports);
tslib_1.__exportStar(require("./services/get-unique-service-name"), exports);
tslib_1.__exportStar(require("./services/is-service-name-available"), exports);
tslib_1.__exportStar(require("./util/get-portal"), exports);

@@ -46,0 +48,0 @@ tslib_1.__exportStar(require("./util/get-portal-settings"), exports);

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

function genericSearch(search, searchType) {
var url;
var options;

@@ -51,3 +50,3 @@ if (typeof search === "string" || search instanceof SearchQueryBuilder_1.SearchQueryBuilder) {

}
url = get_portal_url_1.getPortalUrl(options) + path;
var url = get_portal_url_1.getPortalUrl(options) + path;
// send the request

@@ -54,0 +53,0 @@ return arcgis_rest_request_1.request(url, options).then(function (r) {

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

* Helper that returns the appropriate portal url for a given request. `requestOptions.portal` is given
* precedence over `authentication.portal`. If neither are present, `www.arcgis.com/sharing/rest` is returned.
* precedence over `authentication.portal`. If neither `portal` nor `authentication` is present,
* `www.arcgis.com/sharing/rest` is returned.
*

@@ -12,0 +13,0 @@ * @param requestOptions - Request options that may have authentication manager

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.scrubControlChars = void 0;
// eslint-disable-next-line no-control-regex
var CONTROL_CHAR_MATCHER = /[\x00-\x1F\x7F-\x9F\xA0]/g;

@@ -5,0 +6,0 @@ /**

"use strict";
/* Copyright (c) 2018-2021 Environmental Systems Research Institute, Inc.
* Apache-2.0 */
Object.defineProperty(exports, "__esModule", { value: true });

@@ -6,5 +8,10 @@ exports.SearchQueryBuilder = void 0;

/**
* `SearchQueryBuilder` can be used to construct the `q` param for [`searchItems`](/arcgis-rest-js/api/portal/searchItems#searchItems-search) or [`searchGroups`](/arcgis-rest-js/api/portal/searchGroups#searchGroups-search). By chaining methods, it helps build complex search queries.
* `SearchQueryBuilder` can be used to construct the `q` param for
* [`searchItems`](/arcgis-rest-js/api/portal/searchItems#searchItems-search) or
* [`searchGroups`](/arcgis-rest-js/api/portal/searchGroups#searchGroups-search).
* By chaining methods, it helps build complex search queries.
*
* ```js
* const startDate = new Date("2020-01-01");
* const endDate = new Date("2020-09-01");
* const query = new SearchQueryBuilder()

@@ -14,2 +21,6 @@ * .match("Patrick")

* .and()
* .from(startDate)
* .to(endDate)
* .in("created")
* .and()
* .startGroup()

@@ -35,3 +46,3 @@ * .match("Web Mapping Application")

* ```
* "owner: Patrick AND (type:"Web Mapping Application" OR type:"Mobile Application" OR type:Application) AND Demo App"
* "owner: Patrick AND created:[1577836800000 TO 1598918400000] AND (type:"Web Mapping Application" OR type:"Mobile Application" OR type:Application) AND Demo App"
* ```

@@ -83,3 +94,3 @@ */

arcgis_rest_request_1.warn(
// prettier-ignore
// apparently-p-rettier-ignore causes some
fn + " was called with no call to `match(...)` or `from(...)`/`to(...)`. Your query was not modified.");

@@ -197,5 +208,9 @@ return this;

* ```js
*
* const NEWYEARS = new Date("2020-01-01")
* const TODAY = new Date()
*
* const query = new SearchQueryBuilder()
* .from(yesterdaysDate)
* .to(todaysDate)
* .from(NEWYEARS)
* .to(TODAY)
* .in("created")

@@ -207,4 +222,4 @@ * ```

arcgis_rest_request_1.warn(
// prettier-ignore
"`from(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Your query was not modified.");
// apparently-p*rettier-ignore causes prettier to strip *all* comments O_o
"`from(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date(\"2020-01-01\"). Your query was not modified.");
return this;

@@ -228,4 +243,4 @@ }

arcgis_rest_request_1.warn(
// prettier-ignore
"`to(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Your query was not modified.");
// apparently-p*rettier-ignore causes prettier to strip *all* comments O_o
"`to(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date(\"2020-01-01\"). Your query was not modified.");
return this;

@@ -273,3 +288,3 @@ }

arcgis_rest_request_1.warn(
// prettier-ignore
// apparently-p*rettier-ignore causes prettier to strip *all* comments O_o
"You have called `" + this.currentModifer + "()` after `" + modifier + "()`. Your current query was not modified.");

@@ -335,3 +350,3 @@ return this;

arcgis_rest_request_1.warn(
// prettier-ignore
// apparently-p*rettier-ignore causes prettier to strip *all* comments O_o
"Automatically closing " + this.openGroups + " group(s). You can use `endGroup(...)` to remove this warning.");

@@ -338,0 +353,0 @@ while (this.openGroups > 0) {

/* @preserve
* @esri/arcgis-rest-portal - v3.1.2 - Apache-2.0
* @esri/arcgis-rest-portal - v3.2.0 - Apache-2.0
* Copyright (c) 2017-2021 Esri, Inc.
* Wed Jun 16 2021 15:14:19 GMT-0600 (Mountain Daylight Time)
* Fri Jul 09 2021 07:38:01 GMT-0700 (Pacific Daylight 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="undefined"!=typeof globalThis?globalThis:e||self).arcgisRest=e.arcgisRest||{},e.arcgisRest)}(this,function(e,a){"use strict";var u=function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e){return void 0===e&&(e={}),e.portal?a.cleanUrl(e.portal):e.authentication?e.authentication.portal:"https://www.arcgis.com/sharing/rest"}function n(e){var t=JSON.parse(JSON.stringify(e));return t.data&&("undefined"!=typeof Blob&&e.data instanceof Blob||"ReadStream"===e.data.constructor.name?t.file=e.data:t.text=e.data,delete t.data),t}function c(e){return e.owner?Promise.resolve(e.owner):e.item&&e.item.owner?Promise.resolve(e.item.owner):e.authentication&&e.authentication.getUsername?e.authentication.getUsername():Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."))}function t(t){return c(t).then(function(e){e=t.folderId?s(t)+"/content/users/"+e+"/"+t.folderId+"/items/"+t.item.id+"/update":s(t)+"/content/users/"+e+"/items/"+t.item.id+"/update";return t.params=u(u({},t.params),n(t.item)),a.request(e,t)})}function r(r){return r.multipart&&!r.filename?Promise.reject(new Error("The filename is required for a multipart request.")):c(r).then(function(e){var t=s(r)+"/content/users/"+e,e=t+"/addItem";r.folderId&&(e=t+"/"+r.folderId+"/addItem"),r.params=u(u({},r.params),n(r.item));t=a.appendCustomParams(r,["owner","folderId","file","dataUrl","text","async","multipart","filename","overwrite"],{params:u({},r.params)});return a.request(e,t)})}var o=/[\x00-\x1F\x7F-\x9F\xA0]/g;function i(e){return e.replace(o,"")}var m=function(e,t){return("string"==typeof t?t:s(t))+"/content/items/"+e};function p(e,t){var r=t||{},n=r.fileName,r=r.readAs;return d(e,"/info/"+(void 0===n?"iteminfo.xml":n),void 0===r?"text":r,u({httpMethod:"GET"},t))}function d(e,t,r,n){var t=""+m(e,n)+t,n=u({params:{}},n),o=n.rawResponse;return n.rawResponse=!0,n.params.f=null,a.request(t,n).then(function(e){return o?e:"json"!==r?e[r]():e.text().then(function(e){return JSON.parse(i(e))})})}function h(e,t){e=s(t)+"/community/groups/"+e,t=u({httpMethod:"GET"},t);return a.request(e,t)}function f(e){var t=e.authentication.username,t=e.owner||t;return s(e)+"/content/users/"+encodeURIComponent(t)+"/items/"+e.id+"/share"}function l(e){var t=e.authentication.username;return(e.owner||t)===t}function g(e){return e.authentication.getUser(e).then(function(e){return e&&"org_admin"===e.role&&!e.roleId})}function v(e){return h(e.groupId,e).then(function(e){return e.userMembership.memberType}).catch(function(){return"none"})}var y=(I.prototype.match=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.termStack=this.termStack.concat(e),this},I.prototype.in=function(e){var t="`in("+(e?'"'+e+'"':"")+")`";return this.hasRange||this.hasTerms?(e&&"*"!==e&&(this.q+=e+":"),this.commit()):(a.warn(t+" was called with no call to `match(...)` or `from(...)`/`to(...)`. Your query was not modified."),this)},I.prototype.startGroup=function(){return this.commit(),0<this.openGroups&&(this.q+=" "),this.openGroups++,this.q+="(",this},I.prototype.endGroup=function(){return this.openGroups<=0?a.warn("`endGroup(...)` was called without calling `startGroup(...)` first. Your query was not modified."):(this.commit(),this.openGroups--,this.q+=")"),this},I.prototype.and=function(){return this.addModifier("and")},I.prototype.or=function(){return this.addModifier("or")},I.prototype.not=function(){return this.addModifier("not")},I.prototype.from=function(e){return this.hasTerms?a.warn("`from(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Your query was not modified."):this.rangeStack[0]=e,this},I.prototype.to=function(e){return this.hasTerms?a.warn("`to(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Your query was not modified."):this.rangeStack[1]=e,this},I.prototype.boost=function(e){return this.commit(),this.q+="^"+e,this},I.prototype.toParam=function(){return this.commit(),this.cleanup(),this.q},I.prototype.clone=function(){return this.commit(),this.cleanup(),new I(this.q+"")},I.prototype.addModifier=function(e){return this.currentModifer?(a.warn("You have called `"+this.currentModifer+"()` after `"+e+"()`. Your current query was not modified."),this):(this.commit(),""===this.q&&"not"!==e?a.warn("You have called `"+e+"()` without calling another method to modify your query first. Try calling `match()` first."):(this.currentModifer=e,this.q+=""===this.q?"":" ",this.q+=e.toUpperCase()+" "),this)},I.prototype.hasWhiteSpace=function(e){return/\s/g.test(e)},I.prototype.formatTerm=function(e){return e instanceof Date?e.getTime():"string"==typeof e&&this.hasWhiteSpace(e)?'"'+e+'"':e},I.prototype.commit=function(){var t=this;return this.currentModifer=void 0,this.hasRange&&(this.q+="["+this.formatTerm(this.rangeStack[0])+" TO "+this.formatTerm(this.rangeStack[1])+"]",this.rangeStack=[void 0,void 0]),this.hasTerms&&(this.q+=this.termStack.map(function(e){return t.formatTerm(e)}).join(" "),this.termStack=[]),this},Object.defineProperty(I.prototype,"hasTerms",{get:function(){return 0<this.termStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"hasRange",{get:function(){return this.rangeStack.length&&this.rangeStack[0]&&this.rangeStack[1]},enumerable:!1,configurable:!0}),I.prototype.cleanup=function(){if(0<this.openGroups)for(a.warn("Automatically closing "+this.openGroups+" group(s). You can use `endGroup(...)` to remove this warning.");0<this.openGroups;)this.q+=")",this.openGroups--;var e=this.q;this.q=e.replace(/( AND ?| NOT ?| OR ?)*$/,""),e!==this.q&&a.warn("`startGroup(...)` was called without calling `endGroup(...)` first. Your query was not modified."),this.q=this.q.replace(/(\(\))*/,"")},I);function I(e){void 0===e&&(e=""),this.termStack=[],this.rangeStack=[],this.openGroups=0,this.q=e}function q(r,n){var e,t,o="string"==typeof r||r instanceof y?{httpMethod:"GET",params:{q:r}}:a.appendCustomParams(r,["q","num","start","sortField","sortOrder"],{httpMethod:"GET"});switch(n){case"item":t="/search";break;case"group":t="/community/groups";break;case"groupContent":if("string"==typeof r||r instanceof y||!r.groupId)return Promise.reject(new Error("you must pass a `groupId` option to `searchGroupContent`"));t="/content/groups/"+r.groupId+"/search";break;default:t="/portals/self/users/search"}return e=s(o)+t,a.request(e,o).then(function(t){return t.nextStart&&-1!==t.nextStart&&(t.nextPage=function(){var e;return"string"==typeof r||r instanceof y?e={q:r,start:t.nextStart}:(e=r).start=t.nextStart,q(e,n)}),t})}function w(e){return q(e,"item")}function b(e,t){if(0===e.length)return[];for(var r=[],n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function T(e){var t=e.id,r=s(e)+"/community/groups/"+t+"/addUsers",t=Object.assign({},e,{admins:void 0,users:void 0}),t=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,o++)n[o]=i[u];return n}(G("users",e.users,t),G("admins",e.admins,t)).map(function(e){return t=r,e=e,a.request(t,e).catch(function(e){return{errors:[e]}});var t});return Promise.all(t).then(U)}function G(o,e,i){return!e||e.length<1?[]:b(e,25).map(function(e){return t=o,r=e,n=i,Object.assign({},n,((e={})[t]=r,e.params=u(u({},n.params),((n={})[t]=r,n)),e));var t,r,n})}function U(e){var t=e.filter(function(e){return e.notAdded}).reduce(function(e,t){return e.concat(t.notAdded)},[]),e=e.filter(function(e){return e.errors}).reduce(function(e,t){return e.concat(t.errors)},[]),t={notAdded:t};return 0<e.length&&(t.errors=e),t}function P(t){var e=t.id,r=t.users,n=s(t)+"/community/groups/"+e+"/removeUsers",r=b(r,25).map(function(e){e=u(u({},t),{users:e,params:{users:e}});return a.request(n,e).catch(function(e){return{errors:[e]}})});return Promise.all(r).then(function(e){var t=function(r){return e.filter(function(e){return e[r]}).reduce(function(e,t){return e.concat(t[r])},[])},r=t("errors"),t={notRemoved:t("notRemoved")};return r.length?u(u({},t),{errors:r}):t})}function C(e){var t=e.every(function(e){return e.success}),e=e.reduce(function(e,t){return e.concat(t.errors||[])},[]),t={success:t};return 0<e.length&&(t.errors=e),t}function S(e){var t=s(e)+"/community/groups/"+e.id+"/updateUsers",r={authentication:e.authentication,params:{}};return"admin"===e.newMemberType?r.params.admins=e.users:r.params.users=e.users,a.request(t,r)}function M(e){var t=e.every(function(e){return e.success}),e=e.reduce(function(e,t){return e.concat(t.errors||[])},[]),t={success:t};return 0<e.length&&(t.errors=e),t}function R(e){var t,r,n={httpMethod:"GET"};return"string"==typeof e?r="https://www.arcgis.com/sharing/rest/community/users/"+e:(t=e.username||e.authentication.username,r=s(e)+"/community/users/"+encodeURIComponent(t),n=u(u({},e),n)),a.request(r,n)}function x(e,t){return t.params=u({org:!1,everyone:!1},t.params),"private"===t.access&&(t.params.groups=" "),"org"===t.access&&(t.params.org=!0),"public"===t.access&&(t.params.account=!0,t.params.everyone=!0),a.request(e,t)}function E(t){return w({q:"id: "+t.id+" AND group: "+t.groupId,start:1,num:10,sortField:"title",authentication:t.authentication,httpMethod:"POST"}).then(function(e){if(0<e.total)return e.results.some(function(e){return e.id===t.id})})}function N(e,t){void 0===t&&(t=!1);var r=e.authentication.username,n=e.owner||r,o=s(e)+"/content/items/"+e.id+"/share";return n!==r&&!t||(o=s(e)+"/content/users/"+n+"/items/"+e.id+"/share"),e.params={groups:e.groupId,confirmItemControl:e.confirmItemControl},a.request(o,e)}function O(e,t,r,n,o){var i,u,a=t.groups||[],s=a.find(function(e){return e.id===o.groupId});if(e.orgId!==t.orgId)throw Error("User "+t.username+" is not a member of the same org as "+e.username+". Consequently they can not be added added to group "+o.groupId+" nor can item "+o.id+" be shared to the group.");if(!s&&511<a.length)throw Error("User "+t.username+" already has 512 groups, and can not be added to group "+o.groupId+". Consequently item "+o.id+" can not be shared to the group.");return u=s?r&&"member"===s.userMembership.memberType?(i=S({id:o.groupId,users:[t.username],newMemberType:"admin",authentication:o.authentication}).then(function(e){e=e.results.reduce(function(e,t){return t.success||e.push(t.username),e},[]);return Promise.resolve({notAdded:e})}).catch(function(){return{notAdded:[t.username]}}),function(e){return S({id:o.groupId,users:[t.username],newMemberType:"member",authentication:o.authentication}).then(function(){return e}).catch(function(){return e})}):(i=Promise.resolve({notAdded:[]}),function(e){return Promise.resolve(e)}):(r=r?"admins":"users",i=T(((u={id:o.groupId})[r]=[t.username],u.authentication=o.authentication,u)).then(function(e){if(e.errors&&e.errors.length)throw e.errors[0];return e}).catch(function(){return{notAdded:[t.username]}}),function(e){return P({id:o.groupId,users:[t.username],authentication:o.authentication}).then(function(){return e})}),{promise:i.then(function(e){if(e.notAdded.length)throw new Error(n);return e}),revert:u}}function j(e,t){e=e||"self",e=s(t)+"/portals/"+e,t=u({httpMethod:"GET"},t);return a.request(e,t)}e.SearchQueryBuilder=y,e.acceptInvitation=function(e){var t=encodeURIComponent(e.authentication.username),t=s(e)+"/community/users/"+t+"/invitations/"+e.invitationId+"/accept",e=u({},e);return a.request(t,e)},e.addGroupUsers=T,e.addItemData=function(e){return delete(e=u({item:{id:e.id,data:e.data}},e)).id,delete e.data,t(e)},e.addItemPart=function(r){var n=r.partNum;return!Number.isInteger(n)||n<1||1e4<n?Promise.reject(new Error("The part number must be an integer between 1 to 10000, inclusive.")):c(r).then(function(e){var t=s(r)+"/content/users/"+e+"/items/"+r.id+"/addPart?partNum="+n,e=a.appendCustomParams(r,["file"],{params:u({},r.params)});return a.request(t,e)})},e.addItemRelationship=function(r){return c(r).then(function(e){var t=s(r)+"/content/users/"+e+"/addRelationship",e=a.appendCustomParams(r,["originItemId","destinationItemId","relationshipType"],{params:u({},r.params)});return a.request(t,e)})},e.addItemResource=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/addResources";return t.params=u({file:t.resource,fileName:t.name,resourcesPrefix:t.prefix,text:t.content,access:t.private?"private":"inherit"},t.params),a.request(e,t)})},e.cancelItemUpload=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/cancel";return a.request(e,t)})},e.commitItemUpload=function(r){return c(r).then(function(e){var t=s(r)+"/content/users/"+e+"/items/"+r.id+"/commit",e=a.appendCustomParams(r,[],{params:u(u({},r.params),n(r.item))});return a.request(t,e)})},e.createFolder=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/createFolder";return t.params=u({title:t.title},t.params),a.request(e,t)})},e.createGroup=function(e){var t=s(e)+"/community/createGroup";return e.params=u(u({},e.params),e.group),a.request(t,e)},e.createGroupNotification=function(e){var t=s(e)+"/community/groups/"+e.id+"/createNotification",e=u({params:u({subject:e.subject,message:e.message,users:e.users,notificationChannelType:e.notificationChannelType||"email",clientId:e.clientId,silentNotification:e.silentNotification,notifyAll:!e.users||0===e.users.length},e.params)},e);return a.request(t,e)},e.createItem=function(e){return r(u({folderId:null},e))},e.createItemInFolder=r,e.createOrgNotification=function(e){var n,r=s(e)+"/portals/self/createNotification",e=b((n=e).users,n.batchSize||25).map(function(e){return t=e,r=n,(e=Object.assign({},r)).params=u(u({},e.params),{users:t,subject:r.subject,message:r.message,notificationChannelType:e.notificationChannelType}),e;var t,r}).map(function(e){return t=r,e=e,a.request(t,e).catch(function(e){return{errors:[e]}});var t});return Promise.all(e).then(M)},e.declineInvitation=function(e){var t=encodeURIComponent(e.authentication.username),t=s(e)+"/community/users/"+t+"/invitations/"+e.invitationId+"/decline",e=u({},e);return a.request(t,e)},e.determineOwner=c,e.ensureMembership=O,e.exportItem=function(t){var r=t.authentication,n=t.id,o=t.title,i=t.exportFormat,u=t.exportParameters;return c(t).then(function(e){return s(t)+"/content/users/"+e+"/export"}).then(function(e){return a.request(e,{httpMethod:"POST",authentication:r,params:{itemId:n,title:o,exportFormat:i,exportParameters:u}})})},e.getGroup=h,e.getGroupCategorySchema=function(e,t){return e=s(t)+"/community/groups/"+e+"/categorySchema",t=u({httpMethod:"GET"},t),a.request(e,t)},e.getGroupContent=function(e,t){var r=s(t)+"/content/groups/"+e,e=u(u({httpMethod:"GET"},{params:{start:1,num:100}}),t);return t&&t.paging&&(e.params=u({},t.paging)),a.request(r,e)},e.getGroupUsers=function(e,t){return e=s(t)+"/community/groups/"+e+"/users",t=u({httpMethod:"GET"},t),a.request(e,t)},e.getItem=function(e,t){return e=m(e,t),t=u({httpMethod:"GET"},t),a.request(e,t)},e.getItemBaseUrl=m,e.getItemData=function(e,t){return e=m(e,t)+"/data",(t=u({httpMethod:"GET",params:{}},t)).file&&(t.params.f=null),a.request(e,t).catch(function(e){var t=RegExp(/The string did not match the expected pattern|(Unexpected end of (JSON input|data at line 1 column 1))/i);if(!t.test(e.message))throw e})},e.getItemGroups=function(e,t){return e=m(e,t)+"/groups",a.request(e,t)},e.getItemInfo=p,e.getItemMetadata=function(e,t){return p(e,u(u({},t),{fileName:"metadata/metadata.xml"}))},e.getItemParts=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/parts";return a.request(e,t)})},e.getItemResource=function(e,t){var r=t.readAs||"blob";return d(e,"/resources/"+t.fileName,r,t)},e.getItemResources=function(e,t){return e=m(e,t)+"/resources",(t=u({},t)).params=u({num:1e3},t.params),a.request(e,t)},e.getItemStatus=function(r){return c(r).then(function(e){var t=s(r)+"/content/users/"+e+"/items/"+r.id+"/status",e=a.appendCustomParams(r,["jobId","jobType"],{params:u({},r.params)});return a.request(t,e)})},e.getPortal=j,e.getPortalSettings=function(e,t){return e=e||"self",e=s(t)+"/portals/"+e+"/settings",t=u({httpMethod:"GET"},t),a.request(e,t)},e.getPortalUrl=s,e.getRelatedItems=function(e){var t=m(e.id,e)+"/relatedItems",r=u({httpMethod:"GET",params:{direction:e.direction}},e);return"string"==typeof e.relationshipType?r.params.relationshipType=e.relationshipType:r.params.relationshipTypes=e.relationshipType,delete r.direction,delete r.relationshipType,a.request(t,r)},e.getSelf=function(e){return j(null,e)},e.getSharingUrl=f,e.getUser=R,e.getUserContent=function(t){var e=t.folderId,r=t.start,n=void 0===r?1:r,r=t.num,o=void 0===r?10:r,i=t.authentication,u=e?"/"+e:"";return c(t).then(function(e){return s(t)+"/content/users/"+e+u}).then(function(e){return a.request(e,{httpMethod:"GET",authentication:i,params:{start:n,num:o}})})},e.getUserInvitation=function(e){var t=encodeURIComponent(e.authentication.username),r=s(e)+"/community/users/"+t+"/invitations/"+e.invitationId,t={httpMethod:"GET"},t=u(u({},e),t);return a.request(r,t)},e.getUserInvitations=function(e){var t={httpMethod:"GET"},r=encodeURIComponent(e.authentication.username),r=s(e)+"/community/users/"+r+"/invitations",t=u(u({},e),t);return a.request(r,t)},e.getUserMembership=v,e.getUserNotifications=function(e){var t={httpMethod:"GET"},r=encodeURIComponent(e.authentication.username),r=s(e)+"/community/users/"+r+"/notifications",t=u(u({},e),t);return a.request(r,t)},e.getUserTags=function(e){var t=e.username||e.authentication.username,t=s(e)+"/community/users/"+encodeURIComponent(t)+"/tags";return a.request(t,e)},e.getUserUrl=function(e){return s(e)+"/community/users/"+encodeURIComponent(e.username)},e.inviteGroupUsers=function(e){var t,r=e.id,n=s(e)+"/community/groups/"+r+"/invite",e=b((t=e).users,25).map(function(e){return function(e,t){t=Object.assign({},t);return t.params=u(u({},t.params),{users:e,role:t.role,expiration:t.expiration}),t}(e,t)}).map(function(e){return t=n,e=e,a.request(t,e).catch(function(e){return{errors:[e]}});var t});return Promise.all(e).then(C)},e.isItemOwner=l,e.isItemSharedWithGroup=E,e.isOrgAdmin=g,e.joinGroup=function(e){var t=s(e)+"/community/groups/"+e.id+"/join";return a.request(t,e)},e.leaveGroup=function(e){var t=s(e)+"/community/groups/"+e.id+"/leave";return a.request(t,e)},e.moveItem=function(r){return c(r).then(function(e){var t=s(r)+"/content/users/"+e+"/items/"+r.itemId+"/move",e=(e=r.folderId)||"/";return r.params=u({folder:e},r.params),a.request(t,r)})},e.protectGroup=function(e){var t=s(e)+"/community/groups/"+e.id+"/protect";return a.request(t,e)},e.protectItem=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/protect";return a.request(e,t)})},e.reassignItem=function(r){return g(r).then(function(e){if(!e)throw Error("Item "+r.id+" can not be reassigned because current user is not an organization administrator.");var t=s(r)+"/content/users/"+r.currentOwner+"/items/"+r.id+"/reassign",e={params:{targetUsername:r.targetUsername,targetFolderName:r.targetFolderName},authentication:r.authentication};return a.request(t,e)})},e.removeFolder=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+encodeURIComponent(e)+"/"+t.folderId+"/delete";return a.request(e,t)})},e.removeGroup=function(e){var t=s(e)+"/community/groups/"+e.id+"/delete",e=u({},e);return a.request(t,e)},e.removeGroupUsers=P,e.removeItem=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/delete";return a.request(e,t)})},e.removeItemRelationship=function(r){return c(r).then(function(e){var t=s(r)+"/content/users/"+e+"/deleteRelationship",e=a.appendCustomParams(r,["originItemId","destinationItemId","relationshipType"],{params:u({},r.params)});return a.request(t,e)})},e.removeItemResource=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/removeResources";return t.params=u(u({},t.params),{resource:t.resource}),void 0!==t.deleteAll&&(t.params.deleteAll=t.deleteAll),a.request(e,t)})},e.removeNotification=function(e){var t=encodeURIComponent(e.authentication.username),t=s(e)+"/community/users/"+t+"/notifications/"+e.id+"/delete";return a.request(t,e)},e.scrubControlChars=i,e.searchGroupContent=function(e){return q(e,"groupContent")},e.searchGroupUsers=function(e,t){return e=s(t)+"/community/groups/"+e+"/userlist",t=a.appendCustomParams(t||{},["name","num","start","sortField","sortOrder","joined","memberType"],{httpMethod:"GET"}),a.request(e,t)},e.searchGroups=function(e){return q(e,"group")},e.searchItems=w,e.searchUsers=function(e){return q(e,"user")},e.serializeItem=n,e.setItemAccess=function(t){var r=f(t);return l(t)?x(r,t):g(t).then(function(e){if(e)return x(r,t);throw Error("This item can not be shared by "+t.authentication.username+". They are neither the item owner nor an organization admin.")})},e.shareItemWithGroup=function(i){return E(i).then(function(e){if(e)return{itemId:i.id,shortcut:!0,notSharedWith:[]};var t=i.authentication.username,e=i.owner,n=i.confirmItemControl,e=e||t;if(e===t)return N(i);var o=!1;return Promise.all([R({username:t,authentication:i.authentication}),R({username:e,authentication:i.authentication}),v(i)]).then(function(e){var t=e[0],r=e[1],e=e[2];return function(e,t,r,n,o,i){var u=[];if(i.groupId!==e.favGroupId)if(t){if(!n)throw Error("This item can not be shared to shared editing group "+i.groupId+" by "+e.username+" as they not the item owner or org admin.");u.push(O(e,e,!1,"Error adding "+e.username+" as member to edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i),O(e,o,!0,"none"===r?"Error adding user "+o.username+" to edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.":"Error promoting user "+o.username+" to admin in edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i))}else if(n)u.push(O(e,e,!1,"Error adding "+e.username+" as member to view group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i));else if("none"===r)throw new Error("This item can not be shared by "+e.username+" as they are not a member of the specified group "+i.groupId+".");return u}(t,!!n,e,o="org_admin"===t.role&&!t.roleId,r,i)}).then(function(e){var t=e[0],r=(void 0===t?{promise:Promise.resolve({notAdded:[]}),revert:function(e){return Promise.resolve(e)}}:t).revert;return Promise.all(e.map(function(e){return e.promise})).then(function(){return N(i,o)}).then(function(e){return r(e)})})}).then(function(e){if(e.notSharedWith.length)throw Error("Item "+i.id+" could not be shared to group "+i.groupId+".");return e})},e.unprotectGroup=function(e){var t=s(e)+"/community/groups/"+e.id+"/unprotect";return a.request(t,e)},e.unprotectItem=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/unprotect";return a.request(e,t)})},e.unshareItemWithGroup=function(i){return E(i).then(function(e){if(!e)return Promise.resolve({itemId:i.id,shortcut:!0,notUnsharedFrom:[]});var n=i.authentication.username,o=i.owner;return Promise.all([v(i),R({username:n,authentication:i.authentication})]).then(function(e){var t=e[0],r=e[1],e=(o||n)===n,r="org_admin"===r.role&&!r.roleId;if(!e&&!r&&["admin","owner"].indexOf(t)<0)throw Error("This item can not be unshared from group "+i.groupId+" by "+n+" as they not the item owner, an org admin, group admin or group owner.");return function(e){var t=e.authentication.username,r=e.owner||t,n=s(e)+"/content/items/"+e.id+"/unshare";r===t&&(n=s(e)+"/content/users/"+r+"/items/"+e.id+"/unshare");return e.params={groups:e.groupId},a.request(n,e)}(i)}).then(function(e){if(e.notUnsharedFrom.length)throw Error("Item "+i.id+" could not be unshared to group "+i.groupId);return e})})},e.updateGroup=function(e){var t=s(e)+"/community/groups/"+e.group.id+"/update";return e.params=u(u({},e.params),e.group),a.request(t,e)},e.updateItem=t,e.updateItemInfo=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/updateinfo";return t.params=u({folderName:t.folderName,file:t.file},t.params),a.request(e,t)})},e.updateItemResource=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/updateResources";return t.params=u({file:t.resource,fileName:t.name,resourcesPrefix:t.prefix,text:t.content},t.params),void 0!==t.private&&(t.params.access=t.private?"private":"inherit"),a.request(e,t)})},e.updateUser=function(e){var t=e.user.username||e.authentication.username,t=s(e)+"/community/users/"+encodeURIComponent(t)+"/update";return e.params=u(u({},e.user),e.params),delete e.user,a.request(t,e)},e.updateUserMemberships=S,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="undefined"!=typeof globalThis?globalThis:e||self).arcgisRest=e.arcgisRest||{},e.arcgisRest)}(this,function(e,a){"use strict";var u=function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e){return void 0===e&&(e={}),e.portal?a.cleanUrl(e.portal):e.authentication?e.authentication.portal:"https://www.arcgis.com/sharing/rest"}function n(e){var t=JSON.parse(JSON.stringify(e));return t.data&&("undefined"!=typeof Blob&&e.data instanceof Blob||"ReadStream"===e.data.constructor.name?t.file=e.data:t.text=e.data,delete t.data),t}function c(e){return e.owner?Promise.resolve(e.owner):e.item&&e.item.owner?Promise.resolve(e.item.owner):e.authentication&&e.authentication.getUsername?e.authentication.getUsername():Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."))}function t(t){return c(t).then(function(e){e=t.folderId?s(t)+"/content/users/"+e+"/"+t.folderId+"/items/"+t.item.id+"/update":s(t)+"/content/users/"+e+"/items/"+t.item.id+"/update";return t.params=u(u({},t.params),n(t.item)),a.request(e,t)})}function r(r){return r.multipart&&!r.filename?Promise.reject(new Error("The filename is required for a multipart request.")):c(r).then(function(e){var t=s(r)+"/content/users/"+e,e=t+"/addItem";r.folderId&&(e=t+"/"+r.folderId+"/addItem"),r.params=u(u({},r.params),n(r.item));t=a.appendCustomParams(r,["owner","folderId","file","dataUrl","text","async","multipart","filename","overwrite"],{params:u({},r.params)});return a.request(e,t)})}var o=/[\x00-\x1F\x7F-\x9F\xA0]/g;function i(e){return e.replace(o,"")}var m=function(e,t){return("string"==typeof t?t:s(t))+"/content/items/"+e};function p(e,t){var r=t||{},n=r.fileName,r=r.readAs;return d(e,"/info/"+(void 0===n?"iteminfo.xml":n),void 0===r?"text":r,u({httpMethod:"GET"},t))}function d(e,t,r,n){var t=""+m(e,n)+t,n=u({params:{}},n),o=n.rawResponse;return n.rawResponse=!0,n.params.f=null,a.request(t,n).then(function(e){return o?e:"json"!==r?e[r]():e.text().then(function(e){return JSON.parse(i(e))})})}function h(e,t){e=s(t)+"/community/groups/"+e,t=u({httpMethod:"GET"},t);return a.request(e,t)}function f(e){var t=e.authentication.username,t=e.owner||t;return s(e)+"/content/users/"+encodeURIComponent(t)+"/items/"+e.id+"/share"}function l(e){var t=e.authentication.username;return(e.owner||t)===t}function g(e){return e.authentication.getUser(e).then(function(e){return e&&"org_admin"===e.role&&!e.roleId})}function v(e){return h(e.groupId,e).then(function(e){return e.userMembership.memberType}).catch(function(){return"none"})}var y=(I.prototype.match=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.termStack=this.termStack.concat(e),this},I.prototype.in=function(e){var t="`in("+(e?'"'+e+'"':"")+")`";return this.hasRange||this.hasTerms?(e&&"*"!==e&&(this.q+=e+":"),this.commit()):(a.warn(t+" was called with no call to `match(...)` or `from(...)`/`to(...)`. Your query was not modified."),this)},I.prototype.startGroup=function(){return this.commit(),0<this.openGroups&&(this.q+=" "),this.openGroups++,this.q+="(",this},I.prototype.endGroup=function(){return this.openGroups<=0?a.warn("`endGroup(...)` was called without calling `startGroup(...)` first. Your query was not modified."):(this.commit(),this.openGroups--,this.q+=")"),this},I.prototype.and=function(){return this.addModifier("and")},I.prototype.or=function(){return this.addModifier("or")},I.prototype.not=function(){return this.addModifier("not")},I.prototype.from=function(e){return this.hasTerms?a.warn('`from(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'):this.rangeStack[0]=e,this},I.prototype.to=function(e){return this.hasTerms?a.warn('`to(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'):this.rangeStack[1]=e,this},I.prototype.boost=function(e){return this.commit(),this.q+="^"+e,this},I.prototype.toParam=function(){return this.commit(),this.cleanup(),this.q},I.prototype.clone=function(){return this.commit(),this.cleanup(),new I(this.q+"")},I.prototype.addModifier=function(e){return this.currentModifer?(a.warn("You have called `"+this.currentModifer+"()` after `"+e+"()`. Your current query was not modified."),this):(this.commit(),""===this.q&&"not"!==e?a.warn("You have called `"+e+"()` without calling another method to modify your query first. Try calling `match()` first."):(this.currentModifer=e,this.q+=""===this.q?"":" ",this.q+=e.toUpperCase()+" "),this)},I.prototype.hasWhiteSpace=function(e){return/\s/g.test(e)},I.prototype.formatTerm=function(e){return e instanceof Date?e.getTime():"string"==typeof e&&this.hasWhiteSpace(e)?'"'+e+'"':e},I.prototype.commit=function(){var t=this;return this.currentModifer=void 0,this.hasRange&&(this.q+="["+this.formatTerm(this.rangeStack[0])+" TO "+this.formatTerm(this.rangeStack[1])+"]",this.rangeStack=[void 0,void 0]),this.hasTerms&&(this.q+=this.termStack.map(function(e){return t.formatTerm(e)}).join(" "),this.termStack=[]),this},Object.defineProperty(I.prototype,"hasTerms",{get:function(){return 0<this.termStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"hasRange",{get:function(){return this.rangeStack.length&&this.rangeStack[0]&&this.rangeStack[1]},enumerable:!1,configurable:!0}),I.prototype.cleanup=function(){if(0<this.openGroups)for(a.warn("Automatically closing "+this.openGroups+" group(s). You can use `endGroup(...)` to remove this warning.");0<this.openGroups;)this.q+=")",this.openGroups--;var e=this.q;this.q=e.replace(/( AND ?| NOT ?| OR ?)*$/,""),e!==this.q&&a.warn("`startGroup(...)` was called without calling `endGroup(...)` first. Your query was not modified."),this.q=this.q.replace(/(\(\))*/,"")},I);function I(e){void 0===e&&(e=""),this.termStack=[],this.rangeStack=[],this.openGroups=0,this.q=e}function q(r,n){var e,t="string"==typeof r||r instanceof y?{httpMethod:"GET",params:{q:r}}:a.appendCustomParams(r,["q","num","start","sortField","sortOrder"],{httpMethod:"GET"});switch(n){case"item":e="/search";break;case"group":e="/community/groups";break;case"groupContent":if("string"==typeof r||r instanceof y||!r.groupId)return Promise.reject(new Error("you must pass a `groupId` option to `searchGroupContent`"));e="/content/groups/"+r.groupId+"/search";break;default:e="/portals/self/users/search"}var o=s(t)+e;return a.request(o,t).then(function(t){return t.nextStart&&-1!==t.nextStart&&(t.nextPage=function(){var e;return"string"==typeof r||r instanceof y?e={q:r,start:t.nextStart}:(e=r).start=t.nextStart,q(e,n)}),t})}function w(e){return q(e,"item")}function b(e,t){if(0===e.length)return[];for(var r=[],n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function T(e){var t=e.id,r=s(e)+"/community/groups/"+t+"/addUsers",t=Object.assign({},e,{admins:void 0,users:void 0}),t=function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,o++)n[o]=i[u];return n}(G("users",e.users,t),G("admins",e.admins,t)).map(function(e){return t=r,e=e,a.request(t,e).catch(function(e){return{errors:[e]}});var t});return Promise.all(t).then(U)}function G(o,e,i){return!e||e.length<1?[]:b(e,25).map(function(e){return t=o,r=e,n=i,Object.assign({},n,((e={})[t]=r,e.params=u(u({},n.params),((n={})[t]=r,n)),e));var t,r,n})}function U(e){var t=e.filter(function(e){return e.notAdded}).reduce(function(e,t){return e.concat(t.notAdded)},[]),e=e.filter(function(e){return e.errors}).reduce(function(e,t){return e.concat(t.errors)},[]),t={notAdded:t};return 0<e.length&&(t.errors=e),t}function P(t){var e=t.id,r=t.users,n=s(t)+"/community/groups/"+e+"/removeUsers",r=b(r,25).map(function(e){e=u(u({},t),{users:e,params:{users:e}});return a.request(n,e).catch(function(e){return{errors:[e]}})});return Promise.all(r).then(function(e){var t=function(r){return e.filter(function(e){return e[r]}).reduce(function(e,t){return e.concat(t[r])},[])},r=t("errors"),t={notRemoved:t("notRemoved")};return r.length?u(u({},t),{errors:r}):t})}function C(e){var t=e.every(function(e){return e.success}),e=e.reduce(function(e,t){return e.concat(t.errors||[])},[]),t={success:t};return 0<e.length&&(t.errors=e),t}function S(e){var t=s(e)+"/community/groups/"+e.id+"/updateUsers",r={authentication:e.authentication,params:{}};return"admin"===e.newMemberType?r.params.admins=e.users:r.params.users=e.users,a.request(t,r)}function M(e){var t=e.every(function(e){return e.success}),e=e.reduce(function(e,t){return e.concat(t.errors||[])},[]),t={success:t};return 0<e.length&&(t.errors=e),t}function E(e){var t,r,n={httpMethod:"GET"};return"string"==typeof e?r="https://www.arcgis.com/sharing/rest/community/users/"+e:(t=e.username||e.authentication.username,r=s(e)+"/community/users/"+encodeURIComponent(t),n=u(u({},e),n)),a.request(r,n)}function R(e,t){return t.params=u({org:!1,everyone:!1},t.params),"private"===t.access&&(t.params.groups=" "),"org"===t.access&&(t.params.org=!0),"public"===t.access&&(t.params.account=!0,t.params.everyone=!0),a.request(e,t)}function x(t){return w({q:"id: "+t.id+" AND group: "+t.groupId,start:1,num:10,sortField:"title",authentication:t.authentication,httpMethod:"POST"}).then(function(e){if(0<e.total)return e.results.some(function(e){return e.id===t.id})})}function N(e,t){void 0===t&&(t=!1);var r=e.authentication.username,n=e.owner||r,o=s(e)+"/content/items/"+e.id+"/share";return n!==r&&!t||(o=s(e)+"/content/users/"+n+"/items/"+e.id+"/share"),e.params={groups:e.groupId,confirmItemControl:e.confirmItemControl},a.request(o,e)}function O(e,t,r,n,o){var i,u,a=t.groups||[],s=a.find(function(e){return e.id===o.groupId});if(e.orgId!==t.orgId)throw Error("User "+t.username+" is not a member of the same org as "+e.username+". Consequently they can not be added added to group "+o.groupId+" nor can item "+o.id+" be shared to the group.");if(!s&&511<a.length)throw Error("User "+t.username+" already has 512 groups, and can not be added to group "+o.groupId+". Consequently item "+o.id+" can not be shared to the group.");return u=s?r&&"member"===s.userMembership.memberType?(i=S({id:o.groupId,users:[t.username],newMemberType:"admin",authentication:o.authentication}).then(function(e){e=e.results.reduce(function(e,t){return t.success||e.push(t.username),e},[]);return Promise.resolve({notAdded:e})}).catch(function(){return{notAdded:[t.username]}}),function(e){return S({id:o.groupId,users:[t.username],newMemberType:"member",authentication:o.authentication}).then(function(){return e}).catch(function(){return e})}):(i=Promise.resolve({notAdded:[]}),function(e){return Promise.resolve(e)}):(r=r?"admins":"users",i=T(((u={id:o.groupId})[r]=[t.username],u.authentication=o.authentication,u)).then(function(e){if(e.errors&&e.errors.length)throw e.errors[0];return e}).catch(function(){return{notAdded:[t.username]}}),function(e){return P({id:o.groupId,users:[t.username],authentication:o.authentication}).then(function(){return e})}),{promise:i.then(function(e){if(e.notAdded.length)throw new Error(n);return e}),revert:u}}function j(e,t,r){var n=r.portal+"/portals/self/isServiceNameAvailable";return a.request(n,{params:{name:e,type:t},httpMethod:"GET",authentication:r})}function A(e,t){e=e||"self",e=s(t)+"/portals/"+e,t=u({httpMethod:"GET"},t);return a.request(e,t)}e.SearchQueryBuilder=y,e.acceptInvitation=function(e){var t=encodeURIComponent(e.authentication.username),t=s(e)+"/community/users/"+t+"/invitations/"+e.invitationId+"/accept",e=u({},e);return a.request(t,e)},e.addGroupUsers=T,e.addItemData=function(e){return delete(e=u({item:{id:e.id,data:e.data}},e)).id,delete e.data,t(e)},e.addItemPart=function(r){var n=r.partNum;return!Number.isInteger(n)||n<1||1e4<n?Promise.reject(new Error("The part number must be an integer between 1 to 10000, inclusive.")):c(r).then(function(e){var t=s(r)+"/content/users/"+e+"/items/"+r.id+"/addPart?partNum="+n,e=a.appendCustomParams(r,["file"],{params:u({},r.params)});return a.request(t,e)})},e.addItemRelationship=function(r){return c(r).then(function(e){var t=s(r)+"/content/users/"+e+"/addRelationship",e=a.appendCustomParams(r,["originItemId","destinationItemId","relationshipType"],{params:u({},r.params)});return a.request(t,e)})},e.addItemResource=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/addResources";return t.params=u({file:t.resource,fileName:t.name,resourcesPrefix:t.prefix,text:t.content,access:t.private?"private":"inherit"},t.params),a.request(e,t)})},e.cancelItemUpload=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/cancel";return a.request(e,t)})},e.commitItemUpload=function(r){return c(r).then(function(e){var t=s(r)+"/content/users/"+e+"/items/"+r.id+"/commit",e=a.appendCustomParams(r,[],{params:u(u({},r.params),n(r.item))});return a.request(t,e)})},e.createFolder=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/createFolder";return t.params=u({title:t.title},t.params),a.request(e,t)})},e.createGroup=function(e){var t=s(e)+"/community/createGroup";return e.params=u(u({},e.params),e.group),a.request(t,e)},e.createGroupNotification=function(e){var t=s(e)+"/community/groups/"+e.id+"/createNotification",e=u({params:u({subject:e.subject,message:e.message,users:e.users,notificationChannelType:e.notificationChannelType||"email",clientId:e.clientId,silentNotification:e.silentNotification,notifyAll:!e.users||0===e.users.length},e.params)},e);return a.request(t,e)},e.createItem=function(e){return r(u({folderId:null},e))},e.createItemInFolder=r,e.createOrgNotification=function(e){var n,r=s(e)+"/portals/self/createNotification",e=b((n=e).users,n.batchSize||25).map(function(e){return t=e,r=n,(e=Object.assign({},r)).params=u(u({},e.params),{users:t,subject:r.subject,message:r.message,notificationChannelType:e.notificationChannelType}),e;var t,r}).map(function(e){return t=r,e=e,a.request(t,e).catch(function(e){return{errors:[e]}});var t});return Promise.all(e).then(M)},e.declineInvitation=function(e){var t=encodeURIComponent(e.authentication.username),t=s(e)+"/community/users/"+t+"/invitations/"+e.invitationId+"/decline",e=u({},e);return a.request(t,e)},e.determineOwner=c,e.ensureMembership=O,e.exportItem=function(t){var r=t.authentication,n=t.id,o=t.title,i=t.exportFormat,u=t.exportParameters;return c(t).then(function(e){return s(t)+"/content/users/"+e+"/export"}).then(function(e){return a.request(e,{httpMethod:"POST",authentication:r,params:{itemId:n,title:o,exportFormat:i,exportParameters:u}})})},e.getGroup=h,e.getGroupCategorySchema=function(e,t){return e=s(t)+"/community/groups/"+e+"/categorySchema",t=u({httpMethod:"GET"},t),a.request(e,t)},e.getGroupContent=function(e,t){var r=s(t)+"/content/groups/"+e,e=u(u({httpMethod:"GET"},{params:{start:1,num:100}}),t);return t&&t.paging&&(e.params=u({},t.paging)),a.request(r,e)},e.getGroupUsers=function(e,t){return e=s(t)+"/community/groups/"+e+"/users",t=u({httpMethod:"GET"},t),a.request(e,t)},e.getItem=function(e,t){return e=m(e,t),t=u({httpMethod:"GET"},t),a.request(e,t)},e.getItemBaseUrl=m,e.getItemData=function(e,t){return e=m(e,t)+"/data",(t=u({httpMethod:"GET",params:{}},t)).file&&(t.params.f=null),a.request(e,t).catch(function(e){var t=RegExp(/The string did not match the expected pattern|(Unexpected end of (JSON input|data at line 1 column 1))/i);if(!t.test(e.message))throw e})},e.getItemGroups=function(e,t){return e=m(e,t)+"/groups",a.request(e,t)},e.getItemInfo=p,e.getItemMetadata=function(e,t){return p(e,u(u({},t),{fileName:"metadata/metadata.xml"}))},e.getItemParts=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/parts";return a.request(e,t)})},e.getItemResource=function(e,t){var r=t.readAs||"blob";return d(e,"/resources/"+t.fileName,r,t)},e.getItemResources=function(e,t){return e=m(e,t)+"/resources",(t=u({},t)).params=u({num:1e3},t.params),a.request(e,t)},e.getItemStatus=function(r){return c(r).then(function(e){var t=s(r)+"/content/users/"+e+"/items/"+r.id+"/status",e=a.appendCustomParams(r,["jobId","jobType"],{params:u({},r.params)});return a.request(t,e)})},e.getPortal=A,e.getPortalSettings=function(e,t){return e=e||"self",e=s(t)+"/portals/"+e+"/settings",t=u({httpMethod:"GET"},t),a.request(e,t)},e.getPortalUrl=s,e.getRelatedItems=function(e){var t=m(e.id,e)+"/relatedItems",r=u({httpMethod:"GET",params:{direction:e.direction}},e);return"string"==typeof e.relationshipType?r.params.relationshipType=e.relationshipType:r.params.relationshipTypes=e.relationshipType,delete r.direction,delete r.relationshipType,a.request(t,r)},e.getSelf=function(e){return A(null,e)},e.getSharingUrl=f,e.getUniqueServiceName=function t(r,n,o,i){var u=i?r+"_"+i:r;return j(u,n,o).then(function(e){return e.available?u:t(r,n,o,i+=1)})},e.getUser=E,e.getUserContent=function(t){var e=t.folderId,r=t.start,n=void 0===r?1:r,r=t.num,o=void 0===r?10:r,i=t.authentication,u=e?"/"+e:"";return c(t).then(function(e){return s(t)+"/content/users/"+e+u}).then(function(e){return a.request(e,{httpMethod:"GET",authentication:i,params:{start:n,num:o}})})},e.getUserInvitation=function(e){var t=encodeURIComponent(e.authentication.username),r=s(e)+"/community/users/"+t+"/invitations/"+e.invitationId,t={httpMethod:"GET"},t=u(u({},e),t);return a.request(r,t)},e.getUserInvitations=function(e){var t={httpMethod:"GET"},r=encodeURIComponent(e.authentication.username),r=s(e)+"/community/users/"+r+"/invitations",t=u(u({},e),t);return a.request(r,t)},e.getUserMembership=v,e.getUserNotifications=function(e){var t={httpMethod:"GET"},r=encodeURIComponent(e.authentication.username),r=s(e)+"/community/users/"+r+"/notifications",t=u(u({},e),t);return a.request(r,t)},e.getUserTags=function(e){var t=e.username||e.authentication.username,t=s(e)+"/community/users/"+encodeURIComponent(t)+"/tags";return a.request(t,e)},e.getUserUrl=function(e){return s(e)+"/community/users/"+encodeURIComponent(e.username)},e.inviteGroupUsers=function(e){var t,r=e.id,n=s(e)+"/community/groups/"+r+"/invite",e=b((t=e).users,25).map(function(e){return function(e,t){t=Object.assign({},t);return t.params=u(u({},t.params),{users:e,role:t.role,expiration:t.expiration}),t}(e,t)}).map(function(e){return t=n,e=e,a.request(t,e).catch(function(e){return{errors:[e]}});var t});return Promise.all(e).then(C)},e.isItemOwner=l,e.isItemSharedWithGroup=x,e.isOrgAdmin=g,e.isServiceNameAvailable=j,e.joinGroup=function(e){var t=s(e)+"/community/groups/"+e.id+"/join";return a.request(t,e)},e.leaveGroup=function(e){var t=s(e)+"/community/groups/"+e.id+"/leave";return a.request(t,e)},e.moveItem=function(r){return c(r).then(function(e){var t=s(r)+"/content/users/"+e+"/items/"+r.itemId+"/move",e=(e=r.folderId)||"/";return r.params=u({folder:e},r.params),a.request(t,r)})},e.protectGroup=function(e){var t=s(e)+"/community/groups/"+e.id+"/protect";return a.request(t,e)},e.protectItem=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/protect";return a.request(e,t)})},e.reassignItem=function(r){return g(r).then(function(e){if(!e)throw Error("Item "+r.id+" can not be reassigned because current user is not an organization administrator.");var t=s(r)+"/content/users/"+r.currentOwner+"/items/"+r.id+"/reassign",e={params:{targetUsername:r.targetUsername,targetFolderName:r.targetFolderName},authentication:r.authentication};return a.request(t,e)})},e.removeFolder=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+encodeURIComponent(e)+"/"+t.folderId+"/delete";return a.request(e,t)})},e.removeGroup=function(e){var t=s(e)+"/community/groups/"+e.id+"/delete",e=u({},e);return a.request(t,e)},e.removeGroupUsers=P,e.removeItem=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/delete";return a.request(e,t)})},e.removeItemRelationship=function(r){return c(r).then(function(e){var t=s(r)+"/content/users/"+e+"/deleteRelationship",e=a.appendCustomParams(r,["originItemId","destinationItemId","relationshipType"],{params:u({},r.params)});return a.request(t,e)})},e.removeItemResource=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/removeResources";return t.params=u(u({},t.params),{resource:t.resource}),void 0!==t.deleteAll&&(t.params.deleteAll=t.deleteAll),a.request(e,t)})},e.removeNotification=function(e){var t=encodeURIComponent(e.authentication.username),t=s(e)+"/community/users/"+t+"/notifications/"+e.id+"/delete";return a.request(t,e)},e.scrubControlChars=i,e.searchGroupContent=function(e){return q(e,"groupContent")},e.searchGroupUsers=function(e,t){return e=s(t)+"/community/groups/"+e+"/userlist",t=a.appendCustomParams(t||{},["name","num","start","sortField","sortOrder","joined","memberType"],{httpMethod:"GET"}),a.request(e,t)},e.searchGroups=function(e){return q(e,"group")},e.searchItems=w,e.searchUsers=function(e){return q(e,"user")},e.serializeItem=n,e.setItemAccess=function(t){var r=f(t);return l(t)?R(r,t):g(t).then(function(e){if(e)return R(r,t);throw Error("This item can not be shared by "+t.authentication.username+". They are neither the item owner nor an organization admin.")})},e.shareItemWithGroup=function(i){return x(i).then(function(e){if(e)return{itemId:i.id,shortcut:!0,notSharedWith:[]};var t=i.authentication.username,e=i.owner,n=i.confirmItemControl,e=e||t;if(e===t)return N(i);var o=!1;return Promise.all([E({username:t,authentication:i.authentication}),E({username:e,authentication:i.authentication}),v(i)]).then(function(e){var t=e[0],r=e[1],e=e[2];return function(e,t,r,n,o,i){var u=[];if(i.groupId!==e.favGroupId)if(t){if(!n)throw Error("This item can not be shared to shared editing group "+i.groupId+" by "+e.username+" as they not the item owner or org admin.");u.push(O(e,e,!1,"Error adding "+e.username+" as member to edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i),O(e,o,!0,"none"===r?"Error adding user "+o.username+" to edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.":"Error promoting user "+o.username+" to admin in edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i))}else if(n)u.push(O(e,e,!1,"Error adding "+e.username+" as member to view group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i));else if("none"===r)throw new Error("This item can not be shared by "+e.username+" as they are not a member of the specified group "+i.groupId+".");return u}(t,!!n,e,o="org_admin"===t.role&&!t.roleId,r,i)}).then(function(e){var t=e[0],r=(void 0===t?{promise:Promise.resolve({notAdded:[]}),revert:function(e){return Promise.resolve(e)}}:t).revert;return Promise.all(e.map(function(e){return e.promise})).then(function(){return N(i,o)}).then(function(e){return r(e)})})}).then(function(e){if(e.notSharedWith.length)throw Error("Item "+i.id+" could not be shared to group "+i.groupId+".");return e})},e.unprotectGroup=function(e){var t=s(e)+"/community/groups/"+e.id+"/unprotect";return a.request(t,e)},e.unprotectItem=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/unprotect";return a.request(e,t)})},e.unshareItemWithGroup=function(i){return x(i).then(function(e){if(!e)return Promise.resolve({itemId:i.id,shortcut:!0,notUnsharedFrom:[]});var n=i.authentication.username,o=i.owner;return Promise.all([v(i),E({username:n,authentication:i.authentication})]).then(function(e){var t=e[0],r=e[1],e=(o||n)===n,r="org_admin"===r.role&&!r.roleId;if(!e&&!r&&["admin","owner"].indexOf(t)<0)throw Error("This item can not be unshared from group "+i.groupId+" by "+n+" as they not the item owner, an org admin, group admin or group owner.");return function(e){var t=e.authentication.username,r=e.owner||t,n=s(e)+"/content/items/"+e.id+"/unshare";r===t&&(n=s(e)+"/content/users/"+r+"/items/"+e.id+"/unshare");return e.params={groups:e.groupId},a.request(n,e)}(i)}).then(function(e){if(e.notUnsharedFrom.length)throw Error("Item "+i.id+" could not be unshared to group "+i.groupId);return e})})},e.updateGroup=function(e){var t=s(e)+"/community/groups/"+e.group.id+"/update";return e.params=u(u({},e.params),e.group),a.request(t,e)},e.updateItem=t,e.updateItemInfo=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/updateinfo";return t.params=u({folderName:t.folderName,file:t.file},t.params),a.request(e,t)})},e.updateItemResource=function(t){return c(t).then(function(e){e=s(t)+"/content/users/"+e+"/items/"+t.id+"/updateResources";return t.params=u({file:t.resource,fileName:t.name,resourcesPrefix:t.prefix,text:t.content},t.params),void 0!==t.private&&(t.params.access=t.private?"private":"inherit"),a.request(e,t)})},e.updateUser=function(e){var t=e.user.username||e.authentication.username,t=s(e)+"/community/users/"+encodeURIComponent(t)+"/update";return e.params=u(u({},e.user),e.params),delete e.user,a.request(t,e)},e.updateUserMemberships=S,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=portal.umd.min.js.map
{
"name": "@esri/arcgis-rest-portal",
"version": "3.1.2",
"version": "3.2.0",
"description": "ArcGIS Online and Enterprise content and user helpers for @esri/arcgis-rest-request",

@@ -16,8 +16,8 @@ "main": "dist/node/index.js",

"dependencies": {
"@esri/arcgis-rest-types": "^3.1.2",
"@esri/arcgis-rest-types": "^3.2.0",
"tslib": "^1.13.0"
},
"devDependencies": {
"@esri/arcgis-rest-auth": "^3.1.2",
"@esri/arcgis-rest-request": "^3.1.2"
"@esri/arcgis-rest-auth": "^3.2.0",
"@esri/arcgis-rest-request": "^3.2.0"
},

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

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 too big to display

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