@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/esm/restHelpers.js
CHANGED
|
@@ -36,7 +36,7 @@ export { request as rest_request } from "@esri/arcgis-rest-request";
|
|
|
36
36
|
* Creates a UserSession via a function so that the global arcgisSolution variable can access authentication.
|
|
37
37
|
*
|
|
38
38
|
* @param options See https://esri.github.io/arcgis-rest-js/api/auth/IUserSessionOptions/
|
|
39
|
-
* @
|
|
39
|
+
* @returns UserSession
|
|
40
40
|
*/
|
|
41
41
|
export function getUserSession(options = {}) {
|
|
42
42
|
return new UserSession(options);
|
|
@@ -48,7 +48,7 @@ export function getUserSession(options = {}) {
|
|
|
48
48
|
* @param destinationItemId Destination of relationship
|
|
49
49
|
* @param relationshipType Type of relationship
|
|
50
50
|
* @param authentication Credentials for the request
|
|
51
|
-
* @
|
|
51
|
+
* @returns A Promise to add item resources.
|
|
52
52
|
*/
|
|
53
53
|
export function addForwardItemRelationship(originItemId, destinationItemId, relationshipType, authentication) {
|
|
54
54
|
return new Promise(resolve => {
|
|
@@ -77,7 +77,7 @@ export function addForwardItemRelationship(originItemId, destinationItemId, rela
|
|
|
77
77
|
* @param originItemId Origin of relationship
|
|
78
78
|
* @param destinationRelationships Destinations
|
|
79
79
|
* @param authentication Credentials for the request
|
|
80
|
-
* @
|
|
80
|
+
* @returns A Promise to add item resources.
|
|
81
81
|
*/
|
|
82
82
|
export function addForwardItemRelationships(originItemId, destinationRelationships, authentication) {
|
|
83
83
|
return new Promise(resolve => {
|
|
@@ -97,7 +97,7 @@ export function addForwardItemRelationships(originItemId, destinationRelationshi
|
|
|
97
97
|
*
|
|
98
98
|
* @param url URL to use as base
|
|
99
99
|
* @param authentication Credentials to be used to generate token for URL
|
|
100
|
-
* @
|
|
100
|
+
* @returns A promise that will resolve with the supplied URL with `token=<token>` added to its query params
|
|
101
101
|
* unless either the URL doesn't exist or the token can't be generated
|
|
102
102
|
*/
|
|
103
103
|
export function addTokenToUrl(url, authentication) {
|
|
@@ -127,7 +127,7 @@ export function addTokenToUrl(url, authentication) {
|
|
|
127
127
|
* @param options the info to add to the services definition
|
|
128
128
|
* @param skipRetry a boolean to control if retry logic will be used. Defaults to false.
|
|
129
129
|
* @param useAsync a boolean to control if we will use an async request
|
|
130
|
-
* @
|
|
130
|
+
* @returns A promise that will resolve when the request has completed
|
|
131
131
|
*/
|
|
132
132
|
export function addToServiceDefinition(url, options, skipRetry = false, useAsync = false) {
|
|
133
133
|
/* istanbul ignore else */
|
|
@@ -153,7 +153,7 @@ export function addToServiceDefinition(url, options, skipRetry = false, useAsync
|
|
|
153
153
|
* @param result the result returned from the addToDefinition request.
|
|
154
154
|
* This will contain a status url or the standard sync result.
|
|
155
155
|
* @param authentication Credentials to be used to generate token for URL
|
|
156
|
-
* @
|
|
156
|
+
* @returns A promise that will resolve when the request has completed
|
|
157
157
|
*/
|
|
158
158
|
export function checkRequestStatus(result, authentication) {
|
|
159
159
|
return new Promise((resolve, reject) => {
|
|
@@ -184,7 +184,7 @@ export function checkRequestStatus(result, authentication) {
|
|
|
184
184
|
* Converts a general search into an ISearchOptions structure.
|
|
185
185
|
*
|
|
186
186
|
* @param search Search specified in one of three ways
|
|
187
|
-
* @
|
|
187
|
+
* @returns Recast search
|
|
188
188
|
*/
|
|
189
189
|
export function convertToISearchOptions(search) {
|
|
190
190
|
// Convert the search into an ISearchOptions
|
|
@@ -214,7 +214,7 @@ export function convertToISearchOptions(search) {
|
|
|
214
214
|
* In some cases orgs can have null or undefined coordinate values associated with the org extent
|
|
215
215
|
*
|
|
216
216
|
* @param extent the extent to validate
|
|
217
|
-
* @
|
|
217
|
+
* @returns the provided extent or a default global extent if some coordinates are not numbers
|
|
218
218
|
* @private
|
|
219
219
|
*/
|
|
220
220
|
export function _validateExtent(extent) {
|
|
@@ -244,7 +244,7 @@ export function _validateExtent(extent) {
|
|
|
244
244
|
* @param outSR the spatial reference to project to
|
|
245
245
|
* @param geometryServiceUrl the service url for the geometry service to use
|
|
246
246
|
* @param authentication the credentials for the requests
|
|
247
|
-
* @
|
|
247
|
+
* @returns the extent projected to the provided spatial reference
|
|
248
248
|
* or the world extent projected to the provided spatial reference
|
|
249
249
|
* @private
|
|
250
250
|
*/
|
|
@@ -282,7 +282,7 @@ export function convertExtentWithFallback(extent, fallbackExtent, outSR, geometr
|
|
|
282
282
|
* @param outSR Desired spatial reference
|
|
283
283
|
* @param geometryServiceUrl Path to geometry service providing `findTransformations` and `project` services
|
|
284
284
|
* @param authentication Credentials for the request
|
|
285
|
-
* @
|
|
285
|
+
* @returns Original extent if it's already using outSR or the extents projected into the outSR
|
|
286
286
|
*/
|
|
287
287
|
export function convertExtent(extent, outSR, geometryServiceUrl, authentication) {
|
|
288
288
|
const _requestOptions = { authentication };
|
|
@@ -353,7 +353,7 @@ export function convertExtent(extent, outSR, geometryServiceUrl, authentication)
|
|
|
353
353
|
* @param newItemTemplate Template of item to be created
|
|
354
354
|
* @param authentication Credentials for the request
|
|
355
355
|
* @param templateDictionary Hash of facts: org URL, adlib replacements, user; .user.folders property contains a list
|
|
356
|
-
* @
|
|
356
|
+
* @returns A promise that will resolve with an object reporting success and the Solution id
|
|
357
357
|
*/
|
|
358
358
|
export function createFeatureService(newItemTemplate, authentication, templateDictionary) {
|
|
359
359
|
return new Promise((resolve, reject) => {
|
|
@@ -378,7 +378,7 @@ export function createFeatureService(newItemTemplate, authentication, templateDi
|
|
|
378
378
|
* @param metadataFile Item's metadata file
|
|
379
379
|
* @param resourcesFiles Item's resources
|
|
380
380
|
* @param access Access to set for item: "public", "org", "private"
|
|
381
|
-
* @
|
|
381
|
+
* @returns A promise that will resolve with an object reporting success or failure and the Solution id
|
|
382
382
|
*/
|
|
383
383
|
export function createFullItem(itemInfo, folderId, destinationAuthentication, itemThumbnailUrl, itemThumbnailAuthentication, dataFile, metadataFile, resourcesFiles, access = "private") {
|
|
384
384
|
return new Promise((resolve, reject) => {
|
|
@@ -464,7 +464,7 @@ export function createFullItem(itemInfo, folderId, destinationAuthentication, it
|
|
|
464
464
|
* @param folderId Id of folder to receive item; null indicates that the item goes into the root
|
|
465
465
|
* folder; ignored for Group item type
|
|
466
466
|
* @param access Access to set for item: "public", "org", "private"
|
|
467
|
-
* @
|
|
467
|
+
* @returns A promise that will resolve with an object reporting success and the Solution id
|
|
468
468
|
*/
|
|
469
469
|
export function createItemWithData(itemInfo, dataInfo, authentication, folderId, access = "private") {
|
|
470
470
|
return new Promise((resolve, reject) => {
|
|
@@ -525,7 +525,7 @@ export function createItemWithData(itemInfo, dataInfo, authentication, folderId,
|
|
|
525
525
|
* of known folder names; function updates list with existing names not yet known, and creates .user.folders if it
|
|
526
526
|
* doesn't exist in the dictionary
|
|
527
527
|
* @param authentication Credentials for creating folder
|
|
528
|
-
* @
|
|
528
|
+
* @returns Id of created folder
|
|
529
529
|
*/
|
|
530
530
|
export function createUniqueFolder(title, templateDictionary, authentication) {
|
|
531
531
|
return new Promise((resolve, reject) => {
|
|
@@ -572,7 +572,7 @@ export function createUniqueFolder(title, templateDictionary, authentication) {
|
|
|
572
572
|
* If the tracking owner is not the one deploying the solution
|
|
573
573
|
* tracker groups will be created under the deployment user but
|
|
574
574
|
* will be reassigned to the tracking owner.
|
|
575
|
-
* @
|
|
575
|
+
* @returns Information about created group
|
|
576
576
|
*/
|
|
577
577
|
export function createUniqueGroup(title, groupItem, templateDictionary, authentication, owner) {
|
|
578
578
|
return new Promise((resolve, reject) => {
|
|
@@ -626,7 +626,7 @@ export function createUniqueGroup(title, groupItem, templateDictionary, authenti
|
|
|
626
626
|
*
|
|
627
627
|
* @param itemTemplate Template of item to be created
|
|
628
628
|
* @param authentication Credentials for the request
|
|
629
|
-
* @
|
|
629
|
+
* @returns A promise that will resolve a list of dependencies
|
|
630
630
|
*/
|
|
631
631
|
export function extractDependencies(itemTemplate, authentication) {
|
|
632
632
|
const dependencies = [];
|
|
@@ -663,7 +663,7 @@ export function extractDependencies(itemTemplate, authentication) {
|
|
|
663
663
|
* @param serviceUrl the url for the service
|
|
664
664
|
* @param layerList list of base layer info
|
|
665
665
|
* @param authentication Credentials for the request
|
|
666
|
-
* @
|
|
666
|
+
* @returns A promise that will resolve a list of dependencies
|
|
667
667
|
*/
|
|
668
668
|
export function getLayers(serviceUrl, layerList, authentication) {
|
|
669
669
|
return new Promise((resolve, reject) => {
|
|
@@ -689,7 +689,7 @@ export function getLayers(serviceUrl, layerList, authentication) {
|
|
|
689
689
|
* @param args The IPostProcessArgs for the request(s)
|
|
690
690
|
* @param isPortal boolean to indicate if we are deploying to portal
|
|
691
691
|
*
|
|
692
|
-
* @
|
|
692
|
+
* @returns An array of update instructions
|
|
693
693
|
* @private
|
|
694
694
|
*/
|
|
695
695
|
export function getLayerUpdates(args, isPortal) {
|
|
@@ -746,7 +746,8 @@ export function getLayerUpdates(args, isPortal) {
|
|
|
746
746
|
* @param tables the tables from the service
|
|
747
747
|
* @param relUpdates the relationships to add for the service
|
|
748
748
|
*
|
|
749
|
-
* @
|
|
749
|
+
* @returns An array with relationships that have been sorted
|
|
750
|
+
* @private
|
|
750
751
|
*/
|
|
751
752
|
export function _sortRelationships(layers, tables, relUpdates) {
|
|
752
753
|
const ids = [].concat(layers.map((l) => l.id), tables.map((t) => t.id));
|
|
@@ -775,7 +776,7 @@ export function _sortRelationships(layers, tables, relUpdates) {
|
|
|
775
776
|
* @param itemTemplate Template of item being deployed
|
|
776
777
|
* @param authentication Credentials for the request
|
|
777
778
|
* @param updates An array of update instructions
|
|
778
|
-
* @
|
|
779
|
+
* @returns An array of update instructions
|
|
779
780
|
*/
|
|
780
781
|
export function getFinalServiceUpdates(itemTemplate, authentication, updates) {
|
|
781
782
|
const sourceSchemaChangesAllowed = getProp(itemTemplate, "properties.service.sourceSchemaChangesAllowed");
|
|
@@ -800,7 +801,7 @@ export function getFinalServiceUpdates(itemTemplate, authentication, updates) {
|
|
|
800
801
|
*
|
|
801
802
|
* @param Update will contain either add, update, or delete from service definition call
|
|
802
803
|
* @param skipRetry defaults to false. when true the retry logic will be ignored
|
|
803
|
-
* @
|
|
804
|
+
* @returns A promise that will resolve when service definition call has completed
|
|
804
805
|
* @private
|
|
805
806
|
*/
|
|
806
807
|
/* istanbul ignore else */
|
|
@@ -833,7 +834,7 @@ export function getRequest(update, skipRetry = false, useAsync = false) {
|
|
|
833
834
|
*
|
|
834
835
|
* @param itemTemplate Feature service item, data, dependencies definition to be modified
|
|
835
836
|
* @param authentication Credentials for the request to AGOL
|
|
836
|
-
* @
|
|
837
|
+
* @returns A promise that will resolve when fullItem has been updated
|
|
837
838
|
* @private
|
|
838
839
|
*/
|
|
839
840
|
export function getServiceLayersAndTables(itemTemplate, authentication) {
|
|
@@ -861,7 +862,7 @@ export function getServiceLayersAndTables(itemTemplate, authentication) {
|
|
|
861
862
|
* @param serviceUrl the feature service url
|
|
862
863
|
* @param authentication Credentials for the request to AGOL
|
|
863
864
|
* @param workforceService boolean to indicate if extra workforce service steps should be handled
|
|
864
|
-
* @
|
|
865
|
+
* @returns A promise that will resolve with the service properties
|
|
865
866
|
* @private
|
|
866
867
|
*/
|
|
867
868
|
export function getFeatureServiceProperties(serviceUrl, authentication, workforceService = false) {
|
|
@@ -924,7 +925,8 @@ export function getFeatureServiceProperties(serviceUrl, authentication, workforc
|
|
|
924
925
|
* Layers and Tables are both returned in the layers array when we access a feature service from the admin api.
|
|
925
926
|
*
|
|
926
927
|
* @param adminData The data of the feature service
|
|
927
|
-
* @
|
|
928
|
+
* @returns A mutated version of the provided adminData
|
|
929
|
+
* @private
|
|
928
930
|
*/
|
|
929
931
|
export function _parseAdminServiceData(adminData) {
|
|
930
932
|
const layers = adminData.layers || [];
|
|
@@ -940,7 +942,7 @@ export function _parseAdminServiceData(adminData) {
|
|
|
940
942
|
* These layers should not be templatized or depolyed
|
|
941
943
|
*
|
|
942
944
|
* @param groupDesignations the items group designations to evaluate
|
|
943
|
-
* @
|
|
945
|
+
* @returns A boolean indicating if the invalid designation is found in the item info
|
|
944
946
|
*/
|
|
945
947
|
export function hasInvalidGroupDesignations(groupDesignations) {
|
|
946
948
|
const invalidGroupDesignations = ["livingatlas"];
|
|
@@ -953,7 +955,7 @@ export function hasInvalidGroupDesignations(groupDesignations) {
|
|
|
953
955
|
*
|
|
954
956
|
* @param folderId Id of a folder to delete
|
|
955
957
|
* @param authentication Credentials for the request to AGO
|
|
956
|
-
* @
|
|
958
|
+
* @returns A promise that will resolve with the result of the request
|
|
957
959
|
*/
|
|
958
960
|
export function removeFolder(folderId, authentication) {
|
|
959
961
|
return new Promise((resolve, reject) => {
|
|
@@ -969,7 +971,7 @@ export function removeFolder(folderId, authentication) {
|
|
|
969
971
|
*
|
|
970
972
|
* @param groupId Id of a group to delete
|
|
971
973
|
* @param authentication Credentials for the request to AGO
|
|
972
|
-
* @
|
|
974
|
+
* @returns A promise that will resolve with the result of the request
|
|
973
975
|
*/
|
|
974
976
|
export function removeGroup(groupId, authentication) {
|
|
975
977
|
return new Promise((resolve, reject) => {
|
|
@@ -985,7 +987,7 @@ export function removeGroup(groupId, authentication) {
|
|
|
985
987
|
*
|
|
986
988
|
* @param itemId Id of an item to delete
|
|
987
989
|
* @param authentication Credentials for the request to AGO
|
|
988
|
-
* @
|
|
990
|
+
* @returns A promise that will resolve with the result of the request
|
|
989
991
|
*/
|
|
990
992
|
export function removeItem(itemId, authentication) {
|
|
991
993
|
return new Promise((resolve, reject) => {
|
|
@@ -1001,7 +1003,7 @@ export function removeItem(itemId, authentication) {
|
|
|
1001
1003
|
*
|
|
1002
1004
|
* @param itemId Id of an item or group to delete
|
|
1003
1005
|
* @param authentication Credentials for the request to AGO
|
|
1004
|
-
* @
|
|
1006
|
+
* @returns A promise that will resolve with the result of the request
|
|
1005
1007
|
*/
|
|
1006
1008
|
export function removeItemOrGroup(itemId, authentication) {
|
|
1007
1009
|
return new Promise((resolve, reject) => {
|
|
@@ -1014,7 +1016,7 @@ export function removeItemOrGroup(itemId, authentication) {
|
|
|
1014
1016
|
* Searches for items matching a query and that the caller has access to.
|
|
1015
1017
|
*
|
|
1016
1018
|
* @param search Search string (e.g., "q=redlands+map") or a more detailed structure that can include authentication
|
|
1017
|
-
* @
|
|
1019
|
+
* @returns Promise resolving with search results
|
|
1018
1020
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
|
|
1019
1021
|
*/
|
|
1020
1022
|
export function searchItems(search) {
|
|
@@ -1025,7 +1027,7 @@ export function searchItems(search) {
|
|
|
1025
1027
|
*
|
|
1026
1028
|
* @param search Search string (e.g., "q=redlands+map") or a more detailed structure that can include authentication
|
|
1027
1029
|
* @param accumulatedResponse Response built from previous requests
|
|
1028
|
-
* @
|
|
1030
|
+
* @returns Promise resolving with search results
|
|
1029
1031
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
|
|
1030
1032
|
*/
|
|
1031
1033
|
export function searchAllItems(search, accumulatedResponse) {
|
|
@@ -1061,7 +1063,7 @@ export function searchAllItems(search, accumulatedResponse) {
|
|
|
1061
1063
|
* @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
|
|
1062
1064
|
* @param authentication Credentials for the request to AGO
|
|
1063
1065
|
* @param additionalSearchOptions Adjustments to search, such as tranche size
|
|
1064
|
-
* @
|
|
1066
|
+
* @returns A promise that will resolve with a structure with a tranche of results and
|
|
1065
1067
|
* describing how many items are available
|
|
1066
1068
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-search.htm
|
|
1067
1069
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
|
|
@@ -1084,7 +1086,7 @@ export function searchGroups(searchString, authentication, additionalSearchOptio
|
|
|
1084
1086
|
* @param groups List of groups that have been found from previous requests
|
|
1085
1087
|
* @param inPagingParams The paging params for the recurisve searching
|
|
1086
1088
|
*
|
|
1087
|
-
* @
|
|
1089
|
+
* @returns A promise that will resolve with all groups that meet the search criteria
|
|
1088
1090
|
*/
|
|
1089
1091
|
export function searchAllGroups(searchString, authentication, groups, inPagingParams) {
|
|
1090
1092
|
const pagingParams = inPagingParams ? inPagingParams : {
|
|
@@ -1121,7 +1123,7 @@ export function searchAllGroups(searchString, authentication, groups, inPagingPa
|
|
|
1121
1123
|
* are supplied as an array: each array element consists of one or more categories to be ORed; array elements are ANDed
|
|
1122
1124
|
* @param portalUrl Rest Url of the portal to perform the search
|
|
1123
1125
|
* @param accumulatedResponse Response built from previous requests
|
|
1124
|
-
* @
|
|
1126
|
+
* @returns A promise that will resolve with a structure with a tranche of results and
|
|
1125
1127
|
* describing how many items are available
|
|
1126
1128
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-content-search.htm
|
|
1127
1129
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
|
|
@@ -1160,7 +1162,7 @@ export function searchGroupAllContents(groupId, searchString, authentication, ad
|
|
|
1160
1162
|
* @param additionalSearchOptions Adjustments to search, such as tranche size and categories of interest; categories
|
|
1161
1163
|
* are supplied as an array: each array element consists of one or more categories to be ORed; array elements are ANDed
|
|
1162
1164
|
* @param portalUrl Rest Url of the portal to perform the search
|
|
1163
|
-
* @
|
|
1165
|
+
* @returns A promise that will resolve with a structure with a tranche of results and
|
|
1164
1166
|
* describing how many items are available
|
|
1165
1167
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-content-search.htm
|
|
1166
1168
|
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
|
|
@@ -1189,7 +1191,7 @@ export function searchGroupContents(groupId, searchString, authentication, addit
|
|
|
1189
1191
|
* @param userName The new owner for the group
|
|
1190
1192
|
* @param authentication Credentials for the request to
|
|
1191
1193
|
*
|
|
1192
|
-
* @
|
|
1194
|
+
* @returns A promise that will resolve after the group ownership has been assigned
|
|
1193
1195
|
*
|
|
1194
1196
|
*/
|
|
1195
1197
|
export function reassignGroup(groupId, userName, authentication) {
|
|
@@ -1208,7 +1210,7 @@ export function reassignGroup(groupId, userName, authentication) {
|
|
|
1208
1210
|
* @param users List of users to remove from the group
|
|
1209
1211
|
* @param authentication Credentials for the request to
|
|
1210
1212
|
*
|
|
1211
|
-
* @
|
|
1213
|
+
* @returns A promise that will resolve after the users have been removed
|
|
1212
1214
|
*
|
|
1213
1215
|
*/
|
|
1214
1216
|
export function removeUsers(groupId, users, authentication) {
|
|
@@ -1226,7 +1228,7 @@ export function removeUsers(groupId, users, authentication) {
|
|
|
1226
1228
|
* @param destinationAuthentication Credentials for the request to AGO
|
|
1227
1229
|
* @param owner owner of the group when sharing tracking items (can be different from the deploying user)
|
|
1228
1230
|
*
|
|
1229
|
-
* @
|
|
1231
|
+
* @returns A promise that will resolve after the item has been shared
|
|
1230
1232
|
*
|
|
1231
1233
|
*/
|
|
1232
1234
|
export function shareItem(groupId, id, destinationAuthentication, owner) {
|
|
@@ -1273,7 +1275,7 @@ export function updateItem(itemInfo, authentication, folderId, additionalParams)
|
|
|
1273
1275
|
* for binary content
|
|
1274
1276
|
* @param authentication Credentials for request
|
|
1275
1277
|
* @param additionalParams Updates that are put under the `params` property, which is not serialized
|
|
1276
|
-
* @
|
|
1278
|
+
* @returns A Promise that will resolve with the success/failure status of the request
|
|
1277
1279
|
*/
|
|
1278
1280
|
export function updateGroup(groupInfo, authentication, additionalParams) {
|
|
1279
1281
|
return new Promise((resolve, reject) => {
|
|
@@ -1370,7 +1372,7 @@ export function updateItemTemplateFromDictionary(itemId, templateDictionary, aut
|
|
|
1370
1372
|
* @param id AGOL id of item to update
|
|
1371
1373
|
* @param url URL to assign to item's base section
|
|
1372
1374
|
* @param authentication Credentials for the request
|
|
1373
|
-
* @
|
|
1375
|
+
* @returns A promise that will resolve with the item id when the item has been updated or an AGO-style JSON failure
|
|
1374
1376
|
* response
|
|
1375
1377
|
*/
|
|
1376
1378
|
export function updateItemURL(id, url, authentication) {
|
|
@@ -1384,7 +1386,7 @@ export function updateItemURL(id, url, authentication) {
|
|
|
1384
1386
|
* @param itemId Id of item to receive data file
|
|
1385
1387
|
* @param dataFile Data to be added
|
|
1386
1388
|
* @param authentication Credentials for the request
|
|
1387
|
-
* @
|
|
1389
|
+
* @returns Promise reporting success or failure
|
|
1388
1390
|
* @private
|
|
1389
1391
|
*/
|
|
1390
1392
|
export function _addItemDataFile(itemId, dataFile, authentication) {
|
|
@@ -1415,7 +1417,7 @@ export function _addItemDataFile(itemId, dataFile, authentication) {
|
|
|
1415
1417
|
* @param itemId Id of item to receive data file
|
|
1416
1418
|
* @param metadataFile Metadata to be added
|
|
1417
1419
|
* @param authentication Credentials for the request
|
|
1418
|
-
* @
|
|
1420
|
+
* @returns Promise reporting success or failure
|
|
1419
1421
|
* @private
|
|
1420
1422
|
*/
|
|
1421
1423
|
export function _addItemMetadataFile(itemId, metadataFile, authentication) {
|
|
@@ -1437,7 +1439,7 @@ export function _addItemMetadataFile(itemId, metadataFile, authentication) {
|
|
|
1437
1439
|
* Accumulates the number of relationships in a collection of layers.
|
|
1438
1440
|
*
|
|
1439
1441
|
* @param List of layers to examine
|
|
1440
|
-
* @
|
|
1442
|
+
* @returns The number of relationships
|
|
1441
1443
|
* @private
|
|
1442
1444
|
*/
|
|
1443
1445
|
export function _countRelationships(layers) {
|
|
@@ -1451,7 +1453,7 @@ export function _countRelationships(layers) {
|
|
|
1451
1453
|
* @param serviceUrl URL to hosted service
|
|
1452
1454
|
* @param layerList List of layers at that service...must contain id
|
|
1453
1455
|
* @param authentication Credentials for the request
|
|
1454
|
-
* @
|
|
1456
|
+
* @returns A promise that will resolve with a list of the layers from the admin api
|
|
1455
1457
|
* @private
|
|
1456
1458
|
*/
|
|
1457
1459
|
export function _getCreateServiceOptions(newItemTemplate, authentication, templateDictionary) {
|
|
@@ -1503,7 +1505,7 @@ export function _getCreateServiceOptions(newItemTemplate, authentication, templa
|
|
|
1503
1505
|
*
|
|
1504
1506
|
* @param serviceInfo the object that contains the spatial reference to evaluate
|
|
1505
1507
|
* @param templateDictionary the template dictionary
|
|
1506
|
-
* @
|
|
1508
|
+
* @returns the extent to use as the fallback
|
|
1507
1509
|
* @private
|
|
1508
1510
|
*/
|
|
1509
1511
|
export function _getFallbackExtent(serviceInfo, templateDictionary) {
|
|
@@ -1520,7 +1522,7 @@ export function _getFallbackExtent(serviceInfo, templateDictionary) {
|
|
|
1520
1522
|
* Add relationships to all layers in one call to retain fully functioning composite relationships
|
|
1521
1523
|
*
|
|
1522
1524
|
* @param args The IPostProcessArgs for the request(s)
|
|
1523
|
-
* @
|
|
1525
|
+
* @returns Any relationships that should be updated for the service
|
|
1524
1526
|
* @private
|
|
1525
1527
|
*/
|
|
1526
1528
|
export function _getRelationshipUpdates(args) {
|
|
@@ -1548,7 +1550,7 @@ export function _getRelationshipUpdates(args) {
|
|
|
1548
1550
|
* @param obj parameters for the request
|
|
1549
1551
|
* @param args various arguments to help support the request
|
|
1550
1552
|
* @param type type of update the request will handle
|
|
1551
|
-
* @
|
|
1553
|
+
* @returns IUpdate that has the request url and arguments
|
|
1552
1554
|
* @private
|
|
1553
1555
|
*/
|
|
1554
1556
|
export function _getUpdate(url, id, obj, args, type) {
|
|
@@ -1592,6 +1594,7 @@ export function _getUpdate(url, id, obj, args, type) {
|
|
|
1592
1594
|
*
|
|
1593
1595
|
* @param base Item's base section
|
|
1594
1596
|
* @param data Item's data section
|
|
1597
|
+
* @private
|
|
1595
1598
|
*/
|
|
1596
1599
|
export function _reportVariablesInItem(itemId, itemType, base, data) {
|
|
1597
1600
|
const getUnresolved = (v) => {
|
|
@@ -1623,7 +1626,8 @@ export function _reportVariablesInItem(itemId, itemType, base, data) {
|
|
|
1623
1626
|
* @param serviceInfo Service information
|
|
1624
1627
|
* @param params arcgis-rest-js params to update
|
|
1625
1628
|
* @param isPortal Is the service hosted in a portal?
|
|
1626
|
-
* @
|
|
1629
|
+
* @returns Updated item
|
|
1630
|
+
* @private
|
|
1627
1631
|
*/
|
|
1628
1632
|
export function _setItemProperties(item, itemTemplate, serviceInfo, params, isPortal) {
|
|
1629
1633
|
// Set the capabilities
|
|
@@ -1701,7 +1705,7 @@ export function _setItemProperties(item, itemTemplate, serviceInfo, params, isPo
|
|
|
1701
1705
|
* Set isUnique as true for indexes that reference origin relationship keyFields.
|
|
1702
1706
|
*
|
|
1703
1707
|
* @param serviceInfo Service information
|
|
1704
|
-
* @
|
|
1708
|
+
* @private
|
|
1705
1709
|
*/
|
|
1706
1710
|
export function _updateIndexesForRelationshipKeyFields(serviceInfo) {
|
|
1707
1711
|
const layersAndTables = (serviceInfo.layers || []).concat(serviceInfo.tables || []);
|
|
@@ -1742,8 +1746,9 @@ export function _updateIndexesForRelationshipKeyFields(serviceInfo) {
|
|
|
1742
1746
|
* @param url URL to assign to item's base section
|
|
1743
1747
|
* @param authentication Credentials for the request
|
|
1744
1748
|
* @param numAttempts Number of times to try to set the URL if AGO says that it updated the URL, but really didn't
|
|
1745
|
-
* @
|
|
1749
|
+
* @returns A promise that will resolve with the item id when the item has been updated or an AGO-style JSON failure
|
|
1746
1750
|
* response
|
|
1751
|
+
* @private
|
|
1747
1752
|
*/
|
|
1748
1753
|
export function _updateItemURL(id, url, authentication, numAttempts = 1) {
|
|
1749
1754
|
// Introduce a lag because AGO update appears to choke with rapid subsequent calls
|