@esri/solution-common 6.6.0-next.20260401 → 6.6.0-next.20260403084331
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -243,10 +243,18 @@ exports.getGroupContents = getGroupContents;
|
|
|
243
243
|
* or response error code
|
|
244
244
|
*/
|
|
245
245
|
function getItemBase(itemId, authentication) {
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
const requestOptions = { authentication };
|
|
247
|
+
return (0, arcgisRestJS_1.restSearchItems)({
|
|
248
|
+
q: `id:${itemId}`,
|
|
249
|
+
num: 1,
|
|
250
|
+
...requestOptions,
|
|
251
|
+
}).then((searchResponse) => {
|
|
252
|
+
const item = searchResponse?.results?.[0];
|
|
253
|
+
if (!item || item.id !== itemId) {
|
|
254
|
+
throw new Error(`Item not found via search: ${itemId}`);
|
|
255
|
+
}
|
|
256
|
+
return item;
|
|
257
|
+
});
|
|
250
258
|
}
|
|
251
259
|
exports.getItemBase = getItemBase;
|
|
252
260
|
/**
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* @module restHelpersGet
|
|
20
20
|
*/
|
|
21
21
|
import { blobToFile, blobToJson, blobToText, checkUrlPathTermination, getProp } from "./generalHelpers";
|
|
22
|
-
import { getGroup, getGroupContent,
|
|
22
|
+
import { getGroup, getGroupContent, getRelatedItems, request, restGetGroupCategorySchema as portalGetGroupCategorySchema, restGetItemResources as portalGetItemResources, restGetPortal as portalGetPortal, restSearchItems, } from "./arcgisRestJS";
|
|
23
23
|
import { getBlob } from "./resources/get-blob";
|
|
24
24
|
import { searchGroups, searchGroupContents } from "./restHelpers";
|
|
25
25
|
// ------------------------------------------------------------------------------------------------------------------ //
|
|
@@ -227,10 +227,18 @@ export function getGroupContents(groupId, authentication) {
|
|
|
227
227
|
* or response error code
|
|
228
228
|
*/
|
|
229
229
|
export function getItemBase(itemId, authentication) {
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
230
|
+
const requestOptions = { authentication };
|
|
231
|
+
return restSearchItems({
|
|
232
|
+
q: `id:${itemId}`,
|
|
233
|
+
num: 1,
|
|
234
|
+
...requestOptions,
|
|
235
|
+
}).then((searchResponse) => {
|
|
236
|
+
const item = searchResponse?.results?.[0];
|
|
237
|
+
if (!item || item.id !== itemId) {
|
|
238
|
+
throw new Error(`Item not found via search: ${itemId}`);
|
|
239
|
+
}
|
|
240
|
+
return item;
|
|
241
|
+
});
|
|
234
242
|
}
|
|
235
243
|
/**
|
|
236
244
|
* Gets the data information of an AGO item in its raw (Blob) form and casts it as a file using the supplied name.
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
Built 04/
|
|
2
|
-
|
|
3
|
-
commit
|
|
4
|
-
Author:
|
|
5
|
-
Date:
|
|
1
|
+
Built 04/03/2026 8:39:17.49
|
|
2
|
+
prev8048-getItem-swap
|
|
3
|
+
commit 821200a15016474079e07f2595ce7cb11b1726e0
|
|
4
|
+
Author: Previn Wong <PWong@esri.com>
|
|
5
|
+
Date: Fri Apr 3 08:35:39 2026 -0700
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
version update code
|
|
8
|
+
|
|
9
|
+
version update code
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/solution-common",
|
|
3
|
-
"version": "6.6.0-next.
|
|
3
|
+
"version": "6.6.0-next.20260403084331",
|
|
4
4
|
"description": "Provides general helper functions for @esri/solution.js.",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"esri",
|
|
97
97
|
"ES6"
|
|
98
98
|
],
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "821200a15016474079e07f2595ce7cb11b1726e0"
|
|
100
100
|
}
|