@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,348 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2021 Esri
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports._sendZipsSeriallyToItem = exports._detemplatizeResources = exports._copyAssociatedFileZips = exports.copyAssociatedFilesByType = exports.copyFilesAsResources = void 0;
19
- const tslib_1 = require("tslib");
20
- const interfaces_1 = require("../interfaces");
21
- const hub_common_1 = require("@esri/hub-common");
22
- const copyDataIntoItem_1 = require("./copyDataIntoItem");
23
- const copyMetadataIntoItem_1 = require("./copyMetadataIntoItem");
24
- const copyResourceIntoZip_1 = require("./copyResourceIntoZip");
25
- const copyZipIntoItem_1 = require("./copyZipIntoItem");
26
- const createCopyResults_1 = require("./createCopyResults");
27
- const generalHelpers_1 = require("../generalHelpers");
28
- const restHelpersGet_1 = require("../restHelpersGet");
29
- const jszip_1 = tslib_1.__importDefault(require("jszip"));
30
- // ------------------------------------------------------------------------------------------------------------------ //
31
- /**
32
- * Copies the files for storing the resources, metadata, and thumbnail of an item or group to a storage item
33
- * with a specified path by collecting files into zip files.
34
- *
35
- * @param files List of item files' URLs and folder/filenames for storing the files
36
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
37
- * @param destinationAuthentication Credentials for the request to the storage
38
- * @param maxFilesPerZip Number of files to include per zip file; AGO limits zips to 50 files
39
- * @returns A promise which resolves to a list of the result of the copies
40
- */
41
- function copyFilesAsResources(files, destinationItemId, destinationAuthentication, maxFilesPerZip = 40) {
42
- return new Promise((resolve) => {
43
- const awaitAllItems = [];
44
- const zipInfos = [];
45
- if (files.length > 0) {
46
- // Bundle the resources into chunked zip updates because AGO tends to have problems with
47
- // many updates in a row to the same item: it claims success despite randomly failing.
48
- // Note that AGO imposes a limit of 50 files per zip and a maximum upload file size under
49
- // 50MB, so we break the list of resource file info into chunks below this threshold and
50
- // start a zip for each.
51
- // https://developers.arcgis.com/rest/users-groups-and-items/add-resources.htm
52
- const maxZipSize = 49999000; // bytes
53
- let zipIndex = 0;
54
- let currentZipInfo = _createEmptyZipInfo(zipIndex);
55
- zipInfos.push(currentZipInfo);
56
- let currentZipSize = 0;
57
- files.forEach((file) => {
58
- if (currentZipInfo.filelist.length >= maxFilesPerZip || currentZipSize + file.file.size >= maxZipSize) {
59
- // Create a new zip for the next chunk
60
- zipIndex++;
61
- currentZipInfo = _createEmptyZipInfo(zipIndex);
62
- zipInfos.push(currentZipInfo);
63
- currentZipSize = 0;
64
- }
65
- awaitAllItems.push((0, copyResourceIntoZip_1.copyResourceIntoZip)(file, currentZipInfo));
66
- currentZipSize += file.file.size;
67
- });
68
- }
69
- if (awaitAllItems.length > 0) {
70
- // Wait until the Resource zip file(s) are prepared
71
- void Promise.all(awaitAllItems).then((results) => {
72
- // We have three types of results:
73
- // | fetchedFromSource | copiedToDestination | interpretation | |
74
- // +-------------------+---------------------+------------------------------------------------+
75
- // | false | * | could not fetch file from source |
76
- // | true | true | file has been fetched and sent to AGO |
77
- // | true | undefined | file has been fetched and will be sent via zip |
78
- // Filter out copiedToDestination===undefined; we'll get their status when we send their zip
79
- results = results.filter((result) => !(result.fetchedFromSource && typeof result.copiedToDestination === "undefined"));
80
- // Now send the resources to AGO
81
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
82
- _copyAssociatedFileZips(zipInfos, destinationItemId, destinationAuthentication).then((zipResults) => {
83
- resolve(results.concat(zipResults));
84
- });
85
- });
86
- }
87
- else {
88
- // No data, metadata, or resources to send; we're done
89
- resolve([]);
90
- }
91
- });
92
- }
93
- exports.copyFilesAsResources = copyFilesAsResources;
94
- /**
95
- * Copies the files described by a list of full URLs and storage folder/filename combinations for storing
96
- * the resources, metadata, and thumbnail of an item or group to a storage item with different
97
- * handling based on the type of file.
98
- *
99
- * @param fileInfos List of item files' URLs and folder/filenames for storing the files
100
- * @param sourceAuthentication Credentials for the request to the source
101
- * @param sourceItemId Id of item supplying resource/metadata
102
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
103
- * @param destinationAuthentication Credentials for the request to the storage
104
- * @param template Description of item that will receive files
105
- * @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
106
- * @returns A promise which resolves to a list of the result of the copies
107
- */
108
- async function copyAssociatedFilesByType(fileInfos, sourceAuthentication, sourceItemId, destinationItemId, destinationAuthentication, template = {}, templateDictionary = {}) {
109
- return new Promise((resolve) => {
110
- let awaitAllItems = [];
111
- let resourceFileInfos = fileInfos;
112
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
113
- awaitAllItems = fileInfos
114
- .filter((fileInfo) => fileInfo.type === interfaces_1.EFileType.Data || fileInfo.type === interfaces_1.EFileType.Metadata)
115
- .map((fileInfo) => {
116
- // Handle Data and Metadata first
117
- switch (fileInfo.type) {
118
- case interfaces_1.EFileType.Data:
119
- // We are updating an item with a zip file, which is written to AGO. If the updated
120
- // item is in a folder, the zip file is moved to the item's folder after being written.
121
- // Without the folder information in the URL, AGO writes the zip to the root folder,
122
- // which causes a conflict if an item with the same data is already in that root folder.
123
- return (0, copyDataIntoItem_1.copyDataIntoItem)(fileInfo, sourceAuthentication, destinationItemId, destinationAuthentication);
124
- case interfaces_1.EFileType.Metadata:
125
- return (0, copyMetadataIntoItem_1.copyMetadataIntoItem)(fileInfo, sourceAuthentication, destinationItemId, destinationAuthentication);
126
- }
127
- });
128
- // Now add in the Resources
129
- resourceFileInfos = fileInfos.filter((fileInfo) => fileInfo.type === interfaces_1.EFileType.Info || fileInfo.type === interfaces_1.EFileType.Resource);
130
- const zipInfos = [];
131
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
132
- const awaitAllResources = new Promise((resolve2) => {
133
- if (resourceFileInfos.length > 0) {
134
- // De-templatize as needed in files before adding them to the zip
135
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
136
- _detemplatizeResources(sourceAuthentication, sourceItemId, template, resourceFileInfos, destinationAuthentication, templateDictionary).then(() => {
137
- // Bundle the resources into chunked zip updates because AGO tends to have problems with
138
- // many updates in a row to the same item: it claims success despite randomly failing.
139
- // Note that AGO imposes a limit of 50 files per zip, so we break the list of resource
140
- // file info into chunks below this threshold and start a zip for each
141
- // https://developers.arcgis.com/rest/users-groups-and-items/add-resources.htm
142
- const chunkedResourceFileInfo = (0, hub_common_1.chunkArray)(resourceFileInfos, 40); // leave a bit of room below threshold
143
- chunkedResourceFileInfo.forEach((chunk, index) => {
144
- // Create a zip for this chunk
145
- const zipInfo = {
146
- filename: `resources${index}.zip`,
147
- zip: new jszip_1.default(),
148
- filelist: [],
149
- };
150
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
151
- awaitAllItems = awaitAllItems.concat(chunk.map((fileInfo) => {
152
- return (0, copyResourceIntoZip_1.copyResourceIntoZipFromInfo)(fileInfo, sourceAuthentication, zipInfo);
153
- }));
154
- zipInfos.push(zipInfo);
155
- });
156
- resolve2(null);
157
- });
158
- }
159
- else {
160
- resolve2(null);
161
- }
162
- });
163
- // Wait until the Resource zip file(s) have been prepared
164
- void awaitAllResources.then(() => {
165
- if (awaitAllItems.length > 0) {
166
- // Wait until all Data and Metadata files have been copied
167
- void Promise.all(awaitAllItems).then((results) => {
168
- // We have three types of results:
169
- // | fetchedFromSource | copiedToDestination | interpretation | |
170
- // +-------------------+---------------------+------------------------------------------------+
171
- // | false | * | could not fetch file from source |
172
- // | true | true | file has been fetched and sent to AGO |
173
- // | true | undefined | file has been fetched and will be sent via zip |
174
- // Filter out copiedToDestination===undefined; we'll get their status when we send their zip
175
- results = results.filter((result) => !(result.fetchedFromSource && typeof result.copiedToDestination === "undefined"));
176
- // Now send the resources to AGO
177
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
178
- _copyAssociatedFileZips(zipInfos, destinationItemId, destinationAuthentication).then((zipResults) => {
179
- resolve(results.concat(zipResults));
180
- });
181
- });
182
- }
183
- else {
184
- // No data, metadata, or resources to send; we're done
185
- resolve([]);
186
- }
187
- });
188
- });
189
- }
190
- exports.copyAssociatedFilesByType = copyAssociatedFilesByType;
191
- /**
192
- * Copies one or more zipfiles to a storage item.
193
- *
194
- * @param zipInfos List of zip files containing files to store
195
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
196
- * @param destinationAuthentication Credentials for the request to the storage
197
- * @returns A promise which resolves to a list of the result of the copies
198
- * @private
199
- */
200
- function _copyAssociatedFileZips(zipInfos, destinationItemId, destinationAuthentication) {
201
- return new Promise((resolve) => {
202
- const results = [];
203
- // Filter out empty zips, which can happen when none of the files in the chunk going into a zip
204
- // can be fetched; e.g., the only file is metadata.xml, and the source item doesn't have metadata
205
- const nonEmptyZipInfos = zipInfos.filter((zipInfo) => Object.keys(zipInfo.zip.files).length > 0);
206
- if (nonEmptyZipInfos.length > 0) {
207
- // Send the zip(s) to AGO
208
- void _sendZipsSeriallyToItem(nonEmptyZipInfos, destinationItemId, destinationAuthentication).then((zipResults) => {
209
- resolve(zipResults);
210
- });
211
- }
212
- else {
213
- // No resources to send; we're done
214
- resolve(results);
215
- }
216
- });
217
- }
218
- exports._copyAssociatedFileZips = _copyAssociatedFileZips;
219
- /**
220
- * Creates an empty zip info object.
221
- *
222
- * @param index Index of the zip info object, used as a suffix for the filename
223
- * @returns An empty zip info object
224
- */
225
- function _createEmptyZipInfo(index) {
226
- return {
227
- filename: `resources${index}.zip`,
228
- zip: new jszip_1.default(),
229
- filelist: [],
230
- };
231
- }
232
- /**
233
- * Replace templatizations in an item's resources
234
- *
235
- * @param sourceAuthentication Credentials for the request to the source
236
- * @param sourceItemId Id of item supplying resource/metadata
237
- * @param itemTemplate Item being created
238
- * @param fileInfos Resources for the item; these resources are modified as needed
239
- * by removing the templatization: the `url` property is replaced by the `file` property
240
- * @param destinationAuthentication Credentials for the request to the storage
241
- * @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
242
- *
243
- * @returns A promise that resolves when all de-templatization has completed
244
- */
245
- function _detemplatizeResources(sourceAuthentication, sourceItemId, itemTemplate, fileInfos, destinationAuthentication, templateDictionary = {}) {
246
- const synchronizePromises = [];
247
- if (itemTemplate.type === "Vector Tile Service") {
248
- // Get the root.json files
249
- const rootJsonResources = fileInfos.filter((file) => file.filename === "root.json");
250
- const templatizedResourcePath = "{{" + sourceItemId + ".url}}";
251
- const resourcePath = destinationAuthentication.portal + "/content/items/" + itemTemplate.itemId;
252
- const replacer = new RegExp(templatizedResourcePath, "g");
253
- // Templatize the paths in the files that reference the source item id
254
- rootJsonResources.forEach((rootFileResource) => {
255
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
256
- synchronizePromises.push(new Promise((resolve) => {
257
- // Fetch the file
258
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
259
- (0, restHelpersGet_1.getBlobAsFile)(rootFileResource.url, rootFileResource.filename, sourceAuthentication).then((file) => {
260
- // Read the file
261
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
262
- (0, generalHelpers_1.blobToJson)(file).then((fileJson) => {
263
- // Templatize by turning JSON into string, replacing paths with template, and re-JSONing
264
- const updatedFileJson = JSON.parse(JSON.stringify(fileJson).replace(replacer, resourcePath));
265
- // Write the changes back into the file
266
- rootFileResource.file = (0, generalHelpers_1.jsonToFile)(updatedFileJson, rootFileResource.filename);
267
- rootFileResource.url = "";
268
- resolve(null);
269
- });
270
- });
271
- }));
272
- });
273
- }
274
- else if (itemTemplate.type === "Geoprocessing Service") {
275
- const paths = {};
276
- paths[`{{${sourceItemId}.itemId}}`] = itemTemplate.itemId;
277
- itemTemplate.dependencies.forEach((id) => {
278
- paths[`{{${id}.itemId}}`] = templateDictionary[id].itemId;
279
- });
280
- fileInfos.forEach((fileResource) => {
281
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
282
- synchronizePromises.push(new Promise((resolve) => {
283
- // Fetch the file
284
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
285
- (0, restHelpersGet_1.getBlobAsFile)(fileResource.url, fileResource.filename, sourceAuthentication).then((file) => {
286
- // Read the file
287
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
288
- (0, generalHelpers_1.blobToJson)(file).then((fileJson) => {
289
- // DeTemplatize by turning JSON into string, replacing paths with new value, and re-JSONing
290
- let fileString = JSON.stringify(fileJson);
291
- Object.keys(paths).forEach((k) => {
292
- const replacer = new RegExp(k, "g");
293
- fileString = fileString.replace(replacer, paths[k]);
294
- });
295
- const updatedFileJson = JSON.parse(fileString);
296
- // Write the changes back into the file
297
- fileResource.file = (0, generalHelpers_1.jsonToFile)(updatedFileJson, fileResource.filename);
298
- fileResource.url = "";
299
- resolve(null);
300
- });
301
- });
302
- }));
303
- });
304
- }
305
- return Promise.all(synchronizePromises);
306
- }
307
- exports._detemplatizeResources = _detemplatizeResources;
308
- /**
309
- * Copies one or more zipfiles to a storage item in a serial fashion, waiting a bit between sends.
310
- *
311
- * @param zipInfos List of zip files containing files to store
312
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
313
- * @param destinationAuthentication Credentials for the request to the storage
314
- * @returns A promise which resolves to a list of the result of the copies
315
- */
316
- function _sendZipsSeriallyToItem(zipInfos, destinationItemId, destinationAuthentication) {
317
- return new Promise((resolve) => {
318
- let allResults = [];
319
- // Remove zip from bottom of list
320
- const zipInfoToSend = zipInfos.pop();
321
- // Send predecessors in list
322
- let sendOthersPromise = Promise.resolve([]);
323
- if (zipInfos.length > 0) {
324
- sendOthersPromise = _sendZipsSeriallyToItem(zipInfos, destinationItemId, destinationAuthentication);
325
- }
326
- void sendOthersPromise
327
- .then((response) => {
328
- allResults = response;
329
- // Stall a little to give AGO time to catch up
330
- return new Promise((resolveSleep) => {
331
- setTimeout(() => resolveSleep(), 1000);
332
- });
333
- })
334
- .then(() => {
335
- // Now send the zip removed from bottom of the input list
336
- return (0, copyZipIntoItem_1.copyZipIntoItem)(zipInfoToSend, destinationItemId, destinationAuthentication);
337
- })
338
- .then((zipResult) => {
339
- // Save the result of copying this zip as a status for each of the files that it contains
340
- zipResult.filelist.forEach((fileInfo) => {
341
- allResults.push((0, createCopyResults_1.createCopyResults)(fileInfo, true, zipResult.copiedToDestination));
342
- });
343
- resolve(allResults);
344
- });
345
- });
346
- }
347
- exports._sendZipsSeriallyToItem = _sendZipsSeriallyToItem;
348
- //# sourceMappingURL=copyAssociatedFiles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copyAssociatedFiles.js","sourceRoot":"","sources":["../../../src/resources/copyAssociatedFiles.ts"],"names":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AAC;SACrG;QACD,KAAK,iBAAiB;aACnB,IAAI,CAAC,CAAC,QAAsC,EAAE,EAAE;YAC/C,UAAU,GAAG,QAAQ,CAAC;YAEtB,8CAA8C;YAC9C,OAAO,IAAI,OAAO,CAAO,CAAC,YAAY,EAAE,EAAE;gBACxC,UAAU,CAAC,GAAG,EAAE,CAAC,YAAY,EAAE,EAAE,IAAI,CAAC,CAAC;YACzC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;aACD,IAAI,CAAC,GAAG,EAAE;YACT,yDAAyD;YACzD,OAAO,IAAA,iCAAe,EAAC,aAAa,EAAE,iBAAiB,EAAE,yBAAyB,CAAC,CAAC;QACtF,CAAC,CAAC;aACD,IAAI,CAAC,CAAC,SAA0B,EAAE,EAAE;YACnC,yFAAyF;YACzF,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,QAA6B,EAAE,EAAE;gBAC3D,UAAU,CAAC,IAAI,CACb,IAAA,qCAAiB,EAAC,QAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,mBAAmB,CAA+B,CAC/F,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,OAAO,CAAC,UAAU,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC;AAxCD,0DAwCC"}
@@ -1,34 +0,0 @@
1
- /** @license
2
- * Copyright 2021 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 { UserSession } from "../arcgisRestJS";
17
- import { IAssociatedFileCopyResults, IAssociatedFileInfo, IFileMimeTyped } from "../interfaces";
18
- /**
19
- * Copies data into an AGO item.
20
- *
21
- * @param fileInfo Information about the source and destination of the file such as its URL, folder, filename
22
- * @param sourceAuthentication Credentials for the request to the source
23
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
24
- * @param destinationAuthentication Credentials for the request to the storage
25
- * @returns A promise which resolves to the result of the copy
26
- */
27
- export declare function copyDataIntoItem(fileInfo: IAssociatedFileInfo, sourceAuthentication: UserSession, destinationItemId: string, destinationAuthentication: UserSession): Promise<IAssociatedFileCopyResults>;
28
- /**
29
- * Creates a file with a specified mime type.
30
- *
31
- * @param fileDescription Structure containing a file and the desired mime type
32
- * @returns Created file
33
- */
34
- export declare function createMimeTypedFile(fileDescription: IFileMimeTyped): File;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createMimeTypedFile = exports.copyDataIntoItem = void 0;
4
- const createCopyResults_1 = require("./createCopyResults");
5
- const get_blob_1 = require("./get-blob");
6
- const restHelpers_1 = require("../restHelpers");
7
- // ------------------------------------------------------------------------------------------------------------------ //
8
- /**
9
- * Copies data into an AGO item.
10
- *
11
- * @param fileInfo Information about the source and destination of the file such as its URL, folder, filename
12
- * @param sourceAuthentication Credentials for the request to the source
13
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
14
- * @param destinationAuthentication Credentials for the request to the storage
15
- * @returns A promise which resolves to the result of the copy
16
- */
17
- function copyDataIntoItem(fileInfo, sourceAuthentication, destinationItemId, destinationAuthentication) {
18
- return new Promise((resolve) => {
19
- (0, get_blob_1.getBlob)(fileInfo.url, sourceAuthentication).then((blob) => {
20
- const update = {
21
- id: destinationItemId,
22
- data: createMimeTypedFile({
23
- blob: blob,
24
- filename: fileInfo.filename,
25
- mimeType: fileInfo.mimeType || blob.type,
26
- }),
27
- };
28
- (0, restHelpers_1.updateItem)(update, destinationAuthentication, fileInfo.folder).then(() => resolve((0, createCopyResults_1.createCopyResults)(fileInfo, true, true)), () => resolve((0, createCopyResults_1.createCopyResults)(fileInfo, true, false)));
29
- }, () => resolve((0, createCopyResults_1.createCopyResults)(fileInfo, false)));
30
- });
31
- }
32
- exports.copyDataIntoItem = copyDataIntoItem;
33
- /**
34
- * Creates a file with a specified mime type.
35
- *
36
- * @param fileDescription Structure containing a file and the desired mime type
37
- * @returns Created file
38
- */
39
- function createMimeTypedFile(fileDescription) {
40
- return new File([fileDescription.blob], fileDescription.filename, {
41
- type: fileDescription.mimeType,
42
- });
43
- }
44
- exports.createMimeTypedFile = createMimeTypedFile;
45
- //# sourceMappingURL=copyDataIntoItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copyDataIntoItem.js","sourceRoot":"","sources":["../../../src/resources/copyDataIntoItem.ts"],"names":[],"mappings":";;;AAiBA,2DAAwD;AACxD,yCAAqC;AACrC,gDAAiE;AAEjE,wHAAwH;AAExH;;;;;;;;GAQG;AACH,SAAgB,gBAAgB,CAC9B,QAA6B,EAC7B,oBAAiC,EACjC,iBAAyB,EACzB,yBAAsC;IAEtC,OAAO,IAAI,OAAO,CAA6B,CAAC,OAAO,EAAE,EAAE;QACzD,IAAA,kBAAO,EAAC,QAAQ,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC,IAAI,CAC9C,CAAC,IAAI,EAAE,EAAE;YACP,MAAM,MAAM,GAAgB;gBAC1B,EAAE,EAAE,iBAAiB;gBACrB,IAAI,EAAE,mBAAmB,CAAC;oBACxB,IAAI,EAAE,IAAI;oBACV,QAAQ,EAAE,QAAQ,CAAC,QAAQ;oBAC3B,QAAQ,EAAE,QAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI;iBACzC,CAAC;aACH,CAAC;YAEF,IAAA,wBAAiB,EAAC,MAAM,EAAE,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CACxE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAA,qCAAiB,EAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAA+B,CAAC,EACpF,GAAG,EAAE,CAAC,OAAO,CAAC,IAAA,qCAAiB,EAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,CAA+B,CAAC,CACtF,CAAC;QACJ,CAAC,EACD,GAAG,EAAE,CAAC,OAAO,CAAC,IAAA,qCAAiB,EAAC,QAAQ,EAAE,KAAK,CAA+B,CAAC,CAChF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA1BD,4CA0BC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,eAA+B;IACjE,OAAO,IAAI,IAAI,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC,QAAQ,EAAE;QAChE,IAAI,EAAE,eAAe,CAAC,QAAQ;KAC/B,CAAC,CAAC;AACL,CAAC;AAJD,kDAIC"}
@@ -1,27 +0,0 @@
1
- /** @license
2
- * Copyright 2021 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 { UserSession } from "../arcgisRestJS";
17
- import { IAssociatedFileCopyResults, IAssociatedFileInfo } from "../interfaces";
18
- /**
19
- * Copies metadata into an AGO item.
20
- *
21
- * @param fileInfo Information about the source and destination of the file such as its URL, folder, filename
22
- * @param sourceAuthentication Credentials for the request to the source
23
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
24
- * @param destinationAuthentication Credentials for the request to the storage
25
- * @returns A promise which resolves to the result of the copy
26
- */
27
- export declare function copyMetadataIntoItem(fileInfo: IAssociatedFileInfo, sourceAuthentication: UserSession, destinationItemId: string, destinationAuthentication: UserSession): Promise<IAssociatedFileCopyResults>;
@@ -1,44 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2021 Esri
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.copyMetadataIntoItem = void 0;
19
- const addMetadataFromBlob_1 = require("./addMetadataFromBlob");
20
- const createCopyResults_1 = require("./createCopyResults");
21
- const get_blob_1 = require("./get-blob");
22
- // ------------------------------------------------------------------------------------------------------------------ //
23
- /**
24
- * Copies metadata into an AGO item.
25
- *
26
- * @param fileInfo Information about the source and destination of the file such as its URL, folder, filename
27
- * @param sourceAuthentication Credentials for the request to the source
28
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
29
- * @param destinationAuthentication Credentials for the request to the storage
30
- * @returns A promise which resolves to the result of the copy
31
- */
32
- function copyMetadataIntoItem(fileInfo, sourceAuthentication, destinationItemId, destinationAuthentication) {
33
- return new Promise((resolve) => {
34
- (0, get_blob_1.getBlob)(fileInfo.url, sourceAuthentication).then((blob) => {
35
- if (blob.type !== "text/xml" && blob.type !== "application/xml") {
36
- resolve((0, createCopyResults_1.createCopyResults)(fileInfo, false)); // unable to get resource
37
- return;
38
- }
39
- (0, addMetadataFromBlob_1.addMetadataFromBlob)(blob, destinationItemId, destinationAuthentication).then(() => resolve((0, createCopyResults_1.createCopyResults)(fileInfo, true, true)), () => resolve((0, createCopyResults_1.createCopyResults)(fileInfo, true, false)));
40
- }, () => resolve((0, createCopyResults_1.createCopyResults)(fileInfo, false)));
41
- });
42
- }
43
- exports.copyMetadataIntoItem = copyMetadataIntoItem;
44
- //# sourceMappingURL=copyMetadataIntoItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copyMetadataIntoItem.js","sourceRoot":"","sources":["../../../src/resources/copyMetadataIntoItem.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,+DAA4D;AAC5D,2DAAwD;AACxD,yCAAqC;AAErC,wHAAwH;AAExH;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAClC,QAA6B,EAC7B,oBAAiC,EACjC,iBAAyB,EACzB,yBAAsC;IAEtC,OAAO,IAAI,OAAO,CAA6B,CAAC,OAAO,EAAE,EAAE;QACzD,IAAA,kBAAO,EAAC,QAAQ,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC,IAAI,CAC9C,CAAC,IAAI,EAAE,EAAE;YACP,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,iBAAiB,EAAE;gBAC/D,OAAO,CAAC,IAAA,qCAAiB,EAAC,QAAQ,EAAE,KAAK,CAA+B,CAAC,CAAC,CAAC,yBAAyB;gBACpG,OAAO;aACR;YACD,IAAA,yCAAmB,EAAC,IAAI,EAAE,iBAAiB,EAAE,yBAAyB,CAAC,CAAC,IAAI,CAC1E,GAAG,EAAE,CAAC,OAAO,CAAC,IAAA,qCAAiB,EAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAA+B,CAAC,EACpF,GAAG,EAAE,CAAC,OAAO,CAAC,IAAA,qCAAiB,EAAC,QAAQ,EAAE,IAAI,EAAE,KAAK,CAA+B,CAAC,CACtF,CAAC;QACJ,CAAC,EACD,GAAG,EAAE,CAAC,OAAO,CAAC,IAAA,qCAAiB,EAAC,QAAQ,EAAE,KAAK,CAA+B,CAAC,CAChF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AArBD,oDAqBC"}
@@ -1,34 +0,0 @@
1
- /** @license
2
- * Copyright 2021 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 { UserSession } from "../arcgisRestJS";
17
- import { IAssociatedFileCopyResults, IAssociatedFileInfo, ISourceFile, IZipInfo } from "../interfaces";
18
- /**
19
- * Copies a resource into a zipfile.
20
- *
21
- * @param file Information about the source and destination of the file such as its URL, folder, filename
22
- * @param zipInfo Information about a zipfile such as its name and its zip object
23
- * @returns The result of the copy
24
- */
25
- export declare function copyResourceIntoZip(file: ISourceFile, zipInfo: IZipInfo): IAssociatedFileCopyResults;
26
- /**
27
- * Copies a resource into a zipfile.
28
- *
29
- * @param fileInfo Information about the source and destination of the file such as its URL, folder, filename
30
- * @param sourceAuthentication Credentials for the request to the source
31
- * @param zipInfo Information about a zipfile such as its name and its zip object
32
- * @returns A promise which resolves to the result of the copy
33
- */
34
- export declare function copyResourceIntoZipFromInfo(fileInfo: IAssociatedFileInfo, sourceAuthentication: UserSession, zipInfo: IZipInfo): Promise<IAssociatedFileCopyResults>;
@@ -1,74 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2021 Esri
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.copyResourceIntoZipFromInfo = exports.copyResourceIntoZip = void 0;
19
- const createCopyResults_1 = require("./createCopyResults");
20
- const restHelpersGet_1 = require("../restHelpersGet");
21
- // ------------------------------------------------------------------------------------------------------------------ //
22
- /**
23
- * Copies a resource into a zipfile.
24
- *
25
- * @param file Information about the source and destination of the file such as its URL, folder, filename
26
- * @param zipInfo Information about a zipfile such as its name and its zip object
27
- * @returns The result of the copy
28
- */
29
- function copyResourceIntoZip(file, zipInfo) {
30
- // Add it to the zip
31
- if (file.folder) {
32
- zipInfo.zip.folder(file.folder).file(file.filename, file.file, { binary: true });
33
- }
34
- else {
35
- zipInfo.zip.file(file.filename, file.file, { binary: true });
36
- }
37
- zipInfo.filelist.push(file);
38
- return (0, createCopyResults_1.createCopyResults)(file, true);
39
- }
40
- exports.copyResourceIntoZip = copyResourceIntoZip;
41
- /**
42
- * Copies a resource into a zipfile.
43
- *
44
- * @param fileInfo Information about the source and destination of the file such as its URL, folder, filename
45
- * @param sourceAuthentication Credentials for the request to the source
46
- * @param zipInfo Information about a zipfile such as its name and its zip object
47
- * @returns A promise which resolves to the result of the copy
48
- */
49
- function copyResourceIntoZipFromInfo(fileInfo, sourceAuthentication, zipInfo) {
50
- return new Promise((resolve) => {
51
- let filePromise;
52
- if (fileInfo.file) {
53
- filePromise = Promise.resolve(fileInfo.file);
54
- }
55
- else {
56
- filePromise = (0, restHelpersGet_1.getBlobAsFile)(fileInfo.url, fileInfo.filename, sourceAuthentication);
57
- }
58
- filePromise.then((file) => {
59
- // And add it to the zip
60
- if (fileInfo.folder) {
61
- zipInfo.zip.folder(fileInfo.folder).file(fileInfo.filename, file, { binary: true });
62
- }
63
- else {
64
- zipInfo.zip.file(fileInfo.filename, file, { binary: true });
65
- }
66
- zipInfo.filelist.push(fileInfo);
67
- resolve((0, createCopyResults_1.createCopyResults)(fileInfo, true));
68
- }, () => resolve(
69
- // unable to get resource
70
- (0, createCopyResults_1.createCopyResults)(fileInfo, false)));
71
- });
72
- }
73
- exports.copyResourceIntoZipFromInfo = copyResourceIntoZipFromInfo;
74
- //# sourceMappingURL=copyResourceIntoZip.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copyResourceIntoZip.js","sourceRoot":"","sources":["../../../src/resources/copyResourceIntoZip.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,2DAAwD;AACxD,sDAAkD;AAElD,wHAAwH;AAExH;;;;;;GAMG;AACH,SAAgB,mBAAmB,CAAC,IAAiB,EAAE,OAAiB;IACtE,oBAAoB;IACpB,IAAI,IAAI,CAAC,MAAM,EAAE;QACf,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;KAClF;SAAM;QACL,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;KAC9D;IACD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,OAAO,IAAA,qCAAiB,EAAC,IAAI,EAAE,IAAI,CAA+B,CAAC;AACrE,CAAC;AATD,kDASC;AAED;;;;;;;GAOG;AACH,SAAgB,2BAA2B,CACzC,QAA6B,EAC7B,oBAAiC,EACjC,OAAiB;IAEjB,OAAO,IAAI,OAAO,CAA6B,CAAC,OAAO,EAAE,EAAE;QACzD,IAAI,WAAyB,CAAC;QAC9B,IAAI,QAAQ,CAAC,IAAI,EAAE;YACjB,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;SAC9C;aAAM;YACL,WAAW,GAAG,IAAA,8BAAa,EAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;SACpF;QAED,WAAW,CAAC,IAAI,CAC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