@esri/solution-common 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/dist/esm/featureServiceHelpers.js +20 -2
  2. package/dist/esm/featureServiceHelpers.js.map +1 -1
  3. package/dist/esm/resourceHelpers.d.ts +3 -2
  4. package/dist/esm/resourceHelpers.js +4 -3
  5. package/dist/esm/resourceHelpers.js.map +1 -1
  6. package/dist/esm/resources/copyAssociatedFiles.d.ts +17 -2
  7. package/dist/esm/resources/copyAssociatedFiles.js +106 -42
  8. package/dist/esm/resources/copyAssociatedFiles.js.map +1 -1
  9. package/dist/esm/resources/copyResourceIntoZip.js +8 -1
  10. package/dist/esm/resources/copyResourceIntoZip.js.map +1 -1
  11. package/dist/esm/resources/getItemResourcesPaths.js +9 -2
  12. package/dist/esm/resources/getItemResourcesPaths.js.map +1 -1
  13. package/package.json +3 -3
  14. package/dist/node/completeItem.d.ts +0 -29
  15. package/dist/node/completeItem.js +0 -82
  16. package/dist/node/completeItem.js.map +0 -1
  17. package/dist/node/create-hub-request-options.d.ts +0 -29
  18. package/dist/node/create-hub-request-options.js +0 -64
  19. package/dist/node/create-hub-request-options.js.map +0 -1
  20. package/dist/node/deleteHelpers/deleteEmptyGroups.d.ts +0 -24
  21. package/dist/node/deleteHelpers/deleteEmptyGroups.js +0 -42
  22. package/dist/node/deleteHelpers/deleteEmptyGroups.js.map +0 -1
  23. package/dist/node/deleteHelpers/deleteGroupIfEmpty.d.ts +0 -27
  24. package/dist/node/deleteHelpers/deleteGroupIfEmpty.js +0 -97
  25. package/dist/node/deleteHelpers/deleteGroupIfEmpty.js.map +0 -1
  26. package/dist/node/deleteHelpers/deleteSolutionContents.d.ts +0 -38
  27. package/dist/node/deleteHelpers/deleteSolutionContents.js +0 -130
  28. package/dist/node/deleteHelpers/deleteSolutionContents.js.map +0 -1
  29. package/dist/node/deleteHelpers/deleteSolutionFolder.d.ts +0 -29
  30. package/dist/node/deleteHelpers/deleteSolutionFolder.js +0 -79
  31. package/dist/node/deleteHelpers/deleteSolutionFolder.js.map +0 -1
  32. package/dist/node/deleteHelpers/deleteSolutionItem.d.ts +0 -30
  33. package/dist/node/deleteHelpers/deleteSolutionItem.js +0 -54
  34. package/dist/node/deleteHelpers/deleteSolutionItem.js.map +0 -1
  35. package/dist/node/deleteHelpers/index.d.ts +0 -22
  36. package/dist/node/deleteHelpers/index.js +0 -26
  37. package/dist/node/deleteHelpers/index.js.map +0 -1
  38. package/dist/node/deleteHelpers/reconstructBuildOrderIds.d.ts +0 -27
  39. package/dist/node/deleteHelpers/reconstructBuildOrderIds.js +0 -34
  40. package/dist/node/deleteHelpers/reconstructBuildOrderIds.js.map +0 -1
  41. package/dist/node/deleteHelpers/removeItems.d.ts +0 -34
  42. package/dist/node/deleteHelpers/removeItems.js +0 -112
  43. package/dist/node/deleteHelpers/removeItems.js.map +0 -1
  44. package/dist/node/deleteHelpers/reportProgress.d.ts +0 -27
  45. package/dist/node/deleteHelpers/reportProgress.js +0 -46
  46. package/dist/node/deleteHelpers/reportProgress.js.map +0 -1
  47. package/dist/node/deleteSolution.d.ts +0 -55
  48. package/dist/node/deleteSolution.js +0 -107
  49. package/dist/node/deleteSolution.js.map +0 -1
  50. package/dist/node/dependencies.d.ts +0 -26
  51. package/dist/node/dependencies.js +0 -171
  52. package/dist/node/dependencies.js.map +0 -1
  53. package/dist/node/featureServiceHelpers.d.ts +0 -791
  54. package/dist/node/featureServiceHelpers.js +0 -2403
  55. package/dist/node/featureServiceHelpers.js.map +0 -1
  56. package/dist/node/generalHelpers.d.ts +0 -372
  57. package/dist/node/generalHelpers.js +0 -842
  58. package/dist/node/generalHelpers.js.map +0 -1
  59. package/dist/node/get-subscription-info.d.ts +0 -27
  60. package/dist/node/get-subscription-info.js +0 -39
  61. package/dist/node/get-subscription-info.js.map +0 -1
  62. package/dist/node/getDeletableSolutionInfo.d.ts +0 -29
  63. package/dist/node/getDeletableSolutionInfo.js +0 -53
  64. package/dist/node/getDeletableSolutionInfo.js.map +0 -1
  65. package/dist/node/getItemTypeAbbrev.d.ts +0 -19
  66. package/dist/node/getItemTypeAbbrev.js +0 -184
  67. package/dist/node/getItemTypeAbbrev.js.map +0 -1
  68. package/dist/node/getSolutionSummary.d.ts +0 -27
  69. package/dist/node/getSolutionSummary.js +0 -101
  70. package/dist/node/getSolutionSummary.js.map +0 -1
  71. package/dist/node/index.d.ts +0 -44
  72. package/dist/node/index.js +0 -48
  73. package/dist/node/index.js.map +0 -1
  74. package/dist/node/interfaces.d.ts +0 -1321
  75. package/dist/node/interfaces.js +0 -75
  76. package/dist/node/interfaces.js.map +0 -1
  77. package/dist/node/libConnectors.d.ts +0 -73
  78. package/dist/node/libConnectors.js +0 -115
  79. package/dist/node/libConnectors.js.map +0 -1
  80. package/dist/node/migrations/apply-schema.d.ts +0 -24
  81. package/dist/node/migrations/apply-schema.js +0 -36
  82. package/dist/node/migrations/apply-schema.js.map +0 -1
  83. package/dist/node/migrations/is-legacy-solution.d.ts +0 -24
  84. package/dist/node/migrations/is-legacy-solution.js +0 -40
  85. package/dist/node/migrations/is-legacy-solution.js.map +0 -1
  86. package/dist/node/migrations/upgrade-three-dot-one.d.ts +0 -27
  87. package/dist/node/migrations/upgrade-three-dot-one.js +0 -49
  88. package/dist/node/migrations/upgrade-three-dot-one.js.map +0 -1
  89. package/dist/node/migrations/upgrade-three-dot-zero.d.ts +0 -27
  90. package/dist/node/migrations/upgrade-three-dot-zero.js +0 -43
  91. package/dist/node/migrations/upgrade-three-dot-zero.js.map +0 -1
  92. package/dist/node/migrations/upgrade-two-dot-five.d.ts +0 -24
  93. package/dist/node/migrations/upgrade-two-dot-five.js +0 -73
  94. package/dist/node/migrations/upgrade-two-dot-five.js.map +0 -1
  95. package/dist/node/migrations/upgrade-two-dot-four.d.ts +0 -24
  96. package/dist/node/migrations/upgrade-two-dot-four.js +0 -72
  97. package/dist/node/migrations/upgrade-two-dot-four.js.map +0 -1
  98. package/dist/node/migrations/upgrade-two-dot-one.d.ts +0 -7
  99. package/dist/node/migrations/upgrade-two-dot-one.js +0 -39
  100. package/dist/node/migrations/upgrade-two-dot-one.js.map +0 -1
  101. package/dist/node/migrations/upgrade-two-dot-seven.d.ts +0 -23
  102. package/dist/node/migrations/upgrade-two-dot-seven.js +0 -58
  103. package/dist/node/migrations/upgrade-two-dot-seven.js.map +0 -1
  104. package/dist/node/migrations/upgrade-two-dot-six.d.ts +0 -27
  105. package/dist/node/migrations/upgrade-two-dot-six.js +0 -61
  106. package/dist/node/migrations/upgrade-two-dot-six.js.map +0 -1
  107. package/dist/node/migrations/upgrade-two-dot-three.d.ts +0 -23
  108. package/dist/node/migrations/upgrade-two-dot-three.js +0 -55
  109. package/dist/node/migrations/upgrade-two-dot-three.js.map +0 -1
  110. package/dist/node/migrations/upgrade-two-dot-two.d.ts +0 -23
  111. package/dist/node/migrations/upgrade-two-dot-two.js +0 -58
  112. package/dist/node/migrations/upgrade-two-dot-two.js.map +0 -1
  113. package/dist/node/migrations/upgrade-two-dot-zero.d.ts +0 -44
  114. package/dist/node/migrations/upgrade-two-dot-zero.js +0 -95
  115. package/dist/node/migrations/upgrade-two-dot-zero.js.map +0 -1
  116. package/dist/node/migrator.d.ts +0 -25
  117. package/dist/node/migrator.js +0 -77
  118. package/dist/node/migrator.js.map +0 -1
  119. package/dist/node/polyfills.d.ts +0 -40
  120. package/dist/node/polyfills.js +0 -98
  121. package/dist/node/polyfills.js.map +0 -1
  122. package/dist/node/resourceHelpers.d.ts +0 -190
  123. package/dist/node/resourceHelpers.js +0 -390
  124. package/dist/node/resourceHelpers.js.map +0 -1
  125. package/dist/node/resources/add-resource-from-blob.d.ts +0 -26
  126. package/dist/node/resources/add-resource-from-blob.js +0 -52
  127. package/dist/node/resources/add-resource-from-blob.js.map +0 -1
  128. package/dist/node/resources/addMetadataFromBlob.d.ts +0 -25
  129. package/dist/node/resources/addMetadataFromBlob.js +0 -43
  130. package/dist/node/resources/addMetadataFromBlob.js.map +0 -1
  131. package/dist/node/resources/convert-item-resource-to-storage-resource.d.ts +0 -32
  132. package/dist/node/resources/convert-item-resource-to-storage-resource.js +0 -70
  133. package/dist/node/resources/convert-item-resource-to-storage-resource.js.map +0 -1
  134. package/dist/node/resources/convert-storage-resource-to-item-resource.d.ts +0 -29
  135. package/dist/node/resources/convert-storage-resource-to-item-resource.js +0 -70
  136. package/dist/node/resources/convert-storage-resource-to-item-resource.js.map +0 -1
  137. package/dist/node/resources/copyAssociatedFiles.d.ts +0 -52
  138. package/dist/node/resources/copyAssociatedFiles.js +0 -237
  139. package/dist/node/resources/copyAssociatedFiles.js.map +0 -1
  140. package/dist/node/resources/copyDataIntoItem.d.ts +0 -33
  141. package/dist/node/resources/copyDataIntoItem.js +0 -63
  142. package/dist/node/resources/copyDataIntoItem.js.map +0 -1
  143. package/dist/node/resources/copyMetadataIntoItem.d.ts +0 -26
  144. package/dist/node/resources/copyMetadataIntoItem.js +0 -46
  145. package/dist/node/resources/copyMetadataIntoItem.js.map +0 -1
  146. package/dist/node/resources/copyResourceIntoZip.d.ts +0 -33
  147. package/dist/node/resources/copyResourceIntoZip.js +0 -71
  148. package/dist/node/resources/copyResourceIntoZip.js.map +0 -1
  149. package/dist/node/resources/copyZipIntoItem.d.ts +0 -25
  150. package/dist/node/resources/copyZipIntoItem.js +0 -54
  151. package/dist/node/resources/copyZipIntoItem.js.map +0 -1
  152. package/dist/node/resources/createCopyResults.d.ts +0 -25
  153. package/dist/node/resources/createCopyResults.js +0 -36
  154. package/dist/node/resources/createCopyResults.js.map +0 -1
  155. package/dist/node/resources/get-blob.d.ts +0 -26
  156. package/dist/node/resources/get-blob.js +0 -27
  157. package/dist/node/resources/get-blob.js.map +0 -1
  158. package/dist/node/resources/getItemResourcesFilesFromPaths.d.ts +0 -24
  159. package/dist/node/resources/getItemResourcesFilesFromPaths.js +0 -49
  160. package/dist/node/resources/getItemResourcesFilesFromPaths.js.map +0 -1
  161. package/dist/node/resources/getItemResourcesPaths.d.ts +0 -26
  162. package/dist/node/resources/getItemResourcesPaths.js +0 -66
  163. package/dist/node/resources/getItemResourcesPaths.js.map +0 -1
  164. package/dist/node/resources/index.d.ts +0 -29
  165. package/dist/node/resources/index.js +0 -33
  166. package/dist/node/resources/index.js.map +0 -1
  167. package/dist/node/resources/solution-resource.d.ts +0 -35
  168. package/dist/node/resources/solution-resource.js +0 -31
  169. package/dist/node/resources/solution-resource.js.map +0 -1
  170. package/dist/node/resources/transform-resource-paths-to-solution-resources.d.ts +0 -56
  171. package/dist/node/resources/transform-resource-paths-to-solution-resources.js +0 -146
  172. package/dist/node/resources/transform-resource-paths-to-solution-resources.js.map +0 -1
  173. package/dist/node/restHelpers.d.ts +0 -585
  174. package/dist/node/restHelpers.js +0 -1887
  175. package/dist/node/restHelpers.js.map +0 -1
  176. package/dist/node/restHelpersGet.d.ts +0 -288
  177. package/dist/node/restHelpersGet.js +0 -804
  178. package/dist/node/restHelpersGet.js.map +0 -1
  179. package/dist/node/sharing/index.d.ts +0 -16
  180. package/dist/node/sharing/index.js +0 -20
  181. package/dist/node/sharing/index.js.map +0 -1
  182. package/dist/node/sharing/share-item-to-groups.d.ts +0 -26
  183. package/dist/node/sharing/share-item-to-groups.js +0 -44
  184. package/dist/node/sharing/share-item-to-groups.js.map +0 -1
  185. package/dist/node/templatization.d.ts +0 -139
  186. package/dist/node/templatization.js +0 -314
  187. package/dist/node/templatization.js.map +0 -1
  188. package/dist/node/trackingHelpers.d.ts +0 -116
  189. package/dist/node/trackingHelpers.js +0 -217
  190. package/dist/node/trackingHelpers.js.map +0 -1
  191. package/dist/node/velocityHelpers.d.ts +0 -57
  192. package/dist/node/velocityHelpers.js +0 -135
  193. package/dist/node/velocityHelpers.js.map +0 -1
  194. package/dist/node/workforceHelpers.d.ts +0 -115
  195. package/dist/node/workforceHelpers.js +0 -747
  196. package/dist/node/workforceHelpers.js.map +0 -1
  197. package/dist/umd/common.umd.js +0 -15471
  198. package/dist/umd/common.umd.js.map +0 -1
  199. package/dist/umd/common.umd.min.js +0 -19
  200. package/dist/umd/common.umd.min.js.map +0 -1
  201. package/dist/umd/src/completeItem.d.ts +0 -29
  202. package/dist/umd/src/create-hub-request-options.d.ts +0 -29
  203. package/dist/umd/src/deleteHelpers/deleteEmptyGroups.d.ts +0 -24
  204. package/dist/umd/src/deleteHelpers/deleteGroupIfEmpty.d.ts +0 -27
  205. package/dist/umd/src/deleteHelpers/deleteSolutionContents.d.ts +0 -38
  206. package/dist/umd/src/deleteHelpers/deleteSolutionFolder.d.ts +0 -29
  207. package/dist/umd/src/deleteHelpers/deleteSolutionItem.d.ts +0 -30
  208. package/dist/umd/src/deleteHelpers/index.d.ts +0 -22
  209. package/dist/umd/src/deleteHelpers/reconstructBuildOrderIds.d.ts +0 -27
  210. package/dist/umd/src/deleteHelpers/removeItems.d.ts +0 -34
  211. package/dist/umd/src/deleteHelpers/reportProgress.d.ts +0 -27
  212. package/dist/umd/src/deleteSolution.d.ts +0 -55
  213. package/dist/umd/src/dependencies.d.ts +0 -26
  214. package/dist/umd/src/featureServiceHelpers.d.ts +0 -791
  215. package/dist/umd/src/generalHelpers.d.ts +0 -372
  216. package/dist/umd/src/get-subscription-info.d.ts +0 -27
  217. package/dist/umd/src/getDeletableSolutionInfo.d.ts +0 -29
  218. package/dist/umd/src/getItemTypeAbbrev.d.ts +0 -19
  219. package/dist/umd/src/getSolutionSummary.d.ts +0 -27
  220. package/dist/umd/src/index.d.ts +0 -44
  221. package/dist/umd/src/interfaces.d.ts +0 -1321
  222. package/dist/umd/src/libConnectors.d.ts +0 -73
  223. package/dist/umd/src/migrations/apply-schema.d.ts +0 -24
  224. package/dist/umd/src/migrations/is-legacy-solution.d.ts +0 -24
  225. package/dist/umd/src/migrations/upgrade-three-dot-one.d.ts +0 -27
  226. package/dist/umd/src/migrations/upgrade-three-dot-zero.d.ts +0 -27
  227. package/dist/umd/src/migrations/upgrade-two-dot-five.d.ts +0 -24
  228. package/dist/umd/src/migrations/upgrade-two-dot-four.d.ts +0 -24
  229. package/dist/umd/src/migrations/upgrade-two-dot-one.d.ts +0 -7
  230. package/dist/umd/src/migrations/upgrade-two-dot-seven.d.ts +0 -23
  231. package/dist/umd/src/migrations/upgrade-two-dot-six.d.ts +0 -27
  232. package/dist/umd/src/migrations/upgrade-two-dot-three.d.ts +0 -23
  233. package/dist/umd/src/migrations/upgrade-two-dot-two.d.ts +0 -23
  234. package/dist/umd/src/migrations/upgrade-two-dot-zero.d.ts +0 -44
  235. package/dist/umd/src/migrator.d.ts +0 -25
  236. package/dist/umd/src/polyfills.d.ts +0 -40
  237. package/dist/umd/src/resourceHelpers.d.ts +0 -190
  238. package/dist/umd/src/resources/add-resource-from-blob.d.ts +0 -26
  239. package/dist/umd/src/resources/addMetadataFromBlob.d.ts +0 -25
  240. package/dist/umd/src/resources/convert-item-resource-to-storage-resource.d.ts +0 -32
  241. package/dist/umd/src/resources/convert-storage-resource-to-item-resource.d.ts +0 -29
  242. package/dist/umd/src/resources/copyAssociatedFiles.d.ts +0 -52
  243. package/dist/umd/src/resources/copyDataIntoItem.d.ts +0 -33
  244. package/dist/umd/src/resources/copyMetadataIntoItem.d.ts +0 -26
  245. package/dist/umd/src/resources/copyResourceIntoZip.d.ts +0 -33
  246. package/dist/umd/src/resources/copyZipIntoItem.d.ts +0 -25
  247. package/dist/umd/src/resources/createCopyResults.d.ts +0 -25
  248. package/dist/umd/src/resources/get-blob.d.ts +0 -26
  249. package/dist/umd/src/resources/getItemResourcesFilesFromPaths.d.ts +0 -24
  250. package/dist/umd/src/resources/getItemResourcesPaths.d.ts +0 -26
  251. package/dist/umd/src/resources/index.d.ts +0 -29
  252. package/dist/umd/src/resources/solution-resource.d.ts +0 -35
  253. package/dist/umd/src/resources/transform-resource-paths-to-solution-resources.d.ts +0 -56
  254. package/dist/umd/src/restHelpers.d.ts +0 -585
  255. package/dist/umd/src/restHelpersGet.d.ts +0 -288
  256. package/dist/umd/src/sharing/index.d.ts +0 -16
  257. package/dist/umd/src/sharing/share-item-to-groups.d.ts +0 -26
  258. package/dist/umd/src/templatization.d.ts +0 -139
  259. package/dist/umd/src/trackingHelpers.d.ts +0 -116
  260. package/dist/umd/src/velocityHelpers.d.ts +0 -57
  261. package/dist/umd/src/workforceHelpers.d.ts +0 -115
