@esri/solution-common 5.2.1 → 5.2.3

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.
Files changed (212) hide show
  1. package/README.md +4 -7
  2. package/dist/esm/completeItem.js +3 -3
  3. package/dist/esm/completeItem.js.map +1 -1
  4. package/dist/esm/formHelpers.d.ts +41 -0
  5. package/dist/esm/formHelpers.js +71 -0
  6. package/dist/esm/formHelpers.js.map +1 -0
  7. package/dist/esm/generalHelpers.d.ts +33 -0
  8. package/dist/esm/generalHelpers.js +44 -1
  9. package/dist/esm/generalHelpers.js.map +1 -1
  10. package/dist/esm/index.d.ts +2 -0
  11. package/dist/esm/index.js +2 -0
  12. package/dist/esm/index.js.map +1 -1
  13. package/dist/esm/interfaces.d.ts +19 -1
  14. package/dist/esm/interfaces.js.map +1 -1
  15. package/dist/esm/restHelpers.d.ts +10 -1
  16. package/dist/esm/restHelpers.js +25 -1
  17. package/dist/esm/restHelpers.js.map +1 -1
  18. package/dist/esm/templatization.js +5 -3
  19. package/dist/esm/templatization.js.map +1 -1
  20. package/dist/esm/workflowHelpers.d.ts +21 -1
  21. package/dist/esm/workflowHelpers.js +48 -48
  22. package/dist/esm/workflowHelpers.js.map +1 -1
  23. package/dist/esm/zip-utils.d.ts +44 -17
  24. package/dist/esm/zip-utils.js +73 -24
  25. package/dist/esm/zip-utils.js.map +1 -1
  26. package/package.json +3 -3
  27. package/dist/cjs/completeItem.d.ts +0 -29
  28. package/dist/cjs/completeItem.js +0 -92
  29. package/dist/cjs/completeItem.js.map +0 -1
  30. package/dist/cjs/create-hub-request-options.d.ts +0 -29
  31. package/dist/cjs/create-hub-request-options.js +0 -64
  32. package/dist/cjs/create-hub-request-options.js.map +0 -1
  33. package/dist/cjs/deleteHelpers/deleteEmptyGroups.d.ts +0 -24
  34. package/dist/cjs/deleteHelpers/deleteEmptyGroups.js +0 -42
  35. package/dist/cjs/deleteHelpers/deleteEmptyGroups.js.map +0 -1
  36. package/dist/cjs/deleteHelpers/deleteGroupIfEmpty.d.ts +0 -27
  37. package/dist/cjs/deleteHelpers/deleteGroupIfEmpty.js +0 -97
  38. package/dist/cjs/deleteHelpers/deleteGroupIfEmpty.js.map +0 -1
  39. package/dist/cjs/deleteHelpers/deleteSolutionContents.d.ts +0 -38
  40. package/dist/cjs/deleteHelpers/deleteSolutionContents.js +0 -130
  41. package/dist/cjs/deleteHelpers/deleteSolutionContents.js.map +0 -1
  42. package/dist/cjs/deleteHelpers/deleteSolutionFolder.d.ts +0 -29
  43. package/dist/cjs/deleteHelpers/deleteSolutionFolder.js +0 -79
  44. package/dist/cjs/deleteHelpers/deleteSolutionFolder.js.map +0 -1
  45. package/dist/cjs/deleteHelpers/deleteSolutionItem.d.ts +0 -30
  46. package/dist/cjs/deleteHelpers/deleteSolutionItem.js +0 -54
  47. package/dist/cjs/deleteHelpers/deleteSolutionItem.js.map +0 -1
  48. package/dist/cjs/deleteHelpers/index.d.ts +0 -22
  49. package/dist/cjs/deleteHelpers/index.js +0 -26
  50. package/dist/cjs/deleteHelpers/index.js.map +0 -1
  51. package/dist/cjs/deleteHelpers/reconstructBuildOrderIds.d.ts +0 -27
  52. package/dist/cjs/deleteHelpers/reconstructBuildOrderIds.js +0 -34
  53. package/dist/cjs/deleteHelpers/reconstructBuildOrderIds.js.map +0 -1
  54. package/dist/cjs/deleteHelpers/removeItems.d.ts +0 -34
  55. package/dist/cjs/deleteHelpers/removeItems.js +0 -112
  56. package/dist/cjs/deleteHelpers/removeItems.js.map +0 -1
  57. package/dist/cjs/deleteHelpers/reportProgress.d.ts +0 -27
  58. package/dist/cjs/deleteHelpers/reportProgress.js +0 -46
  59. package/dist/cjs/deleteHelpers/reportProgress.js.map +0 -1
  60. package/dist/cjs/deleteSolution.d.ts +0 -55
  61. package/dist/cjs/deleteSolution.js +0 -107
  62. package/dist/cjs/deleteSolution.js.map +0 -1
  63. package/dist/cjs/dependencies.d.ts +0 -26
  64. package/dist/cjs/dependencies.js +0 -171
  65. package/dist/cjs/dependencies.js.map +0 -1
  66. package/dist/cjs/featureServiceHelpers.d.ts +0 -799
  67. package/dist/cjs/featureServiceHelpers.js +0 -2438
  68. package/dist/cjs/featureServiceHelpers.js.map +0 -1
  69. package/dist/cjs/generalHelpers.d.ts +0 -400
  70. package/dist/cjs/generalHelpers.js +0 -877
  71. package/dist/cjs/generalHelpers.js.map +0 -1
  72. package/dist/cjs/get-subscription-info.d.ts +0 -27
  73. package/dist/cjs/get-subscription-info.js +0 -39
  74. package/dist/cjs/get-subscription-info.js.map +0 -1
  75. package/dist/cjs/getDeletableSolutionInfo.d.ts +0 -29
  76. package/dist/cjs/getDeletableSolutionInfo.js +0 -53
  77. package/dist/cjs/getDeletableSolutionInfo.js.map +0 -1
  78. package/dist/cjs/getItemTypeAbbrev.d.ts +0 -19
  79. package/dist/cjs/getItemTypeAbbrev.js +0 -186
  80. package/dist/cjs/getItemTypeAbbrev.js.map +0 -1
  81. package/dist/cjs/getSolutionSummary.d.ts +0 -27
  82. package/dist/cjs/getSolutionSummary.js +0 -101
  83. package/dist/cjs/getSolutionSummary.js.map +0 -1
  84. package/dist/cjs/index.d.ts +0 -44
  85. package/dist/cjs/index.js +0 -48
  86. package/dist/cjs/index.js.map +0 -1
  87. package/dist/cjs/interfaces.d.ts +0 -1344
  88. package/dist/cjs/interfaces.js +0 -77
  89. package/dist/cjs/interfaces.js.map +0 -1
  90. package/dist/cjs/libConnectors.d.ts +0 -73
  91. package/dist/cjs/libConnectors.js +0 -115
  92. package/dist/cjs/libConnectors.js.map +0 -1
  93. package/dist/cjs/migrations/apply-schema.d.ts +0 -24
  94. package/dist/cjs/migrations/apply-schema.js +0 -36
  95. package/dist/cjs/migrations/apply-schema.js.map +0 -1
  96. package/dist/cjs/migrations/is-legacy-solution.d.ts +0 -24
  97. package/dist/cjs/migrations/is-legacy-solution.js +0 -40
  98. package/dist/cjs/migrations/is-legacy-solution.js.map +0 -1
  99. package/dist/cjs/migrations/upgrade-three-dot-one.d.ts +0 -27
  100. package/dist/cjs/migrations/upgrade-three-dot-one.js +0 -49
  101. package/dist/cjs/migrations/upgrade-three-dot-one.js.map +0 -1
  102. package/dist/cjs/migrations/upgrade-three-dot-zero.d.ts +0 -27
  103. package/dist/cjs/migrations/upgrade-three-dot-zero.js +0 -43
  104. package/dist/cjs/migrations/upgrade-three-dot-zero.js.map +0 -1
  105. package/dist/cjs/migrations/upgrade-two-dot-five.d.ts +0 -24
  106. package/dist/cjs/migrations/upgrade-two-dot-five.js +0 -73
  107. package/dist/cjs/migrations/upgrade-two-dot-five.js.map +0 -1
  108. package/dist/cjs/migrations/upgrade-two-dot-four.d.ts +0 -24
  109. package/dist/cjs/migrations/upgrade-two-dot-four.js +0 -72
  110. package/dist/cjs/migrations/upgrade-two-dot-four.js.map +0 -1
  111. package/dist/cjs/migrations/upgrade-two-dot-one.d.ts +0 -7
  112. package/dist/cjs/migrations/upgrade-two-dot-one.js +0 -39
  113. package/dist/cjs/migrations/upgrade-two-dot-one.js.map +0 -1
  114. package/dist/cjs/migrations/upgrade-two-dot-seven.d.ts +0 -23
  115. package/dist/cjs/migrations/upgrade-two-dot-seven.js +0 -58
  116. package/dist/cjs/migrations/upgrade-two-dot-seven.js.map +0 -1
  117. package/dist/cjs/migrations/upgrade-two-dot-six.d.ts +0 -27
  118. package/dist/cjs/migrations/upgrade-two-dot-six.js +0 -61
  119. package/dist/cjs/migrations/upgrade-two-dot-six.js.map +0 -1
  120. package/dist/cjs/migrations/upgrade-two-dot-three.d.ts +0 -23
  121. package/dist/cjs/migrations/upgrade-two-dot-three.js +0 -55
  122. package/dist/cjs/migrations/upgrade-two-dot-three.js.map +0 -1
  123. package/dist/cjs/migrations/upgrade-two-dot-two.d.ts +0 -23
  124. package/dist/cjs/migrations/upgrade-two-dot-two.js +0 -58
  125. package/dist/cjs/migrations/upgrade-two-dot-two.js.map +0 -1
  126. package/dist/cjs/migrations/upgrade-two-dot-zero.d.ts +0 -44
  127. package/dist/cjs/migrations/upgrade-two-dot-zero.js +0 -95
  128. package/dist/cjs/migrations/upgrade-two-dot-zero.js.map +0 -1
  129. package/dist/cjs/migrator.d.ts +0 -25
  130. package/dist/cjs/migrator.js +0 -77
  131. package/dist/cjs/migrator.js.map +0 -1
  132. package/dist/cjs/resourceHelpers.d.ts +0 -191
  133. package/dist/cjs/resourceHelpers.js +0 -384
  134. package/dist/cjs/resourceHelpers.js.map +0 -1
  135. package/dist/cjs/resources/add-resource-from-blob.d.ts +0 -26
  136. package/dist/cjs/resources/add-resource-from-blob.js +0 -52
  137. package/dist/cjs/resources/add-resource-from-blob.js.map +0 -1
  138. package/dist/cjs/resources/addMetadataFromBlob.d.ts +0 -25
  139. package/dist/cjs/resources/addMetadataFromBlob.js +0 -43
  140. package/dist/cjs/resources/addMetadataFromBlob.js.map +0 -1
  141. package/dist/cjs/resources/convert-item-resource-to-storage-resource.d.ts +0 -32
  142. package/dist/cjs/resources/convert-item-resource-to-storage-resource.js +0 -70
  143. package/dist/cjs/resources/convert-item-resource-to-storage-resource.js.map +0 -1
  144. package/dist/cjs/resources/convert-storage-resource-to-item-resource.d.ts +0 -29
  145. package/dist/cjs/resources/convert-storage-resource-to-item-resource.js +0 -70
  146. package/dist/cjs/resources/convert-storage-resource-to-item-resource.js.map +0 -1
  147. package/dist/cjs/resources/copyAssociatedFiles.d.ts +0 -67
  148. package/dist/cjs/resources/copyAssociatedFiles.js +0 -304
  149. package/dist/cjs/resources/copyAssociatedFiles.js.map +0 -1
  150. package/dist/cjs/resources/copyDataIntoItem.d.ts +0 -33
  151. package/dist/cjs/resources/copyDataIntoItem.js +0 -62
  152. package/dist/cjs/resources/copyDataIntoItem.js.map +0 -1
  153. package/dist/cjs/resources/copyMetadataIntoItem.d.ts +0 -26
  154. package/dist/cjs/resources/copyMetadataIntoItem.js +0 -46
  155. package/dist/cjs/resources/copyMetadataIntoItem.js.map +0 -1
  156. package/dist/cjs/resources/copyResourceIntoZip.d.ts +0 -33
  157. package/dist/cjs/resources/copyResourceIntoZip.js +0 -78
  158. package/dist/cjs/resources/copyResourceIntoZip.js.map +0 -1
  159. package/dist/cjs/resources/copyZipIntoItem.d.ts +0 -25
  160. package/dist/cjs/resources/copyZipIntoItem.js +0 -54
  161. package/dist/cjs/resources/copyZipIntoItem.js.map +0 -1
  162. package/dist/cjs/resources/createCopyResults.d.ts +0 -25
  163. package/dist/cjs/resources/createCopyResults.js +0 -36
  164. package/dist/cjs/resources/createCopyResults.js.map +0 -1
  165. package/dist/cjs/resources/get-blob.d.ts +0 -26
  166. package/dist/cjs/resources/get-blob.js +0 -27
  167. package/dist/cjs/resources/get-blob.js.map +0 -1
  168. package/dist/cjs/resources/getItemResourcesFilesFromPaths.d.ts +0 -24
  169. package/dist/cjs/resources/getItemResourcesFilesFromPaths.js +0 -49
  170. package/dist/cjs/resources/getItemResourcesFilesFromPaths.js.map +0 -1
  171. package/dist/cjs/resources/getItemResourcesPaths.d.ts +0 -26
  172. package/dist/cjs/resources/getItemResourcesPaths.js +0 -76
  173. package/dist/cjs/resources/getItemResourcesPaths.js.map +0 -1
  174. package/dist/cjs/resources/index.d.ts +0 -29
  175. package/dist/cjs/resources/index.js +0 -33
  176. package/dist/cjs/resources/index.js.map +0 -1
  177. package/dist/cjs/resources/solution-resource.d.ts +0 -35
  178. package/dist/cjs/resources/solution-resource.js +0 -31
  179. package/dist/cjs/resources/solution-resource.js.map +0 -1
  180. package/dist/cjs/resources/transform-resource-paths-to-solution-resources.d.ts +0 -56
  181. package/dist/cjs/resources/transform-resource-paths-to-solution-resources.js +0 -146
  182. package/dist/cjs/resources/transform-resource-paths-to-solution-resources.js.map +0 -1
  183. package/dist/cjs/restHelpers.d.ts +0 -598
  184. package/dist/cjs/restHelpers.js +0 -1929
  185. package/dist/cjs/restHelpers.js.map +0 -1
  186. package/dist/cjs/restHelpersGet.d.ts +0 -288
  187. package/dist/cjs/restHelpersGet.js +0 -804
  188. package/dist/cjs/restHelpersGet.js.map +0 -1
  189. package/dist/cjs/sharing/index.d.ts +0 -16
  190. package/dist/cjs/sharing/index.js +0 -20
  191. package/dist/cjs/sharing/index.js.map +0 -1
  192. package/dist/cjs/sharing/share-item-to-groups.d.ts +0 -26
  193. package/dist/cjs/sharing/share-item-to-groups.js +0 -44
  194. package/dist/cjs/sharing/share-item-to-groups.js.map +0 -1
  195. package/dist/cjs/templatization.d.ts +0 -139
  196. package/dist/cjs/templatization.js +0 -314
  197. package/dist/cjs/templatization.js.map +0 -1
  198. package/dist/cjs/trackingHelpers.d.ts +0 -116
  199. package/dist/cjs/trackingHelpers.js +0 -217
  200. package/dist/cjs/trackingHelpers.js.map +0 -1
  201. package/dist/cjs/velocityHelpers.d.ts +0 -57
  202. package/dist/cjs/velocityHelpers.js +0 -135
  203. package/dist/cjs/velocityHelpers.js.map +0 -1
  204. package/dist/cjs/workflowHelpers.d.ts +0 -17
  205. package/dist/cjs/workflowHelpers.js +0 -76
  206. package/dist/cjs/workflowHelpers.js.map +0 -1
  207. package/dist/cjs/workforceHelpers.d.ts +0 -115
  208. package/dist/cjs/workforceHelpers.js +0 -749
  209. package/dist/cjs/workforceHelpers.js.map +0 -1
  210. package/dist/cjs/zip-utils.d.ts +0 -49
  211. package/dist/cjs/zip-utils.js +0 -89
  212. package/dist/cjs/zip-utils.js.map +0 -1
