@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,73 +0,0 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Provides connectors to third-party helper functions.
18
- */
19
- import { Sanitizer } from "@esri/arcgis-html-sanitizer";
20
- export { Sanitizer } from "@esri/arcgis-html-sanitizer";
21
- /**
22
- * Creates a zip File from a collection of Files.
23
- *
24
- * @param zipFilename Name to use for zip File
25
- * @param files List of files to add to zip File
26
- * @param folder Folder to contain the files
27
- * @returns Promise resolving to a zip File
28
- */
29
- export declare function createZip(zipFilename: string, files: File[], folder?: string): Promise<File>;
30
- /**
31
- * Result of checking if a string contains invalid HTML.
32
- */
33
- export interface IValidationResult {
34
- isValid: boolean;
35
- sanitized: string;
36
- }
37
- /**
38
- * Sanitizes html.
39
- *
40
- * @param HTML Text to sanitize
41
- * @param sanitizer Instance of Sanitizer class
42
- * @returns Sanitized version of `html`
43
- * @see https://github.com/esri/arcgis-html-sanitizer#basic-usage
44
- */
45
- export declare function sanitizeHTML(html: string, sanitizer?: Sanitizer): string;
46
- /**
47
- * Sanitizes JSON.
48
- *
49
- * @param json JSON to sanitize
50
- * @param sanitizer Instance of Sanitizer class
51
- * @returns Sanitized version of `json`
52
- * @see https://github.com/esri/arcgis-html-sanitizer#sanitize-json
53
- */
54
- export declare function sanitizeJSON(json: any, sanitizer?: Sanitizer): any;
55
- /**
56
- * Sanitizes the protocol in a URL.
57
- *
58
- * @param url URL to sanitize
59
- * @param sanitizer Instance of Sanitizer class
60
- * @returns Sanitized version of `url`
61
- * @see https://github.com/esri/arcgis-html-sanitizer#sanitize-urls
62
- */
63
- export declare function sanitizeURLProtocol(url: string, sanitizer?: Sanitizer): string;
64
- /**
65
- * Checks if a string contains invalid HTML.
66
- *
67
- * @param html HTML to check
68
- * @param sanitizer Instance of Sanitizer class
69
- * @returns An object containing a flag indicating if `html` is valid (i.e., contains no invalid HTML)
70
- * as well as the sanitized version of `html`
71
- * @see https://github.com/esri/arcgis-html-sanitizer#basic-usage
72
- */
73
- export declare function validateHTML(html: string, sanitizer?: Sanitizer): IValidationResult;
@@ -1,24 +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 { ISolutionItem } from "../interfaces";
17
- /**
18
- * Apply the initial schema for old Hub Solutions
19
- *
20
- * @param model
21
- * @param authentication
22
- * @private
23
- */
24
- export declare function _applySchema(model: ISolutionItem): ISolutionItem;
@@ -1,24 +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 { ISolutionItem } from "../interfaces";
17
- /**
18
- * Determine if the Solution is a legacy item created by Hub
19
- * vs one that is 100% compatible with Solution.js
20
- *
21
- * @param model ISolutionModel
22
- * @private
23
- */
24
- export declare function _isLegacySolution(model: ISolutionItem): boolean;
@@ -1,27 +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 { ISolutionItem } from "../interfaces";
17
- /**
18
- * Apply the initial schema
19
- * If the item was created by Solution.js, this will stamp it
20
- * with the initial Solution.js schama version number (3)
21
- * If it is a legacy hub solution, it will apply the transforms
22
- *
23
- * @param model ISolutionItem
24
- * @param authentication UserSession
25
- * @private
26
- */
27
- export declare function _upgradeThreeDotOne(model: ISolutionItem): ISolutionItem;
@@ -1,27 +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 { ISolutionItem } from "../interfaces";
17
- /**
18
- * Apply the initial schema
19
- * If the item was created by Solution.js, this will stamp it
20
- * with the initial Solution.js schama version number (3)
21
- * If it is a legacy hub solution, it will apply the transforms
22
- *
23
- * @param model ISolutionItem
24
- * @param authentication UserSession
25
- * @private
26
- */
27
- export declare function _upgradeThreeDotZero(model: ISolutionItem): ISolutionItem;
@@ -1,24 +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 { ISolutionItem } from "../interfaces";
17
- /**
18
- * Applies Survey123 Form Config Schema migrations.
19
- *
20
- * @param {ISolutionItem} model A Solution model
21
- * @returns {ISolutionItem}
22
- * @private
23
- */
24
- export declare function _upgradeTwoDotFive(model: ISolutionItem): ISolutionItem;
@@ -1,24 +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 { ISolutionItem } from "../interfaces";
17
- /**
18
- * Hub Solutions use the `key` property for follow on replacements
19
- * but the Solution.js ones use the
20
- *
21
- * @param model ISolutionItem
22
- * @private
23
- */
24
- export declare function _upgradeTwoDotFour(model: ISolutionItem): ISolutionItem;
@@ -1,7 +0,0 @@
1
- /**
2
- *
3
- * @param model
4
- * @param authentication
5
- * @private
6
- */
7
- export declare function _upgradeTwoDotOne(model: any): any;
@@ -1,23 +0,0 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Updates schema to 2.7.
18
- *
19
- * @param model Model to be updated
20
- * @returns Updated model
21
- * @private
22
- */
23
- export declare function _upgradeTwoDotSeven(model: any): any;
@@ -1,27 +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 { ISolutionItem } from "../interfaces";
17
- /**
18
- * Hub creates a Web Map dependency for Form templates
19
- * that contain map questions. This migration updates
20
- * any form's map questions to use the default basemap
21
- * and filters out related Web Map templates.
22
- *
23
- * @param {ISolutionItem} model A Solution model
24
- * @returns {ISolutionItem}
25
- * @private
26
- */
27
- export declare function _upgradeTwoDotSix(model: ISolutionItem): ISolutionItem;
@@ -1,23 +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 { ISolutionItem } from "../interfaces";
17
- /**
18
- * Migrate Hub assets structure to resource paths
19
- *
20
- * @param model
21
- * @private
22
- */
23
- export declare function _upgradeTwoDotThree(model: ISolutionItem): ISolutionItem;
@@ -1,23 +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 { ISolutionItem } from "../interfaces";
17
- /**
18
- * Swap tokens from Hub Solutions
19
- *
20
- * @param model
21
- * @private
22
- */
23
- export declare function _upgradeTwoDotTwo(model: ISolutionItem): ISolutionItem;
@@ -1,44 +0,0 @@
1
- /**
2
- * Convert indicator "definitions" from the CAS style to the Indicator schema
3
- * see https://github.com/ArcGIS/Hub/blob/master/indicators.md
4
- *
5
- * @param model
6
- * @private
7
- */
8
- export declare function _upgradeTwoDotZero(model: any): any;
9
- /**
10
- * Given the Indicators entry from a CAS configurationSettings array,
11
- * convert to an indicators object in the new schema
12
- *
13
- * @private
14
- */
15
- export declare function _convertIndicatorsToDefinitions(indicatorsHash?: any): any;
16
- /**
17
- * Convert a CAS formatted indicator to the .definition in the new schama
18
- *
19
- * @private
20
- */
21
- export declare const _convertIndicatorToDefinition: (ind: any) => {
22
- id: any;
23
- type: string;
24
- name: any;
25
- optional: any;
26
- definition: {
27
- description: any;
28
- supportedTypes: any[];
29
- geometryTypes: any[];
30
- fields: any;
31
- };
32
- };
33
- /**
34
- * Convert the CAS formatted "field" into the new schema
35
- *
36
- * @private
37
- */
38
- export declare const _convertIndicatorField: (field: any) => {
39
- id: any;
40
- name: any;
41
- optional: any;
42
- description: any;
43
- supportedTypes: any[];
44
- };
@@ -1,25 +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 { ISolutionItem } from "./interfaces";
17
- export declare const CURRENT_SCHEMA_VERSION = 3;
18
- /**
19
- * Apply schema migrations to a Solution item
20
- * This system allows the schema of the Solution item to change over time
21
- * while abstracting those changes into a single set of functional transforms
22
- *
23
- * @param model ISolutionItem
24
- */
25
- export declare function migrateSchema(model: ISolutionItem): Promise<ISolutionItem>;
@@ -1,40 +0,0 @@
1
- /** @license
2
- * Copyright 2020 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- /**
17
- * Provides polyfill helper functions.
18
- *
19
- * @module polyfills
20
- */
21
- /**
22
- * Supplies Blob.text for Microsoft Legacy Edge
23
- *
24
- * @param blob Blob to read
25
- * @returns Promise resolving to blob's text
26
- * @see https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob
27
- * @see https://developer.mozilla.org/en-US/docs/Web/API/FileReader
28
- */
29
- export declare function getBlobText(blob: Blob): Promise<string>;
30
- /**
31
- * Supplies the File constructor for Microsoft Legacy Edge.
32
- *
33
- * @param fileBits Contents for file
34
- * @param fileName Name for file
35
- * @param options Bucket of options, euch as `type` for the MIME type; defaults to empty string for `type`
36
- * @returns File or, for Microsoft Legacy Edge, Blob
37
- * @see https://developer.mozilla.org/en-US/docs/Web/API/File/File
38
- * @see https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob
39
- */
40
- export declare function new_File(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
@@ -1,190 +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&gt;/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&gt;/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, UserSession } from "./interfaces";
49
- import { IItemResourceResponse } from "@esri/arcgis-rest-portal";
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 destinationFolderId Id of folder
59
- * @param destinationItemId Id of item to receive copy of resource/metadata
60
- * @param destinationAuthentication Credentials for the request to the destination
61
- * @param template Template for using its itemId and properties for fine-tuning the filename for Hub
62
- * @returns A promise which resolves to a boolean indicating if the copies were successful
63
- */
64
- export declare function copyFilesFromStorageItem(storageAuthentication: UserSession, filePaths: IDeployFileCopyPath[], destinationFolderId: string, destinationItemId: string, destinationAuthentication: UserSession, template?: any): Promise<boolean>;
65
- /**
66
- * Copies the files for storing the resources, metadata, and thumbnail of an item or group to a storage item
67
- * with a specified path.
68
- *
69
- * @param files List of item files and paths for storing the files
70
- * @param storageItemId Id of item to receive copy of resource/metadata
71
- * @param storageAuthentication Credentials for the request to the storage
72
- * @returns A promise which resolves to a list of the filenames under which the resource/metadata are stored
73
- */
74
- export declare function copyFilesToStorageItem(files: ISourceFile[], storageItemId: string, storageAuthentication: UserSession): Promise<string[]>;
75
- /**
76
- * Generates a folder and filename for storing a copy of an item's metadata in a storage item.
77
- *
78
- * @param itemId Id of item
79
- * @returns Folder and filename for storage; folder is the itemID suffixed with "_info_metadata"
80
- * @see convertStorageResourceToItemResource
81
- */
82
- export declare function generateMetadataStorageFilename(itemId: string): {
83
- folder: string;
84
- filename: string;
85
- };
86
- /**
87
- * Generates a list of full URLs and storage folder/filename combinations for storing the resources, metadata,
88
- * and thumbnail of an item.
89
- *
90
- * @param portalSharingUrl Server/sharing
91
- * @param itemId Id of item
92
- * @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
93
- * @param resourceFilenames List of resource filenames for an item, e.g., ["file1", "myFolder/file2"]
94
- * @param isGroup Boolean to indicate if the files are associated with a group or item
95
- * @param storageVersion Version of the Solution template
96
- * @returns List of item files' URLs and folder/filenames for storing the files
97
- */
98
- export declare function generateSourceFilePaths(portalSharingUrl: string, itemId: string, thumbnailUrlPart: string, resourceFilenames: string[], isGroup?: boolean, storageVersion?: number): ISourceFileCopyPath[];
99
- /**
100
- * Generates the URL for reading an item's metadata.
101
- *
102
- * @param sourcePortalSharingUrl Server/sharing
103
- * @param itemId Id of item
104
- * @param isGroup Boolean to indicate if the files are associated with a group or item
105
- * @returns URL string
106
- */
107
- export declare function generateSourceMetadataUrl(sourcePortalSharingUrl: string, itemId: string, isGroup?: boolean): string;
108
- /**
109
- * Generates the URL for reading an item's resource given the filename of the resource.
110
- *
111
- * @param sourcePortalSharingUrl Server/sharing
112
- * @param itemId Id of item
113
- * @param sourceResourceFilename Either filename or folder/filename to resource
114
- * @returns URL string
115
- */
116
- export declare function generateSourceResourceUrl(sourcePortalSharingUrl: string, itemId: string, sourceResourceFilename: string): string;
117
- /**
118
- * Generates the URL for reading an item's thumbnail.
119
- *
120
- * @param sourcePortalSharingUrl Server/sharing
121
- * @param itemId Id of item
122
- * @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
123
- * @param isGroup Boolean to indicate if the files are associated with a group or item
124
- * @returns URL string
125
- */
126
- export declare function generateSourceThumbnailUrl(sourcePortalSharingUrl: string, itemId: string, thumbnailUrlPart: string, isGroup?: boolean): string;
127
- /**
128
- * Generates a list of full URLs and folder/filename combinations used to store the resources, metadata,
129
- * and thumbnail of an item.
130
- *
131
- * @param portalSharingUrl Server/sharing
132
- * @param storageItemId Id of storage item
133
- * @param resourceFilenames List of resource filenames for an item, e.g., ["file1", "myFolder/file2"]
134
- * @param storageVersion Version of the Solution template
135
- * @returns List of item files' URLs and folder/filenames for storing the files
136
- */
137
- export declare function generateStorageFilePaths(portalSharingUrl: string, storageItemId: string, resourceFilenames?: string[], storageVersion?: number): IDeployFileCopyPath[];
138
- /**
139
- * Generates a folder and filename for storing a copy of an item's thumbnail in a storage item.
140
- *
141
- * @param itemId Id of item
142
- * @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON; can also be a filename
143
- * @returns Folder and filename for storage; folder is the itemID suffixed with "_info_thumbnail";
144
- * file is URI-encoded thumbnailUrlPart
145
- * @see convertStorageResourceToItemResource
146
- */
147
- export declare function generateThumbnailStorageFilename(itemId: string, thumbnailurl: string): {
148
- folder: string;
149
- filename: string;
150
- };
151
- export declare function isSupportedFileType(filename: string): boolean;
152
- /**
153
- * Gets the thumbnail of an item or group.
154
- *
155
- * @param authentication Credentials for the request to the storage
156
- * @param filePaths List of item files' URLs and folder/filenames for storing the files
157
- * @returns A promise which resolves to a boolean indicating if the copies were successful
158
- */
159
- export declare function getThumbnailFromStorageItem(authentication: UserSession, filePaths: IDeployFileCopyPath[]): Promise<File>;
160
- /**
161
- * Removes the item's resource that matches the filename with new content
162
- *
163
- * @param itemId Id of the item to remove
164
- * @param filename Name of the resource file to remove
165
- * @param authentication Credentials for the request to the storage
166
- * @returns A promise which resolves with a success true/false response
167
- */
168
- export declare function removeItemResourceFile(itemId: string, filename: string, authentication: UserSession): Promise<{
169
- success: boolean;
170
- }>;
171
- /**
172
- * Updates the item's resource that matches the filename with new content
173
- *
174
- * @param itemId Id of the item to update
175
- * @param filename Name of the resource file to update; prefix optional (e.g., a/b/file.txt)
176
- * @param resource The new content to update the resource with
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 updateItemResourceFile(itemId: string, filename: string, resource: File, authentication: UserSession): Promise<IItemResourceResponse>;
181
- /**
182
- * Updates the item's resource that matches the filename with new content
183
- *
184
- * @param itemId Id of the item to update
185
- * @param filename Name of the resource file to update
186
- * @param content The new content to update the resource with
187
- * @param authentication Credentials for the request to the storage
188
- * @returns A promise which resolves with a success true/false response
189
- */
190
- export declare function updateItemResourceText(itemId: string, filename: string, content: string, authentication: UserSession): Promise<IItemResourceResponse>;
@@ -1,26 +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 "../interfaces";
17
- /**
18
- * Add a resource from a blob
19
- *
20
- * @param blob
21
- * @param itemId
22
- * @param folder
23
- * @param filename
24
- * @param authentication
25
- */
26
- export declare function addResourceFromBlob(blob: any, itemId: string, folder: string, filename: string, authentication: UserSession): Promise<any>;