@@ -1 +0,0 @@
1
- {"version":3,"file":"convert-item-resource-to-storage-resource.js","sourceRoot":"","sources":["../../../src/resources/convert-item-resource-to-storage-resource.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2DAA2D;AAE3D;;;;;;;;;;;GAWG;AACH,SAAgB,oCAAoC,CAClD,MAAc,EACd,sBAA8B,EAC9B,cAAc,GAAG,CAAC,EAClB,eAAsC;IAKtC,0BAA0B;IAC1B,IAAI,eAAe,KAAK,SAAS,EAAE;QACjC,QAAQ,eAAe,EAAE;YACvB,KAAK,wCAAoB,CAAC,IAAI;gBAC5B,MAAM,GAAG,GAAG,MAAM,YAAY,CAAC;gBAC/B,MAAM;YACR,KAAK,wCAAoB,CAAC,OAAO;gBAC/B,MAAM,GAAG,GAAG,MAAM,aAAa,CAAC;gBAChC,MAAM;YACR,KAAK,wCAAoB,CAAC,IAAI;gBAC5B,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC;gBAC1B,MAAM;YACR,KAAK,wCAAoB,CAAC,QAAQ;gBAChC,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC;gBACnC,MAAM;YACR,KAAK,wCAAoB,CAAC,SAAS;gBACjC,MAAM,GAAG,GAAG,MAAM,iBAAiB,CAAC;gBACpC,MAAM;SACT;KACF;IAED,IAAI,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,QAAQ,GAAG,sBAAsB,CAAC;IACtC,MAAM,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC7C,IAAI,UAAU,IAAI,CAAC,EAAE;QACnB,IAAI,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;QAC7C,IAAI,cAAc,KAAK,CAAC,EAAE;YACxB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YACpC,MAAM,IAAI,GAAG,GAAG,OAAO,CAAC;SACzB;aAAM;YACL,MAAM,IAAI,GAAG,GAAG,OAAO,CAAC;SACzB;QACD,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;KAC5C;IAED,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAC9B,CAAC;AA7CD,oFA6CC"}
@@ -1,29 +0,0 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { IDeployFilename } from "../interfaces";
17
- /**
18
- * Extracts an item's resource folder and filename from the filename used to store a copy in a storage item.
19
- *
20
- * @param storageResourceFilename Filename used to store the resource, metadata, or thumbnail of an item
21
- * @param storageVersion Version of the Solution template
22
- * @returns Folder and filename for storing information in an item, as well as the type (resource, metadata,
23
- * or thumbnail) of the information; the folder property is only meaningful for the resource type
24
- * @see generateResourceStorageFilename
25
- * @see generateMetadataStorageFilename
26
- * @see generateThumbnailStorageFilename
27
- * @see convertItemResourceToStorageResource
28
- */
29
- export declare function convertStorageResourceToItemResource(storageResourceFilename: string, storageVersion?: number): IDeployFilename;
@@ -1,70 +0,0 @@
1
- "use strict";
2
- /** @license
3
- * Copyright 2020 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.convertStorageResourceToItemResource = void 0;
19
- const interfaces_1 = require("../interfaces");
20
- /**
21
- * Extracts an item's resource folder and filename from the filename used to store a copy in a storage item.
22
- *
23
- * @param storageResourceFilename Filename used to store the resource, metadata, or thumbnail of an item
24
- * @param storageVersion Version of the Solution template
25
- * @returns Folder and filename for storing information in an item, as well as the type (resource, metadata,
26
- * or thumbnail) of the information; the folder property is only meaningful for the resource type
27
- * @see generateResourceStorageFilename
28
- * @see generateMetadataStorageFilename
29
- * @see generateThumbnailStorageFilename
30
- * @see convertItemResourceToStorageResource
31
- */
32
- function convertStorageResourceToItemResource(storageResourceFilename, storageVersion = 0) {
33
- const nameParts = storageResourceFilename.split("/");
34
- let filename = nameParts.pop();
35
- let folder = "";
36
- const firstPrefixPart = nameParts.shift(); // undefined if there's no folder
37
- // Handle special "folders"
38
- let type = interfaces_1.EFileType.Resource;
39
- if (firstPrefixPart) {
40
- if (firstPrefixPart.endsWith("_info_thumbnail")) {
41
- type = interfaces_1.EFileType.Thumbnail;
42
- }
43
- else if (firstPrefixPart.endsWith("_info_metadata")) {
44
- type = interfaces_1.EFileType.Metadata;
45
- filename = "metadata.xml";
46
- }
47
- else if (firstPrefixPart.endsWith("_info_data")) {
48
- type = interfaces_1.EFileType.Data;
49
- }
50
- else if (firstPrefixPart.endsWith("_info_dataz")) {
51
- filename = filename.replace(/\.zip$/, "");
52
- type = interfaces_1.EFileType.Data;
53
- // Otherwise, strip off item id
54
- }
55
- else if (storageVersion < 1) {
56
- // Version 0
57
- const folderStart = firstPrefixPart.indexOf("_");
58
- if (folderStart > 0) {
59
- folder = firstPrefixPart.substr(folderStart + 1);
60
- }
61
- }
62
- else {
63
- // Version ≥ 1
64
- folder = nameParts.join("/"); // folder is optional, in which case this will be ""
65
- }
66
- }
67
- return { type, folder, filename };
68
- }
69
- exports.convertStorageResourceToItemResource = convertStorageResourceToItemResource;
70
- //# sourceMappingURL=convert-storage-resource-to-item-resource.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"convert-storage-resource-to-item-resource.js","sourceRoot":"","sources":["../../../src/resources/convert-storage-resource-to-item-resource.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,8CAA2D;AAE3D;;;;;;;;;;;GAWG;AACH,SAAgB,oCAAoC,CAClD,uBAA+B,EAC/B,cAAc,GAAG,CAAC;IAElB,MAAM,SAAS,GAAG,uBAAuB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrD,IAAI,QAAQ,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;IAC/B,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,eAAe,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,iCAAiC;IAE5E,2BAA2B;IAC3B,IAAI,IAAI,GAAG,sBAAS,CAAC,QAAQ,CAAC;IAC9B,IAAI,eAAe,EAAE;QACnB,IAAI,eAAe,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE;YAC/C,IAAI,GAAG,sBAAS,CAAC,SAAS,CAAC;SAC5B;aAAM,IAAI,eAAe,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE;YACrD,IAAI,GAAG,sBAAS,CAAC,QAAQ,CAAC;YAC1B,QAAQ,GAAG,cAAc,CAAC;SAC3B;aAAM,IAAI,eAAe,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE;YACjD,IAAI,GAAG,sBAAS,CAAC,IAAI,CAAC;SACvB;aAAM,IAAI,eAAe,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE;YAClD,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YAC1C,IAAI,GAAG,sBAAS,CAAC,IAAI,CAAC;YAEtB,+BAA+B;SAChC;aAAM,IAAI,cAAc,GAAG,CAAC,EAAE;YAC7B,YAAY;YACZ,MAAM,WAAW,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;YACjD,IAAI,WAAW,GAAG,CAAC,EAAE;gBACnB,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;aAClD;SACF;aAAM;YACL,cAAc;YACd,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,oDAAoD;SACnF;KACF;IAED,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AACpC,CAAC;AArCD,oFAqCC"}
@@ -1,52 +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
- /**
17
- * Provides functions for sending resources to AGO.
18
- */
19
- import { IAssociatedFileCopyResults, IAssociatedFileInfo, ISourceFile, IZipInfo, UserSession } from "../interfaces";
20
- /**
21
- * Copies the files for storing the resources, metadata, and thumbnail of an item or group to a storage item
22
- * with a specified path by collecting files into zip files.
23
- *
24
- * @param files List of item files' URLs and folder/filenames for storing the files
25
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
26
- * @param destinationAuthentication Credentials for the request to the storage
27
- * @param filesPerZip Number of files to include per zip file; AGO limits zips to 50 files
28
- * @returns A promise which resolves to a list of the result of the copies
29
- */
30
- export declare function copyFilesAsResources(files: ISourceFile[], destinationItemId: string, destinationAuthentication: UserSession, filesPerZip?: number): Promise<IAssociatedFileCopyResults[]>;
31
- /**
32
- * Copies the files described by a list of full URLs and storage folder/filename combinations for storing
33
- * the resources, metadata, and thumbnail of an item or group to a storage item with different
34
- * handling based on the type of file.
35
- *
36
- * @param fileInfos List of item files' URLs and folder/filenames for storing the files
37
- * @param sourceAuthentication Credentials for the request to the source
38
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
39
- * @param destinationAuthentication Credentials for the request to the storage
40
- * @returns A promise which resolves to a list of the result of the copies
41
- */
42
- export declare function copyAssociatedFilesByType(fileInfos: IAssociatedFileInfo[], sourceAuthentication: UserSession, destinationItemId: string, destinationAuthentication: UserSession): Promise<IAssociatedFileCopyResults[]>;
43
- /**
44
- * Copies one or more zipfiles to a storage item.
45
- *
46
- * @param zipInfos List of zip files containing files to store
47
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
48
- * @param destinationAuthentication Credentials for the request to the storage
49
- * @returns A promise which resolves to a list of the result of the copies
50
- * @private
51
- */
52
- export declare function _copyAssociatedFileZips(zipInfos: IZipInfo[], destinationItemId: string, destinationAuthentication: UserSession): Promise<IAssociatedFileCopyResults[]>;
@@ -1,237 +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._copyAssociatedFileZips = exports.copyAssociatedFilesByType = exports.copyFilesAsResources = void 0;
19
- const tslib_1 = require("tslib");
20
- /**
21
- * Provides functions for sending resources to AGO.
22
- */
23
- const interfaces_1 = require("../interfaces");
24
- const hub_common_1 = require("@esri/hub-common");
25
- const copyDataIntoItem_1 = require("./copyDataIntoItem");
26
- const copyMetadataIntoItem_1 = require("./copyMetadataIntoItem");
27
- const copyResourceIntoZip_1 = require("./copyResourceIntoZip");
28
- const copyZipIntoItem_1 = require("./copyZipIntoItem");
29
- const createCopyResults_1 = require("./createCopyResults");
30
- const jszip_1 = tslib_1.__importDefault(require("jszip"));
31
- // ------------------------------------------------------------------------------------------------------------------ //
32
- /**
33
- * Copies the files for storing the resources, metadata, and thumbnail of an item or group to a storage item
34
- * with a specified path by collecting files into zip files.
35
- *
36
- * @param files List of item files' URLs and folder/filenames for storing the files
37
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
38
- * @param destinationAuthentication Credentials for the request to the storage
39
- * @param filesPerZip Number of files to include per zip file; AGO limits zips to 50 files
40
- * @returns A promise which resolves to a list of the result of the copies
41
- */
42
- function copyFilesAsResources(files, destinationItemId, destinationAuthentication, filesPerZip = 40) {
43
- return new Promise(resolve => {
44
- let awaitAllItems = [];
45
- const zipInfos = [];
46
- if (files.length > 0) {
47
- // Bundle the resources into chunked zip updates because AGO tends to have problems with
48
- // many updates in a row to the same item: it claims success despite randomly failing.
49
- // Note that AGO imposes a limit of 50 files per zip, so we break the list of resource
50
- // file info into chunks below this threshold and start a zip for each
51
- // https://developers.arcgis.com/rest/users-groups-and-items/add-resources.htm
52
- const chunkedResourceFiles = (0, hub_common_1.chunkArray)(files, filesPerZip);
53
- chunkedResourceFiles.forEach((chunk, index) => {
54
- // Create a zip for this chunk
55
- const zipInfo = {
56
- filename: `resources${index}.zip`,
57
- zip: new jszip_1.default(),
58
- filelist: []
59
- };
60
- awaitAllItems = awaitAllItems.concat(chunk.map(file => (0, copyResourceIntoZip_1.copyResourceIntoZip)(file, zipInfo)));
61
- zipInfos.push(zipInfo);
62
- });
63
- }
64
- if (awaitAllItems.length > 0) {
65
- // Wait until the Resource zip file(s) are prepared
66
- void Promise.all(awaitAllItems).then((results) => {
67
- // We have three types of results:
68
- // | fetchedFromSource | copiedToDestination | interpretation | |
69
- // +-------------------+---------------------+------------------------------------------------+
70
- // | false | * | could not fetch file from source |
71
- // | true | true | file has been fetched and sent to AGO |
72
- // | true | undefined | file has been fetched and will be sent via zip |
73
- // Filter out copiedToDestination===undefined; we'll get their status when we send their zip
74
- results = results.filter((result) => !(result.fetchedFromSource &&
75
- typeof result.copiedToDestination === "undefined"));
76
- // Now send the resources to AGO
77
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
78
- _copyAssociatedFileZips(zipInfos, destinationItemId, destinationAuthentication).then((zipResults) => {
79
- resolve(results.concat(zipResults));
80
- });
81
- });
82
- }
83
- else {
84
- // No data, metadata, or resources to send; we're done
85
- resolve([]);
86
- }
87
- });
88
- }
89
- exports.copyFilesAsResources = copyFilesAsResources;
90
- /**
91
- * Copies the files described by a list of full URLs and storage folder/filename combinations for storing
92
- * the resources, metadata, and thumbnail of an item or group to a storage item with different
93
- * handling based on the type of file.
94
- *
95
- * @param fileInfos List of item files' URLs and folder/filenames for storing the files
96
- * @param sourceAuthentication Credentials for the request to the source
97
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
98
- * @param destinationAuthentication Credentials for the request to the storage
99
- * @returns A promise which resolves to a list of the result of the copies
100
- */
101
- function copyAssociatedFilesByType(fileInfos, sourceAuthentication, destinationItemId, destinationAuthentication) {
102
- return new Promise(resolve => {
103
- let awaitAllItems = [];
104
- let resourceFileInfos = fileInfos;
105
- awaitAllItems = fileInfos
106
- .filter(fileInfo => fileInfo.type === interfaces_1.EFileType.Data ||
107
- fileInfo.type === interfaces_1.EFileType.Metadata)
108
- .map(fileInfo => {
109
- // Handle Data and Metadata first
110
- switch (fileInfo.type) {
111
- case interfaces_1.EFileType.Data:
112
- // We are updating an item with a zip file, which is written to AGO. If the updated
113
- // item is in a folder, the zip file is moved to the item's folder after being written.
114
- // Without the folder information in the URL, AGO writes the zip to the root folder,
115
- // which causes a conflict if an item with the same data is already in that root folder.
116
- return (0, copyDataIntoItem_1.copyDataIntoItem)(fileInfo, sourceAuthentication, destinationItemId, destinationAuthentication);
117
- case interfaces_1.EFileType.Metadata:
118
- return (0, copyMetadataIntoItem_1.copyMetadataIntoItem)(fileInfo, sourceAuthentication, destinationItemId, destinationAuthentication);
119
- }
120
- });
121
- // Now add in the Resources
122
- resourceFileInfos = fileInfos.filter(fileInfo => fileInfo.type === interfaces_1.EFileType.Info || fileInfo.type === interfaces_1.EFileType.Resource);
123
- const zipInfos = [];
124
- if (resourceFileInfos.length > 0) {
125
- // Bundle the resources into chunked zip updates because AGO tends to have problems with
126
- // many updates in a row to the same item: it claims success despite randomly failing.
127
- // Note that AGO imposes a limit of 50 files per zip, so we break the list of resource
128
- // file info into chunks below this threshold and start a zip for each
129
- // https://developers.arcgis.com/rest/users-groups-and-items/add-resources.htm
130
- const chunkedResourceFileInfo = (0, hub_common_1.chunkArray)(resourceFileInfos, 40); // leave a bit of room below threshold
131
- chunkedResourceFileInfo.forEach((chunk, index) => {
132
- // Create a zip for this chunk
133
- const zipInfo = {
134
- filename: `resources${index}.zip`,
135
- zip: new jszip_1.default(),
136
- filelist: []
137
- };
138
- awaitAllItems = awaitAllItems.concat(chunk.map(fileInfo => {
139
- return (0, copyResourceIntoZip_1.copyResourceIntoZipFromInfo)(fileInfo, sourceAuthentication, zipInfo);
140
- }));
141
- zipInfos.push(zipInfo);
142
- });
143
- }
144
- if (awaitAllItems.length > 0) {
145
- // Wait until all Data and Metadata files have been copied and the Resource zip file(s) prepared
146
- void Promise.all(awaitAllItems).then((results) => {
147
- // We have three types of results:
148
- // | fetchedFromSource | copiedToDestination | interpretation | |
149
- // +-------------------+---------------------+------------------------------------------------+
150
- // | false | * | could not fetch file from source |
151
- // | true | true | file has been fetched and sent to AGO |
152
- // | true | undefined | file has been fetched and will be sent via zip |
153
- // Filter out copiedToDestination===undefined; we'll get their status when we send their zip
154
- results = results.filter((result) => !(result.fetchedFromSource &&
155
- typeof result.copiedToDestination === "undefined"));
156
- // Now send the resources to AGO
157
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
158
- _copyAssociatedFileZips(zipInfos, destinationItemId, destinationAuthentication).then((zipResults) => {
159
- resolve(results.concat(zipResults));
160
- });
161
- });
162
- }
163
- else {
164
- // No data, metadata, or resources to send; we're done
165
- resolve([]);
166
- }
167
- });
168
- }
169
- exports.copyAssociatedFilesByType = copyAssociatedFilesByType;
170
- /**
171
- * Copies one or more zipfiles to a storage item.
172
- *
173
- * @param zipInfos List of zip files containing files to store
174
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
175
- * @param destinationAuthentication Credentials for the request to the storage
176
- * @returns A promise which resolves to a list of the result of the copies
177
- * @private
178
- */
179
- function _copyAssociatedFileZips(zipInfos, destinationItemId, destinationAuthentication) {
180
- return new Promise(resolve => {
181
- const results = [];
182
- // Filter out empty zips, which can happen when none of the files in the chunk going into a zip
183
- // can be fetched; e.g., the only file is metadata.xml, and the source item doesn't have metadata
184
- const nonEmptyZipInfos = zipInfos.filter((zipInfo) => Object.keys(zipInfo.zip.files).length > 0);
185
- if (nonEmptyZipInfos.length > 0) {
186
- // Send the zip(s) to AGO
187
- void _sendZipsSeriallyToItem(nonEmptyZipInfos, destinationItemId, destinationAuthentication).then((zipResults) => {
188
- resolve(zipResults);
189
- });
190
- }
191
- else {
192
- // No resources to send; we're done
193
- resolve(results);
194
- }
195
- });
196
- }
197
- exports._copyAssociatedFileZips = _copyAssociatedFileZips;
198
- /**
199
- * Copies one or more zipfiles to a storage item in a serial fashion, waiting a bit between sends.
200
- *
201
- * @param zipInfos List of zip files containing files to store
202
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
203
- * @param destinationAuthentication Credentials for the request to the storage
204
- * @returns A promise which resolves to a list of the result of the copies
205
- */
206
- function _sendZipsSeriallyToItem(zipInfos, destinationItemId, destinationAuthentication) {
207
- return new Promise(resolve => {
208
- let allResults = [];
209
- // Remove zip from bottom of list
210
- const zipInfoToSend = zipInfos.pop();
211
- // Send predecessors in list
212
- let sendOthersPromise = Promise.resolve([]);
213
- if (zipInfos.length > 0) {
214
- sendOthersPromise = _sendZipsSeriallyToItem(zipInfos, destinationItemId, destinationAuthentication);
215
- }
216
- void sendOthersPromise
217
- .then((response) => {
218
- allResults = response;
219
- // Stall a little to give AGO time to catch up
220
- return new Promise(resolveSleep => {
221
- setTimeout(() => resolveSleep(), 1000);
222
- });
223
- })
224
- .then(() => {
225
- // Now send the zip removed from bottom of the input list
226
- return (0, copyZipIntoItem_1.copyZipIntoItem)(zipInfoToSend, destinationItemId, destinationAuthentication);
227
- })
228
- .then((zipResult) => {
229
- // Save the result of copying this zip as a status for each of the files that it contains
230
- zipResult.filelist.forEach((fileInfo) => {
231
- allResults.push((0, createCopyResults_1.createCopyResults)(fileInfo, true, zipResult.copiedToDestination));
232
- });
233
- resolve(allResults);
234
- });
235
- });
236
- }
237
- //# sourceMappingURL=copyAssociatedFiles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copyAssociatedFiles.js","sourceRoot":"","sources":["../../../src/resources/copyAssociatedFiles.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH;;GAEG;AAEH,8CAQuB;AACvB,iDAA8C;AAC9C,yDAAsD;AACtD,iEAA8D;AAC9D,+DAG+B;AAC/B,uDAAoD;AACpD,2DAAwD;AACxD,0DAA0B;AAE1B,wHAAwH;AAExH;;;;;;;;;GASG;AACH,SAAgB,oBAAoB,CAClC,KAAoB,EACpB,iBAAyB,EACzB,yBAAsC,EACtC,WAAW,GAAG,EAAE;IAEhB,OAAO,IAAI,OAAO,CAA+B,OAAO,CAAC,EAAE;QACzD,IAAI,aAAa,GAAiC,EAAE,CAAC;QAErD,MAAM,QAAQ,GAAe,EAAE,CAAC;QAChC,IAAI,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GAAiC,EAAE,CAAC;QAElD,iCAAiC;QACjC,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC;QAErC,4BAA4B;QAC5B,IAAI,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,EAAkC,CAAC,CAAC;QAC5E,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,iBAAiB,GAAG,uBAAuB,CACzC,QAAQ,EACR,iBAAiB,EACjB,yBAAyB,CAC1B,CAAC;SACH;QACD,KAAK,iBAAiB;aACnB,IAAI,CAAC,CAAC,QAAsC,EAAE,EAAE;YAC/C,UAAU,GAAG,QAAQ,CAAC;YAEtB,8CAA8C;YAC9C,OAAO,IAAI,OAAO,CAAO,YAAY,CAAC,EAAE;gBACtC,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,EACpB,aAAa,EACb,iBAAiB,EACjB,yBAAyB,CAC1B,CAAC;QACJ,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,EACf,QAAQ,EACR,IAAI,EACJ,SAAS,CAAC,mBAAmB,CACA,CAChC,CAAC;YACJ,CAAC,CAAC,CAAC;YAEH,OAAO,CAAC,UAAU,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,33 +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 { IAssociatedFileCopyResults, IAssociatedFileInfo, IFileMimeTyped, UserSession } from "../interfaces";
17
- /**
18
- * Copies data into an AGO item.
19
- *
20
- * @param fileInfo Information about the source and destination of the file such as its URL, folder, filename
21
- * @param sourceAuthentication Credentials for the request to the source
22
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
23
- * @param destinationAuthentication Credentials for the request to the storage
24
- * @returns A promise which resolves to the result of the copy
25
- */
26
- export declare function copyDataIntoItem(fileInfo: IAssociatedFileInfo, sourceAuthentication: UserSession, destinationItemId: string, destinationAuthentication: UserSession): Promise<IAssociatedFileCopyResults>;
27
- /**
28
- * Creates a file with a specified mime type.
29
- *
30
- * @param fileDescription Structure containing a file and the desired mime type
31
- * @returns Created file
32
- */
33
- export declare function createMimeTypedFile(fileDescription: IFileMimeTyped): File;
@@ -1,63 +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.createMimeTypedFile = exports.copyDataIntoItem = void 0;
19
- const createCopyResults_1 = require("./createCopyResults");
20
- const get_blob_1 = require("./get-blob");
21
- const polyfills_1 = require("../polyfills");
22
- const restHelpers_1 = require("../restHelpers");
23
- // ------------------------------------------------------------------------------------------------------------------ //
24
- /**
25
- * Copies data into an AGO item.
26
- *
27
- * @param fileInfo Information about the source and destination of the file such as its URL, folder, filename
28
- * @param sourceAuthentication Credentials for the request to the source
29
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
30
- * @param destinationAuthentication Credentials for the request to the storage
31
- * @returns A promise which resolves to the result of the copy
32
- */
33
- function copyDataIntoItem(fileInfo, sourceAuthentication, destinationItemId, destinationAuthentication) {
34
- return new Promise(resolve => {
35
- (0, get_blob_1.getBlob)(fileInfo.url, sourceAuthentication).then(blob => {
36
- const update = {
37
- id: destinationItemId,
38
- data: createMimeTypedFile({
39
- blob: blob,
40
- filename: fileInfo.filename,
41
- mimeType: fileInfo.mimeType || blob.type
42
- })
43
- };
44
- (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)) // unable to add resource
45
- );
46
- }, () => resolve((0, createCopyResults_1.createCopyResults)(fileInfo, false)) // unable to get resource
47
- );
48
- });
49
- }
50
- exports.copyDataIntoItem = copyDataIntoItem;
51
- /**
52
- * Creates a file with a specified mime type.
53
- *
54
- * @param fileDescription Structure containing a file and the desired mime type
55
- * @returns Created file
56
- */
57
- function createMimeTypedFile(fileDescription) {
58
- return (0, polyfills_1.new_File)([fileDescription.blob], fileDescription.filename, {
59
- type: fileDescription.mimeType
60
- });
61
- }
62
- exports.createMimeTypedFile = createMimeTypedFile;
63
- //# sourceMappingURL=copyDataIntoItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copyDataIntoItem.js","sourceRoot":"","sources":["../../../src/resources/copyDataIntoItem.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AASH,2DAAwD;AACxD,yCAAqC;AACrC,4CAAwC;AACxC,gDAAiE;AAEjE,wHAAwH;AAExH;;;;;;;;GAQG;AACH,SAAgB,g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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 { IAssociatedFileCopyResults, IAssociatedFileInfo, UserSession } from "../interfaces";
17
- /**
18
- * Copies metadata into an AGO item.
19
- *
20
- * @param fileInfo Information about the source and destination of the file such as its URL, folder, filename
21
- * @param sourceAuthentication Credentials for the request to the source
22
- * @param destinationItemId Id of item to receive copy of resource/metadata/thumbnail
23
- * @param destinationAuthentication Credentials for the request to the storage
24
- * @returns A promise which resolves to the result of the copy
25
- */
26
- export declare function copyMetadataIntoItem(fileInfo: IAssociatedFileInfo, sourceAuthentication: UserSession, destinationItemId: string, destinationAuthentication: UserSession): Promise<IAssociatedFileCopyResults>;
@@ -1,46 +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)) // unable to add resource
40
- );
41
- }, () => resolve((0, createCopyResults_1.createCopyResults)(fileInfo, false)) // unable to get resource
42
- );
43
- });
44
- }
45
- exports.copyMetadataIntoItem = copyMetadataIntoItem;
46
- //# sourceMappingURL=copyMetadataIntoItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copyMetadataIntoItem.js","sourceRoot":"","sources":["../../../src/resources/copyMetadataIntoItem.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAOH,+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,OAAO,CAAC,EAAE;QACvD,IAAA,kBAAO,EAAC,QAAQ,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC,IAAI,CAC9C,IAAI,CAAC,EAAE;YACL,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,iBAAiB,EAAE;gBAC/D,OAAO,CACL,IAAA,qCAAiB,EAAC,QAAQ,EAAE,KAAK,CAA+B,CACjE,CAAC,CAAC,yBAAyB;gBAC5B,OAAO;aACR;YACD,IAAA,yCAAmB,EACjB,IAAI,EACJ,iBAAiB,EACjB,yBAAyB,CAC1B,CAAC,IAAI,CACJ,GAAG,EAAE,CACH,OAAO,CACL,IAAA,qCAAiB,EACf,QAAQ,EACR,IAAI,EACJ,IAAI,CACyB,CAChC,EACH,GAAG,EAAE,CACH,OAAO,CACL,IAAA,qCAAiB,EACf,QAAQ,EACR,IAAI,EACJ,KAAK,CACwB,CAChC,CAAC,yBAAyB;aAC9B,CAAC;QACJ,CAAC,EACD,GAAG,EAAE,CACH,OAAO,CACL,IAAA,qCAAiB,EAAC,QAAQ,EAAE,KAAK,CAA+B,CACjE,CAAC,yBAAyB;SAC9B,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA5CD,oDA4CC"}
@@ -1,33 +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 { IAssociatedFileCopyResults, IAssociatedFileInfo, ISourceFile, IZipInfo, UserSession } from "../interfaces";
17
- /**
18
- * Copies a resource into a zipfile.
19
- *
20
- * @param file Information about the source and destination of the file such as its URL, folder, filename
21
- * @param zipInfo Information about a zipfile such as its name and its zip object
22
- * @returns The result of the copy
23
- */
24
- export declare function copyResourceIntoZip(file: ISourceFile, zipInfo: IZipInfo): IAssociatedFileCopyResults;
25
- /**
26
- * Copies a resource into a zipfile.
27
- *
28
- * @param fileInfo Information about the source and destination of the file such as its URL, folder, filename
29
- * @param sourceAuthentication Credentials for the request to the source
30
- * @param zipInfo Information about a zipfile such as its name and its zip object
31
- * @returns A promise which resolves to the result of the copy
32
- */
33
- export declare function copyResourceIntoZipFromInfo(fileInfo: IAssociatedFileInfo, sourceAuthentication: UserSession, zipInfo: IZipInfo): Promise<IAssociatedFileCopyResults>;