@esri/solution-common 1.2.0 → 1.3.0
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.
- package/dist/esm/generalHelpers.d.ts +12 -1
- package/dist/esm/generalHelpers.js +22 -0
- package/dist/esm/generalHelpers.js.map +1 -1
- package/dist/esm/restHelpers.d.ts +53 -8
- package/dist/esm/restHelpers.js +139 -13
- package/dist/esm/restHelpers.js.map +1 -1
- package/dist/esm/templatization.js +1 -0
- package/dist/esm/templatization.js.map +1 -1
- package/dist/node/completeItem.js +3 -2
- package/dist/node/completeItem.js.map +1 -1
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.js +2 -1
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.js.map +1 -1
- package/dist/node/deleteHelpers/deleteSolutionContents.js +6 -5
- package/dist/node/deleteHelpers/deleteSolutionContents.js.map +1 -1
- package/dist/node/deleteHelpers/deleteSolutionFolder.js +2 -1
- package/dist/node/deleteHelpers/deleteSolutionFolder.js.map +1 -1
- package/dist/node/deleteHelpers/deleteSolutionItem.js +3 -2
- package/dist/node/deleteHelpers/deleteSolutionItem.js.map +1 -1
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.js +2 -1
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.js.map +1 -1
- package/dist/node/deleteHelpers/removeItems.js +5 -4
- package/dist/node/deleteHelpers/removeItems.js.map +1 -1
- package/dist/node/deleteSolution.js +3 -2
- package/dist/node/deleteSolution.js.map +1 -1
- package/dist/node/generalHelpers.d.ts +12 -1
- package/dist/node/generalHelpers.js +24 -1
- package/dist/node/generalHelpers.js.map +1 -1
- package/dist/node/getDeletableSolutionInfo.js +3 -2
- package/dist/node/getDeletableSolutionInfo.js.map +1 -1
- package/dist/node/getSolutionSummary.js +4 -3
- package/dist/node/getSolutionSummary.js.map +1 -1
- package/dist/node/libConnectors.js +2 -1
- package/dist/node/libConnectors.js.map +1 -1
- package/dist/node/resources/copyAssociatedFiles.js +2 -1
- package/dist/node/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/node/restHelpers.d.ts +53 -8
- package/dist/node/restHelpers.js +145 -15
- package/dist/node/restHelpers.js.map +1 -1
- package/dist/node/templatization.js +1 -0
- package/dist/node/templatization.js.map +1 -1
- package/dist/umd/common.umd.js +169 -15
- package/dist/umd/common.umd.js.map +1 -1
- package/dist/umd/common.umd.min.js +4 -4
- package/dist/umd/common.umd.min.js.map +1 -1
- package/dist/umd/generalHelpers.d.ts +12 -1
- package/dist/umd/restHelpers.d.ts +53 -8
- package/package.json +10 -10
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ICreateItemFromTemplateResponse, IDatasourceInfo, IItemTemplate } from "./interfaces";
|
|
16
|
+
import { ICreateItemFromTemplateResponse, IDatasourceInfo, IItemTemplate, IStringValuePair } from "./interfaces";
|
|
17
17
|
import { Sanitizer } from "./libConnectors";
|
|
18
18
|
/**
|
|
19
19
|
* Returns a URL with a query parameter appended
|
|
@@ -222,6 +222,17 @@ export declare function getProp(obj: {
|
|
|
222
222
|
* @return Array of the values plucked from the object; only defined values are returned
|
|
223
223
|
*/
|
|
224
224
|
export declare function getProps(obj: any, props: string[]): any;
|
|
225
|
+
/**
|
|
226
|
+
* Get a property out of a deeply nested object
|
|
227
|
+
* Does not handle anything but nested object graph
|
|
228
|
+
*
|
|
229
|
+
* @param obj Object to retrieve value from
|
|
230
|
+
* @param path Path into an object, e.g., "data.values.webmap", where "data" is a top-level property
|
|
231
|
+
* in obj
|
|
232
|
+
* @param defaultV Optional value to use if any part of path--including final value--is undefined
|
|
233
|
+
* @return Value at end of path
|
|
234
|
+
*/
|
|
235
|
+
export declare function getPropWithDefault(obj: IStringValuePair, path: string, defaultV?: any): any;
|
|
225
236
|
/**
|
|
226
237
|
* Updates a list of the items dependencies if more are found in the
|
|
227
238
|
* provided value.
|
|
@@ -25,14 +25,6 @@ export { request as rest_request } from "@esri/arcgis-rest-request";
|
|
|
25
25
|
* @return UserSession
|
|
26
26
|
*/
|
|
27
27
|
export declare function getUserSession(options?: IUserSessionOptions): UserSession;
|
|
28
|
-
/**
|
|
29
|
-
* Searches for items matching a query and that the caller has access to.
|
|
30
|
-
*
|
|
31
|
-
* @param search Search string (e.g., "q=redlands+map")
|
|
32
|
-
* @return Promise resolving with search results
|
|
33
|
-
* @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
|
|
34
|
-
*/
|
|
35
|
-
export declare function searchItems(search: string | ISearchOptions | SearchQueryBuilder): Promise<ISearchResult<IItem>>;
|
|
36
28
|
/**
|
|
37
29
|
* Adds a forward relationship between two items.
|
|
38
30
|
*
|
|
@@ -84,6 +76,13 @@ export declare function addToServiceDefinition(url: string, options: any, skipRe
|
|
|
84
76
|
* @return A promise that will resolve when the request has completed
|
|
85
77
|
*/
|
|
86
78
|
export declare function checkRequestStatus(result: any, authentication: any): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Converts a general search into an ISearchOptions structure.
|
|
81
|
+
*
|
|
82
|
+
* @param search Search specified in one of three ways
|
|
83
|
+
* @return Recast search
|
|
84
|
+
*/
|
|
85
|
+
export declare function convertToISearchOptions(search: string | ISearchOptions | SearchQueryBuilder): ISearchOptions;
|
|
87
86
|
/**
|
|
88
87
|
* Simple validate function to ensure all coordinates are numbers
|
|
89
88
|
* In some cases orgs can have null or undefined coordinate values associated with the org extent
|
|
@@ -308,6 +307,23 @@ export declare function removeItem(itemId: string, authentication: UserSession):
|
|
|
308
307
|
* @return A promise that will resolve with the result of the request
|
|
309
308
|
*/
|
|
310
309
|
export declare function removeItemOrGroup(itemId: string, authentication: UserSession): Promise<IStatusResponse>;
|
|
310
|
+
/**
|
|
311
|
+
* Searches for items matching a query and that the caller has access to.
|
|
312
|
+
*
|
|
313
|
+
* @param search Search string (e.g., "q=redlands+map") or a more detailed structure that can include authentication
|
|
314
|
+
* @return Promise resolving with search results
|
|
315
|
+
* @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
|
|
316
|
+
*/
|
|
317
|
+
export declare function searchItems(search: string | ISearchOptions | SearchQueryBuilder): Promise<ISearchResult<IItem>>;
|
|
318
|
+
/**
|
|
319
|
+
* Searches for items matching a query and that the caller has access to, continuing recursively until done.
|
|
320
|
+
*
|
|
321
|
+
* @param search Search string (e.g., "q=redlands+map") or a more detailed structure that can include authentication
|
|
322
|
+
* @param accumulatedResponse Response built from previous requests
|
|
323
|
+
* @return Promise resolving with search results
|
|
324
|
+
* @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
|
|
325
|
+
*/
|
|
326
|
+
export declare function searchAllItems(search: string | ISearchOptions | SearchQueryBuilder, accumulatedResponse?: ISearchResult<IItem>): Promise<ISearchResult<IItem>>;
|
|
311
327
|
/**
|
|
312
328
|
* Searches for groups matching criteria.
|
|
313
329
|
*
|
|
@@ -331,6 +347,22 @@ export declare function searchGroups(searchString: string, authentication: UserS
|
|
|
331
347
|
* @return A promise that will resolve with all groups that meet the search criteria
|
|
332
348
|
*/
|
|
333
349
|
export declare function searchAllGroups(searchString: string, authentication: UserSession, groups?: IGroup[], inPagingParams?: IPagingParams): Promise<IGroup[]>;
|
|
350
|
+
/**
|
|
351
|
+
* Searches for group contents matching criteria recursively.
|
|
352
|
+
*
|
|
353
|
+
* @param groupId Group whose contents are to be searched
|
|
354
|
+
* @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
|
|
355
|
+
* @param authentication Credentials for the request to AGO
|
|
356
|
+
* @param additionalSearchOptions Adjustments to search, such as tranche size and categories of interest; categories
|
|
357
|
+
* are supplied as an array: each array element consists of one or more categories to be ORed; array elements are ANDed
|
|
358
|
+
* @param portalUrl Rest Url of the portal to perform the search
|
|
359
|
+
* @param accumulatedResponse Response built from previous requests
|
|
360
|
+
* @return A promise that will resolve with a structure with a tranche of results and
|
|
361
|
+
* describing how many items are available
|
|
362
|
+
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-content-search.htm
|
|
363
|
+
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
|
|
364
|
+
*/
|
|
365
|
+
export declare function searchGroupAllContents(groupId: string, searchString: string, authentication: UserSession, additionalSearchOptions?: IAdditionalSearchOptions, portalUrl?: string, accumulatedResponse?: ISearchResult<IItem>): Promise<ISearchResult<IItem>>;
|
|
334
366
|
/**
|
|
335
367
|
* Searches for group contents matching criteria.
|
|
336
368
|
*
|
|
@@ -391,6 +423,19 @@ export declare function shareItem(groupId: string, id: string, destinationAuthen
|
|
|
391
423
|
* @return
|
|
392
424
|
*/
|
|
393
425
|
export declare function updateItem(itemInfo: IItemUpdate, authentication: UserSession, folderId?: string, additionalParams?: any): Promise<IUpdateItemResponse>;
|
|
426
|
+
/**
|
|
427
|
+
* Updates a group.
|
|
428
|
+
*
|
|
429
|
+
* @param groupInfo The base info of a group; note that this content will be serialized, which doesn't work
|
|
430
|
+
* for binary content
|
|
431
|
+
* @param authentication Credentials for request
|
|
432
|
+
* @param additionalParams Updates that are put under the `params` property, which is not serialized
|
|
433
|
+
* @return A Promise that will resolve with the success/failure status of the request
|
|
434
|
+
*/
|
|
435
|
+
export declare function updateGroup(groupInfo: IGroup, authentication: UserSession, additionalParams?: any): Promise<{
|
|
436
|
+
success: boolean;
|
|
437
|
+
groupId: string;
|
|
438
|
+
}>;
|
|
394
439
|
/**
|
|
395
440
|
* Updates an item.
|
|
396
441
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/solution-common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Provides general helper functions for @esri/solution.js.",
|
|
5
5
|
"main": "dist/node/index.js",
|
|
6
6
|
"unpkg": "dist/umd/common.umd.min.js",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"@esri/arcgis-rest-portal": "3.4.3",
|
|
19
19
|
"@esri/arcgis-rest-request": "3.4.3",
|
|
20
20
|
"@esri/arcgis-rest-service-admin": "3.4.3",
|
|
21
|
-
"@esri/hub-common": "9.
|
|
22
|
-
"@esri/hub-initiatives": "9.
|
|
23
|
-
"@esri/hub-sites": "9.
|
|
24
|
-
"@esri/hub-teams": "9.
|
|
21
|
+
"@esri/hub-common": "9.15.0",
|
|
22
|
+
"@esri/hub-initiatives": "9.15.0",
|
|
23
|
+
"@esri/hub-sites": "9.15.0",
|
|
24
|
+
"@esri/hub-teams": "9.15.0",
|
|
25
25
|
"@types/adlib": "^3.0.1",
|
|
26
26
|
"rollup": "^2.60.0"
|
|
27
27
|
},
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"@esri/arcgis-rest-portal": "3.4.3",
|
|
32
32
|
"@esri/arcgis-rest-request": "3.4.3",
|
|
33
33
|
"@esri/arcgis-rest-service-admin": "3.4.3",
|
|
34
|
-
"@esri/hub-common": "9.
|
|
35
|
-
"@esri/hub-initiatives": "9.
|
|
36
|
-
"@esri/hub-sites": "9.
|
|
37
|
-
"@esri/hub-teams": "9.
|
|
34
|
+
"@esri/hub-common": "9.15.0",
|
|
35
|
+
"@esri/hub-initiatives": "9.15.0",
|
|
36
|
+
"@esri/hub-sites": "9.15.0",
|
|
37
|
+
"@esri/hub-teams": "9.15.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@esri/arcgis-html-sanitizer": "2.8.0",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"esri",
|
|
96
96
|
"ES6"
|
|
97
97
|
],
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "b8f04e56c71adb7aadaa0293f8708800cdaa9c81"
|
|
99
99
|
}
|