@esri/solution-common 3.0.0 → 3.1.0

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