@esri/solution-common 6.1.1 → 6.1.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 (404) hide show
  1. package/package.json +2 -2
  2. package/dist/cjs/arcgisRestJS.d.ts +0 -61
  3. package/dist/cjs/arcgisRestJS.js +0 -144
  4. package/dist/cjs/arcgisRestJS.js.map +0 -1
  5. package/dist/cjs/completeItem.d.ts +0 -30
  6. package/dist/cjs/completeItem.js +0 -72
  7. package/dist/cjs/completeItem.js.map +0 -1
  8. package/dist/cjs/create-hub-request-options.d.ts +0 -29
  9. package/dist/cjs/create-hub-request-options.js +0 -64
  10. package/dist/cjs/create-hub-request-options.js.map +0 -1
  11. package/dist/cjs/deleteHelpers/deleteEmptyGroups.d.ts +0 -24
  12. package/dist/cjs/deleteHelpers/deleteEmptyGroups.js +0 -42
  13. package/dist/cjs/deleteHelpers/deleteEmptyGroups.js.map +0 -1
  14. package/dist/cjs/deleteHelpers/deleteGroupIfEmpty.d.ts +0 -27
  15. package/dist/cjs/deleteHelpers/deleteGroupIfEmpty.js +0 -99
  16. package/dist/cjs/deleteHelpers/deleteGroupIfEmpty.js.map +0 -1
  17. package/dist/cjs/deleteHelpers/deleteSolutionContents.d.ts +0 -39
  18. package/dist/cjs/deleteHelpers/deleteSolutionContents.js +0 -127
  19. package/dist/cjs/deleteHelpers/deleteSolutionContents.js.map +0 -1
  20. package/dist/cjs/deleteHelpers/deleteSolutionFolder.d.ts +0 -29
  21. package/dist/cjs/deleteHelpers/deleteSolutionFolder.js +0 -81
  22. package/dist/cjs/deleteHelpers/deleteSolutionFolder.js.map +0 -1
  23. package/dist/cjs/deleteHelpers/deleteSolutionItem.d.ts +0 -31
  24. package/dist/cjs/deleteHelpers/deleteSolutionItem.js +0 -52
  25. package/dist/cjs/deleteHelpers/deleteSolutionItem.js.map +0 -1
  26. package/dist/cjs/deleteHelpers/index.d.ts +0 -22
  27. package/dist/cjs/deleteHelpers/index.js +0 -26
  28. package/dist/cjs/deleteHelpers/index.js.map +0 -1
  29. package/dist/cjs/deleteHelpers/reconstructBuildOrderIds.d.ts +0 -27
  30. package/dist/cjs/deleteHelpers/reconstructBuildOrderIds.js +0 -34
  31. package/dist/cjs/deleteHelpers/reconstructBuildOrderIds.js.map +0 -1
  32. package/dist/cjs/deleteHelpers/removeItems.d.ts +0 -35
  33. package/dist/cjs/deleteHelpers/removeItems.js +0 -116
  34. package/dist/cjs/deleteHelpers/removeItems.js.map +0 -1
  35. package/dist/cjs/deleteHelpers/reportProgress.d.ts +0 -27
  36. package/dist/cjs/deleteHelpers/reportProgress.js +0 -46
  37. package/dist/cjs/deleteHelpers/reportProgress.js.map +0 -1
  38. package/dist/cjs/deleteSolution.d.ts +0 -56
  39. package/dist/cjs/deleteSolution.js +0 -107
  40. package/dist/cjs/deleteSolution.js.map +0 -1
  41. package/dist/cjs/dependencies.d.ts +0 -26
  42. package/dist/cjs/dependencies.js +0 -171
  43. package/dist/cjs/dependencies.js.map +0 -1
  44. package/dist/cjs/featureServiceHelpers.d.ts +0 -847
  45. package/dist/cjs/featureServiceHelpers.js +0 -2553
  46. package/dist/cjs/featureServiceHelpers.js.map +0 -1
  47. package/dist/cjs/formHelpers.d.ts +0 -26
  48. package/dist/cjs/formHelpers.js +0 -40
  49. package/dist/cjs/formHelpers.js.map +0 -1
  50. package/dist/cjs/generalHelpers.d.ts +0 -447
  51. package/dist/cjs/generalHelpers.js +0 -959
  52. package/dist/cjs/generalHelpers.js.map +0 -1
  53. package/dist/cjs/get-subscription-info.d.ts +0 -27
  54. package/dist/cjs/get-subscription-info.js +0 -38
  55. package/dist/cjs/get-subscription-info.js.map +0 -1
  56. package/dist/cjs/getDeletableSolutionInfo.d.ts +0 -30
  57. package/dist/cjs/getDeletableSolutionInfo.js +0 -53
  58. package/dist/cjs/getDeletableSolutionInfo.js.map +0 -1
  59. package/dist/cjs/getItemTypeAbbrev.d.ts +0 -19
  60. package/dist/cjs/getItemTypeAbbrev.js +0 -186
  61. package/dist/cjs/getItemTypeAbbrev.js.map +0 -1
  62. package/dist/cjs/getSolutionSummary.d.ts +0 -28
  63. package/dist/cjs/getSolutionSummary.js +0 -100
  64. package/dist/cjs/getSolutionSummary.js.map +0 -1
  65. package/dist/cjs/index.d.ts +0 -49
  66. package/dist/cjs/index.js +0 -53
  67. package/dist/cjs/index.js.map +0 -1
  68. package/dist/cjs/interfaces.d.ts +0 -1446
  69. package/dist/cjs/interfaces.js +0 -72
  70. package/dist/cjs/interfaces.js.map +0 -1
  71. package/dist/cjs/item-reuse.d.ts +0 -140
  72. package/dist/cjs/item-reuse.js +0 -176
  73. package/dist/cjs/item-reuse.js.map +0 -1
  74. package/dist/cjs/libConnectors.d.ts +0 -73
  75. package/dist/cjs/libConnectors.js +0 -115
  76. package/dist/cjs/libConnectors.js.map +0 -1
  77. package/dist/cjs/migrations/apply-schema.d.ts +0 -24
  78. package/dist/cjs/migrations/apply-schema.js +0 -36
  79. package/dist/cjs/migrations/apply-schema.js.map +0 -1
  80. package/dist/cjs/migrations/is-legacy-solution.d.ts +0 -24
  81. package/dist/cjs/migrations/is-legacy-solution.js +0 -39
  82. package/dist/cjs/migrations/is-legacy-solution.js.map +0 -1
  83. package/dist/cjs/migrations/upgrade-three-dot-one.d.ts +0 -26
  84. package/dist/cjs/migrations/upgrade-three-dot-one.js +0 -48
  85. package/dist/cjs/migrations/upgrade-three-dot-one.js.map +0 -1
  86. package/dist/cjs/migrations/upgrade-three-dot-zero.d.ts +0 -27
  87. package/dist/cjs/migrations/upgrade-three-dot-zero.js +0 -43
  88. package/dist/cjs/migrations/upgrade-three-dot-zero.js.map +0 -1
  89. package/dist/cjs/migrations/upgrade-two-dot-five.d.ts +0 -24
  90. package/dist/cjs/migrations/upgrade-two-dot-five.js +0 -73
  91. package/dist/cjs/migrations/upgrade-two-dot-five.js.map +0 -1
  92. package/dist/cjs/migrations/upgrade-two-dot-four.d.ts +0 -24
  93. package/dist/cjs/migrations/upgrade-two-dot-four.js +0 -72
  94. package/dist/cjs/migrations/upgrade-two-dot-four.js.map +0 -1
  95. package/dist/cjs/migrations/upgrade-two-dot-one.d.ts +0 -7
  96. package/dist/cjs/migrations/upgrade-two-dot-one.js +0 -39
  97. package/dist/cjs/migrations/upgrade-two-dot-one.js.map +0 -1
  98. package/dist/cjs/migrations/upgrade-two-dot-seven.d.ts +0 -23
  99. package/dist/cjs/migrations/upgrade-two-dot-seven.js +0 -58
  100. package/dist/cjs/migrations/upgrade-two-dot-seven.js.map +0 -1
  101. package/dist/cjs/migrations/upgrade-two-dot-six.d.ts +0 -27
  102. package/dist/cjs/migrations/upgrade-two-dot-six.js +0 -61
  103. package/dist/cjs/migrations/upgrade-two-dot-six.js.map +0 -1
  104. package/dist/cjs/migrations/upgrade-two-dot-three.d.ts +0 -23
  105. package/dist/cjs/migrations/upgrade-two-dot-three.js +0 -55
  106. package/dist/cjs/migrations/upgrade-two-dot-three.js.map +0 -1
  107. package/dist/cjs/migrations/upgrade-two-dot-two.d.ts +0 -23
  108. package/dist/cjs/migrations/upgrade-two-dot-two.js +0 -58
  109. package/dist/cjs/migrations/upgrade-two-dot-two.js.map +0 -1
  110. package/dist/cjs/migrations/upgrade-two-dot-zero.d.ts +0 -44
  111. package/dist/cjs/migrations/upgrade-two-dot-zero.js +0 -95
  112. package/dist/cjs/migrations/upgrade-two-dot-zero.js.map +0 -1
  113. package/dist/cjs/migrator.d.ts +0 -25
  114. package/dist/cjs/migrator.js +0 -75
  115. package/dist/cjs/migrator.js.map +0 -1
  116. package/dist/cjs/resourceHelpers.d.ts +0 -192
  117. package/dist/cjs/resourceHelpers.js +0 -380
  118. package/dist/cjs/resourceHelpers.js.map +0 -1
  119. package/dist/cjs/resources/add-resource.d.ts +0 -38
  120. package/dist/cjs/resources/add-resource.js +0 -84
  121. package/dist/cjs/resources/add-resource.js.map +0 -1
  122. package/dist/cjs/resources/addMetadataFromBlob.d.ts +0 -25
  123. package/dist/cjs/resources/addMetadataFromBlob.js +0 -43
  124. package/dist/cjs/resources/addMetadataFromBlob.js.map +0 -1
  125. package/dist/cjs/resources/convert-item-resource-to-storage-resource.d.ts +0 -32
  126. package/dist/cjs/resources/convert-item-resource-to-storage-resource.js +0 -70
  127. package/dist/cjs/resources/convert-item-resource-to-storage-resource.js.map +0 -1
  128. package/dist/cjs/resources/convert-storage-resource-to-item-resource.d.ts +0 -29
  129. package/dist/cjs/resources/convert-storage-resource-to-item-resource.js +0 -70
  130. package/dist/cjs/resources/convert-storage-resource-to-item-resource.js.map +0 -1
  131. package/dist/cjs/resources/copyAssociatedFiles.d.ts +0 -79
  132. package/dist/cjs/resources/copyAssociatedFiles.js +0 -348
  133. package/dist/cjs/resources/copyAssociatedFiles.js.map +0 -1
  134. package/dist/cjs/resources/copyDataIntoItem.d.ts +0 -34
  135. package/dist/cjs/resources/copyDataIntoItem.js +0 -45
  136. package/dist/cjs/resources/copyDataIntoItem.js.map +0 -1
  137. package/dist/cjs/resources/copyMetadataIntoItem.d.ts +0 -27
  138. package/dist/cjs/resources/copyMetadataIntoItem.js +0 -44
  139. package/dist/cjs/resources/copyMetadataIntoItem.js.map +0 -1
  140. package/dist/cjs/resources/copyResourceIntoZip.d.ts +0 -34
  141. package/dist/cjs/resources/copyResourceIntoZip.js +0 -74
  142. package/dist/cjs/resources/copyResourceIntoZip.js.map +0 -1
  143. package/dist/cjs/resources/copyZipIntoItem.d.ts +0 -26
  144. package/dist/cjs/resources/copyZipIntoItem.js +0 -53
  145. package/dist/cjs/resources/copyZipIntoItem.js.map +0 -1
  146. package/dist/cjs/resources/createCopyResults.d.ts +0 -25
  147. package/dist/cjs/resources/createCopyResults.js +0 -36
  148. package/dist/cjs/resources/createCopyResults.js.map +0 -1
  149. package/dist/cjs/resources/get-blob.d.ts +0 -25
  150. package/dist/cjs/resources/get-blob.js +0 -42
  151. package/dist/cjs/resources/get-blob.js.map +0 -1
  152. package/dist/cjs/resources/getItemResourcesFilesFromPaths.d.ts +0 -25
  153. package/dist/cjs/resources/getItemResourcesFilesFromPaths.js +0 -49
  154. package/dist/cjs/resources/getItemResourcesFilesFromPaths.js.map +0 -1
  155. package/dist/cjs/resources/getItemResourcesPaths.d.ts +0 -27
  156. package/dist/cjs/resources/getItemResourcesPaths.js +0 -80
  157. package/dist/cjs/resources/getItemResourcesPaths.js.map +0 -1
  158. package/dist/cjs/resources/index.d.ts +0 -30
  159. package/dist/cjs/resources/index.js +0 -34
  160. package/dist/cjs/resources/index.js.map +0 -1
  161. package/dist/cjs/resources/solution-resource.d.ts +0 -35
  162. package/dist/cjs/resources/solution-resource.js +0 -31
  163. package/dist/cjs/resources/solution-resource.js.map +0 -1
  164. package/dist/cjs/resources/transform-resource-paths-to-solution-resources.d.ts +0 -56
  165. package/dist/cjs/resources/transform-resource-paths-to-solution-resources.js +0 -140
  166. package/dist/cjs/resources/transform-resource-paths-to-solution-resources.js.map +0 -1
  167. package/dist/cjs/resources/update-resource.d.ts +0 -27
  168. package/dist/cjs/resources/update-resource.js +0 -52
  169. package/dist/cjs/resources/update-resource.js.map +0 -1
  170. package/dist/cjs/restHelpers.d.ts +0 -634
  171. package/dist/cjs/restHelpers.js +0 -2008
  172. package/dist/cjs/restHelpers.js.map +0 -1
  173. package/dist/cjs/restHelpersGet.d.ts +0 -303
  174. package/dist/cjs/restHelpersGet.js +0 -835
  175. package/dist/cjs/restHelpersGet.js.map +0 -1
  176. package/dist/cjs/sharing/index.d.ts +0 -16
  177. package/dist/cjs/sharing/index.js +0 -20
  178. package/dist/cjs/sharing/index.js.map +0 -1
  179. package/dist/cjs/sharing/share-item-to-groups.d.ts +0 -26
  180. package/dist/cjs/sharing/share-item-to-groups.js +0 -44
  181. package/dist/cjs/sharing/share-item-to-groups.js.map +0 -1
  182. package/dist/cjs/templatization.d.ts +0 -139
  183. package/dist/cjs/templatization.js +0 -311
  184. package/dist/cjs/templatization.js.map +0 -1
  185. package/dist/cjs/trackingHelpers.d.ts +0 -115
  186. package/dist/cjs/trackingHelpers.js +0 -212
  187. package/dist/cjs/trackingHelpers.js.map +0 -1
  188. package/dist/cjs/velocityHelpers.d.ts +0 -68
  189. package/dist/cjs/velocityHelpers.js +0 -151
  190. package/dist/cjs/velocityHelpers.js.map +0 -1
  191. package/dist/cjs/webtoolHelpers.d.ts +0 -57
  192. package/dist/cjs/webtoolHelpers.js +0 -102
  193. package/dist/cjs/webtoolHelpers.js.map +0 -1
  194. package/dist/cjs/workflowHelpers.d.ts +0 -112
  195. package/dist/cjs/workflowHelpers.js +0 -284
  196. package/dist/cjs/workflowHelpers.js.map +0 -1
  197. package/dist/cjs/workforceHelpers.d.ts +0 -121
  198. package/dist/cjs/workforceHelpers.js +0 -720
  199. package/dist/cjs/workforceHelpers.js.map +0 -1
  200. package/dist/cjs/zip-utils.d.ts +0 -85
  201. package/dist/cjs/zip-utils.js +0 -154
  202. package/dist/cjs/zip-utils.js.map +0 -1
  203. package/dist/esm/arcgisRestJS.d.ts +0 -61
  204. package/dist/esm/arcgisRestJS.js +0 -95
  205. package/dist/esm/arcgisRestJS.js.map +0 -1
  206. package/dist/esm/completeItem.d.ts +0 -30
  207. package/dist/esm/completeItem.js +0 -67
  208. package/dist/esm/completeItem.js.map +0 -1
  209. package/dist/esm/create-hub-request-options.d.ts +0 -29
  210. package/dist/esm/create-hub-request-options.js +0 -60
  211. package/dist/esm/create-hub-request-options.js.map +0 -1
  212. package/dist/esm/deleteHelpers/deleteEmptyGroups.d.ts +0 -24
  213. package/dist/esm/deleteHelpers/deleteEmptyGroups.js +0 -38
  214. package/dist/esm/deleteHelpers/deleteEmptyGroups.js.map +0 -1
  215. package/dist/esm/deleteHelpers/deleteGroupIfEmpty.d.ts +0 -27
  216. package/dist/esm/deleteHelpers/deleteGroupIfEmpty.js +0 -95
  217. package/dist/esm/deleteHelpers/deleteGroupIfEmpty.js.map +0 -1
  218. package/dist/esm/deleteHelpers/deleteSolutionContents.d.ts +0 -39
  219. package/dist/esm/deleteHelpers/deleteSolutionContents.js +0 -122
  220. package/dist/esm/deleteHelpers/deleteSolutionContents.js.map +0 -1
  221. package/dist/esm/deleteHelpers/deleteSolutionFolder.d.ts +0 -29
  222. package/dist/esm/deleteHelpers/deleteSolutionFolder.js +0 -77
  223. package/dist/esm/deleteHelpers/deleteSolutionFolder.js.map +0 -1
  224. package/dist/esm/deleteHelpers/deleteSolutionItem.d.ts +0 -31
  225. package/dist/esm/deleteHelpers/deleteSolutionItem.js +0 -48
  226. package/dist/esm/deleteHelpers/deleteSolutionItem.js.map +0 -1
  227. package/dist/esm/deleteHelpers/index.d.ts +0 -22
  228. package/dist/esm/deleteHelpers/index.js +0 -23
  229. package/dist/esm/deleteHelpers/index.js.map +0 -1
  230. package/dist/esm/deleteHelpers/reconstructBuildOrderIds.d.ts +0 -27
  231. package/dist/esm/deleteHelpers/reconstructBuildOrderIds.js +0 -29
  232. package/dist/esm/deleteHelpers/reconstructBuildOrderIds.js.map +0 -1
  233. package/dist/esm/deleteHelpers/removeItems.d.ts +0 -35
  234. package/dist/esm/deleteHelpers/removeItems.js +0 -111
  235. package/dist/esm/deleteHelpers/removeItems.js.map +0 -1
  236. package/dist/esm/deleteHelpers/reportProgress.d.ts +0 -27
  237. package/dist/esm/deleteHelpers/reportProgress.js +0 -42
  238. package/dist/esm/deleteHelpers/reportProgress.js.map +0 -1
  239. package/dist/esm/deleteSolution.d.ts +0 -56
  240. package/dist/esm/deleteSolution.js +0 -101
  241. package/dist/esm/deleteSolution.js.map +0 -1
  242. package/dist/esm/dependencies.d.ts +0 -26
  243. package/dist/esm/dependencies.js +0 -167
  244. package/dist/esm/dependencies.js.map +0 -1
  245. package/dist/esm/featureServiceHelpers.d.ts +0 -847
  246. package/dist/esm/featureServiceHelpers.js +0 -2466
  247. package/dist/esm/featureServiceHelpers.js.map +0 -1
  248. package/dist/esm/formHelpers.d.ts +0 -26
  249. package/dist/esm/formHelpers.js +0 -35
  250. package/dist/esm/formHelpers.js.map +0 -1
  251. package/dist/esm/generalHelpers.d.ts +0 -447
  252. package/dist/esm/generalHelpers.js +0 -903
  253. package/dist/esm/generalHelpers.js.map +0 -1
  254. package/dist/esm/get-subscription-info.d.ts +0 -27
  255. package/dist/esm/get-subscription-info.js +0 -34
  256. package/dist/esm/get-subscription-info.js.map +0 -1
  257. package/dist/esm/getDeletableSolutionInfo.d.ts +0 -30
  258. package/dist/esm/getDeletableSolutionInfo.js +0 -48
  259. package/dist/esm/getDeletableSolutionInfo.js.map +0 -1
  260. package/dist/esm/getItemTypeAbbrev.d.ts +0 -19
  261. package/dist/esm/getItemTypeAbbrev.js +0 -182
  262. package/dist/esm/getItemTypeAbbrev.js.map +0 -1
  263. package/dist/esm/getSolutionSummary.d.ts +0 -28
  264. package/dist/esm/getSolutionSummary.js +0 -95
  265. package/dist/esm/getSolutionSummary.js.map +0 -1
  266. package/dist/esm/index.d.ts +0 -49
  267. package/dist/esm/index.js +0 -50
  268. package/dist/esm/index.js.map +0 -1
  269. package/dist/esm/interfaces.d.ts +0 -1446
  270. package/dist/esm/interfaces.js +0 -69
  271. package/dist/esm/interfaces.js.map +0 -1
  272. package/dist/esm/item-reuse.d.ts +0 -140
  273. package/dist/esm/item-reuse.js +0 -167
  274. package/dist/esm/item-reuse.js.map +0 -1
  275. package/dist/esm/libConnectors.d.ts +0 -73
  276. package/dist/esm/libConnectors.js +0 -105
  277. package/dist/esm/libConnectors.js.map +0 -1
  278. package/dist/esm/migrations/apply-schema.d.ts +0 -24
  279. package/dist/esm/migrations/apply-schema.js +0 -32
  280. package/dist/esm/migrations/apply-schema.js.map +0 -1
  281. package/dist/esm/migrations/is-legacy-solution.d.ts +0 -24
  282. package/dist/esm/migrations/is-legacy-solution.js +0 -35
  283. package/dist/esm/migrations/is-legacy-solution.js.map +0 -1
  284. package/dist/esm/migrations/upgrade-three-dot-one.d.ts +0 -26
  285. package/dist/esm/migrations/upgrade-three-dot-one.js +0 -44
  286. package/dist/esm/migrations/upgrade-three-dot-one.js.map +0 -1
  287. package/dist/esm/migrations/upgrade-three-dot-zero.d.ts +0 -27
  288. package/dist/esm/migrations/upgrade-three-dot-zero.js +0 -39
  289. package/dist/esm/migrations/upgrade-three-dot-zero.js.map +0 -1
  290. package/dist/esm/migrations/upgrade-two-dot-five.d.ts +0 -24
  291. package/dist/esm/migrations/upgrade-two-dot-five.js +0 -69
  292. package/dist/esm/migrations/upgrade-two-dot-five.js.map +0 -1
  293. package/dist/esm/migrations/upgrade-two-dot-four.d.ts +0 -24
  294. package/dist/esm/migrations/upgrade-two-dot-four.js +0 -68
  295. package/dist/esm/migrations/upgrade-two-dot-four.js.map +0 -1
  296. package/dist/esm/migrations/upgrade-two-dot-one.d.ts +0 -7
  297. package/dist/esm/migrations/upgrade-two-dot-one.js +0 -35
  298. package/dist/esm/migrations/upgrade-two-dot-one.js.map +0 -1
  299. package/dist/esm/migrations/upgrade-two-dot-seven.d.ts +0 -23
  300. package/dist/esm/migrations/upgrade-two-dot-seven.js +0 -54
  301. package/dist/esm/migrations/upgrade-two-dot-seven.js.map +0 -1
  302. package/dist/esm/migrations/upgrade-two-dot-six.d.ts +0 -27
  303. package/dist/esm/migrations/upgrade-two-dot-six.js +0 -57
  304. package/dist/esm/migrations/upgrade-two-dot-six.js.map +0 -1
  305. package/dist/esm/migrations/upgrade-two-dot-three.d.ts +0 -23
  306. package/dist/esm/migrations/upgrade-two-dot-three.js +0 -51
  307. package/dist/esm/migrations/upgrade-two-dot-three.js.map +0 -1
  308. package/dist/esm/migrations/upgrade-two-dot-two.d.ts +0 -23
  309. package/dist/esm/migrations/upgrade-two-dot-two.js +0 -54
  310. package/dist/esm/migrations/upgrade-two-dot-two.js.map +0 -1
  311. package/dist/esm/migrations/upgrade-two-dot-zero.d.ts +0 -44
  312. package/dist/esm/migrations/upgrade-two-dot-zero.js +0 -88
  313. package/dist/esm/migrations/upgrade-two-dot-zero.js.map +0 -1
  314. package/dist/esm/migrator.d.ts +0 -25
  315. package/dist/esm/migrator.js +0 -71
  316. package/dist/esm/migrator.js.map +0 -1
  317. package/dist/esm/resourceHelpers.d.ts +0 -192
  318. package/dist/esm/resourceHelpers.js +0 -361
  319. package/dist/esm/resourceHelpers.js.map +0 -1
  320. package/dist/esm/resources/add-resource.d.ts +0 -38
  321. package/dist/esm/resources/add-resource.js +0 -79
  322. package/dist/esm/resources/add-resource.js.map +0 -1
  323. package/dist/esm/resources/addMetadataFromBlob.d.ts +0 -25
  324. package/dist/esm/resources/addMetadataFromBlob.js +0 -39
  325. package/dist/esm/resources/addMetadataFromBlob.js.map +0 -1
  326. package/dist/esm/resources/convert-item-resource-to-storage-resource.d.ts +0 -32
  327. package/dist/esm/resources/convert-item-resource-to-storage-resource.js +0 -66
  328. package/dist/esm/resources/convert-item-resource-to-storage-resource.js.map +0 -1
  329. package/dist/esm/resources/convert-storage-resource-to-item-resource.d.ts +0 -29
  330. package/dist/esm/resources/convert-storage-resource-to-item-resource.js +0 -66
  331. package/dist/esm/resources/convert-storage-resource-to-item-resource.js.map +0 -1
  332. package/dist/esm/resources/copyAssociatedFiles.d.ts +0 -79
  333. package/dist/esm/resources/copyAssociatedFiles.js +0 -339
  334. package/dist/esm/resources/copyAssociatedFiles.js.map +0 -1
  335. package/dist/esm/resources/copyDataIntoItem.d.ts +0 -34
  336. package/dist/esm/resources/copyDataIntoItem.js +0 -40
  337. package/dist/esm/resources/copyDataIntoItem.js.map +0 -1
  338. package/dist/esm/resources/copyMetadataIntoItem.d.ts +0 -27
  339. package/dist/esm/resources/copyMetadataIntoItem.js +0 -40
  340. package/dist/esm/resources/copyMetadataIntoItem.js.map +0 -1
  341. package/dist/esm/resources/copyResourceIntoZip.d.ts +0 -34
  342. package/dist/esm/resources/copyResourceIntoZip.js +0 -69
  343. package/dist/esm/resources/copyResourceIntoZip.js.map +0 -1
  344. package/dist/esm/resources/copyZipIntoItem.d.ts +0 -26
  345. package/dist/esm/resources/copyZipIntoItem.js +0 -49
  346. package/dist/esm/resources/copyZipIntoItem.js.map +0 -1
  347. package/dist/esm/resources/createCopyResults.d.ts +0 -25
  348. package/dist/esm/resources/createCopyResults.js +0 -32
  349. package/dist/esm/resources/createCopyResults.js.map +0 -1
  350. package/dist/esm/resources/get-blob.d.ts +0 -25
  351. package/dist/esm/resources/get-blob.js +0 -38
  352. package/dist/esm/resources/get-blob.js.map +0 -1
  353. package/dist/esm/resources/getItemResourcesFilesFromPaths.d.ts +0 -25
  354. package/dist/esm/resources/getItemResourcesFilesFromPaths.js +0 -45
  355. package/dist/esm/resources/getItemResourcesFilesFromPaths.js.map +0 -1
  356. package/dist/esm/resources/getItemResourcesPaths.d.ts +0 -27
  357. package/dist/esm/resources/getItemResourcesPaths.js +0 -76
  358. package/dist/esm/resources/getItemResourcesPaths.js.map +0 -1
  359. package/dist/esm/resources/index.d.ts +0 -30
  360. package/dist/esm/resources/index.js +0 -31
  361. package/dist/esm/resources/index.js.map +0 -1
  362. package/dist/esm/resources/solution-resource.d.ts +0 -35
  363. package/dist/esm/resources/solution-resource.js +0 -28
  364. package/dist/esm/resources/solution-resource.js.map +0 -1
  365. package/dist/esm/resources/transform-resource-paths-to-solution-resources.d.ts +0 -56
  366. package/dist/esm/resources/transform-resource-paths-to-solution-resources.js +0 -132
  367. package/dist/esm/resources/transform-resource-paths-to-solution-resources.js.map +0 -1
  368. package/dist/esm/resources/update-resource.d.ts +0 -27
  369. package/dist/esm/resources/update-resource.js +0 -48
  370. package/dist/esm/resources/update-resource.js.map +0 -1
  371. package/dist/esm/restHelpers.d.ts +0 -634
  372. package/dist/esm/restHelpers.js +0 -1943
  373. package/dist/esm/restHelpers.js.map +0 -1
  374. package/dist/esm/restHelpersGet.d.ts +0 -303
  375. package/dist/esm/restHelpersGet.js +0 -793
  376. package/dist/esm/restHelpersGet.js.map +0 -1
  377. package/dist/esm/sharing/index.d.ts +0 -16
  378. package/dist/esm/sharing/index.js +0 -17
  379. package/dist/esm/sharing/index.js.map +0 -1
  380. package/dist/esm/sharing/share-item-to-groups.d.ts +0 -26
  381. package/dist/esm/sharing/share-item-to-groups.js +0 -40
  382. package/dist/esm/sharing/share-item-to-groups.js.map +0 -1
  383. package/dist/esm/templatization.d.ts +0 -139
  384. package/dist/esm/templatization.js +0 -291
  385. package/dist/esm/templatization.js.map +0 -1
  386. package/dist/esm/trackingHelpers.d.ts +0 -115
  387. package/dist/esm/trackingHelpers.js +0 -200
  388. package/dist/esm/trackingHelpers.js.map +0 -1
  389. package/dist/esm/velocityHelpers.d.ts +0 -68
  390. package/dist/esm/velocityHelpers.js +0 -144
  391. package/dist/esm/velocityHelpers.js.map +0 -1
  392. package/dist/esm/webtoolHelpers.d.ts +0 -57
  393. package/dist/esm/webtoolHelpers.js +0 -95
  394. package/dist/esm/webtoolHelpers.js.map +0 -1
  395. package/dist/esm/workflowHelpers.d.ts +0 -112
  396. package/dist/esm/workflowHelpers.js +0 -270
  397. package/dist/esm/workflowHelpers.js.map +0 -1
  398. package/dist/esm/workforceHelpers.d.ts +0 -121
  399. package/dist/esm/workforceHelpers.js +0 -691
  400. package/dist/esm/workforceHelpers.js.map +0 -1
  401. package/dist/esm/zip-utils.d.ts +0 -85
  402. package/dist/esm/zip-utils.js +0 -142
  403. package/dist/esm/zip-utils.js.map +0 -1
  404. package/dist/solution.js_commit.txt +0 -7
