@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,372 +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 { ICreateItemFromTemplateResponse, IDatasourceInfo, IItemTemplate, IStringValuePair } from "./interfaces";
17
- import { Sanitizer } from "./libConnectors";
18
- /**
19
- * Returns a URL with a query parameter appended
20
- *
21
- * @param url URL to append to
22
- * @param parameter Query parameter to append, prefixed with "?" or "&" as appropriate to what url already has
23
- * @returns New URL combining url and parameter
24
- */
25
- export declare function appendQueryParam(url: string, parameter: string): string;
26
- /**
27
- * Extracts JSON from a Blob.
28
- *
29
- * @param blob Blob to use as source
30
- * @returns A promise that will resolve with JSON or null
31
- */
32
- export declare function blobToJson(blob: Blob): Promise<any>;
33
- /**
34
- * Converts a Blob to a File.
35
- *
36
- * @param blob Blob to use as source
37
- * @param filename Name to use for file
38
- * @param mimeType MIME type to override blob's MIME type
39
- * @returns File created out of Blob and filename
40
- */
41
- export declare function blobToFile(blob: Blob, filename: string, mimeType?: string): File;
42
- /**
43
- * Extracts text from a Blob.
44
- *
45
- * @param blob Blob to use as source
46
- * @returns A promise that will resolve with text read from blob
47
- */
48
- export declare function blobToText(blob: Blob): Promise<string>;
49
- /**
50
- * Checks that a URL path ends with a slash.
51
- *
52
- * @param url URL to check
53
- * @returns URL, appended with slash if missing
54
- */
55
- export declare function checkUrlPathTermination(url: string): string;
56
- /**
57
- * Creates a random 32-character alphanumeric string.
58
- *
59
- * @returns A lowercase 32-char alphanumeric string
60
- * @internal
61
- */
62
- export declare function createLongId(): string;
63
- /**
64
- * Creates a random 8-character alphanumeric string that begins with an alphabetic character.
65
- *
66
- * @returns An alphanumeric string in the range [a0000000..zzzzzzzz]
67
- */
68
- export declare function createShortId(): string;
69
- /**
70
- * Copies an input list removing duplicates.
71
- *
72
- * @param input List to be deduped
73
- * @returns Deduped list; order of items in input is not maintained
74
- */
75
- export declare function dedupe(input?: string[]): string[];
76
- /**
77
- * Flags a failure to create an item from a template.
78
- *
79
- * @param itemType The AGO item type
80
- * @param id Item id to include in response
81
- * @returns Empty creation response
82
- */
83
- export declare function generateEmptyCreationResponse(itemType: string, id?: string): ICreateItemFromTemplateResponse;
84
- /**
85
- * Converts JSON to a Blob.
86
- *
87
- * @param json JSON to use as source
88
- * @returns A blob from the source JSON
89
- */
90
- export declare function jsonToBlob(json: any): Blob;
91
- /**
92
- * Converts JSON to a File.
93
- *
94
- * @param json JSON to use as source
95
- * @param filename Name to use for file
96
- * @param mimeType MIME type to override blob's MIME type
97
- * @returns File created out of JSON and filename
98
- */
99
- export declare function jsonToFile(json: any, filename: string, mimeType?: string): File;
100
- /**
101
- * Saves a blob to a file.
102
- *
103
- * @param filename Name to give file
104
- * @param blob Blob to save
105
- * @returns Promise resolving when operation is complete
106
- */
107
- export declare function saveBlobAsFile(filename: string, blob: Blob): Promise<void>;
108
- /**
109
- * Makes a deep clone, including arrays but not functions.
110
- *
111
- * @param obj Object to be cloned
112
- * @returns Clone of obj
113
- * @example
114
- * ```js
115
- * import { cloneObject } from "utils/object-helpers";
116
- * const original = { foo: "bar" }
117
- * const copy = cloneObject(original)
118
- * copy.foo // "bar"
119
- * copy === original // false
120
- * ```
121
- */
122
- export declare function cloneObject(obj: {
123
- [index: string]: any;
124
- }): any;
125
- /**
126
- * Compares two JSON objects using JSON.stringify.
127
- *
128
- * @param json1 First object
129
- * @param json2 Second object
130
- * @returns True if objects are the same
131
- */
132
- export declare function compareJSON(json1: any, json2: any): boolean;
133
- /**
134
- * Compares two JSON objects using JSON.stringify, converting empty strings to nulls.
135
- *
136
- * @param json1 First object
137
- * @param json2 Second object
138
- * @returns True if objects are the same
139
- */
140
- export declare function compareJSONNoEmptyStrings(json1: any, json2: any): boolean;
141
- /**
142
- * Compares two JSON objects property by property and reports each mismatch.
143
- *
144
- * @param json1 First object
145
- * @param json2 Second object
146
- * @returns A list of mismatch report strings
147
- */
148
- export declare function compareJSONProperties(json1: any, json2: any): string[];
149
- /**
150
- * Sanitizes JSON and echoes changes to console.
151
- *
152
- * @param json JSON to sanitize
153
- * @param sanitizer Instance of Sanitizer class
154
- * @returns Sanitized version of `json`
155
- * @see https://github.com/esri/arcgis-html-sanitizer#sanitize-json
156
- */
157
- export declare function sanitizeJSONAndReportChanges(json: any, sanitizer?: Sanitizer): any;
158
- export declare function deleteItemProps(itemTemplate: any): any;
159
- /**
160
- * Deletes a property from an object.
161
- *
162
- * @param obj Object with property to delete
163
- * @param path Path into an object to property, e.g., "data.values.webmap", where "data" is a top-level property
164
- * in obj
165
- */
166
- export declare function deleteProp(obj: any, path: string): void;
167
- /**
168
- * Deletes properties from an object.
169
- *
170
- * @param obj Object with properties to delete
171
- * @param props Array of properties on object that should be deleted
172
- */
173
- export declare function deleteProps(obj: any, props: string[]): void;
174
- /**
175
- * Creates an AGO-style JSON failure response with success property.
176
- *
177
- * @param e Optional error information
178
- * @returns JSON structure with property success set to false and optionally including `e`
179
- */
180
- export declare function fail(e?: any): any;
181
- /**
182
- * Creates an AGO-style JSON failure response with success property and extended with ids list.
183
- *
184
- * @param ids List of ids
185
- * @param e Optional error information
186
- * @returns JSON structure with property success set to false and optionally including `e`
187
- */
188
- export declare function failWithIds(itemIds: string[], e?: any): any;
189
- /**
190
- * Extracts the ids from a string
191
- *
192
- * @param v String to examine
193
- * @returns List of id strings found
194
- * @example
195
- * get id from
196
- * bad3483e025c47338d43df308c117308
197
- * {bad3483e025c47338d43df308c117308
198
- * =bad3483e025c47338d43df308c117308
199
- * do not get id from
200
- * http: *something/name_bad3483e025c47338d43df308c117308
201
- * {{bad3483e025c47338d43df308c117308.itemId}}
202
- * bad3483e025c47338d43df308c117308bad3483e025c47338d43df308c117308
203
- */
204
- export declare function getIDs(v: string): string[];
205
- /**
206
- * Gets a property out of a deeply nested object.
207
- * Does not handle anything but nested object graph
208
- *
209
- * @param obj Object to retrieve value from
210
- * @param path Path into an object, e.g., "data.values.webmap", where "data" is a top-level property
211
- * in obj
212
- * @returns Value at end of path
213
- */
214
- export declare function getProp(obj: {
215
- [index: string]: any;
216
- }, path: string): any;
217
- /**
218
- * Returns an array of values from an object based on an array of property paths.
219
- *
220
- * @param obj Object to retrieve values from
221
- * @param props Array of paths into the object e.g., "data.values.webmap", where "data" is a top-level property
222
- * @returns Array of the values plucked from the object; only defined values are returned
223
- */
224
- export declare function getProps(obj: any, props: string[]): any;
225
- /**
226
- * Get a property out of a deeply nested object
227
- * Does not handle anything but nested object graph
228
- *
229
- * @param obj Object to retrieve value from
230
- * @param path Path into an object, e.g., "data.values.webmap", where "data" is a top-level property
231
- * in obj
232
- * @param defaultV Optional value to use if any part of path--including final value--is undefined
233
- * @returns Value at end of path
234
- */
235
- export declare function getPropWithDefault(obj: IStringValuePair, path: string, defaultV?: any): any;
236
- /**
237
- * Updates a list of the items dependencies if more are found in the
238
- * provided value.
239
- *
240
- * @param v a string value to check for ids
241
- * @param deps a list of the items dependencies
242
- */
243
- export declare function idTest(v: any, deps: string[]): void;
244
- /**
245
- * Sets a deeply nested property of an object.
246
- * Creates the full path if it does not exist.
247
- *
248
- * @param obj Object to set value of
249
- * @param path Path into an object, e.g., "data.values.webmap", where "data" is a top-level property in obj
250
- * @param value The value to set at the end of the path
251
- */
252
- export declare function setCreateProp(obj: any, path: string, value: any): void;
253
- /**
254
- * Sets a deeply nested property of an object.
255
- * Does nothing if the full path does not exist.
256
- *
257
- * @param obj Object to set value of
258
- * @param path Path into an object, e.g., "data.values.webmap", where "data" is a top-level property in obj
259
- * @param value The value to set at the end of the path
260
- */
261
- export declare function setProp(obj: any, path: string, value: any): void;
262
- /**
263
- * Creates a timestamp string using the current UTC date and time.
264
- *
265
- * @returns Timestamp formatted as YYYYMMDD_hhmm_ssmmm, with month one-based and all values padded with zeroes on the
266
- * left as needed (`ssmmm` stands for seconds from 0..59 and milliseconds from 0..999)
267
- * @private
268
- */
269
- export declare function getUTCTimestamp(): string;
270
- /**
271
- * Tests if an object's `item.typeKeywords` or `typeKeywords` properties has any of a set of keywords.
272
- *
273
- * @param jsonObj Object to test
274
- * @param keywords List of keywords to look for in jsonObj
275
- * @returns Boolean indicating result
276
- */
277
- export declare function hasAnyKeyword(jsonObj: any, keywords: string[]): boolean;
278
- /**
279
- * Tests if an object's `item.typeKeywords` or `typeKeywords` properties has a specific keyword.
280
- *
281
- * @param jsonObj Object to test
282
- * @param keyword Keyword to look for in jsonObj
283
- * @returns Boolean indicating result
284
- */
285
- export declare function hasTypeKeyword(jsonObj: any, keyword: string): boolean;
286
- /**
287
- * Will return the provided title if it does not exist as a property
288
- * in one of the objects at the defined path. Otherwise the title will
289
- * have a numerical value attached.
290
- *
291
- * @param title The root title to test
292
- * @param templateDictionary Hash of the facts
293
- * @param path to the objects to evaluate for potantial name clashes
294
- * @returns string The unique title to use
295
- */
296
- export declare function getUniqueTitle(title: string, templateDictionary: any, path: string): string;
297
- /**
298
- * Performs string replacement on every string in an object.
299
- *
300
- * @param obj Object to scan and to modify
301
- * @param pattern Search pattern in each string
302
- * @param replacement Replacement for matches to search pattern
303
- * @returns Modified obj is returned
304
- */
305
- export declare function globalStringReplace(obj: any, pattern: RegExp, replacement: string): any;
306
- /**
307
- * Tests if an array of DatasourceInfos has a given item and layer id already.
308
- *
309
- * @param datasourceInfos Array of DatasourceInfos to evaluate
310
- * @param itemId The items id to check for
311
- * @param layerId The layers id to check for
312
- * @returns Boolean indicating result
313
- */
314
- export declare function hasDatasource(datasourceInfos: IDatasourceInfo[], itemId: string, layerId: number): boolean;
315
- /**
316
- * remove templatization from item id to compare
317
- *
318
- * @example
319
- * \{\{934a9ef8efa7448fa8ddf7b13cef0240.itemId\}\}
320
- * returns 934a9ef8efa7448fa8ddf7b13cef0240
321
- */
322
- export declare function cleanItemId(id: any): any;
323
- /**
324
- * remove templatization from layer based item id to compare
325
- *
326
- * @example
327
- * \{\{934a9ef8efa7448fa8ddf7b13cef0240.layer0.itemId\}\}
328
- * returns 934a9ef8efa7448fa8ddf7b13cef0240
329
- */
330
- export declare function cleanLayerBasedItemId(id: any): any;
331
- /**
332
- * remove templatization from layer id to compare
333
- *
334
- * @example
335
- * \{\{934a9ef8efa7448fa8ddf7b13cef0240.layer0.layerId\}\}
336
- * returns 0
337
- */
338
- export declare function cleanLayerId(id: any): any;
339
- /**
340
- * Get template from list of templates by ID
341
- *
342
- * @param templates Array of item templates to search
343
- * @param id of template we are searching for
344
- *
345
- * @returns Template associated with the user provided id argument
346
- */
347
- export declare function getTemplateById(templates: IItemTemplate[], id: string): any;
348
- /**
349
- * Evaluates a value with a regular expression
350
- *
351
- * @param v a string value to test with the expression
352
- * @param ex the regular expresion to test with
353
- * @returns an array of matches
354
- */
355
- export declare function regExTest(v: any, ex: RegExp): any[];
356
- /**
357
- * Creates a random number between two values.
358
- *
359
- * @param min Inclusive minimum desired value
360
- * @param max Non-inclusive maximum desired value
361
- * @returns Random number in the range [min, max)
362
- */
363
- export declare function _getRandomNumberInRange(min: number, max: number): number;
364
- /**
365
- * Pads the string representation of a number to a minimum width. Requires modern browser.
366
- *
367
- * @param n Number to pad
368
- * @param totalSize Desired *minimum* width of number after padding with zeroes
369
- * @returns Number converted to string and padded on the left as needed
370
- * @private
371
- */
372
- export declare function _padPositiveNum(n: number, totalSize: number): string;
@@ -1,27 +0,0 @@
1
- /** @license
2
- * Copyright 2021 Esri
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { IRequestOptions } from "@esri/arcgis-rest-request";
17
- export interface ISubscriptionInfo {
18
- id: string;
19
- [key: string]: any;
20
- }
21
- /**
22
- * Fetch subscription information about the current portal using
23
- * portals/self/subscriptionInfo
24
- *
25
- * @param requestOptions
26
- */
27
- export declare function getSubscriptionInfo(requestOptions: IRequestOptions): Promise<ISubscriptionInfo>;
@@ -1,29 +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
- * @module deleteSolution
18
- */
19
- import { ISolutionPrecis, UserSession } from "./interfaces";
20
- /**
21
- * Returns a list of items in a deployed Solution that would be deleted by the `deleteSolution` function; list
22
- * does not include the Solution folder, Solution items that are shared with any item other than the deployed
23
- * Solution, or the Solution item itself.
24
- *
25
- * @param solutionItemId Id of a deployed Solution
26
- * @param authentication Credentials for the request
27
- * @returns Promise resolving to the list of items in the solution that would be deleted.
28
- */
29
- export declare function getDeletableSolutionInfo(solutionItemId: string, authentication: UserSession): Promise<ISolutionPrecis>;
@@ -1,19 +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
- export interface IItemTypeAbbrev {
17
- [id: string]: string;
18
- }
19
- export declare function getItemTypeAbbrev(type: string): string;
@@ -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
- /**
17
- * @module deleteSolution
18
- */
19
- import { ISolutionPrecis, UserSession } from "./interfaces";
20
- /**
21
- * Creates a summary of a deployed Solution.
22
- *
23
- * @param solutionItemId Id of a deployed Solution
24
- * @param authentication Credentials for the request
25
- * @returns Promise resolving to a summary of the deployed Solution
26
- */
27
- export declare function getSolutionSummary(solutionItemId: string, authentication: UserSession): Promise<ISolutionPrecis>;
@@ -1,44 +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.
18
- *
19
- * @module common
20
- */
21
- export * from "./completeItem";
22
- export * from "./create-hub-request-options";
23
- export * from "./deleteHelpers";
24
- export * from "./deleteSolution";
25
- export * from "./dependencies";
26
- export * from "./featureServiceHelpers";
27
- export * from "./generalHelpers";
28
- export * from "./getDeletableSolutionInfo";
29
- export * from "./getItemTypeAbbrev";
30
- export * from "./getSolutionSummary";
31
- export * from "./get-subscription-info";
32
- export * from "./interfaces";
33
- export * from "./libConnectors";
34
- export * from "./migrator";
35
- export * from "./polyfills";
36
- export * from "./resourceHelpers";
37
- export * from "./resources";
38
- export * from "./restHelpers";
39
- export * from "./restHelpersGet";
40
- export * from "./sharing";
41
- export * from "./templatization";
42
- export * from "./trackingHelpers";
43
- export * from "./velocityHelpers";
44
- export * from "./workforceHelpers";