@esri/solution-common 6.1.2 → 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,192 +0,0 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Provides common functions involving the management of item and group resources.
18
- *
19
- * @module resourceHelpers
20
- *
21
- * How it works
22
- *
23
- * An item may have resources that are listed as a set of filenames and/or folder/filename combinations. It may have
24
- * a thumbnail, listed in its item info as a filename or folder/filename combination. It may have metadata, which is
25
- * not listed, but has a distinct URL. A group may have a thumbnail, but not the others.
26
- *
27
- * For storing these files in a common storage item, a new folder and filename combination is created for each. The
28
- * filename is kept as-is. The folder consists of the source item's id and an optional suffix. For thumbnails, the
29
- * suffix is "_info_thumbnail"; for metadata, the suffix is "_info_metadata"; for resources, the suffix is "_" plus
30
- * the resource's folder's name; if the resource doesn't have a folder, there is no suffix.
31
- *
32
- * Note that "thumbnail" is included in an item's thumbnail property like a folder (e.g., "thumbnail/thumbnail.png"),
33
- * and the item's thumbnail is accessed using a path such as "%lt;itemId>/info/thumbnail/thumbnail.png". Groups,
34
- * on the other hand, have a property with a simple name (e.g., "thumbnail.png") and it is accessed using a path
35
- * such as "%lt;groupId>/info/thumbnail.png".
36
- *
37
- * For copying these files from the common storage item to another item, one converts the unique names back into the
38
- * original names (or the special cases for thumbnails and metadata).
39
- *
40
- * Routines are provided to
41
- * 1. create full URLs to resources, thumbnails, and metadata.
42
- * 2. create a folder and filename combination that uniquely identifies these files for
43
- * storing them in a single, shared storage item
44
- * 3. copy a set of resources, thumbnails, and metadata for an item to a storage item
45
- * 4. copy a file by URL to an item using specified folder and filename
46
- * 5. undo the unique folder and filename into the original folder and filename
47
- */
48
- import { IDeployFileCopyPath, IFileMimeTyped, ISourceFile, ISourceFileCopyPath } from "./interfaces";
49
- import { IItemResourceResponse, UserSession } from "./arcgisRestJS";
50
- export declare function addThumbnailFromBlob(blob: any, itemId: string, authentication: UserSession, isGroup?: boolean): Promise<any>;
51
- export declare function convertBlobToSupportableResource(blob: Blob, filename?: string): IFileMimeTyped;
52
- /**
53
- * Copies the files described by a list of full URLs and folder/filename combinations for
54
- * the resources and metadata of an item or group to an item.
55
- *
56
- * @param storageAuthentication Credentials for the request to the storage
57
- * @param filePaths List of item files' URLs and folder/filenames for storing the files
58
- * @param sourceItemId Id of item supplying resource/metadata
59
- * @param destinationFolderId Id of folder
60
- * @param destinationItemId Id of item to receive copy of resource/metadata
61
- * @param destinationAuthentication Credentials for the request to the destination
62
- * @param template Description of item that will receive files
63
- * @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
64
- * @returns A promise which resolves to a boolean indicating if the copies were successful
65
- */
66
- export declare function copyFilesFromStorageItem(storageAuthentication: UserSession, filePaths: IDeployFileCopyPath[], sourceItemId: string, destinationFolderId: string, destinationItemId: string, destinationAuthentication: UserSession, template?: any, templateDictionary?: any): Promise<boolean>;
67
- /**
68
- * Copies the files for storing the resources, metadata, and thumbnail of an item or group to a storage item
69
- * with a specified path.
70
- *
71
- * @param files List of item files and paths for storing the files
72
- * @param storageItemId Id of item to receive copy of resource/metadata
73
- * @param storageAuthentication Credentials for the request to the storage
74
- * @returns A promise which resolves to a list of the filenames under which the resource/metadata are stored
75
- */
76
- export declare function copyFilesToStorageItem(files: ISourceFile[], storageItemId: string, storageAuthentication: UserSession): Promise<string[]>;
77
- /**
78
- * Generates a folder and filename for storing a copy of an item's metadata in a storage item.
79
- *
80
- * @param itemId Id of item
81
- * @returns Folder and filename for storage; folder is the itemID suffixed with "_info_metadata"
82
- * @see convertStorageResourceToItemResource
83
- */
84
- export declare function generateMetadataStorageFilename(itemId: string): {
85
- folder: string;
86
- filename: string;
87
- };
88
- /**
89
- * Generates a list of full URLs and storage folder/filename combinations for storing the resources, metadata,
90
- * and thumbnail of an item.
91
- *
92
- * @param portalSharingUrl Server/sharing
93
- * @param itemId Id of item
94
- * @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
95
- * @param resourceFilenames List of resource filenames for an item, e.g., ["file1", "myFolder/file2"]
96
- * @param isGroup Boolean to indicate if the files are associated with a group or item
97
- * @param storageVersion Version of the Solution template
98
- * @returns List of item files' URLs and folder/filenames for storing the files
99
- */
100
- export declare function generateSourceFilePaths(portalSharingUrl: string, itemId: string, thumbnailUrlPart: string, resourceFilenames: string[], isGroup?: boolean, storageVersion?: number): ISourceFileCopyPath[];
101
- /**
102
- * Generates the full URL and storage folder/filename for storing an item's thumbnail.
103
- *
104
- * @param portalSharingUrl Server/sharing
105
- * @param itemId Id of item
106
- * @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
107
- * @param isGroup Boolean to indicate if the files are associated with a group or item
108
- * @returns URL and folder/filename for storing the thumbnail
109
- */
110
- export declare function generateSourceThumbnailPath(portalSharingUrl: string, itemId: string, thumbnailUrlPart: string, isGroup?: boolean): ISourceFileCopyPath;
111
- /**
112
- * Generates the URL for reading an item's metadata.
113
- *
114
- * @param sourcePortalSharingUrl Server/sharing
115
- * @param itemId Id of item
116
- * @param isGroup Boolean to indicate if the files are associated with a group or item
117
- * @returns URL string
118
- */
119
- export declare function generateSourceMetadataUrl(sourcePortalSharingUrl: string, itemId: string, isGroup?: boolean): string;
120
- /**
121
- * Generates the URL for reading an item's resource given the filename of the resource.
122
- *
123
- * @param sourcePortalSharingUrl Server/sharing
124
- * @param itemId Id of item
125
- * @param sourceResourceFilename Either filename or folder/filename to resource
126
- * @returns URL string
127
- */
128
- export declare function generateSourceResourceUrl(sourcePortalSharingUrl: string, itemId: string, sourceResourceFilename: string): string;
129
- /**
130
- * Generates the URL for reading an item's thumbnail.
131
- *
132
- * @param sourcePortalSharingUrl Server/sharing
133
- * @param itemId Id of item
134
- * @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
135
- * @param isGroup Boolean to indicate if the files are associated with a group or item
136
- * @returns URL string
137
- */
138
- export declare function generateSourceThumbnailUrl(sourcePortalSharingUrl: string, itemId: string, thumbnailUrlPart: string, isGroup?: boolean): string;
139
- /**
140
- * Generates a list of full URLs and folder/filename combinations used to store the resources, metadata,
141
- * and thumbnail of an item.
142
- *
143
- * @param portalSharingUrl Server/sharing
144
- * @param storageItemId Id of storage item
145
- * @param resourceFilenames List of resource filenames for an item, e.g., ["file1", "myFolder/file2"]
146
- * @param storageVersion Version of the Solution template
147
- * @returns List of item files' URLs and folder/filenames for storing the files
148
- */
149
- export declare function generateStorageFilePaths(portalSharingUrl: string, storageItemId: string, resourceFilenames?: string[], storageVersion?: number): IDeployFileCopyPath[];
150
- /**
151
- * Generates a folder and filename for storing a copy of an item's thumbnail in a storage item.
152
- *
153
- * @param itemId Id of item
154
- * @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON; can also be a filename
155
- * @returns Folder and filename for storage; folder is the itemID suffixed with "_info_thumbnail";
156
- * file is URI-encoded thumbnailUrlPart
157
- * @see convertStorageResourceToItemResource
158
- */
159
- export declare function generateThumbnailStorageFilename(itemId: string, thumbnailurl: string): {
160
- folder: string;
161
- filename: string;
162
- };
163
- export declare function isSupportedFileType(filename: string): boolean;
164
- /**
165
- * Gets the thumbnail of an item or group.
166
- *
167
- * @param authentication Credentials for the request to the storage
168
- * @param filePaths List of item files' URLs and folder/filenames for storing the files
169
- * @returns A promise which resolves to a boolean indicating if the copies were successful
170
- */
171
- export declare function getThumbnailFromStorageItem(authentication: UserSession, filePaths: IDeployFileCopyPath[]): Promise<File>;
172
- /**
173
- * Removes the item's resource that matches the filename with new content
174
- *
175
- * @param itemId Id of the item to remove
176
- * @param filename Name of the resource file to remove
177
- * @param authentication Credentials for the request to the storage
178
- * @returns A promise which resolves with a success true/false response
179
- */
180
- export declare function removeItemResourceFile(itemId: string, filename: string, authentication: UserSession): Promise<{
181
- success: boolean;
182
- }>;
183
- /**
184
- * Updates the item's resource that matches the filename with new content
185
- *
186
- * @param itemId Id of the item to update
187
- * @param filename Name of the resource file to update; prefix optional (e.g., a/b/file.txt)
188
- * @param resource The new content to update the resource with
189
- * @param authentication Credentials for the request to the storage
190
- * @returns A promise which resolves with a success true/false response
191
- */
192
- export declare function updateItemResourceFile(itemId: string, filename: string, resource: File, authentication: UserSession): Promise<IItemResourceResponse>;
@@ -1,380 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2018 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.updateItemResourceFile = exports.removeItemResourceFile = exports.getThumbnailFromStorageItem = exports.isSupportedFileType = exports.generateThumbnailStorageFilename = exports.generateStorageFilePaths = exports.generateSourceThumbnailUrl = exports.generateSourceResourceUrl = exports.generateSourceMetadataUrl = exports.generateSourceThumbnailPath = exports.generateSourceFilePaths = exports.generateMetadataStorageFilename = exports.copyFilesToStorageItem = exports.copyFilesFromStorageItem = exports.convertBlobToSupportableResource = exports.addThumbnailFromBlob = void 0;
19
- /**
20
- * Provides common functions involving the management of item and group resources.
21
- *
22
- * @module resourceHelpers
23
- *
24
- * How it works
25
- *
26
- * An item may have resources that are listed as a set of filenames and/or folder/filename combinations. It may have
27
- * a thumbnail, listed in its item info as a filename or folder/filename combination. It may have metadata, which is
28
- * not listed, but has a distinct URL. A group may have a thumbnail, but not the others.
29
- *
30
- * For storing these files in a common storage item, a new folder and filename combination is created for each. The
31
- * filename is kept as-is. The folder consists of the source item's id and an optional suffix. For thumbnails, the
32
- * suffix is "_info_thumbnail"; for metadata, the suffix is "_info_metadata"; for resources, the suffix is "_" plus
33
- * the resource's folder's name; if the resource doesn't have a folder, there is no suffix.
34
- *
35
- * Note that "thumbnail" is included in an item's thumbnail property like a folder (e.g., "thumbnail/thumbnail.png"),
36
- * and the item's thumbnail is accessed using a path such as "%lt;itemId&gt;/info/thumbnail/thumbnail.png". Groups,
37
- * on the other hand, have a property with a simple name (e.g., "thumbnail.png") and it is accessed using a path
38
- * such as "%lt;groupId&gt;/info/thumbnail.png".
39
- *
40
- * For copying these files from the common storage item to another item, one converts the unique names back into the
41
- * original names (or the special cases for thumbnails and metadata).
42
- *
43
- * Routines are provided to
44
- * 1. create full URLs to resources, thumbnails, and metadata.
45
- * 2. create a folder and filename combination that uniquely identifies these files for
46
- * storing them in a single, shared storage item
47
- * 3. copy a set of resources, thumbnails, and metadata for an item to a storage item
48
- * 4. copy a file by URL to an item using specified folder and filename
49
- * 5. undo the unique folder and filename into the original folder and filename
50
- */
51
- const interfaces_1 = require("./interfaces");
52
- const arcgisRestJS_1 = require("./arcgisRestJS");
53
- const generalHelpers_1 = require("./generalHelpers");
54
- const convert_item_resource_to_storage_resource_1 = require("./resources/convert-item-resource-to-storage-resource");
55
- const convert_storage_resource_to_item_resource_1 = require("./resources/convert-storage-resource-to-item-resource");
56
- const restHelpersGet_1 = require("./restHelpersGet");
57
- const copyAssociatedFiles_1 = require("./resources/copyAssociatedFiles");
58
- // ------------------------------------------------------------------------------------------------------------------ //
59
- function addThumbnailFromBlob(blob, itemId, authentication, isGroup = false) {
60
- const updateOptions = {
61
- params: {
62
- // Pass image in directly because item object is serialized, which discards a blob
63
- thumbnail: blob,
64
- },
65
- authentication: authentication,
66
- };
67
- updateOptions[isGroup ? "group" : "item"] = {
68
- id: itemId,
69
- };
70
- return isGroup ? (0, arcgisRestJS_1.restUpdateGroup)(updateOptions) : (0, arcgisRestJS_1.restUpdateItem)(updateOptions);
71
- }
72
- exports.addThumbnailFromBlob = addThumbnailFromBlob;
73
- function convertBlobToSupportableResource(blob, filename = "") {
74
- const originalFilename = blob.name || filename;
75
- let filenameToUse = originalFilename;
76
- if (filenameToUse && !isSupportedFileType(filenameToUse)) {
77
- filenameToUse = filenameToUse + ".zip";
78
- }
79
- return {
80
- blob: new File([blob], filenameToUse, { type: blob.type }),
81
- filename: originalFilename,
82
- mimeType: blob.type,
83
- };
84
- }
85
- exports.convertBlobToSupportableResource = convertBlobToSupportableResource;
86
- /**
87
- * Copies the files described by a list of full URLs and folder/filename combinations for
88
- * the resources and metadata of an item or group to an item.
89
- *
90
- * @param storageAuthentication Credentials for the request to the storage
91
- * @param filePaths List of item files' URLs and folder/filenames for storing the files
92
- * @param sourceItemId Id of item supplying resource/metadata
93
- * @param destinationFolderId Id of folder
94
- * @param destinationItemId Id of item to receive copy of resource/metadata
95
- * @param destinationAuthentication Credentials for the request to the destination
96
- * @param template Description of item that will receive files
97
- * @param templateDictionary Hash of facts: org URL, adlib replacements, deferreds for dependencies
98
- * @returns A promise which resolves to a boolean indicating if the copies were successful
99
- */
100
- function copyFilesFromStorageItem(storageAuthentication, filePaths, sourceItemId, destinationFolderId, destinationItemId, destinationAuthentication, template = {}, templateDictionary = {}) {
101
- // TODO: This is only used in deployer, so move there
102
- // changed to allow the template to be passed in
103
- // because Hub templates need to swap out the templateId
104
- // in the resource filename
105
- const mimeTypes = template.properties || null;
106
- // remove the template.itemId from the fileName in the filePaths
107
- /* istanbul ignore else */
108
- if (template.itemId) {
109
- filePaths = filePaths.map((fp) => {
110
- /* istanbul ignore else */
111
- if (fp.filename.indexOf(template.itemId) === 0 && fp.folder === "") {
112
- fp.filename = fp.filename.replace(`${template.itemId}-`, "");
113
- }
114
- return fp;
115
- });
116
- }
117
- return new Promise((resolve, reject) => {
118
- const fileInfos = filePaths.map((path) => {
119
- return {
120
- folder: path.type === interfaces_1.EFileType.Data ? destinationFolderId : path.folder,
121
- filename: path.filename,
122
- type: path.type,
123
- mimeType: mimeTypes ? mimeTypes[path.filename] : "",
124
- url: path.url,
125
- };
126
- });
127
- void (0, copyAssociatedFiles_1.copyAssociatedFilesByType)(fileInfos, storageAuthentication, sourceItemId, destinationItemId, destinationAuthentication, template, templateDictionary).then((results) => {
128
- const allOK = results
129
- // Filter out metadata
130
- .filter((result) => result.filename !== "metadata.xml")
131
- // Extract success
132
- .map((result) => result.fetchedFromSource && result.copiedToDestination)
133
- // Boil it down to a single result
134
- .reduce((success, currentValue) => success && currentValue, true);
135
- if (allOK) {
136
- resolve(true);
137
- }
138
- else {
139
- reject();
140
- }
141
- });
142
- });
143
- }
144
- exports.copyFilesFromStorageItem = copyFilesFromStorageItem;
145
- /**
146
- * Copies the files for storing the resources, metadata, and thumbnail of an item or group to a storage item
147
- * with a specified path.
148
- *
149
- * @param files List of item files and paths for storing the files
150
- * @param storageItemId Id of item to receive copy of resource/metadata
151
- * @param storageAuthentication Credentials for the request to the storage
152
- * @returns A promise which resolves to a list of the filenames under which the resource/metadata are stored
153
- */
154
- function copyFilesToStorageItem(files, storageItemId, storageAuthentication) {
155
- return new Promise((resolve) => {
156
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
157
- void (0, copyAssociatedFiles_1.copyFilesAsResources)(files, storageItemId, storageAuthentication).then((results) => {
158
- resolve(results
159
- // Filter out failures
160
- .filter((result) => result.fetchedFromSource && result.copiedToDestination)
161
- // Return folder and filename in storage item's resources
162
- .map((result) => result.folder + "/" + result.filename));
163
- });
164
- });
165
- }
166
- exports.copyFilesToStorageItem = copyFilesToStorageItem;
167
- /**
168
- * Generates a folder and filename for storing a copy of an item's metadata in a storage item.
169
- *
170
- * @param itemId Id of item
171
- * @returns Folder and filename for storage; folder is the itemID suffixed with "_info_metadata"
172
- * @see convertStorageResourceToItemResource
173
- */
174
- function generateMetadataStorageFilename(itemId) {
175
- return {
176
- folder: itemId + "_info_metadata",
177
- filename: "metadata.xml",
178
- };
179
- }
180
- exports.generateMetadataStorageFilename = generateMetadataStorageFilename;
181
- /**
182
- * Generates a list of full URLs and storage folder/filename combinations for storing the resources, metadata,
183
- * and thumbnail of an item.
184
- *
185
- * @param portalSharingUrl Server/sharing
186
- * @param itemId Id of item
187
- * @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
188
- * @param resourceFilenames List of resource filenames for an item, e.g., ["file1", "myFolder/file2"]
189
- * @param isGroup Boolean to indicate if the files are associated with a group or item
190
- * @param storageVersion Version of the Solution template
191
- * @returns List of item files' URLs and folder/filenames for storing the files
192
- */
193
- function generateSourceFilePaths(portalSharingUrl, itemId, thumbnailUrlPart, resourceFilenames, isGroup = false, storageVersion = 0) {
194
- const filePaths = resourceFilenames.map((resourceFilename) => {
195
- return {
196
- itemId,
197
- url: generateSourceResourceUrl(portalSharingUrl, itemId, resourceFilename),
198
- ...(0, convert_item_resource_to_storage_resource_1.convertItemResourceToStorageResource)(itemId, resourceFilename, storageVersion),
199
- };
200
- });
201
- filePaths.push({
202
- itemId,
203
- url: generateSourceMetadataUrl(portalSharingUrl, itemId, isGroup),
204
- ...generateMetadataStorageFilename(itemId),
205
- });
206
- /* istanbul ignore else */
207
- if (thumbnailUrlPart) {
208
- filePaths.push(generateSourceThumbnailPath(portalSharingUrl, itemId, thumbnailUrlPart, isGroup));
209
- }
210
- return filePaths;
211
- }
212
- exports.generateSourceFilePaths = generateSourceFilePaths;
213
- /**
214
- * Generates the full URL and storage folder/filename for storing an item's thumbnail.
215
- *
216
- * @param portalSharingUrl Server/sharing
217
- * @param itemId Id of item
218
- * @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
219
- * @param isGroup Boolean to indicate if the files are associated with a group or item
220
- * @returns URL and folder/filename for storing the thumbnail
221
- */
222
- function generateSourceThumbnailPath(portalSharingUrl, itemId, thumbnailUrlPart, isGroup = false) {
223
- return {
224
- itemId,
225
- url: (0, generalHelpers_1.appendQueryParam)(generateSourceThumbnailUrl(portalSharingUrl, itemId, thumbnailUrlPart, isGroup), "w=400"),
226
- ...generateThumbnailStorageFilename(itemId, thumbnailUrlPart),
227
- };
228
- }
229
- exports.generateSourceThumbnailPath = generateSourceThumbnailPath;
230
- /**
231
- * Generates the URL for reading an item's metadata.
232
- *
233
- * @param sourcePortalSharingUrl Server/sharing
234
- * @param itemId Id of item
235
- * @param isGroup Boolean to indicate if the files are associated with a group or item
236
- * @returns URL string
237
- */
238
- function generateSourceMetadataUrl(sourcePortalSharingUrl, itemId, isGroup = false) {
239
- return ((0, generalHelpers_1.checkUrlPathTermination)(sourcePortalSharingUrl) +
240
- (isGroup ? "community/groups/" : "content/items/") +
241
- itemId +
242
- "/info/metadata/metadata.xml");
243
- }
244
- exports.generateSourceMetadataUrl = generateSourceMetadataUrl;
245
- /**
246
- * Generates the URL for reading an item's resource given the filename of the resource.
247
- *
248
- * @param sourcePortalSharingUrl Server/sharing
249
- * @param itemId Id of item
250
- * @param sourceResourceFilename Either filename or folder/filename to resource
251
- * @returns URL string
252
- */
253
- function generateSourceResourceUrl(sourcePortalSharingUrl, itemId, sourceResourceFilename) {
254
- return ((0, generalHelpers_1.checkUrlPathTermination)(sourcePortalSharingUrl) + "content/items/" + itemId + "/resources/" + sourceResourceFilename);
255
- }
256
- exports.generateSourceResourceUrl = generateSourceResourceUrl;
257
- /**
258
- * Generates the URL for reading an item's thumbnail.
259
- *
260
- * @param sourcePortalSharingUrl Server/sharing
261
- * @param itemId Id of item
262
- * @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
263
- * @param isGroup Boolean to indicate if the files are associated with a group or item
264
- * @returns URL string
265
- */
266
- function generateSourceThumbnailUrl(sourcePortalSharingUrl, itemId, thumbnailUrlPart, isGroup = false) {
267
- return ((0, generalHelpers_1.checkUrlPathTermination)(sourcePortalSharingUrl) +
268
- (isGroup ? "community/groups/" : "content/items/") +
269
- itemId +
270
- "/info/" +
271
- thumbnailUrlPart);
272
- }
273
- exports.generateSourceThumbnailUrl = generateSourceThumbnailUrl;
274
- /**
275
- * Generates a list of full URLs and folder/filename combinations used to store the resources, metadata,
276
- * and thumbnail of an item.
277
- *
278
- * @param portalSharingUrl Server/sharing
279
- * @param storageItemId Id of storage item
280
- * @param resourceFilenames List of resource filenames for an item, e.g., ["file1", "myFolder/file2"]
281
- * @param storageVersion Version of the Solution template
282
- * @returns List of item files' URLs and folder/filenames for storing the files
283
- */
284
- function generateStorageFilePaths(portalSharingUrl, storageItemId, resourceFilenames = [], storageVersion = 0) {
285
- return resourceFilenames.map((resourceFilename) => {
286
- return {
287
- url: generateSourceResourceUrl(portalSharingUrl, storageItemId, resourceFilename),
288
- ...(0, convert_storage_resource_to_item_resource_1.convertStorageResourceToItemResource)(resourceFilename, storageVersion),
289
- };
290
- });
291
- }
292
- exports.generateStorageFilePaths = generateStorageFilePaths;
293
- /**
294
- * Generates a folder and filename for storing a copy of an item's thumbnail in a storage item.
295
- *
296
- * @param itemId Id of item
297
- * @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON; can also be a filename
298
- * @returns Folder and filename for storage; folder is the itemID suffixed with "_info_thumbnail";
299
- * file is URI-encoded thumbnailUrlPart
300
- * @see convertStorageResourceToItemResource
301
- */
302
- function generateThumbnailStorageFilename(itemId, thumbnailurl) {
303
- const folder = itemId + "_info_thumbnail";
304
- const thumbnailUrlParts = thumbnailurl.split("/");
305
- const filename = thumbnailUrlParts.length === 1 ? thumbnailUrlParts[0] : thumbnailUrlParts[1];
306
- return { folder, filename };
307
- }
308
- exports.generateThumbnailStorageFilename = generateThumbnailStorageFilename;
309
- function isSupportedFileType(filename) {
310
- // Supported file formats are: .json, .xml, .txt, .png, .pbf, .zip, .jpeg, .jpg, .gif, .bmp, .gz, .svg,
311
- // .svgz, .geodatabase (https://developers.arcgis.com/rest/users-groups-and-items/add-resources.htm)
312
- const filenameExtension = filename.match(/\.([a-z]+)$/i);
313
- const supportedExtensions = "|.json|.xml|.txt|.png|.pbf|.zip|.jpeg|.jpg|.gif|.bmp|.gz|.svg|.svgz|.geodatabase|";
314
- return !!filenameExtension && supportedExtensions.indexOf("|" + filenameExtension[0] + "|") >= 0;
315
- }
316
- exports.isSupportedFileType = isSupportedFileType;
317
- /**
318
- * Gets the thumbnail of an item or group.
319
- *
320
- * @param authentication Credentials for the request to the storage
321
- * @param filePaths List of item files' URLs and folder/filenames for storing the files
322
- * @returns A promise which resolves to a boolean indicating if the copies were successful
323
- */
324
- function getThumbnailFromStorageItem(authentication, filePaths) {
325
- let thumbnailUrl;
326
- let thumbnailFilename;
327
- filePaths.forEach((path) => {
328
- if (path.type === interfaces_1.EFileType.Thumbnail) {
329
- thumbnailUrl = path.url;
330
- thumbnailFilename = path.filename;
331
- }
332
- });
333
- if (!thumbnailUrl) {
334
- return Promise.resolve(null);
335
- }
336
- return (0, restHelpersGet_1.getThumbnailFile)(thumbnailUrl, thumbnailFilename, authentication);
337
- }
338
- exports.getThumbnailFromStorageItem = getThumbnailFromStorageItem;
339
- /**
340
- * Removes the item's resource that matches the filename with new content
341
- *
342
- * @param itemId Id of the item to remove
343
- * @param filename Name of the resource file to remove
344
- * @param authentication Credentials for the request to the storage
345
- * @returns A promise which resolves with a success true/false response
346
- */
347
- function removeItemResourceFile(itemId, filename, authentication) {
348
- return (0, arcgisRestJS_1.removeItemResource)({
349
- id: itemId,
350
- resource: filename,
351
- authentication: authentication,
352
- });
353
- }
354
- exports.removeItemResourceFile = removeItemResourceFile;
355
- /**
356
- * Updates the item's resource that matches the filename with new content
357
- *
358
- * @param itemId Id of the item to update
359
- * @param filename Name of the resource file to update; prefix optional (e.g., a/b/file.txt)
360
- * @param resource The new content to update the resource with
361
- * @param authentication Credentials for the request to the storage
362
- * @returns A promise which resolves with a success true/false response
363
- */
364
- function updateItemResourceFile(itemId, filename, resource, authentication) {
365
- // Prefix has to be specified separately
366
- const prefixedFilenameParts = filename.split("/");
367
- const prefix = prefixedFilenameParts.length > 1
368
- ? prefixedFilenameParts.slice(0, prefixedFilenameParts.length - 1).join("/")
369
- : undefined;
370
- const suffix = prefixedFilenameParts[prefixedFilenameParts.length - 1];
371
- return (0, arcgisRestJS_1.updateItemResource)({
372
- id: itemId,
373
- prefix: prefix,
374
- name: suffix,
375
- resource,
376
- authentication: authentication,
377
- });
378
- }
379
- exports.updateItemResourceFile = updateItemResourceFile;
380
- //# sourceMappingURL=resourceHelpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resourceHelpers.js","sourceRoot":"","sources":["../../src/resourceHelpers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,6CAQsB;AACtB,iDASwB;AACxB,qDAA6E;AAC7E,qHAA6G;AAC7G,qHAA6G;AAC7G,qDAAoD;AACpD,yEAAkG;AAElG,wHA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AED;;;;;;;GAOG;AACH,SAAgB,sBAAsB,CACpC,MAAc,EACd,QAAgB,EAChB,cAA2B;IAE3B,OAAO,IAAA,iCAAkB,EAAC;QACxB,EAAE,EAAE,MAAM;QACV,QAAQ,EAAE,QAAQ;QAClB,cAAc,EAAE,cAAc;KACD,CAAC,CAAC;AACnC,CAAC;AAVD,wDAUC;AAED;;;;;;;;GAQG;AACH,SAAgB,sBAAsB,CACpC,MAAc,EACd,QAAgB,EAChB,QAAc,EACd,cAA2B;IAE3B,wCAAwC;IACxC,MAAM,qBAAqB,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,MAAM,GACV,qBAAqB,CAAC,MAAM,GAAG,CAAC;QAC9B,CAAC,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,EAAE,qBAAqB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC5E,CAAC,CAAC,SAAS,CAAC;IAChB,MAAM,MAAM,GAAG,qBAAqB,CAAC,qBAAqB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAEvE,OAAO,IAAA,iCAAkB,EAAC;QACxB,EAAE,EAAE,MAAM;QACV,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,MAAM;QACZ,QAAQ;QACR,cAAc,EAAE,cAAc;KACP,CAAC,CAAC;AAC7B,CAAC;AArBD,wDAqBC"}
@@ -1,38 +0,0 @@
1
- /** @license
2
- * Copyright 2018 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { UserSession } from "../arcgisRestJS";
17
- /**
18
- * Adds a blob resource.
19
- *
20
- * @param blob Blob containing the resource to add
21
- * @param itemId Id of the item to add the resource to
22
- * @param folder A prefix string added to the filename in the storage; use null or undefined for no folder
23
- * @param filename File name used to rename an existing file resource uploaded.
24
- * File name must have the file resource extension.
25
- * @param authentication Credentials for the request
26
- */
27
- export declare function addBlobResource(blob: any, itemId: string, folder: string, filename: string, authentication: UserSession): Promise<any>;
28
- /**
29
- * Adds a text resource.
30
- *
31
- * @param content Text to add as a resource
32
- * @param itemId Id of the item to add the resource to
33
- * @param folder A prefix string added to the filename in the storage; use null or undefined for no folder
34
- * @param filename File name used to rename an existing file resource uploaded, or to be used together with
35
- * text as file name for it. File name must have the file resource extension.
36
- * @param authentication Credentials for the request
37
- */
38
- export declare function addTextResource(content: string, itemId: string, folder: string, filename: string, authentication: UserSession): Promise<any>;