@@ -1,598 +0,0 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { IAddFolderResponse, IAddGroupResponse, IAdditionalGroupSearchOptions, ICreateItemResponse, ICreateServiceResult, IDependency, IExtent, IFeatureServiceProperties, IFolderStatusResponse, IGroup, IGroupAdd, IItem, IItemTemplate, IItemUpdate, IPostProcessArgs, IRelatedItems, ISpatialReference, IStatusResponse, ItemRelationshipType, IUpdate, IUpdateItemResponse, UserSession } from "./interfaces";
17
- import { IUserSessionOptions } from "@esri/arcgis-rest-auth";
18
- import { IPagingParams, ISearchOptions, ISearchResult, SearchQueryBuilder } from "@esri/arcgis-rest-portal";
19
- import { IParams } from "@esri/arcgis-rest-request";
20
- export { request as rest_request } from "@esri/arcgis-rest-request";
21
- export declare function addItemData(id: string, data: any, authentication: UserSession): Promise<IUpdateItemResponse>;
22
- /**
23
- * Creates a UserSession via a function so that the global arcgisSolution variable can access authentication.
24
- *
25
- * @param options See https://esri.github.io/arcgis-rest-js/api/auth/IUserSessionOptions/
26
- * @returns UserSession
27
- */
28
- export declare function getUserSession(options?: IUserSessionOptions): UserSession;
29
- /**
30
- * Adds a forward relationship between two items.
31
- *
32
- * @param originItemId Origin of relationship
33
- * @param destinationItemId Destination of relationship
34
- * @param relationshipType Type of relationship
35
- * @param authentication Credentials for the request
36
- * @returns A Promise to add item resources.
37
- */
38
- export declare function addForwardItemRelationship(originItemId: string, destinationItemId: string, relationshipType: ItemRelationshipType, authentication: UserSession): Promise<IStatusResponse>;
39
- /**
40
- * Adds forward relationships for an item.
41
- *
42
- * @param originItemId Origin of relationship
43
- * @param destinationRelationships Destinations
44
- * @param authentication Credentials for the request
45
- * @returns A Promise to add item resources.
46
- */
47
- export declare function addForwardItemRelationships(originItemId: string, destinationRelationships: IRelatedItems[], authentication: UserSession): Promise<IStatusResponse[]>;
48
- /**
49
- * Adds a token to the query parameters of a URL.
50
- *
51
- * @param url URL to use as base
52
- * @param authentication Credentials to be used to generate token for URL
53
- * @returns A promise that will resolve with the supplied URL with `token=&lt;token&gt;` added to its query params
54
- * unless either the URL doesn't exist or the token can't be generated
55
- */
56
- export declare function addTokenToUrl(url: string, authentication: UserSession): Promise<string>;
57
- /**
58
- * Calls addToDefinition for the service.
59
- *
60
- * Added retry due to some solutions failing to deploy in specific orgs/hives due to timeouts.
61
- * On the first pass we will use the quicker sync request to add.
62
- * If it fails we will use an async request that will avoid the timeout errors.
63
- *
64
- * @param url URL to use as base
65
- * @param options the info to add to the services definition
66
- * @param skipRetry a boolean to control if retry logic will be used. Defaults to false.
67
- * @param useAsync a boolean to control if we will use an async request
68
- * @returns A promise that will resolve when the request has completed
69
- */
70
- export declare function addToServiceDefinition(url: string, options: any, skipRetry?: boolean, useAsync?: boolean): Promise<void>;
71
- /**
72
- * When using an async request we need to poll the status url to know when the request has completed or failed.
73
- *
74
- * @param result the result returned from the addToDefinition request.
75
- * This will contain a status url or the standard sync result.
76
- * @param authentication Credentials to be used to generate token for URL
77
- * @returns A promise that will resolve when the request has completed
78
- */
79
- export declare function checkRequestStatus(result: any, authentication: any): Promise<void>;
80
- /**
81
- * Converts a general search into an ISearchOptions structure.
82
- *
83
- * @param search Search specified in one of three ways
84
- * @returns Recast search
85
- */
86
- export declare function convertToISearchOptions(search: string | ISearchOptions | SearchQueryBuilder): ISearchOptions;
87
- /**
88
- * Simple validate function to ensure all coordinates are numbers
89
- * In some cases orgs can have null or undefined coordinate values associated with the org extent
90
- *
91
- * @param extent the extent to validate
92
- * @returns the provided extent or a default global extent if some coordinates are not numbers
93
- * @private
94
- */
95
- export declare function _validateExtent(extent: IExtent): IExtent;
96
- /**
97
- * If the request to convert the extent fails it has commonly been due to an invalid extent.
98
- * This function will first attempt to use the provided extent. If it fails it will default to
99
- * the source items extent and if that fails it will then use a default global extent.
100
- *
101
- * @param extent the extent to convert
102
- * @param fallbackExtent the extent to convert if the main extent does not project to the outSR
103
- * @param outSR the spatial reference to project to
104
- * @param geometryServiceUrl the service url for the geometry service to use
105
- * @param authentication the credentials for the requests
106
- * @returns the extent projected to the provided spatial reference
107
- * or the world extent projected to the provided spatial reference
108
- * @private
109
- */
110
- export declare function convertExtentWithFallback(extent: IExtent, fallbackExtent: any, outSR: ISpatialReference, geometryServiceUrl: string, authentication: UserSession): Promise<any>;
111
- /**
112
- * Converts an extent to a specified spatial reference.
113
- *
114
- * @param extent Extent object to check and (possibly) to project
115
- * @param outSR Desired spatial reference
116
- * @param geometryServiceUrl Path to geometry service providing `findTransformations` and `project` services
117
- * @param authentication Credentials for the request
118
- * @returns Original extent if it's already using outSR or the extents projected into the outSR
119
- */
120
- export declare function convertExtent(extent: IExtent, outSR: ISpatialReference, geometryServiceUrl: string, authentication: UserSession): Promise<any>;
121
- /**
122
- * Publishes a feature service as an AGOL item; it does not include its layers and tables
123
- *
124
- * @param newItemTemplate Template of item to be created
125
- * @param authentication Credentials for the request
126
- * @param templateDictionary Hash of facts: org URL, adlib replacements, user; .user.folders property contains a list
127
- * @returns A promise that will resolve with an object reporting success and the Solution id
128
- */
129
- export declare function createFeatureService(newItemTemplate: IItemTemplate, authentication: UserSession, templateDictionary: any): Promise<ICreateServiceResult>;
130
- /**
131
- * Publishes an item and its data, metadata, and resources as an AGOL item.
132
- *
133
- * @param itemInfo Item's `item` section
134
- * @param folderId Id of folder to receive item; null indicates that the item goes into the root
135
- * folder; ignored for Group item type
136
- * @param destinationAuthentication Credentials for for requests to where the item is to be created
137
- * @param itemThumbnailUrl URL to image to use for item thumbnail
138
- * @param itemThumbnailAuthentication Credentials for requests to the thumbnail source
139
- * @param dataFile Item's `data` section
140
- * @param metadataFile Item's metadata file
141
- * @param resourcesFiles Item's resources
142
- * @param access Access to set for item: "public", "org", "private"
143
- * @returns A promise that will resolve with an object reporting success or failure and the Solution id
144
- */
145
- export declare function createFullItem(itemInfo: any, folderId: string | undefined, destinationAuthentication: UserSession, itemThumbnailUrl?: string, itemThumbnailAuthentication?: UserSession, dataFile?: File, metadataFile?: File, resourcesFiles?: File[], access?: string): Promise<ICreateItemResponse>;
146
- /**
147
- * Publishes an item and its data as an AGOL item.
148
- *
149
- * @param itemInfo Item's `item` section
150
- * @param dataInfo Item's `data` section
151
- * @param authentication Credentials for the request
152
- * @param folderId Id of folder to receive item; null indicates that the item goes into the root
153
- * folder; ignored for Group item type
154
- * @param access Access to set for item: "public", "org", "private"
155
- * @returns A promise that will resolve with an object reporting success and the Solution id
156
- */
157
- export declare function createItemWithData(itemInfo: any, dataInfo: any, authentication: UserSession, folderId: string | undefined, access?: string): Promise<ICreateItemResponse>;
158
- /**
159
- * Creates a folder using a numeric suffix to ensure uniqueness if necessary.
160
- *
161
- * @param title Folder title, used as-is if possible and with suffix otherwise
162
- * @param templateDictionary Hash of facts: org URL, adlib replacements, user; .user.folders property contains a list
163
- * of known folder names; function updates list with existing names not yet known, and creates .user.folders if it
164
- * doesn't exist in the dictionary
165
- * @param authentication Credentials for creating folder
166
- * @returns Id of created folder
167
- */
168
- export declare function createUniqueFolder(title: string, templateDictionary: any, authentication: UserSession): Promise<IAddFolderResponse>;
169
- /**
170
- * Creates a group using numeric suffix to ensure uniqueness.
171
- *
172
- * @param title Group title, used as-is if possible and with suffix otherwise
173
- * @param templateDictionary Hash of facts: org URL, adlib replacements, user
174
- * @param authentication Credentials for creating group
175
- * @param owner Optional arg for the Tracking owner
176
- * If the tracking owner is not the one deploying the solution
177
- * tracker groups will be created under the deployment user but
178
- * will be reassigned to the tracking owner.
179
- * @returns Information about created group
180
- */
181
- export declare function createUniqueGroup(title: string, groupItem: IGroupAdd, templateDictionary: any, authentication: UserSession, owner?: string): Promise<IAddGroupResponse>;
182
- /**
183
- * Gets the ids of the dependencies of an AGOL feature service item.
184
- * Dependencies will only exist when the service is a view.
185
- *
186
- * @param itemTemplate Template of item to be created
187
- * @param authentication Credentials for the request
188
- * @returns A promise that will resolve a list of dependencies
189
- */
190
- export declare function extractDependencies(itemTemplate: IItemTemplate, authentication?: UserSession): Promise<IDependency[]>;
191
- /**
192
- * Get json info for the services layers
193
- *
194
- * @param serviceUrl the url for the service
195
- * @param layerList list of base layer info
196
- * @param authentication Credentials for the request
197
- * @returns A promise that will resolve a list of dependencies
198
- */
199
- export declare function getLayers(serviceUrl: string, layerList: any[], authentication: UserSession): Promise<any[]>;
200
- /**
201
- * Add additional options to a layers definition.
202
- *
203
- * @param args The IPostProcessArgs for the request(s)
204
- * @param isPortal boolean to indicate if we are deploying to portal
205
- *
206
- * @returns An array of update instructions
207
- * @private
208
- */
209
- export declare function getLayerUpdates(args: IPostProcessArgs, isPortal: boolean): IUpdate[];
210
- /**
211
- * Sorts relationships based on order of supporting layers and tables in the service definition
212
- *
213
- * @param layers the layers from the service
214
- * @param tables the tables from the service
215
- * @param relUpdates the relationships to add for the service
216
- *
217
- * @returns An array with relationships that have been sorted
218
- * @private
219
- */
220
- export declare function _sortRelationships(layers: any[], tables: any[], relUpdates: any): any[];
221
- /**
222
- * Add additional options to a layers definition
223
- *
224
- * Added retry due to some solutions failing to deploy in specific orgs/hives
225
- *
226
- *
227
- * @param Update will contain either add, update, or delete from service definition call
228
- * @param skipRetry defaults to false. when true the retry logic will be ignored
229
- * @returns A promise that will resolve when service definition call has completed
230
- * @private
231
- */
232
- export declare function getRequest(update: IUpdate, skipRetry?: boolean, useAsync?: boolean): Promise<void>;
233
- /**
234
- * Fills in missing data, including full layer and table definitions, in a feature services' definition.
235
- *
236
- * @param itemTemplate Feature service item, data, dependencies definition to be modified
237
- * @param authentication Credentials for the request to AGOL
238
- * @returns A promise that will resolve when fullItem has been updated
239
- * @private
240
- */
241
- export declare function getServiceLayersAndTables(itemTemplate: IItemTemplate, authentication: UserSession): Promise<IItemTemplate>;
242
- /**
243
- * Get service properties for the given url and update key props
244
- *
245
- * @param serviceUrl the feature service url
246
- * @param authentication Credentials for the request to AGOL
247
- * @param workforceService boolean to indicate if extra workforce service steps should be handled
248
- * @returns A promise that will resolve with the service properties
249
- * @private
250
- */
251
- export declare function getFeatureServiceProperties(serviceUrl: string, authentication: UserSession, workforceService?: boolean): Promise<IFeatureServiceProperties>;
252
- /**
253
- * Fetches the configuration of a workflow.
254
- *
255
- * @param itemId Id of the workflow item
256
- * @param authentication Credentials for the request to AGOL
257
- * @returns Promise resolving with the workflow configuration in a zip file
258
- */
259
- export declare function getWorkflowConfiguration(itemId: string, authentication: UserSession): Promise<any>;
260
- /**
261
- * Parses the layers array and will filter subsets of Layers and Tables
262
- * Layers and Tables are both returned in the layers array when we access a feature service from the admin api.
263
- *
264
- * @param adminData The data of the feature service
265
- * @returns A mutated version of the provided adminData
266
- * @private
267
- */
268
- export declare function _parseAdminServiceData(adminData: any): any;
269
- /**
270
- * livingatlas designation test.
271
- * These layers should not be templatized or depolyed
272
- *
273
- * @param groupDesignations the items group designations to evaluate
274
- * @returns A boolean indicating if the invalid designation is found in the item info
275
- */
276
- export declare function hasInvalidGroupDesignations(groupDesignations: string): boolean;
277
- /**
278
- * Removes a folder from AGO.
279
- *
280
- * @param folderId Id of a folder to delete
281
- * @param authentication Credentials for the request to AGO
282
- * @returns A promise that will resolve with the result of the request
283
- */
284
- export declare function removeFolder(folderId: string, authentication: UserSession): Promise<IFolderStatusResponse>;
285
- /**
286
- * Removes a group from AGO.
287
- *
288
- * @param groupId Id of a group to delete
289
- * @param authentication Credentials for the request to AGO
290
- * @returns A promise that will resolve with the result of the request
291
- */
292
- export declare function removeGroup(groupId: string, authentication: UserSession): Promise<IStatusResponse>;
293
- /**
294
- * Removes an item from AGO.
295
- *
296
- * @param itemId Id of an item to delete
297
- * @param authentication Credentials for the request to AGO
298
- * @param permanentDelete If true (the default), the item is permanently deleted; if false and the item type
299
- * supports the recycle bin, the item will be put into the recycle bin
300
- * @returns A promise that will resolve with the result of the request
301
- */
302
- export declare function removeItem(itemId: string, authentication: UserSession, permanentDelete?: boolean): Promise<IStatusResponse>;
303
- /**
304
- * Removes an item or group from AGO.
305
- *
306
- * @param itemId Id of an item or group to delete
307
- * @param authentication Credentials for the request to AGO
308
- * @param permanentDelete If true (the default), the item is permanently deleted; if false and the item type
309
- * supports the recycle bin, the item will be put into the recycle bin; note that this does not apply to groups
310
- * @returns A promise that will resolve with the result of the request
311
- */
312
- export declare function removeItemOrGroup(itemId: string, authentication: UserSession, permanentDelete?: boolean): Promise<IStatusResponse>;
313
- /**
314
- * Searches for items matching a query and that the caller has access to.
315
- *
316
- * @param search Search string (e.g., "q=redlands+map") or a more detailed structure that can include authentication
317
- * @returns Promise resolving with search results
318
- * @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
319
- */
320
- export declare function searchItems(search: string | ISearchOptions | SearchQueryBuilder): Promise<ISearchResult<IItem>>;
321
- /**
322
- * Searches for items matching a query and that the caller has access to, continuing recursively until done.
323
- *
324
- * @param search Search string (e.g., "q=redlands+map") or a more detailed structure that can include authentication
325
- * @param accumulatedResponse Response built from previous requests
326
- * @returns Promise resolving with search results
327
- * @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
328
- */
329
- export declare function searchAllItems(search: string | ISearchOptions | SearchQueryBuilder, accumulatedResponse?: ISearchResult<IItem>): Promise<ISearchResult<IItem>>;
330
- /**
331
- * Searches for groups matching criteria.
332
- *
333
- * @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
334
- * @param authentication Credentials for the request to AGO
335
- * @param additionalSearchOptions Adjustments to search, such as tranche size
336
- * @returns A promise that will resolve with a structure with a tranche of results and
337
- * describing how many items are available
338
- * @see https://developers.arcgis.com/rest/users-groups-and-items/group-search.htm
339
- * @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
340
- */
341
- export declare function searchGroups(searchString: string, authentication: UserSession, additionalSearchOptions?: IAdditionalGroupSearchOptions): Promise<ISearchResult<IGroup>>;
342
- /**
343
- * Searches for groups matching criteria recurusively.
344
- *
345
- * @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
346
- * @param authentication Credentials for the request to AGO
347
- * @param groups List of groups that have been found from previous requests
348
- * @param inPagingParams The paging params for the recurisve searching
349
- *
350
- * @returns A promise that will resolve with all groups that meet the search criteria
351
- */
352
- export declare function searchAllGroups(searchString: string, authentication: UserSession, groups?: IGroup[], inPagingParams?: IPagingParams): Promise<IGroup[]>;
353
- /**
354
- * Searches for group contents matching criteria recursively.
355
- *
356
- * @param groupId Group whose contents are to be searched
357
- * @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
358
- * @param authentication Credentials for the request to AGO
359
- * @param additionalSearchOptions Adjustments to search, such as tranche size and categories of interest; categories
360
- * are supplied as an array: each array element consists of one or more categories to be ORed; array elements are ANDed
361
- * @param portalUrl Rest Url of the portal to perform the search
362
- * @param accumulatedResponse Response built from previous requests
363
- * @returns A promise that will resolve with a structure with a tranche of results and
364
- * describing how many items are available
365
- * @see https://developers.arcgis.com/rest/users-groups-and-items/group-content-search.htm
366
- * @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
367
- */
368
- export declare function searchGroupAllContents(groupId: string, searchString: string, authentication: UserSession, additionalSearchOptions?: IAdditionalGroupSearchOptions, portalUrl?: string, accumulatedResponse?: ISearchResult<IItem>): Promise<ISearchResult<IItem>>;
369
- /**
370
- * Searches for group contents matching criteria.
371
- *
372
- * @param groupId Group whose contents are to be searched
373
- * @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
374
- * @param authentication Credentials for the request to AGO
375
- * @param additionalSearchOptions Adjustments to search, such as tranche size and categories of interest; categories
376
- * are supplied as an array: each array element consists of one or more categories to be ORed; array elements are ANDed
377
- * @param portalUrl Rest Url of the portal to perform the search
378
- * @returns A promise that will resolve with a structure with a tranche of results and
379
- * describing how many items are available
380
- * @see https://developers.arcgis.com/rest/users-groups-and-items/group-content-search.htm
381
- * @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
382
- */
383
- export declare function searchGroupContents(groupId: string, searchString: string, authentication: UserSession, additionalSearchOptions?: IAdditionalGroupSearchOptions, portalUrl?: string): Promise<ISearchResult<IItem>>;
384
- /**
385
- * Reassign ownership of a group
386
- *
387
- * @param groupId Group to remove users from
388
- * @param userName The new owner for the group
389
- * @param authentication Credentials for the request to
390
- *
391
- * @returns A promise that will resolve after the group ownership has been assigned
392
- *
393
- */
394
- export declare function reassignGroup(groupId: string, userName: string, authentication: UserSession): Promise<any>;
395
- /**
396
- * Remove users from a group
397
- *
398
- * @param groupId Group to remove users from
399
- * @param users List of users to remove from the group
400
- * @param authentication Credentials for the request to
401
- *
402
- * @returns A promise that will resolve after the users have been removed
403
- *
404
- */
405
- export declare function removeUsers(groupId: string, users: string[], authentication: UserSession): Promise<any>;
406
- /**
407
- * Shares an item to the defined group
408
- *
409
- * @param groupId Group to share with
410
- * @param id the item id to share with the group
411
- * @param destinationAuthentication Credentials for the request to AGO
412
- * @param owner owner of the group when sharing tracking items (can be different from the deploying user)
413
- *
414
- * @returns A promise that will resolve after the item has been shared
415
- *
416
- */
417
- export declare function shareItem(groupId: string, id: string, destinationAuthentication: UserSession, owner?: string): Promise<void>;
418
- /**
419
- * Updates an item.
420
- *
421
- * @param itemInfo The base info of an item; note that this content will be serialized, which doesn't work
422
- * for binary content
423
- * @param authentication Credentials for request
424
- * @param folderId Item's folder
425
- * @param additionalParams Updates that are put under the `params` property, which is not serialized
426
- * @return
427
- */
428
- export declare function updateItem(itemInfo: IItemUpdate, authentication: UserSession, folderId?: string, additionalParams?: any): Promise<IUpdateItemResponse>;
429
- /**
430
- * Updates a group.
431
- *
432
- * @param groupInfo The base info of a group; note that this content will be serialized, which doesn't work
433
- * for binary content
434
- * @param authentication Credentials for request
435
- * @param additionalParams Updates that are put under the `params` property, which is not serialized
436
- * @returns A Promise that will resolve with the success/failure status of the request
437
- */
438
- export declare function updateGroup(groupInfo: IGroup, authentication: UserSession, additionalParams?: any): Promise<{
439
- success: boolean;
440
- groupId: string;
441
- }>;
442
- /**
443
- * Updates an item.
444
- *
445
- * @param itemInfo The base info of an item
446
- * @param data The items data section
447
- * @param authentication Credentials for requests
448
- * @param thumbnail optional thumbnail to update
449
- * @param access "public" or "org"
450
- * @return
451
- */
452
- export declare function updateItemExtended(itemInfo: IItemUpdate, data: any, authentication: UserSession, thumbnail?: File, access?: string | undefined, templateDictionary?: any): Promise<IUpdateItemResponse>;
453
- /**
454
- * Update an item's base and data using a dictionary.
455
- *
456
- * @param {string} itemId The item ID
457
- * @param {any} templateDictionary The template dictionary
458
- * @param {UserSession} authentication The destination session info
459
- * @returns Promise resolving to successfulness of update
460
- */
461
- export declare function updateItemTemplateFromDictionary(itemId: string, templateDictionary: any, authentication: UserSession): Promise<IUpdateItemResponse>;
462
- /**
463
- * Updates the URL of an item.
464
- *
465
- * @param id AGOL id of item to update
466
- * @param url URL to assign to item's base section
467
- * @param authentication Credentials for the request
468
- * @returns A promise that will resolve with the item id when the item has been updated or an AGO-style JSON failure
469
- * response
470
- */
471
- export declare function updateItemURL(id: string, url: string, authentication: UserSession): Promise<string>;
472
- /**
473
- * Adds a data section to an item.
474
- *
475
- * @param itemId Id of item to receive data file
476
- * @param dataFile Data to be added
477
- * @param authentication Credentials for the request
478
- * @returns Promise reporting success or failure
479
- * @private
480
- */
481
- export declare function _addItemDataFile(itemId: string, dataFile: File, authentication: UserSession): Promise<IUpdateItemResponse>;
482
- /**
483
- * Adds a metadata file to an item.
484
- *
485
- * @param itemId Id of item to receive data file
486
- * @param metadataFile Metadata to be added
487
- * @param authentication Credentials for the request
488
- * @returns Promise reporting success or failure
489
- * @private
490
- */
491
- export declare function _addItemMetadataFile(itemId: string, metadataFile: File, authentication: UserSession): Promise<IUpdateItemResponse>;
492
- /**
493
- * Accumulates the number of relationships in a collection of layers.
494
- *
495
- * @param List of layers to examine
496
- * @returns The number of relationships
497
- * @private
498
- */
499
- export declare function _countRelationships(layers: any[]): number;
500
- /**
501
- * Gets the full definitions of the layers affiliated with a hosted service.
502
- *
503
- * @param serviceUrl URL to hosted service
504
- * @param layerList List of layers at that service...must contain id
505
- * @param authentication Credentials for the request
506
- * @returns A promise that will resolve with a list of the layers from the admin api
507
- * @private
508
- */
509
- export declare function _getCreateServiceOptions(newItemTemplate: IItemTemplate, authentication: UserSession, templateDictionary: any): Promise<any>;
510
- /**
511
- * When the services spatial reference does not match that of it's default extent
512
- * use the out SRs default extent if it exists in the templateDictionary
513
- * this should be set when adding a custom out wkid to the params before calling deploy
514
- * this will help avoid situations where the orgs default extent and default world extent
515
- * will not project successfully to the out SR
516
- *
517
- * @param serviceInfo the object that contains the spatial reference to evaluate
518
- * @param templateDictionary the template dictionary
519
- * @returns the extent to use as the fallback
520
- * @private
521
- */
522
- export declare function _getFallbackExtent(serviceInfo: any, templateDictionary: any): any;
523
- /**
524
- * Add relationships to all layers in one call to retain fully functioning composite relationships
525
- *
526
- * @param args The IPostProcessArgs for the request(s)
527
- * @returns Any relationships that should be updated for the service
528
- * @private
529
- */
530
- export declare function _getRelationshipUpdates(args: IPostProcessArgs): any;
531
- /**
532
- * Get the stored contingent values and structure them to be added to the services layers.
533
- *
534
- * @param args The IPostProcessArgs for the request(s)
535
- * @returns Any contingent values that should be added to the service.
536
- * @private
537
- */
538
- export declare function _getContingentValuesUpdates(args: IPostProcessArgs): any;
539
- /**
540
- * Get refresh, add, update, or delete definition info
541
- *
542
- * @param url the base admin url for the service
543
- * @param id the id of the layer
544
- * @param obj parameters for the request
545
- * @param args various arguments to help support the request
546
- * @param type type of update the request will handle
547
- * @returns IUpdate that has the request url and arguments
548
- * @private
549
- */
550
- export declare function _getUpdate(url: string, id: any, obj: any, args: any, type: "delete" | "update" | "add" | "refresh"): IUpdate;
551
- /**
552
- * Changes just the domain part of a URL to lowercase.
553
- *
554
- * @param url URL to modify
555
- * @return Adjusted URL
556
- * @see From `getServerRootUrl` in arcgis-rest-js' ArcGISIdentityManager.ts
557
- * @private
558
- */
559
- export declare function _lowercaseDomain(url: string): string;
560
- /**
561
- * Checks the two main parts of an item for unresolved variables and reports any found.
562
- *
563
- * @param base Item's base section
564
- * @param data Item's data section
565
- * @private
566
- */
567
- export declare function _reportVariablesInItem(itemId: string, itemType: string, base: any, data: any): void;
568
- /**
569
- * Updates a feature service item.
570
- *
571
- * @param item Item to update
572
- * @param itemTemplate item template for the new item
573
- * @param serviceInfo Service information
574
- * @param params arcgis-rest-js params to update
575
- * @param isPortal Is the service hosted in a portal?
576
- * @returns Updated item
577
- * @private
578
- */
579
- export declare function _setItemProperties(item: any, itemTemplate: IItemTemplate, serviceInfo: any, params: IParams, isPortal: boolean): any;
580
- /**
581
- * Set isUnique as true for indexes that reference origin relationship keyFields.
582
- *
583
- * @param serviceInfo Service information
584
- * @private
585
- */
586
- export declare function _updateIndexesForRelationshipKeyFields(serviceInfo: any): void;
587
- /**
588
- * Updates the URL of an item.
589
- *
590
- * @param id AGOL id of item to update
591
- * @param url URL to assign to item's base section
592
- * @param authentication Credentials for the request
593
- * @param numAttempts Number of times to try to set the URL if AGO says that it updated the URL, but really didn't
594
- * @returns A promise that will resolve with the item id when the item has been updated or an AGO-style JSON failure
595
- * response
596
- * @private
597
- */
598
- export declare function _updateItemURL(id: string, url: string, authentication: UserSession, numAttempts?: number): Promise<string>;