@esri/solution-common 1.3.10 → 1.3.13
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/completeItem.d.ts +1 -1
- package/dist/esm/completeItem.js +1 -1
- package/dist/esm/deleteHelpers/deleteEmptyGroups.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteEmptyGroups.js +1 -1
- package/dist/esm/deleteHelpers/deleteGroupIfEmpty.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteGroupIfEmpty.js +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionContents.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionContents.js +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionFolder.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionFolder.js +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionItem.d.ts +1 -1
- package/dist/esm/deleteHelpers/deleteSolutionItem.js +1 -1
- package/dist/esm/deleteHelpers/reconstructBuildOrderIds.d.ts +1 -1
- package/dist/esm/deleteHelpers/reconstructBuildOrderIds.js +1 -1
- package/dist/esm/deleteHelpers/removeItems.d.ts +1 -1
- package/dist/esm/deleteHelpers/removeItems.js +1 -1
- package/dist/esm/deleteSolution.d.ts +2 -2
- package/dist/esm/deleteSolution.js +2 -2
- package/dist/esm/dependencies.d.ts +1 -1
- package/dist/esm/dependencies.js +2 -2
- package/dist/esm/featureServiceHelpers.d.ts +99 -60
- package/dist/esm/featureServiceHelpers.js +99 -60
- package/dist/esm/featureServiceHelpers.js.map +1 -1
- package/dist/esm/generalHelpers.d.ts +34 -34
- package/dist/esm/generalHelpers.js +36 -36
- package/dist/esm/getDeletableSolutionInfo.d.ts +1 -1
- package/dist/esm/getDeletableSolutionInfo.js +1 -1
- package/dist/esm/getSolutionSummary.d.ts +1 -1
- package/dist/esm/getSolutionSummary.js +1 -1
- package/dist/esm/interfaces.d.ts +438 -10
- package/dist/esm/interfaces.js +7 -1
- package/dist/esm/interfaces.js.map +1 -1
- package/dist/esm/libConnectors.d.ts +5 -5
- package/dist/esm/libConnectors.js +5 -5
- package/dist/esm/migrations/apply-schema.d.ts +1 -0
- package/dist/esm/migrations/apply-schema.js +1 -0
- package/dist/esm/migrations/apply-schema.js.map +1 -1
- package/dist/esm/migrations/upgrade-three-dot-one.d.ts +1 -0
- package/dist/esm/migrations/upgrade-three-dot-one.js +1 -0
- package/dist/esm/migrations/upgrade-three-dot-one.js.map +1 -1
- package/dist/esm/migrations/upgrade-two-dot-seven.d.ts +7 -0
- package/dist/esm/migrations/upgrade-two-dot-seven.js +7 -0
- package/dist/esm/migrations/upgrade-two-dot-seven.js.map +1 -1
- package/dist/esm/polyfills.d.ts +2 -2
- package/dist/esm/polyfills.js +2 -2
- package/dist/esm/resourceHelpers.d.ts +11 -11
- package/dist/esm/resourceHelpers.js +11 -11
- package/dist/esm/resources/addMetadataFromBlob.d.ts +1 -1
- package/dist/esm/resources/addMetadataFromBlob.js +1 -1
- package/dist/esm/resources/convert-item-resource-to-storage-resource.d.ts +1 -1
- package/dist/esm/resources/convert-item-resource-to-storage-resource.js +1 -1
- package/dist/esm/resources/convert-storage-resource-to-item-resource.d.ts +1 -1
- package/dist/esm/resources/convert-storage-resource-to-item-resource.js +1 -1
- package/dist/esm/resources/copyAssociatedFiles.d.ts +4 -3
- package/dist/esm/resources/copyAssociatedFiles.js +5 -4
- package/dist/esm/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/esm/resources/copyDataIntoItem.d.ts +2 -2
- package/dist/esm/resources/copyDataIntoItem.js +2 -2
- package/dist/esm/resources/copyMetadataIntoItem.d.ts +1 -1
- package/dist/esm/resources/copyMetadataIntoItem.js +1 -1
- package/dist/esm/resources/copyResourceIntoZip.d.ts +2 -2
- package/dist/esm/resources/copyResourceIntoZip.js +2 -2
- package/dist/esm/resources/copyZipIntoItem.d.ts +1 -1
- package/dist/esm/resources/copyZipIntoItem.js +1 -1
- package/dist/esm/resources/createCopyResults.d.ts +1 -1
- package/dist/esm/resources/createCopyResults.js +1 -1
- package/dist/esm/resources/get-blob.d.ts +1 -1
- package/dist/esm/resources/get-blob.js +1 -1
- package/dist/esm/resources/getItemResourcesFilesFromPaths.d.ts +1 -1
- package/dist/esm/resources/getItemResourcesFilesFromPaths.js +1 -1
- package/dist/esm/resources/getItemResourcesPaths.d.ts +1 -1
- package/dist/esm/resources/getItemResourcesPaths.js +1 -1
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.d.ts +1 -0
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.js +1 -0
- package/dist/esm/resources/transform-resource-paths-to-solution-resources.js.map +1 -1
- package/dist/esm/restHelpers.d.ts +59 -54
- package/dist/esm/restHelpers.js +55 -50
- package/dist/esm/restHelpers.js.map +1 -1
- package/dist/esm/restHelpersGet.d.ts +30 -30
- package/dist/esm/restHelpersGet.js +30 -30
- package/dist/esm/templatization.d.ts +15 -15
- package/dist/esm/templatization.js +15 -15
- package/dist/esm/trackingHelpers.d.ts +9 -9
- package/dist/esm/trackingHelpers.js +9 -9
- package/dist/esm/velocityHelpers.d.ts +4 -4
- package/dist/esm/velocityHelpers.js +4 -4
- package/dist/esm/workforceHelpers.d.ts +8 -7
- package/dist/esm/workforceHelpers.js +18 -7
- package/dist/esm/workforceHelpers.js.map +1 -1
- package/dist/node/completeItem.d.ts +1 -1
- package/dist/node/completeItem.js +1 -1
- package/dist/node/deleteHelpers/deleteEmptyGroups.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteEmptyGroups.js +1 -1
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteGroupIfEmpty.js +1 -1
- package/dist/node/deleteHelpers/deleteSolutionContents.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteSolutionContents.js +1 -1
- package/dist/node/deleteHelpers/deleteSolutionFolder.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteSolutionFolder.js +1 -1
- package/dist/node/deleteHelpers/deleteSolutionItem.d.ts +1 -1
- package/dist/node/deleteHelpers/deleteSolutionItem.js +1 -1
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.d.ts +1 -1
- package/dist/node/deleteHelpers/reconstructBuildOrderIds.js +1 -1
- package/dist/node/deleteHelpers/removeItems.d.ts +1 -1
- package/dist/node/deleteHelpers/removeItems.js +1 -1
- package/dist/node/deleteSolution.d.ts +2 -2
- package/dist/node/deleteSolution.js +2 -2
- package/dist/node/dependencies.d.ts +1 -1
- package/dist/node/dependencies.js +2 -2
- package/dist/node/featureServiceHelpers.d.ts +99 -60
- package/dist/node/featureServiceHelpers.js +99 -60
- package/dist/node/featureServiceHelpers.js.map +1 -1
- package/dist/node/generalHelpers.d.ts +34 -34
- package/dist/node/generalHelpers.js +36 -36
- package/dist/node/getDeletableSolutionInfo.d.ts +1 -1
- package/dist/node/getDeletableSolutionInfo.js +1 -1
- package/dist/node/getSolutionSummary.d.ts +1 -1
- package/dist/node/getSolutionSummary.js +1 -1
- package/dist/node/interfaces.d.ts +438 -10
- package/dist/node/interfaces.js +7 -1
- package/dist/node/interfaces.js.map +1 -1
- package/dist/node/libConnectors.d.ts +5 -5
- package/dist/node/libConnectors.js +5 -5
- package/dist/node/migrations/apply-schema.d.ts +1 -0
- package/dist/node/migrations/apply-schema.js +1 -0
- package/dist/node/migrations/apply-schema.js.map +1 -1
- package/dist/node/migrations/upgrade-three-dot-one.d.ts +1 -0
- package/dist/node/migrations/upgrade-three-dot-one.js +1 -0
- package/dist/node/migrations/upgrade-three-dot-one.js.map +1 -1
- package/dist/node/migrations/upgrade-two-dot-seven.d.ts +7 -0
- package/dist/node/migrations/upgrade-two-dot-seven.js +7 -0
- package/dist/node/migrations/upgrade-two-dot-seven.js.map +1 -1
- package/dist/node/polyfills.d.ts +2 -2
- package/dist/node/polyfills.js +2 -2
- package/dist/node/resourceHelpers.d.ts +11 -11
- package/dist/node/resourceHelpers.js +11 -11
- package/dist/node/resources/addMetadataFromBlob.d.ts +1 -1
- package/dist/node/resources/addMetadataFromBlob.js +1 -1
- package/dist/node/resources/convert-item-resource-to-storage-resource.d.ts +1 -1
- package/dist/node/resources/convert-item-resource-to-storage-resource.js +1 -1
- package/dist/node/resources/convert-storage-resource-to-item-resource.d.ts +1 -1
- package/dist/node/resources/convert-storage-resource-to-item-resource.js +1 -1
- package/dist/node/resources/copyAssociatedFiles.d.ts +4 -3
- package/dist/node/resources/copyAssociatedFiles.js +5 -4
- package/dist/node/resources/copyAssociatedFiles.js.map +1 -1
- package/dist/node/resources/copyDataIntoItem.d.ts +2 -2
- package/dist/node/resources/copyDataIntoItem.js +2 -2
- package/dist/node/resources/copyMetadataIntoItem.d.ts +1 -1
- package/dist/node/resources/copyMetadataIntoItem.js +1 -1
- package/dist/node/resources/copyResourceIntoZip.d.ts +2 -2
- package/dist/node/resources/copyResourceIntoZip.js +2 -2
- package/dist/node/resources/copyZipIntoItem.d.ts +1 -1
- package/dist/node/resources/copyZipIntoItem.js +1 -1
- package/dist/node/resources/createCopyResults.d.ts +1 -1
- package/dist/node/resources/createCopyResults.js +1 -1
- package/dist/node/resources/get-blob.d.ts +1 -1
- package/dist/node/resources/get-blob.js +1 -1
- package/dist/node/resources/getItemResourcesFilesFromPaths.d.ts +1 -1
- package/dist/node/resources/getItemResourcesFilesFromPaths.js +1 -1
- package/dist/node/resources/getItemResourcesPaths.d.ts +1 -1
- package/dist/node/resources/getItemResourcesPaths.js +1 -1
- package/dist/node/resources/transform-resource-paths-to-solution-resources.d.ts +1 -0
- package/dist/node/resources/transform-resource-paths-to-solution-resources.js +1 -0
- package/dist/node/resources/transform-resource-paths-to-solution-resources.js.map +1 -1
- package/dist/node/restHelpers.d.ts +59 -54
- package/dist/node/restHelpers.js +55 -50
- package/dist/node/restHelpers.js.map +1 -1
- package/dist/node/restHelpersGet.d.ts +30 -30
- package/dist/node/restHelpersGet.js +30 -30
- package/dist/node/templatization.d.ts +15 -15
- package/dist/node/templatization.js +15 -15
- package/dist/node/trackingHelpers.d.ts +9 -9
- package/dist/node/trackingHelpers.js +9 -9
- package/dist/node/velocityHelpers.d.ts +4 -4
- package/dist/node/velocityHelpers.js +4 -4
- package/dist/node/workforceHelpers.d.ts +8 -7
- package/dist/node/workforceHelpers.js +18 -7
- package/dist/node/workforceHelpers.js.map +1 -1
- package/dist/umd/common.umd.js +399 -313
- package/dist/umd/common.umd.js.map +1 -1
- package/dist/umd/common.umd.min.js +3 -3
- package/dist/umd/common.umd.min.js.map +1 -1
- package/dist/umd/completeItem.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteEmptyGroups.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteGroupIfEmpty.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteSolutionContents.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteSolutionFolder.d.ts +1 -1
- package/dist/umd/deleteHelpers/deleteSolutionItem.d.ts +1 -1
- package/dist/umd/deleteHelpers/reconstructBuildOrderIds.d.ts +1 -1
- package/dist/umd/deleteHelpers/removeItems.d.ts +1 -1
- package/dist/umd/deleteSolution.d.ts +2 -2
- package/dist/umd/dependencies.d.ts +1 -1
- package/dist/umd/featureServiceHelpers.d.ts +99 -60
- package/dist/umd/generalHelpers.d.ts +34 -34
- package/dist/umd/getDeletableSolutionInfo.d.ts +1 -1
- package/dist/umd/getSolutionSummary.d.ts +1 -1
- package/dist/umd/interfaces.d.ts +438 -10
- package/dist/umd/libConnectors.d.ts +5 -5
- package/dist/umd/migrations/apply-schema.d.ts +1 -0
- package/dist/umd/migrations/upgrade-three-dot-one.d.ts +1 -0
- package/dist/umd/migrations/upgrade-two-dot-seven.d.ts +7 -0
- package/dist/umd/polyfills.d.ts +2 -2
- package/dist/umd/resourceHelpers.d.ts +11 -11
- package/dist/umd/resources/addMetadataFromBlob.d.ts +1 -1
- package/dist/umd/resources/convert-item-resource-to-storage-resource.d.ts +1 -1
- package/dist/umd/resources/convert-storage-resource-to-item-resource.d.ts +1 -1
- package/dist/umd/resources/copyAssociatedFiles.d.ts +4 -3
- package/dist/umd/resources/copyDataIntoItem.d.ts +2 -2
- package/dist/umd/resources/copyMetadataIntoItem.d.ts +1 -1
- package/dist/umd/resources/copyResourceIntoZip.d.ts +2 -2
- package/dist/umd/resources/copyZipIntoItem.d.ts +1 -1
- package/dist/umd/resources/createCopyResults.d.ts +1 -1
- package/dist/umd/resources/get-blob.d.ts +1 -1
- package/dist/umd/resources/getItemResourcesFilesFromPaths.d.ts +1 -1
- package/dist/umd/resources/getItemResourcesPaths.d.ts +1 -1
- package/dist/umd/resources/transform-resource-paths-to-solution-resources.d.ts +1 -0
- package/dist/umd/restHelpers.d.ts +59 -54
- package/dist/umd/restHelpersGet.d.ts +30 -30
- package/dist/umd/templatization.d.ts +15 -15
- package/dist/umd/trackingHelpers.d.ts +9 -9
- package/dist/umd/velocityHelpers.d.ts +4 -4
- package/dist/umd/workforceHelpers.d.ts +8 -7
- package/package.json +18 -17
package/dist/node/restHelpers.js
CHANGED
|
@@ -41,7 +41,7 @@ Object.defineProperty(exports, "rest_request", { enumerable: true, get: function
|
|
|
41
41
|
* Creates a UserSession via a function so that the global arcgisSolution variable can access authentication.
|
|
42
42
|
*
|
|
43
43
|
* @param options See https://esri.github.io/arcgis-rest-js/api/auth/IUserSessionOptions/
|
|
44
|
-
* @
|
|
44
|
+
* @returns UserSession
|
|
45
45
|
*/
|
|
46
46
|
function getUserSession(options = {}) {
|
|
47
47
|
return new interfaces_1.UserSession(options);
|
|
@@ -54,7 +54,7 @@ exports.getUserSession = getUserSession;
|
|
|
54
54
|
* @param destinationItemId Destination of relationship
|
|
55
55
|
* @param relationshipType Type of relationship
|
|
56
56
|
* @param authentication Credentials for the request
|
|
57
|
-
* @
|
|
57
|
+
* @returns A Promise to add item resources.
|
|
58
58
|
*/
|
|
59
59
|
function addForwardItemRelationship(originItemId, destinationItemId, relationshipType, authentication) {
|
|
60
60
|
return new Promise(resolve => {
|
|
@@ -84,7 +84,7 @@ exports.addForwardItemRelationship = addForwardItemRelationship;
|
|
|
84
84
|
* @param originItemId Origin of relationship
|
|
85
85
|
* @param destinationRelationships Destinations
|
|
86
86
|
* @param authentication Credentials for the request
|
|
87
|
-
* @
|
|
87
|
+
* @returns A Promise to add item resources.
|
|
88
88
|
*/
|
|
89
89
|
function addForwardItemRelationships(originItemId, destinationRelationships, authentication) {
|
|
90
90
|
return new Promise(resolve => {
|
|
@@ -105,7 +105,7 @@ exports.addForwardItemRelationships = addForwardItemRelationships;
|
|
|
105
105
|
*
|
|
106
106
|
* @param url URL to use as base
|
|
107
107
|
* @param authentication Credentials to be used to generate token for URL
|
|
108
|
-
* @
|
|
108
|
+
* @returns A promise that will resolve with the supplied URL with `token=<token>` added to its query params
|
|
109
109
|
* unless either the URL doesn't exist or the token can't be generated
|
|
110
110
|
*/
|
|
111
111
|
function addTokenToUrl(url, authentication) {
|
|
@@ -136,7 +136,7 @@ exports.addTokenToUrl = addTokenToUrl;
|
|
|
136
136
|
* @param options the info to add to the services definition
|
|
137
137
|
* @param skipRetry a boolean to control if retry logic will be used. Defaults to false.
|
|
138
138
|
* @param useAsync a boolean to control if we will use an async request
|
|
139
|
-
* @
|
|
139
|
+
* @returns A promise that will resolve when the request has completed
|
|
140
140
|
*/
|
|
141
141
|
function addToServiceDefinition(url, options, skipRetry = false, useAsync = false) {
|
|
142
142
|
/* istanbul ignore else */
|
|
@@ -163,7 +163,7 @@ exports.addToServiceDefinition = addToServiceDefinition;
|
|
|
163
163
|
* @param result the result returned from the addToDefinition request.
|
|
164
164
|
* This will contain a status url or the standard sync result.
|
|
165
165
|
* @param authentication Credentials to be used to generate token for URL
|
|
166
|
-
* @
|
|
166
|
+
* @returns A promise that will resolve when the request has completed
|
|
167
167
|
*/
|
|
168
168
|
function checkRequestStatus(result, authentication) {
|
|
169
169
|
return new Promise((resolve, reject) => {
|
|
@@ -195,7 +195,7 @@ exports.checkRequestStatus = checkRequestStatus;
|
|
|
195
195
|
* Converts a general search into an ISearchOptions structure.
|
|
196
196
|
*
|
|
197
197
|
* @param search Search specified in one of three ways
|
|
198
|
-
* @
|
|
198
|
+
* @returns Recast search
|
|
199
199
|
*/
|
|
200
200
|
function convertToISearchOptions(search) {
|
|
201
201
|
// Convert the search into an ISearchOptions
|
|
@@ -226,7 +226,7 @@ exports.convertToISearchOptions = convertToISearchOptions;
|
|
|
226
226
|
* In some cases orgs can have null or undefined coordinate values associated with the org extent
|
|
227
227
|
*
|
|
228
228
|
* @param extent the extent to validate
|
|
229
|
-
* @
|
|
229
|
+
* @returns the provided extent or a default global extent if some coordinates are not numbers
|
|
230
230
|
* @private
|
|
231
231
|
*/
|
|
232
232
|
function _validateExtent(extent) {
|
|
@@ -257,7 +257,7 @@ exports._validateExtent = _validateExtent;
|
|
|
257
257
|
* @param outSR the spatial reference to project to
|
|
258
258
|
* @param geometryServiceUrl the service url for the geometry service to use
|
|
259
259
|
* @param authentication the credentials for the requests
|
|
260
|
-
* @
|
|
260
|
+
* @returns the extent projected to the provided spatial reference
|
|
261
261
|
* or the world extent projected to the provided spatial reference
|
|
262
262
|
* @private
|
|
263
263
|
*/
|
|
@@ -296,7 +296,7 @@ exports.convertExtentWithFallback = convertExtentWithFallback;
|
|
|
296
296
|
* @param outSR Desired spatial reference
|
|
297
297
|
* @param geometryServiceUrl Path to geometry service providing `findTransformations` and `project` services
|
|
298
298
|
* @param authentication Credentials for the request
|
|
299
|
-
* @
|
|
299
|
+
* @returns Original extent if it's already using outSR or the extents projected into the outSR
|
|
300
300
|
*/
|
|
301
301
|
function convertExtent(extent, outSR, geometryServiceUrl, authentication) {
|
|
302
302
|
const _requestOptions = { authentication };
|
|
@@ -368,7 +368,7 @@ exports.convertExtent = convertExtent;
|
|
|
368
368
|
* @param newItemTemplate Template of item to be created
|
|
369
369
|
* @param authentication Credentials for the request
|
|
370
370
|
* @param templateDictionary Hash of facts: org URL, adlib replacements, user; .user.folders property contains a list
|
|
371
|
-
* @
|
|
371
|
+
* @returns A promise that will resolve with an object reporting success and the Solution id
|
|
372
372
|
*/
|
|
373
373
|
function createFeatureService(newItemTemplate, authentication, templateDictionary) {
|
|
374
374
|
return new Promise((resolve, reject) => {
|
|
@@ -394,7 +394,7 @@ exports.createFeatureService = createFeatureService;
|
|
|
394
394
|
* @param metadataFile Item's metadata file
|
|
395
395
|
* @param resourcesFiles Item's resources
|
|
396
396
|
* @param access Access to set for item: "public", "org", "private"
|
|
397
|
-
* @
|
|
397
|
+
* @returns A promise that will resolve with an object reporting success or failure and the Solution id
|
|
398
398
|
*/
|
|
399
399
|
function createFullItem(itemInfo, folderId, destinationAuthentication, itemThumbnailUrl, itemThumbnailAuthentication, dataFile, metadataFile, resourcesFiles, access = "private") {
|
|
400
400
|
return new Promise((resolve, reject) => {
|
|
@@ -481,7 +481,7 @@ exports.createFullItem = createFullItem;
|
|
|
481
481
|
* @param folderId Id of folder to receive item; null indicates that the item goes into the root
|
|
482
482
|
* folder; ignored for Group item type
|
|
483
483
|
* @param access Access to set for item: "public", "org", "private"
|
|
484
|
-
* @
|
|
484
|
+
* @returns A promise that will resolve with an object reporting success and the Solution id
|
|
485
485
|
*/
|
|
486
486
|
function createItemWithData(itemInfo, dataInfo, authentication, folderId, access = "private") {
|
|
487
487
|
return new Promise((resolve, reject) => {
|
|
@@ -543,7 +543,7 @@ exports.createItemWithData = createItemWithData;
|
|
|
543
543
|
* of known folder names; function updates list with existing names not yet known, and creates .user.folders if it
|
|
544
544
|
* doesn't exist in the dictionary
|
|
545
545
|
* @param authentication Credentials for creating folder
|
|
546
|
-
* @
|
|
546
|
+
* @returns Id of created folder
|
|
547
547
|
*/
|
|
548
548
|
function createUniqueFolder(title, templateDictionary, authentication) {
|
|
549
549
|
return new Promise((resolve, reject) => {
|
|
@@ -591,7 +591,7 @@ exports.createUniqueFolder = createUniqueFolder;
|
|
|
591
591
|
* If the tracking owner is not the one deploying the solution
|
|
592
592
|
* tracker groups will be created under the deployment user but
|
|
593
593
|
* will be reassigned to the tracking owner.
|
|
594
|
-
* @
|
|
594
|
+
* @returns Information about created group
|
|
595
595
|
*/
|
|
596
596
|
function createUniqueGroup(title, groupItem, templateDictionary, authentication, owner) {
|
|
597
597
|
return new Promise((resolve, reject) => {
|
|
@@ -646,7 +646,7 @@ exports.createUniqueGroup = createUniqueGroup;
|
|
|
646
646
|
*
|
|
647
647
|
* @param itemTemplate Template of item to be created
|
|
648
648
|
* @param authentication Credentials for the request
|
|
649
|
-
* @
|
|
649
|
+
* @returns A promise that will resolve a list of dependencies
|
|
650
650
|
*/
|
|
651
651
|
function extractDependencies(itemTemplate, authentication) {
|
|
652
652
|
const dependencies = [];
|
|
@@ -684,7 +684,7 @@ exports.extractDependencies = extractDependencies;
|
|
|
684
684
|
* @param serviceUrl the url for the service
|
|
685
685
|
* @param layerList list of base layer info
|
|
686
686
|
* @param authentication Credentials for the request
|
|
687
|
-
* @
|
|
687
|
+
* @returns A promise that will resolve a list of dependencies
|
|
688
688
|
*/
|
|
689
689
|
function getLayers(serviceUrl, layerList, authentication) {
|
|
690
690
|
return new Promise((resolve, reject) => {
|
|
@@ -711,7 +711,7 @@ exports.getLayers = getLayers;
|
|
|
711
711
|
* @param args The IPostProcessArgs for the request(s)
|
|
712
712
|
* @param isPortal boolean to indicate if we are deploying to portal
|
|
713
713
|
*
|
|
714
|
-
* @
|
|
714
|
+
* @returns An array of update instructions
|
|
715
715
|
* @private
|
|
716
716
|
*/
|
|
717
717
|
function getLayerUpdates(args, isPortal) {
|
|
@@ -769,7 +769,8 @@ exports.getLayerUpdates = getLayerUpdates;
|
|
|
769
769
|
* @param tables the tables from the service
|
|
770
770
|
* @param relUpdates the relationships to add for the service
|
|
771
771
|
*
|
|
772
|
-
* @
|
|
772
|
+
* @returns An array with relationships that have been sorted
|
|
773
|
+
* @private
|
|
773
774
|
*/
|
|
774
775
|
function _sortRelationships(layers, tables, relUpdates) {
|
|
775
776
|
const ids = [].concat(layers.map((l) => l.id), tables.map((t) => t.id));
|
|
@@ -799,7 +800,7 @@ exports._sortRelationships = _sortRelationships;
|
|
|
799
800
|
* @param itemTemplate Template of item being deployed
|
|
800
801
|
* @param authentication Credentials for the request
|
|
801
802
|
* @param updates An array of update instructions
|
|
802
|
-
* @
|
|
803
|
+
* @returns An array of update instructions
|
|
803
804
|
*/
|
|
804
805
|
function getFinalServiceUpdates(itemTemplate, authentication, updates) {
|
|
805
806
|
const sourceSchemaChangesAllowed = (0, generalHelpers_1.getProp)(itemTemplate, "properties.service.sourceSchemaChangesAllowed");
|
|
@@ -825,7 +826,7 @@ exports.getFinalServiceUpdates = getFinalServiceUpdates;
|
|
|
825
826
|
*
|
|
826
827
|
* @param Update will contain either add, update, or delete from service definition call
|
|
827
828
|
* @param skipRetry defaults to false. when true the retry logic will be ignored
|
|
828
|
-
* @
|
|
829
|
+
* @returns A promise that will resolve when service definition call has completed
|
|
829
830
|
* @private
|
|
830
831
|
*/
|
|
831
832
|
/* istanbul ignore else */
|
|
@@ -859,7 +860,7 @@ exports.getRequest = getRequest;
|
|
|
859
860
|
*
|
|
860
861
|
* @param itemTemplate Feature service item, data, dependencies definition to be modified
|
|
861
862
|
* @param authentication Credentials for the request to AGOL
|
|
862
|
-
* @
|
|
863
|
+
* @returns A promise that will resolve when fullItem has been updated
|
|
863
864
|
* @private
|
|
864
865
|
*/
|
|
865
866
|
function getServiceLayersAndTables(itemTemplate, authentication) {
|
|
@@ -888,7 +889,7 @@ exports.getServiceLayersAndTables = getServiceLayersAndTables;
|
|
|
888
889
|
* @param serviceUrl the feature service url
|
|
889
890
|
* @param authentication Credentials for the request to AGOL
|
|
890
891
|
* @param workforceService boolean to indicate if extra workforce service steps should be handled
|
|
891
|
-
* @
|
|
892
|
+
* @returns A promise that will resolve with the service properties
|
|
892
893
|
* @private
|
|
893
894
|
*/
|
|
894
895
|
function getFeatureServiceProperties(serviceUrl, authentication, workforceService = false) {
|
|
@@ -952,7 +953,8 @@ exports.getFeatureServiceProperties = getFeatureServiceProperties;
|
|
|
952
953
|
* Layers and Tables are both returned in the layers array when we access a feature service from the admin api.
|
|
953
954
|
*
|
|
954
955
|
* @param adminData The data of the feature service
|
|
955
|
-
* @
|
|
956
|
+
* @returns A mutated version of the provided adminData
|
|
957
|
+
* @private
|
|
956
958
|
*/
|
|
957
959
|
function _parseAdminServiceData(adminData) {
|
|
958
960
|
const layers = adminData.layers || [];
|
|
@@ -969,7 +971,7 @@ exports._parseAdminServiceData = _parseAdminServiceData;
|
|
|
969
971
|
* These layers should not be templatized or depolyed
|
|
970
972
|
*
|
|
971
973
|
* @param groupDesignations the items group designations to evaluate
|
|
972
|
-
* @
|
|
974
|
+
* @returns A boolean indicating if the invalid designation is found in the item info
|
|
973
975
|
*/
|
|
974
976
|
function hasInvalidGroupDesignations(groupDesignations) {
|
|
975
977
|
const invalidGroupDesignations = ["livingatlas"];
|
|
@@ -983,7 +985,7 @@ exports.hasInvalidGroupDesignations = hasInvalidGroupDesignations;
|
|
|
983
985
|
*
|
|
984
986
|
* @param folderId Id of a folder to delete
|
|
985
987
|
* @param authentication Credentials for the request to AGO
|
|
986
|
-
* @
|
|
988
|
+
* @returns A promise that will resolve with the result of the request
|
|
987
989
|
*/
|
|
988
990
|
function removeFolder(folderId, authentication) {
|
|
989
991
|
return new Promise((resolve, reject) => {
|
|
@@ -1000,7 +1002,7 @@ exports.removeFolder = removeFolder;
|
|
|
1000
1002
|
*
|
|
1001
1003
|
* @param groupId Id of a group to delete
|
|
1002
1004
|
* @param authentication Credentials for the request to AGO
|
|
1003
|
-
* @
|
|
1005
|
+
* @returns A promise that will resolve with the result of the request
|
|
1004
1006
|
*/
|
|
1005
1007
|
function removeGroup(groupId, authentication) {
|
|
1006
1008
|
return new Promise((resolve, reject) => {
|
|
@@ -1017,7 +1019,7 @@ exports.removeGroup = removeGroup;
|
|
|
1017
1019
|
*
|
|
1018
1020
|
* @param itemId Id of an item to delete
|
|
1019
1021
|
* @param authentication Credentials for the request to AGO
|
|
1020
|
-
* @
|
|
1022
|
+
* @returns A promise that will resolve with the result of the request
|
|
1021
1023
|
*/
|
|
1022
1024
|
function removeItem(itemId, authentication) {
|
|
1023
1025
|
return new Promise((resolve, reject) => {
|
|
@@ -1034,7 +1036,7 @@ exports.removeItem = removeItem;
|
|
|
1034
1036
|
*
|
|
1035
1037
|
* @param itemId Id of an item or group to delete
|
|
1036
1038
|
* @param authentication Credentials for the request to AGO
|
|
1037
|
-
* @
|
|
1039
|
+
* @returns A promise that will resolve with the result of the request
|
|
1038
1040
|
*/
|
|
1039
1041
|
function removeItemOrGroup(itemId, authentication) {
|
|
1040
1042
|
return new Promise((resolve, reject) => {
|
|
@@ -1048,7 +1050,7 @@ exports.removeItemOrGroup = removeItemOrGroup;
|
|
|
1048
1050
|
* Searches for items matching a query and that the caller has access to.
|
|
1049
1051
|
*
|
|
1050
1052
|
* @param search Search string (e.g., "q=redlands+map") or a more detailed structure that can include authentication
|
|
1051
|
-
* @
|
|
1053
|
+
* @returns Promise resolving with search results
|
|
1052
1054
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
|
|
1053
1055
|
*/
|
|
1054
1056
|
function searchItems(search) {
|
|
@@ -1060,7 +1062,7 @@ exports.searchItems = searchItems;
|
|
|
1060
1062
|
*
|
|
1061
1063
|
* @param search Search string (e.g., "q=redlands+map") or a more detailed structure that can include authentication
|
|
1062
1064
|
* @param accumulatedResponse Response built from previous requests
|
|
1063
|
-
* @
|
|
1065
|
+
* @returns Promise resolving with search results
|
|
1064
1066
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
|
|
1065
1067
|
*/
|
|
1066
1068
|
function searchAllItems(search, accumulatedResponse) {
|
|
@@ -1097,7 +1099,7 @@ exports.searchAllItems = searchAllItems;
|
|
|
1097
1099
|
* @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
|
|
1098
1100
|
* @param authentication Credentials for the request to AGO
|
|
1099
1101
|
* @param additionalSearchOptions Adjustments to search, such as tranche size
|
|
1100
|
-
* @
|
|
1102
|
+
* @returns A promise that will resolve with a structure with a tranche of results and
|
|
1101
1103
|
* describing how many items are available
|
|
1102
1104
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-search.htm
|
|
1103
1105
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
|
|
@@ -1121,7 +1123,7 @@ exports.searchGroups = searchGroups;
|
|
|
1121
1123
|
* @param groups List of groups that have been found from previous requests
|
|
1122
1124
|
* @param inPagingParams The paging params for the recurisve searching
|
|
1123
1125
|
*
|
|
1124
|
-
* @
|
|
1126
|
+
* @returns A promise that will resolve with all groups that meet the search criteria
|
|
1125
1127
|
*/
|
|
1126
1128
|
function searchAllGroups(searchString, authentication, groups, inPagingParams) {
|
|
1127
1129
|
const pagingParams = inPagingParams ? inPagingParams : {
|
|
@@ -1159,7 +1161,7 @@ exports.searchAllGroups = searchAllGroups;
|
|
|
1159
1161
|
* are supplied as an array: each array element consists of one or more categories to be ORed; array elements are ANDed
|
|
1160
1162
|
* @param portalUrl Rest Url of the portal to perform the search
|
|
1161
1163
|
* @param accumulatedResponse Response built from previous requests
|
|
1162
|
-
* @
|
|
1164
|
+
* @returns A promise that will resolve with a structure with a tranche of results and
|
|
1163
1165
|
* describing how many items are available
|
|
1164
1166
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-content-search.htm
|
|
1165
1167
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
|
|
@@ -1199,7 +1201,7 @@ exports.searchGroupAllContents = searchGroupAllContents;
|
|
|
1199
1201
|
* @param additionalSearchOptions Adjustments to search, such as tranche size and categories of interest; categories
|
|
1200
1202
|
* are supplied as an array: each array element consists of one or more categories to be ORed; array elements are ANDed
|
|
1201
1203
|
* @param portalUrl Rest Url of the portal to perform the search
|
|
1202
|
-
* @
|
|
1204
|
+
* @returns A promise that will resolve with a structure with a tranche of results and
|
|
1203
1205
|
* describing how many items are available
|
|
1204
1206
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-content-search.htm
|
|
1205
1207
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
|
|
@@ -1229,7 +1231,7 @@ exports.searchGroupContents = searchGroupContents;
|
|
|
1229
1231
|
* @param userName The new owner for the group
|
|
1230
1232
|
* @param authentication Credentials for the request to
|
|
1231
1233
|
*
|
|
1232
|
-
* @
|
|
1234
|
+
* @returns A promise that will resolve after the group ownership has been assigned
|
|
1233
1235
|
*
|
|
1234
1236
|
*/
|
|
1235
1237
|
function reassignGroup(groupId, userName, authentication) {
|
|
@@ -1249,7 +1251,7 @@ exports.reassignGroup = reassignGroup;
|
|
|
1249
1251
|
* @param users List of users to remove from the group
|
|
1250
1252
|
* @param authentication Credentials for the request to
|
|
1251
1253
|
*
|
|
1252
|
-
* @
|
|
1254
|
+
* @returns A promise that will resolve after the users have been removed
|
|
1253
1255
|
*
|
|
1254
1256
|
*/
|
|
1255
1257
|
function removeUsers(groupId, users, authentication) {
|
|
@@ -1268,7 +1270,7 @@ exports.removeUsers = removeUsers;
|
|
|
1268
1270
|
* @param destinationAuthentication Credentials for the request to AGO
|
|
1269
1271
|
* @param owner owner of the group when sharing tracking items (can be different from the deploying user)
|
|
1270
1272
|
*
|
|
1271
|
-
* @
|
|
1273
|
+
* @returns A promise that will resolve after the item has been shared
|
|
1272
1274
|
*
|
|
1273
1275
|
*/
|
|
1274
1276
|
function shareItem(groupId, id, destinationAuthentication, owner) {
|
|
@@ -1317,7 +1319,7 @@ exports.updateItem = updateItem;
|
|
|
1317
1319
|
* for binary content
|
|
1318
1320
|
* @param authentication Credentials for request
|
|
1319
1321
|
* @param additionalParams Updates that are put under the `params` property, which is not serialized
|
|
1320
|
-
* @
|
|
1322
|
+
* @returns A Promise that will resolve with the success/failure status of the request
|
|
1321
1323
|
*/
|
|
1322
1324
|
function updateGroup(groupInfo, authentication, additionalParams) {
|
|
1323
1325
|
return new Promise((resolve, reject) => {
|
|
@@ -1417,7 +1419,7 @@ exports.updateItemTemplateFromDictionary = updateItemTemplateFromDictionary;
|
|
|
1417
1419
|
* @param id AGOL id of item to update
|
|
1418
1420
|
* @param url URL to assign to item's base section
|
|
1419
1421
|
* @param authentication Credentials for the request
|
|
1420
|
-
* @
|
|
1422
|
+
* @returns A promise that will resolve with the item id when the item has been updated or an AGO-style JSON failure
|
|
1421
1423
|
* response
|
|
1422
1424
|
*/
|
|
1423
1425
|
function updateItemURL(id, url, authentication) {
|
|
@@ -1432,7 +1434,7 @@ exports.updateItemURL = updateItemURL;
|
|
|
1432
1434
|
* @param itemId Id of item to receive data file
|
|
1433
1435
|
* @param dataFile Data to be added
|
|
1434
1436
|
* @param authentication Credentials for the request
|
|
1435
|
-
* @
|
|
1437
|
+
* @returns Promise reporting success or failure
|
|
1436
1438
|
* @private
|
|
1437
1439
|
*/
|
|
1438
1440
|
function _addItemDataFile(itemId, dataFile, authentication) {
|
|
@@ -1464,7 +1466,7 @@ exports._addItemDataFile = _addItemDataFile;
|
|
|
1464
1466
|
* @param itemId Id of item to receive data file
|
|
1465
1467
|
* @param metadataFile Metadata to be added
|
|
1466
1468
|
* @param authentication Credentials for the request
|
|
1467
|
-
* @
|
|
1469
|
+
* @returns Promise reporting success or failure
|
|
1468
1470
|
* @private
|
|
1469
1471
|
*/
|
|
1470
1472
|
function _addItemMetadataFile(itemId, metadataFile, authentication) {
|
|
@@ -1487,7 +1489,7 @@ exports._addItemMetadataFile = _addItemMetadataFile;
|
|
|
1487
1489
|
* Accumulates the number of relationships in a collection of layers.
|
|
1488
1490
|
*
|
|
1489
1491
|
* @param List of layers to examine
|
|
1490
|
-
* @
|
|
1492
|
+
* @returns The number of relationships
|
|
1491
1493
|
* @private
|
|
1492
1494
|
*/
|
|
1493
1495
|
function _countRelationships(layers) {
|
|
@@ -1502,7 +1504,7 @@ exports._countRelationships = _countRelationships;
|
|
|
1502
1504
|
* @param serviceUrl URL to hosted service
|
|
1503
1505
|
* @param layerList List of layers at that service...must contain id
|
|
1504
1506
|
* @param authentication Credentials for the request
|
|
1505
|
-
* @
|
|
1507
|
+
* @returns A promise that will resolve with a list of the layers from the admin api
|
|
1506
1508
|
* @private
|
|
1507
1509
|
*/
|
|
1508
1510
|
function _getCreateServiceOptions(newItemTemplate, authentication, templateDictionary) {
|
|
@@ -1555,7 +1557,7 @@ exports._getCreateServiceOptions = _getCreateServiceOptions;
|
|
|
1555
1557
|
*
|
|
1556
1558
|
* @param serviceInfo the object that contains the spatial reference to evaluate
|
|
1557
1559
|
* @param templateDictionary the template dictionary
|
|
1558
|
-
* @
|
|
1560
|
+
* @returns the extent to use as the fallback
|
|
1559
1561
|
* @private
|
|
1560
1562
|
*/
|
|
1561
1563
|
function _getFallbackExtent(serviceInfo, templateDictionary) {
|
|
@@ -1573,7 +1575,7 @@ exports._getFallbackExtent = _getFallbackExtent;
|
|
|
1573
1575
|
* Add relationships to all layers in one call to retain fully functioning composite relationships
|
|
1574
1576
|
*
|
|
1575
1577
|
* @param args The IPostProcessArgs for the request(s)
|
|
1576
|
-
* @
|
|
1578
|
+
* @returns Any relationships that should be updated for the service
|
|
1577
1579
|
* @private
|
|
1578
1580
|
*/
|
|
1579
1581
|
function _getRelationshipUpdates(args) {
|
|
@@ -1602,7 +1604,7 @@ exports._getRelationshipUpdates = _getRelationshipUpdates;
|
|
|
1602
1604
|
* @param obj parameters for the request
|
|
1603
1605
|
* @param args various arguments to help support the request
|
|
1604
1606
|
* @param type type of update the request will handle
|
|
1605
|
-
* @
|
|
1607
|
+
* @returns IUpdate that has the request url and arguments
|
|
1606
1608
|
* @private
|
|
1607
1609
|
*/
|
|
1608
1610
|
function _getUpdate(url, id, obj, args, type) {
|
|
@@ -1647,6 +1649,7 @@ exports._getUpdate = _getUpdate;
|
|
|
1647
1649
|
*
|
|
1648
1650
|
* @param base Item's base section
|
|
1649
1651
|
* @param data Item's data section
|
|
1652
|
+
* @private
|
|
1650
1653
|
*/
|
|
1651
1654
|
function _reportVariablesInItem(itemId, itemType, base, data) {
|
|
1652
1655
|
const getUnresolved = (v) => {
|
|
@@ -1679,7 +1682,8 @@ exports._reportVariablesInItem = _reportVariablesInItem;
|
|
|
1679
1682
|
* @param serviceInfo Service information
|
|
1680
1683
|
* @param params arcgis-rest-js params to update
|
|
1681
1684
|
* @param isPortal Is the service hosted in a portal?
|
|
1682
|
-
* @
|
|
1685
|
+
* @returns Updated item
|
|
1686
|
+
* @private
|
|
1683
1687
|
*/
|
|
1684
1688
|
function _setItemProperties(item, itemTemplate, serviceInfo, params, isPortal) {
|
|
1685
1689
|
// Set the capabilities
|
|
@@ -1758,7 +1762,7 @@ exports._setItemProperties = _setItemProperties;
|
|
|
1758
1762
|
* Set isUnique as true for indexes that reference origin relationship keyFields.
|
|
1759
1763
|
*
|
|
1760
1764
|
* @param serviceInfo Service information
|
|
1761
|
-
* @
|
|
1765
|
+
* @private
|
|
1762
1766
|
*/
|
|
1763
1767
|
function _updateIndexesForRelationshipKeyFields(serviceInfo) {
|
|
1764
1768
|
const layersAndTables = (serviceInfo.layers || []).concat(serviceInfo.tables || []);
|
|
@@ -1800,8 +1804,9 @@ exports._updateIndexesForRelationshipKeyFields = _updateIndexesForRelationshipKe
|
|
|
1800
1804
|
* @param url URL to assign to item's base section
|
|
1801
1805
|
* @param authentication Credentials for the request
|
|
1802
1806
|
* @param numAttempts Number of times to try to set the URL if AGO says that it updated the URL, but really didn't
|
|
1803
|
-
* @
|
|
1807
|
+
* @returns A promise that will resolve with the item id when the item has been updated or an AGO-style JSON failure
|
|
1804
1808
|
* response
|
|
1809
|
+
* @private
|
|
1805
1810
|
*/
|
|
1806
1811
|
function _updateItemURL(id, url, authentication, numAttempts = 1) {
|
|
1807
1812
|
// Introduce a lag because AGO update appears to choke with rapid subsequent calls
|