@@ -1,95 +0,0 @@
1
- /** @license
2
- * Copyright 2024 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 { globalStringReplace } from "./generalHelpers";
17
- /**
18
- * Store any web tool urls in the templateDictionary so we can use them to search other items
19
- * after they have been converted to templates
20
- *
21
- * @param template the current template
22
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
23
- *
24
- */
25
- export function preProcessWebTool(template, templateDictionary) {
26
- if (template.type === "Geoprocessing Service") {
27
- const url = template.item.origUrl;
28
- const urlVar = `{{${template.itemId}.url}}`;
29
- templateDictionary[url] = urlVar;
30
- }
31
- }
32
- /**
33
- * Use any stored GPServer urls to search all other templates for potential references
34
- * This will allow us to replace the base server name as will as the itemId
35
- *
36
- * @param templates the list of all the templates in the solution
37
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
38
- *
39
- * @returns potentially updated list of all the templates in the solution
40
- */
41
- export function postProcessWebToolReferences(templates, templateDictionary) {
42
- const gpServerUrls = Object.keys(templateDictionary).filter((k) => k.indexOf("GPServer") > -1);
43
- if (gpServerUrls.length > 0) {
44
- gpServerUrls.forEach((url) => {
45
- const itemId = templateDictionary[url].replace("{{", "").replace(".url}}", "");
46
- _globalTemplatize(templates, url, templateDictionary[url], itemId);
47
- // handle items that already have a templatized itemId in the url
48
- const idTest = /[0-9A-F]{32}/gim;
49
- const templatizedUrl = url.replace(idTest, `{{${itemId}.itemId}}`);
50
- _globalTemplatize(templates, templatizedUrl, templateDictionary[url], itemId);
51
- });
52
- }
53
- return templates;
54
- }
55
- /**
56
- * Use any stored GPServer urls to search all other templates for potential references
57
- * This will allow us to replace the base server name as will as the itemId
58
- *
59
- * @param templates the list of all the templates in the solution
60
- * @param orgUrl the item url of the GPServer
61
- * @param templatizedUrl the templatized GPServer Url
62
- * @param orgItemId the item id of the GPServer
63
- *
64
- * @returns potentially updated list of all the templates in the solution
65
- */
66
- export function _globalTemplatize(templates, orgUrl, templatizedUrl, orgItemId) {
67
- // Cycle through each of the items in the template and scan the `item` and `data` sections of each for replacements
68
- templates.forEach((template) => {
69
- const itemString = JSON.stringify(template.item);
70
- const dataString = JSON.stringify(template.data);
71
- globalStringReplace(template.item, new RegExp(orgUrl, "gi"), templatizedUrl);
72
- globalStringReplace(template.data, new RegExp(orgUrl, "gi"), templatizedUrl);
73
- _updateDependencies(template, itemString, dataString, orgItemId);
74
- });
75
- return templates;
76
- }
77
- /**
78
- * Update the templates dependencies if we can detect differences after we try and replace a GPServer url
79
- *
80
- * @param template the current template
81
- * @param itemString stringified version of the the templates item before we replaced anything
82
- * @param dataString stringified version of the the templates data before we replaced anything
83
- * @param id the current item Id of the GPServer
84
- *
85
- */
86
- export function _updateDependencies(template, itemString, dataString, id) {
87
- const hasItemDepdendency = template.dependencies.indexOf(id) > -1;
88
- if (itemString && itemString !== JSON.stringify(template.item) && !hasItemDepdendency) {
89
- template.dependencies.push(id);
90
- }
91
- if (dataString && dataString !== JSON.stringify(template.data) && !hasItemDepdendency) {
92
- template.dependencies.push(id);
93
- }
94
- }
95
- //# sourceMappingURL=webtoolHelpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webtoolHelpers.js","sourceRoot":"","sources":["../../src/webtoolHelpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAuB,EAAE,kBAAuB;IAChF,IAAI,QAAQ,CAAC,IAAI,KAAK,uBAAuB,EAAE;QAC7C,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;QAClC,MAAM,MAAM,GAAG,KAAK,QAAQ,CAAC,MAAM,QAAQ,CAAC;QAC5C,kBAAkB,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;KAClC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,4BAA4B,CAAC,SAA0B,EAAE,kBAAuB;IAC9F,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAE/F,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,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,CAAC;IACnE,CAAC,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAAuB,EAAE,UAAkB,EAAE,UAAkB,EAAE,EAAU;IAC7G,MAAM,kBAAkB,GAAG,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAElE,IAAI,UAAU,IAAI,UAAU,KAAK,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;QACrF,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KAChC;IAED,IAAI,UAAU,IAAI,UAAU,KAAK,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE;QACrF,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KAChC;AACH,CAAC"}
@@ -1,112 +0,0 @@
1
- /** @license
2
- * Copyright 2024 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
- /**
17
- * Provides common functions compressing and decompressing workflow configurations.
18
- *
19
- * @module workflowHelpers
20
- */
21
- import { IItemTemplate, IPreProcessWorkflowTemplatesResponse } from "./interfaces";
22
- import { IPortal, UserSession } from "./arcgisRestJS";
23
- /**
24
- * Compresses a workflow configuration into a zip file.
25
- *
26
- * @param workflowConfig Workflow configuration
27
- * @returns Promise resolving with a zip file
28
- */
29
- export declare function compressWorkflowIntoZipFile(workflowConfig: any): Promise<File>;
30
- /**
31
- * Deletes a workflow.
32
- *
33
- * @param itemId Id of the workflow item
34
- * @param workflowBaseUrl URL of the workflow manager, e.g., "https://workflow.arcgis.com/orgId"
35
- * @param authentication Credentials for the request to AGOL
36
- * @returns Promise resolving with success or faliure of the request
37
- */
38
- export declare function deleteWorkflowItem(itemId: string, workflowBaseUrl: string, authentication: UserSession): Promise<boolean>;
39
- /**
40
- * Extracts a workflow configuration from a zip file into a JSON object.
41
- *
42
- * @param zipFile Zip file containing a workflow configuration
43
- * @returns Promise resolving with a workflow configuration as JSON object, with each file being a key
44
- */
45
- export declare function extractWorkflowFromZipFile(zipFile: File): Promise<any>;
46
- /**
47
- * Check the license capability of Workflow Manager Server.
48
- *
49
- * @param workflowBaseUrl URL of the workflow manager, e.g., "https://workflow.arcgis.com/orgId"
50
- * @param authentication Credentials for the request to AGO
51
- * @returns Promise resolving with a boolean indicating whether the organization has the license
52
- * @throws {WorkflowJsonExceptionDTO} if request to workflow manager fails
53
- */
54
- export declare function getWorkflowManagerAuthorized(workflowBaseUrl: string, authentication: UserSession): Promise<boolean>;
55
- /**
56
- * Determines the URL to the Workflow Manager.
57
- *
58
- * @param authentication Authenticated user session
59
- * @param portalResponse Response from portal "self" call; will be fetched if not supplied
60
- * @param orgId Id of organization whose license is to be checked; if truthy, the URL will be for AGO;
61
- * if falsy, the URL will be for Workflow Manager Enterprise
62
- * @returns A URL based on ArcGIS Online or Enterprise, e.g., "https://abc123.esri.com:6443/arcgis"
63
- */
64
- export declare function getWorkflowBaseURL(authentication: UserSession, portalResponse?: IPortal, orgId?: string): Promise<string>;
65
- /**
66
- * Get the URL for the Workflow Manager Enterprise application.
67
- *
68
- * @param portalRestUrl URL of the portal REST endpoint, e.g., "https://gisserver.domain.com/server/rest/services"
69
- * @param authentication Credentials for the request to AGO
70
- * @returns URL for the Workflow Manager Enterprise application (e.g., "https://abc123.esri.com:6443/arcgis"),
71
- * or an empty string if Workflow Manager is not enabled
72
- */
73
- export declare function getWorkflowEnterpriseServerRootURL(portalRestUrl: string, authentication: UserSession): Promise<string>;
74
- /**
75
- * Remove feature service templates that will be auto-generated by Workflow when
76
- * creating the Workflow item.
77
- *
78
- * Also store key values from any Workflow items so we can update variables in other items.
79
- *
80
- * @param templates The list of all templates from the Solutions
81
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
82
- *
83
- * @returns An object that contains the items that should use standard deployment and
84
- * templates that will be deployed by Wokflow deployment.
85
- */
86
- export declare function preprocessWorkflowTemplates(templates: IItemTemplate[], templateDictionary: any): IPreProcessWorkflowTemplatesResponse;
87
- /**
88
- * Store key values from any Workflow items so we can update variables in other items.
89
- *
90
- * @param key property from a workflow item that will contain an item id that we will need for variable replacement
91
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
92
- * @param template Workflow template
93
- * @param ids list of ids that will be auto generated by Workflow
94
- *
95
- */
96
- export declare function storeKeyWorkflowServiceId(key: string, templateDictionary: any, template: IItemTemplate, ids: string[]): void;
97
- /**
98
- * Replace various IDs in the templates based on items that were created by Workflow
99
- *
100
- * @param templates The list of all templates from the Solutions
101
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
102
- *
103
- * @returns The updated collection of templates
104
- */
105
- export declare function updateWorkflowTemplateIds(templates: IItemTemplate[], templateDictionary: any): IItemTemplate[];
106
- /**
107
- * Get the various dependencies from the workflow item and add them to the current templates dependency list
108
- *
109
- * @param template The IItemTemplate of the workflow item
110
- *
111
- */
112
- export declare function getWorkflowDependencies(template: IItemTemplate): void;
@@ -1,270 +0,0 @@
1
- /** @license
2
- * Copyright 2024 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 * as restHelpersGet from "./restHelpersGet";
17
- import * as zipUtils from "./zip-utils";
18
- import { request } from "./arcgisRestJS";
19
- import { removeGroup } from "./restHelpers";
20
- import { getEnterpriseServers, getItemDataAsJson } from "./restHelpersGet";
21
- import { createMimeTypedFile } from "./resources/copyDataIntoItem";
22
- import { getProp } from "./generalHelpers";
23
- import JSZip from "jszip";
24
- // ------------------------------------------------------------------------------------------------------------------ //
25
- /**
26
- * Compresses a workflow configuration into a zip file.
27
- *
28
- * @param workflowConfig Workflow configuration
29
- * @returns Promise resolving with a zip file
30
- */
31
- export async function compressWorkflowIntoZipFile(workflowConfig) {
32
- const zip = new JSZip();
33
- Object.keys(workflowConfig).forEach((key) => {
34
- zip.file(key, workflowConfig[key]);
35
- });
36
- const zipFile = createMimeTypedFile({
37
- blob: await zip.generateAsync({ type: "blob" }),
38
- filename: `workflow_configuration.zip`,
39
- mimeType: "application/zip",
40
- });
41
- return Promise.resolve(zipFile);
42
- }
43
- /**
44
- * Deletes a workflow.
45
- *
46
- * @param itemId Id of the workflow item
47
- * @param workflowBaseUrl URL of the workflow manager, e.g., "https://workflow.arcgis.com/orgId"
48
- * @param authentication Credentials for the request to AGOL
49
- * @returns Promise resolving with success or faliure of the request
50
- */
51
- export async function deleteWorkflowItem(itemId, workflowBaseUrl, authentication) {
52
- // Get the id of the Workflow Manager Admin group because the group has to be deleted separately
53
- const data = await getItemDataAsJson(itemId, authentication);
54
- const adminGroupId = data?.groupId;
55
- // Delete the item
56
- const url = `${workflowBaseUrl}/admin/${itemId}`;
57
- const options = {
58
- authentication,
59
- headers: {
60
- "Accept": "application/json",
61
- "Authorization": `Bearer ${authentication.token}`,
62
- "X-Esri-Authorization": `Bearer ${authentication.token}`,
63
- },
64
- httpMethod: "DELETE",
65
- params: {
66
- f: "json",
67
- },
68
- };
69
- const response = await request(url, options);
70
- // Delete the admin group
71
- if (adminGroupId) {
72
- await removeGroup(adminGroupId, authentication);
73
- }
74
- return Promise.resolve(response.success);
75
- }
76
- /**
77
- * Extracts a workflow configuration from a zip file into a JSON object.
78
- *
79
- * @param zipFile Zip file containing a workflow configuration
80
- * @returns Promise resolving with a workflow configuration as JSON object, with each file being a key
81
- */
82
- export async function extractWorkflowFromZipFile(zipFile) {
83
- const zippedFiles = await zipUtils.getZipObjectContents(await zipUtils.blobToZipObject(zipFile));
84
- const workflowConfig = {};
85
- zippedFiles.forEach((zippedFile) => {
86
- workflowConfig[zippedFile.file] = zippedFile.content;
87
- });
88
- return Promise.resolve(workflowConfig);
89
- }
90
- /**
91
- * Check the license capability of Workflow Manager Server.
92
- *
93
- * @param workflowBaseUrl URL of the workflow manager, e.g., "https://workflow.arcgis.com/orgId"
94
- * @param authentication Credentials for the request to AGO
95
- * @returns Promise resolving with a boolean indicating whether the organization has the license
96
- * @throws {WorkflowJsonExceptionDTO} if request to workflow manager fails
97
- */
98
- export async function getWorkflowManagerAuthorized(workflowBaseUrl, authentication) {
99
- try {
100
- const url = `${workflowBaseUrl}/checkStatus`;
101
- const options = {
102
- authentication,
103
- httpMethod: "GET",
104
- params: {
105
- f: "json",
106
- },
107
- };
108
- const response = await request(url, options);
109
- const isAuthorized = response?.hasAdvancedLicense || false;
110
- return Promise.resolve(isAuthorized);
111
- }
112
- catch (err) {
113
- // User is not authorized for Workflow Manager
114
- return Promise.resolve(false);
115
- }
116
- }
117
- /**
118
- * Determines the URL to the Workflow Manager.
119
- *
120
- * @param authentication Authenticated user session
121
- * @param portalResponse Response from portal "self" call; will be fetched if not supplied
122
- * @param orgId Id of organization whose license is to be checked; if truthy, the URL will be for AGO;
123
- * if falsy, the URL will be for Workflow Manager Enterprise
124
- * @returns A URL based on ArcGIS Online or Enterprise, e.g., "https://abc123.esri.com:6443/arcgis"
125
- */
126
- export async function getWorkflowBaseURL(authentication, portalResponse, orgId) {
127
- let workflowServerUrl;
128
- if (!portalResponse) {
129
- const user = await restHelpersGet.getUser(authentication);
130
- orgId = orgId ?? user.orgId;
131
- portalResponse = await restHelpersGet.getPortal("", authentication);
132
- }
133
- const portalURL = `https://${portalResponse.portalHostname}`;
134
- const portalRestURL = `${portalURL}/sharing/rest`;
135
- if (portalResponse.isPortal) {
136
- // Enterprise
137
- workflowServerUrl = await getWorkflowEnterpriseServerRootURL(portalRestURL, authentication);
138
- }
139
- else {
140
- // ArcGIS Online
141
- workflowServerUrl = portalResponse.helperServices?.workflowManager?.url ?? portalURL;
142
- }
143
- return Promise.resolve(orgId ? `${workflowServerUrl}/${orgId}` : `${workflowServerUrl}/workflow`);
144
- }
145
- /**
146
- * Get the URL for the Workflow Manager Enterprise application.
147
- *
148
- * @param portalRestUrl URL of the portal REST endpoint, e.g., "https://gisserver.domain.com/server/rest/services"
149
- * @param authentication Credentials for the request to AGO
150
- * @returns URL for the Workflow Manager Enterprise application (e.g., "https://abc123.esri.com:6443/arcgis"),
151
- * or an empty string if Workflow Manager is not enabled
152
- */
153
- export async function getWorkflowEnterpriseServerRootURL(portalRestUrl, authentication) {
154
- // Get the servers
155
- const servers = await getEnterpriseServers(portalRestUrl, authentication);
156
- // Find the Workflow Manager server
157
- const workflowServer = servers.find((server) => server.serverFunction === "WorkflowManager");
158
- if (!workflowServer) {
159
- return "";
160
- }
161
- return workflowServer.url;
162
- }
163
- /**
164
- * Remove feature service templates that will be auto-generated by Workflow when
165
- * creating the Workflow item.
166
- *
167
- * Also store key values from any Workflow items so we can update variables in other items.
168
- *
169
- * @param templates The list of all templates from the Solutions
170
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
171
- *
172
- * @returns An object that contains the items that should use standard deployment and
173
- * templates that will be deployed by Wokflow deployment.
174
- */
175
- export function preprocessWorkflowTemplates(templates, templateDictionary) {
176
- const workflowItems = templates.filter((t) => t.type === "Workflow");
177
- const serviceIds = workflowItems.reduce((prev, cur) => {
178
- templateDictionary.workflows = { ...templateDictionary.workflows };
179
- templateDictionary.workflows[cur.itemId] = {};
180
- storeKeyWorkflowServiceId("viewSchema", templateDictionary, cur, prev);
181
- storeKeyWorkflowServiceId("workflowLocations", templateDictionary, cur, prev);
182
- storeKeyWorkflowServiceId("workflowSchema", templateDictionary, cur, prev);
183
- return prev;
184
- }, []);
185
- const workflowManagedTemplates = [];
186
- const deployTemplates = templates.filter((t) => {
187
- if (serviceIds.indexOf(t.itemId) < 0) {
188
- return true;
189
- }
190
- else {
191
- workflowManagedTemplates.push(t);
192
- }
193
- });
194
- return {
195
- deployTemplates,
196
- workflowManagedTemplates,
197
- };
198
- }
199
- /**
200
- * Store key values from any Workflow items so we can update variables in other items.
201
- *
202
- * @param key property from a workflow item that will contain an item id that we will need for variable replacement
203
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
204
- * @param template Workflow template
205
- * @param ids list of ids that will be auto generated by Workflow
206
- *
207
- */
208
- export function storeKeyWorkflowServiceId(key, templateDictionary, template, ids) {
209
- const id = getProp(template, `data.${key}.itemId`).replace("{{", "").replace(".itemId}}", "");
210
- if (id && ids.indexOf(id) < 0) {
211
- ids.push(id);
212
- }
213
- templateDictionary.workflows[template.itemId][key] = id;
214
- templateDictionary[id] = {};
215
- }
216
- /**
217
- * Replace various IDs in the templates based on items that were created by Workflow
218
- *
219
- * @param templates The list of all templates from the Solutions
220
- * @param templateDictionary Hash of facts: folder id, org URL, adlib replacements
221
- *
222
- * @returns The updated collection of templates
223
- */
224
- export function updateWorkflowTemplateIds(templates, templateDictionary) {
225
- if (templateDictionary.workflows) {
226
- Object.keys(templateDictionary.workflows).forEach((k) => {
227
- // the ids retained here are that of the source items
228
- // we justr need to swap them out in the templates arrey
229
- const workflowHash = templateDictionary.workflows[k];
230
- const viewSchemaId = workflowHash.viewSchema;
231
- const workflowLocationsId = workflowHash.workflowLocations;
232
- const workflowSchemaId = workflowHash.workflowSchema;
233
- const workflowIds = [viewSchemaId, workflowLocationsId, workflowSchemaId];
234
- templates = templates.map((t) => {
235
- if (workflowIds.indexOf(t.itemId) > -1) {
236
- t.dependencies = t.dependencies.map((d) => {
237
- if (workflowIds.indexOf(d) > -1) {
238
- d = templateDictionary[d].itemId;
239
- }
240
- return d;
241
- });
242
- t.itemId = templateDictionary[t.itemId].itemId;
243
- }
244
- return t;
245
- });
246
- });
247
- }
248
- return templates;
249
- }
250
- /**
251
- * Get the various dependencies from the workflow item and add them to the current templates dependency list
252
- *
253
- * @param template The IItemTemplate of the workflow item
254
- *
255
- */
256
- export function getWorkflowDependencies(template) {
257
- const data = template.data;
258
- if (data) {
259
- const keys = ["viewSchema", "workflowLocations", "workflowSchema"];
260
- keys.forEach((k) => {
261
- if (Object.keys(data).indexOf(k) > -1) {
262
- const id = data[k].itemId;
263
- if (id && template.dependencies.indexOf(id) < 0) {
264
- template.dependencies.push(id);
265
- }
266
- }
267
- });
268
- }
269
- }
270
- //# sourceMappingURL=workflowHelpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflowHelpers.js","sourceRoot":"","sources":["../../src/workflowHelpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AACxC,OAAO,EAA4B,OAAO,EAAe,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wHAAwH;AAExH;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,cAAmB;IACnE,MAAM,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC;IACxB,MAAM,CAAC,IAAI,CAAC,cAAc,CAA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AAC,CAAC,MAAM,GAAG,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC;iBAChD;gBACD,OAAO,CAAC,CAAC;YACX,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,QAAuB;IAC7D,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;IAC3B,IAAI,IAAI,EAAE;QACR,MAAM,IAAI,GAAG,CAAC,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,CAAC,CAAC;QACnE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACjB,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE;gBACrC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;gBAC1B,IAAI,EAAE,IAAI,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE;oBAC/C,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;iBAChC;aACF;QACH,CAAC,CAAC,CAAC;KACJ;AACH,CAAC"}
@@ -1,121 +0,0 @@
1
- /** @license
2
- * Copyright 2020 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
- /**
17
- * Provides general helper functions.
18
- *
19
- * @module workforceHelpers
20
- */
21
- import { UserSession } from "./arcgisRestJS";
22
- import { IItemTemplate, IFeatureServiceProperties } from "./interfaces";
23
- /**
24
- * Converts an workforce item to a template.
25
- *
26
- * @param itemTemplate template for the workforce project item
27
- * @param authentication credentials for any requests
28
- * @param templateDictionary Hash of key details used for variable replacement
29
- * @returns templatized itemTemplate
30
- */
31
- export declare function convertWorkforceItemToTemplate(itemTemplate: IItemTemplate, authentication: UserSession, templateDictionary: any): Promise<IItemTemplate>;
32
- /**
33
- * Gets the ids of the dependencies of the workforce project.
34
- *
35
- * @param data itemTemplate data
36
- * @param keyProperties workforce project properties that contain references to dependencies
37
- * @param authentication credentials for any requests
38
- * @returns List of dependencies ids
39
- */
40
- export declare function extractWorkforceDependencies(data: any, keyProperties: string[], authentication: UserSession): Promise<any>;
41
- /**
42
- * Templatizes key item properties.
43
- *
44
- * @param data itemTemplate data
45
- * @param keyProperties workforce project properties that should be templatized
46
- * @param urlHash a key value pair of url and itemId
47
- * @param templateDictionary Hash of key details used for variable replacement
48
- * @returns an updated data object to be stored in the template
49
- */
50
- export declare function templatizeWorkforce(data: any, keyProperties: string[], urlHash: any, templateDictionary: any): any;
51
- /**
52
- * Evaluate key properties in the workforce service of additional items that are needed
53
- *
54
- * @param itemTemplate template for the workforce project item
55
- * @param dependencies list of the items dependencies
56
- * @returns an array of objects with dependency ids
57
- */
58
- export declare function getWorkforceDependencies(itemTemplate: IItemTemplate, dependencies: any[]): any;
59
- export declare function getWorkforceServiceInfo(properties: IFeatureServiceProperties, url: string, authentication: UserSession): Promise<IFeatureServiceProperties>;
60
- /**
61
- * Wrap global id and assignmenttype values in curly braces
62
- *
63
- * Added for issue #734
64
- *
65
- * This function will update the provided workforceInfos object
66
- *
67
- * @param workforceInfos the object that stores the integration and type info with global ids
68
- * @private
69
- */
70
- export declare function _updateGlobalIdAndAssignmentType(workforceInfos: any): void;
71
- export declare function _getAssignmentTypeInfos(assignmentTypes: any): any[];
72
- export declare function _getAssignmentIntegrationInfos(assignmentIntegrations: any, authentication: UserSession): Promise<any>;
73
- export declare function getUrlDependencies(requests: Array<Promise<any>>, urls: string[]): Promise<any>;
74
- /**
75
- * Templatizes values from a urlTemplate
76
- *
77
- * @param item the object that may contain a urlTemplate
78
- * @param urlHash a key value pair of url and itemId
79
- * @private
80
- */
81
- export declare function _templatizeUrlTemplate(item: any, urlHash: any): void;
82
- export declare function getLayerId(url: string): any;
83
- export declare function getReplaceValue(layerId: any, suffix: string): string;
84
- export declare function postProcessWorkforceTemplates(templates: IItemTemplate[]): IItemTemplate[];
85
- export declare function _templatizeWorkforceProject(t: IItemTemplate, groupUpdates: any): any;
86
- export declare function _templatizeWorkforceDispatcherOrWorker(t: IItemTemplate, type: string): IItemTemplate;
87
- export declare function isWorkforceProject(itemTemplate: IItemTemplate): boolean;
88
- export declare function getKeyWorkforceProperties(version: number): string[];
89
- /**
90
- * Test the provided value for any urls and submit a request to obtain the service item id for the url
91
- *
92
- * @param v a string value to test for urls
93
- * @param authentication credentials for the requests
94
- * @returns an object with any pending requests and the urls that requests were made to
95
- */
96
- export declare function urlTest(v: any, authentication: UserSession): any;
97
- export declare function _getURLs(v: string): string[];
98
- /**
99
- * Gets the current user and updates the dispatchers service
100
- *
101
- * @param newlyCreatedItem Item to be created; n.b.: this item is modified
102
- * @param destinationAuthentication The session used to create the new item(s)
103
- * @returns A promise that will resolve with \{ "success" === true || false \}
104
- */
105
- export declare function fineTuneCreatedWorkforceItem(newlyCreatedItem: IItemTemplate, destinationAuthentication: UserSession, url: string, templateDictionary: any): Promise<any>;
106
- export declare function _getFields(url: string, ids: number[], authentication: UserSession): Promise<any>;
107
- export declare function _updateUrl(url: string): string;
108
- export declare function _getAddFeatures(updateInfos: any, fields: any[]): any;
109
- export declare function _getField(name: string, fields: string[]): string;
110
- /**
111
- * Updates the dispatchers service to include the current user as a dispatcher
112
- *
113
- * @param dispatchers The dispatchers object from the workforce items data
114
- * @param name Current users name
115
- * @param fullName Current users full name
116
- * @param destinationAuthentication The session used to create the new item(s)
117
- * @returns A promise that will resolve with true || false
118
- * @private
119
- */
120
- export declare function _updateDispatchers(url: any, name: string, fullName: string, authentication: UserSession, isPortal: boolean): Promise<boolean>;
121
- export declare function _applyEdits(url: string, adds: any[], authentication: UserSession, useGlobalIds?: boolean): any;