@esri/solution-common 5.2.3 → 5.2.4

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 (192) hide show
  1. package/dist/cjs/completeItem.d.ts +29 -0
  2. package/dist/cjs/completeItem.js +92 -0
  3. package/dist/cjs/completeItem.js.map +1 -0
  4. package/dist/cjs/create-hub-request-options.d.ts +29 -0
  5. package/dist/cjs/create-hub-request-options.js +64 -0
  6. package/dist/cjs/create-hub-request-options.js.map +1 -0
  7. package/dist/cjs/deleteHelpers/deleteEmptyGroups.d.ts +24 -0
  8. package/dist/cjs/deleteHelpers/deleteEmptyGroups.js +42 -0
  9. package/dist/cjs/deleteHelpers/deleteEmptyGroups.js.map +1 -0
  10. package/dist/cjs/deleteHelpers/deleteGroupIfEmpty.d.ts +27 -0
  11. package/dist/cjs/deleteHelpers/deleteGroupIfEmpty.js +97 -0
  12. package/dist/cjs/deleteHelpers/deleteGroupIfEmpty.js.map +1 -0
  13. package/dist/cjs/deleteHelpers/deleteSolutionContents.d.ts +38 -0
  14. package/dist/cjs/deleteHelpers/deleteSolutionContents.js +130 -0
  15. package/dist/cjs/deleteHelpers/deleteSolutionContents.js.map +1 -0
  16. package/dist/cjs/deleteHelpers/deleteSolutionFolder.d.ts +29 -0
  17. package/dist/cjs/deleteHelpers/deleteSolutionFolder.js +79 -0
  18. package/dist/cjs/deleteHelpers/deleteSolutionFolder.js.map +1 -0
  19. package/dist/cjs/deleteHelpers/deleteSolutionItem.d.ts +30 -0
  20. package/dist/cjs/deleteHelpers/deleteSolutionItem.js +54 -0
  21. package/dist/cjs/deleteHelpers/deleteSolutionItem.js.map +1 -0
  22. package/dist/cjs/deleteHelpers/index.d.ts +22 -0
  23. package/dist/cjs/deleteHelpers/index.js +26 -0
  24. package/dist/cjs/deleteHelpers/index.js.map +1 -0
  25. package/dist/cjs/deleteHelpers/reconstructBuildOrderIds.d.ts +27 -0
  26. package/dist/cjs/deleteHelpers/reconstructBuildOrderIds.js +34 -0
  27. package/dist/cjs/deleteHelpers/reconstructBuildOrderIds.js.map +1 -0
  28. package/dist/cjs/deleteHelpers/removeItems.d.ts +34 -0
  29. package/dist/cjs/deleteHelpers/removeItems.js +112 -0
  30. package/dist/cjs/deleteHelpers/removeItems.js.map +1 -0
  31. package/dist/cjs/deleteHelpers/reportProgress.d.ts +27 -0
  32. package/dist/cjs/deleteHelpers/reportProgress.js +46 -0
  33. package/dist/cjs/deleteHelpers/reportProgress.js.map +1 -0
  34. package/dist/cjs/deleteSolution.d.ts +55 -0
  35. package/dist/cjs/deleteSolution.js +107 -0
  36. package/dist/cjs/deleteSolution.js.map +1 -0
  37. package/dist/cjs/dependencies.d.ts +26 -0
  38. package/dist/cjs/dependencies.js +171 -0
  39. package/dist/cjs/dependencies.js.map +1 -0
  40. package/dist/cjs/featureServiceHelpers.d.ts +799 -0
  41. package/dist/cjs/featureServiceHelpers.js +2438 -0
  42. package/dist/cjs/featureServiceHelpers.js.map +1 -0
  43. package/dist/cjs/formHelpers.d.ts +41 -0
  44. package/dist/cjs/formHelpers.js +78 -0
  45. package/dist/cjs/formHelpers.js.map +1 -0
  46. package/dist/cjs/generalHelpers.d.ts +433 -0
  47. package/dist/cjs/generalHelpers.js +925 -0
  48. package/dist/cjs/generalHelpers.js.map +1 -0
  49. package/dist/cjs/get-subscription-info.d.ts +27 -0
  50. package/dist/cjs/get-subscription-info.js +39 -0
  51. package/dist/cjs/get-subscription-info.js.map +1 -0
  52. package/dist/cjs/getDeletableSolutionInfo.d.ts +29 -0
  53. package/dist/cjs/getDeletableSolutionInfo.js +53 -0
  54. package/dist/cjs/getDeletableSolutionInfo.js.map +1 -0
  55. package/dist/cjs/getItemTypeAbbrev.d.ts +19 -0
  56. package/dist/cjs/getItemTypeAbbrev.js +186 -0
  57. package/dist/cjs/getItemTypeAbbrev.js.map +1 -0
  58. package/dist/cjs/getSolutionSummary.d.ts +27 -0
  59. package/dist/cjs/getSolutionSummary.js +101 -0
  60. package/dist/cjs/getSolutionSummary.js.map +1 -0
  61. package/dist/cjs/index.d.ts +46 -0
  62. package/dist/cjs/index.js +50 -0
  63. package/dist/cjs/index.js.map +1 -0
  64. package/dist/cjs/interfaces.d.ts +1362 -0
  65. package/dist/cjs/interfaces.js +77 -0
  66. package/dist/cjs/interfaces.js.map +1 -0
  67. package/dist/cjs/libConnectors.d.ts +73 -0
  68. package/dist/cjs/libConnectors.js +115 -0
  69. package/dist/cjs/libConnectors.js.map +1 -0
  70. package/dist/cjs/migrations/apply-schema.d.ts +24 -0
  71. package/dist/cjs/migrations/apply-schema.js +36 -0
  72. package/dist/cjs/migrations/apply-schema.js.map +1 -0
  73. package/dist/cjs/migrations/is-legacy-solution.d.ts +24 -0
  74. package/dist/cjs/migrations/is-legacy-solution.js +40 -0
  75. package/dist/cjs/migrations/is-legacy-solution.js.map +1 -0
  76. package/dist/cjs/migrations/upgrade-three-dot-one.d.ts +27 -0
  77. package/dist/cjs/migrations/upgrade-three-dot-one.js +49 -0
  78. package/dist/cjs/migrations/upgrade-three-dot-one.js.map +1 -0
  79. package/dist/cjs/migrations/upgrade-three-dot-zero.d.ts +27 -0
  80. package/dist/cjs/migrations/upgrade-three-dot-zero.js +43 -0
  81. package/dist/cjs/migrations/upgrade-three-dot-zero.js.map +1 -0
  82. package/dist/cjs/migrations/upgrade-two-dot-five.d.ts +24 -0
  83. package/dist/cjs/migrations/upgrade-two-dot-five.js +73 -0
  84. package/dist/cjs/migrations/upgrade-two-dot-five.js.map +1 -0
  85. package/dist/cjs/migrations/upgrade-two-dot-four.d.ts +24 -0
  86. package/dist/cjs/migrations/upgrade-two-dot-four.js +72 -0
  87. package/dist/cjs/migrations/upgrade-two-dot-four.js.map +1 -0
  88. package/dist/cjs/migrations/upgrade-two-dot-one.d.ts +7 -0
  89. package/dist/cjs/migrations/upgrade-two-dot-one.js +39 -0
  90. package/dist/cjs/migrations/upgrade-two-dot-one.js.map +1 -0
  91. package/dist/cjs/migrations/upgrade-two-dot-seven.d.ts +23 -0
  92. package/dist/cjs/migrations/upgrade-two-dot-seven.js +58 -0
  93. package/dist/cjs/migrations/upgrade-two-dot-seven.js.map +1 -0
  94. package/dist/cjs/migrations/upgrade-two-dot-six.d.ts +27 -0
  95. package/dist/cjs/migrations/upgrade-two-dot-six.js +61 -0
  96. package/dist/cjs/migrations/upgrade-two-dot-six.js.map +1 -0
  97. package/dist/cjs/migrations/upgrade-two-dot-three.d.ts +23 -0
  98. package/dist/cjs/migrations/upgrade-two-dot-three.js +55 -0
  99. package/dist/cjs/migrations/upgrade-two-dot-three.js.map +1 -0
  100. package/dist/cjs/migrations/upgrade-two-dot-two.d.ts +23 -0
  101. package/dist/cjs/migrations/upgrade-two-dot-two.js +58 -0
  102. package/dist/cjs/migrations/upgrade-two-dot-two.js.map +1 -0
  103. package/dist/cjs/migrations/upgrade-two-dot-zero.d.ts +44 -0
  104. package/dist/cjs/migrations/upgrade-two-dot-zero.js +95 -0
  105. package/dist/cjs/migrations/upgrade-two-dot-zero.js.map +1 -0
  106. package/dist/cjs/migrator.d.ts +25 -0
  107. package/dist/cjs/migrator.js +77 -0
  108. package/dist/cjs/migrator.js.map +1 -0
  109. package/dist/cjs/package.json +3 -0
  110. package/dist/cjs/resourceHelpers.d.ts +191 -0
  111. package/dist/cjs/resourceHelpers.js +384 -0
  112. package/dist/cjs/resourceHelpers.js.map +1 -0
  113. package/dist/cjs/resources/add-resource-from-blob.d.ts +26 -0
  114. package/dist/cjs/resources/add-resource-from-blob.js +52 -0
  115. package/dist/cjs/resources/add-resource-from-blob.js.map +1 -0
  116. package/dist/cjs/resources/addMetadataFromBlob.d.ts +25 -0
  117. package/dist/cjs/resources/addMetadataFromBlob.js +43 -0
  118. package/dist/cjs/resources/addMetadataFromBlob.js.map +1 -0
  119. package/dist/cjs/resources/convert-item-resource-to-storage-resource.d.ts +32 -0
  120. package/dist/cjs/resources/convert-item-resource-to-storage-resource.js +70 -0
  121. package/dist/cjs/resources/convert-item-resource-to-storage-resource.js.map +1 -0
  122. package/dist/cjs/resources/convert-storage-resource-to-item-resource.d.ts +29 -0
  123. package/dist/cjs/resources/convert-storage-resource-to-item-resource.js +70 -0
  124. package/dist/cjs/resources/convert-storage-resource-to-item-resource.js.map +1 -0
  125. package/dist/cjs/resources/copyAssociatedFiles.d.ts +67 -0
  126. package/dist/cjs/resources/copyAssociatedFiles.js +304 -0
  127. package/dist/cjs/resources/copyAssociatedFiles.js.map +1 -0
  128. package/dist/cjs/resources/copyDataIntoItem.d.ts +33 -0
  129. package/dist/cjs/resources/copyDataIntoItem.js +62 -0
  130. package/dist/cjs/resources/copyDataIntoItem.js.map +1 -0
  131. package/dist/cjs/resources/copyMetadataIntoItem.d.ts +26 -0
  132. package/dist/cjs/resources/copyMetadataIntoItem.js +46 -0
  133. package/dist/cjs/resources/copyMetadataIntoItem.js.map +1 -0
  134. package/dist/cjs/resources/copyResourceIntoZip.d.ts +33 -0
  135. package/dist/cjs/resources/copyResourceIntoZip.js +78 -0
  136. package/dist/cjs/resources/copyResourceIntoZip.js.map +1 -0
  137. package/dist/cjs/resources/copyZipIntoItem.d.ts +25 -0
  138. package/dist/cjs/resources/copyZipIntoItem.js +54 -0
  139. package/dist/cjs/resources/copyZipIntoItem.js.map +1 -0
  140. package/dist/cjs/resources/createCopyResults.d.ts +25 -0
  141. package/dist/cjs/resources/createCopyResults.js +36 -0
  142. package/dist/cjs/resources/createCopyResults.js.map +1 -0
  143. package/dist/cjs/resources/get-blob.d.ts +26 -0
  144. package/dist/cjs/resources/get-blob.js +27 -0
  145. package/dist/cjs/resources/get-blob.js.map +1 -0
  146. package/dist/cjs/resources/getItemResourcesFilesFromPaths.d.ts +24 -0
  147. package/dist/cjs/resources/getItemResourcesFilesFromPaths.js +49 -0
  148. package/dist/cjs/resources/getItemResourcesFilesFromPaths.js.map +1 -0
  149. package/dist/cjs/resources/getItemResourcesPaths.d.ts +26 -0
  150. package/dist/cjs/resources/getItemResourcesPaths.js +76 -0
  151. package/dist/cjs/resources/getItemResourcesPaths.js.map +1 -0
  152. package/dist/cjs/resources/index.d.ts +29 -0
  153. package/dist/cjs/resources/index.js +33 -0
  154. package/dist/cjs/resources/index.js.map +1 -0
  155. package/dist/cjs/resources/solution-resource.d.ts +35 -0
  156. package/dist/cjs/resources/solution-resource.js +31 -0
  157. package/dist/cjs/resources/solution-resource.js.map +1 -0
  158. package/dist/cjs/resources/transform-resource-paths-to-solution-resources.d.ts +56 -0
  159. package/dist/cjs/resources/transform-resource-paths-to-solution-resources.js +146 -0
  160. package/dist/cjs/resources/transform-resource-paths-to-solution-resources.js.map +1 -0
  161. package/dist/cjs/restHelpers.d.ts +607 -0
  162. package/dist/cjs/restHelpers.js +1954 -0
  163. package/dist/cjs/restHelpers.js.map +1 -0
  164. package/dist/cjs/restHelpersGet.d.ts +288 -0
  165. package/dist/cjs/restHelpersGet.js +804 -0
  166. package/dist/cjs/restHelpersGet.js.map +1 -0
  167. package/dist/cjs/sharing/index.d.ts +16 -0
  168. package/dist/cjs/sharing/index.js +20 -0
  169. package/dist/cjs/sharing/index.js.map +1 -0
  170. package/dist/cjs/sharing/share-item-to-groups.d.ts +26 -0
  171. package/dist/cjs/sharing/share-item-to-groups.js +44 -0
  172. package/dist/cjs/sharing/share-item-to-groups.js.map +1 -0
  173. package/dist/cjs/templatization.d.ts +139 -0
  174. package/dist/cjs/templatization.js +316 -0
  175. package/dist/cjs/templatization.js.map +1 -0
  176. package/dist/cjs/trackingHelpers.d.ts +116 -0
  177. package/dist/cjs/trackingHelpers.js +217 -0
  178. package/dist/cjs/trackingHelpers.js.map +1 -0
  179. package/dist/cjs/velocityHelpers.d.ts +57 -0
  180. package/dist/cjs/velocityHelpers.js +135 -0
  181. package/dist/cjs/velocityHelpers.js.map +1 -0
  182. package/dist/cjs/workflowHelpers.d.ts +37 -0
  183. package/dist/cjs/workflowHelpers.js +77 -0
  184. package/dist/cjs/workflowHelpers.js.map +1 -0
  185. package/dist/cjs/workforceHelpers.d.ts +115 -0
  186. package/dist/cjs/workforceHelpers.js +749 -0
  187. package/dist/cjs/workforceHelpers.js.map +1 -0
  188. package/dist/cjs/zip-utils.d.ts +76 -0
  189. package/dist/cjs/zip-utils.js +142 -0
  190. package/dist/cjs/zip-utils.js.map +1 -0
  191. package/dist/esm/package.json +3 -0
  192. package/package.json +2 -2
@@ -0,0 +1,1362 @@
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 interfaces.
18
+ */
19
+ import { IGetRelatedItemsResponse, IGroup, IItem, IItemRelationshipOptions } from "@esri/arcgis-rest-portal";
20
+ import { ISpatialReference } from "@esri/arcgis-rest-service-admin";
21
+ import { UserSession } from "@esri/arcgis-rest-auth";
22
+ export { IUserRequestOptions, IUserSessionOptions, UserSession } from "@esri/arcgis-rest-auth";
23
+ export { IFeature, IQueryRelatedOptions, IQueryRelatedResponse, IRelatedRecordGroup, queryRelated } from "@esri/arcgis-rest-feature-layer";
24
+ export { IAddFolderResponse, ICreateItemResponse, IGetRelatedItemsResponse, IGroup, IGroupAdd, IItem, IPagingParams, IPortal, ISearchResult, ItemRelationshipType, IUpdateItemResponse, IUser } from "@esri/arcgis-rest-portal";
25
+ export { ICreateServiceResult, IExtent, ISpatialReference } from "@esri/arcgis-rest-service-admin";
26
+ import JSZip from "jszip";
27
+ export declare const SolutionTemplateFormatVersion = 1;
28
+ export declare const DeployedSolutionFormatVersion = 1;
29
+ export declare const UNREACHABLE = "unreachable";
30
+ /**
31
+ * Flags for storing an item's binary resources.
32
+ */
33
+ export declare enum EFileType {
34
+ Data = 0,
35
+ Info = 1,
36
+ Metadata = 2,
37
+ Resource = 3,
38
+ Thumbnail = 4
39
+ }
40
+ /**
41
+ * Text versions of flags for storing an item's binary resources.
42
+ */
43
+ export declare enum SFileType {
44
+ "Data" = 0,
45
+ "Info" = 1,
46
+ "Metadata" = 2,
47
+ "Resource" = 3,
48
+ "Thumbnail" = 4
49
+ }
50
+ /**
51
+ * Flags for reporting the status of creating or deploying an item.
52
+ */
53
+ export declare enum EItemProgressStatus {
54
+ Started = 0,
55
+ Created = 1,
56
+ Cancelled = 2,
57
+ Finished = 3,
58
+ Ignored = 4,
59
+ Failed = 5,
60
+ Unknown = 6
61
+ }
62
+ /**
63
+ * Text versions of flags for reporting the status of creating or deploying an item.
64
+ */
65
+ export declare const SItemProgressStatus: string[];
66
+ /**
67
+ * Function signature describing internal item-level progress to enable cancellation and rollback in case of failure
68
+ *
69
+ */
70
+ export type IItemProgressCallback = (
71
+ /**
72
+ * Id of item
73
+ */
74
+ itemId: string,
75
+ /**
76
+ * Progress status code (e.g., Started, Created,...)
77
+ */
78
+ status: EItemProgressStatus,
79
+ /**
80
+ * Accumulated "costs" of task, which can be divided by the total estimated cost to get percent done
81
+ */
82
+ costUsed: number,
83
+ /**
84
+ * Id of created item, which is supplied when status is EItemProgressStatus.Created or .Finished
85
+ */
86
+ createdItemId?: string) => boolean;
87
+ /**
88
+ * Function signature describing progress to calling programs
89
+ */
90
+ export type ISolutionProgressCallback = (
91
+ /**
92
+ * Percent of total work done
93
+ */
94
+ percentDone: number,
95
+ /**
96
+ * Calling-program-supplied id, perhaps used to distinguish between concurrent deployments or deletions
97
+ */
98
+ jobId?: string,
99
+ /**
100
+ * Packet of supplemental information provided from certain progress states, e.g., Finished deleting an item
101
+ * or deploying a Solution item
102
+ */
103
+ progressEvent?: ISolutionProgressEvent) => void;
104
+ export type INoArgFunction = () => any;
105
+ /**
106
+ * Result of creating a unique group
107
+ */
108
+ export interface IAddGroupResponse {
109
+ /**
110
+ * Success or failure
111
+ */
112
+ success: boolean;
113
+ /**
114
+ * Id of created group
115
+ */
116
+ group: IGroup;
117
+ }
118
+ /**
119
+ * Additional info to be used when searching the contents of a group
120
+ */
121
+ export interface IAdditionalGroupSearchOptions {
122
+ /**
123
+ * The number of the first entry requested. The index number is 1-based.
124
+ */
125
+ start?: number;
126
+ /**
127
+ * The number of results requested.
128
+ */
129
+ num?: number;
130
+ /**
131
+ * Sets sort field for group items. Values: title | owner | avgrating | numviews | created | modified
132
+ */
133
+ sortField?: string;
134
+ /**
135
+ * Sets sort order for group items. Values: asc | desc
136
+ */
137
+ sortOrder?: string;
138
+ /**
139
+ * The bounding box for a spatial search defined as minx, miny, maxx, or maxy. Spatial search is an
140
+ * overlaps/intersects function of the query bbox and the extent of the document. Documents that have
141
+ * no extent (for example, mxds, 3dds, lyr) will not be found when doing a bbox search. Document extent
142
+ * is assumed to be in the WGS84 geographic coordinate system. E.g.: "-118,32,-116,34"
143
+ */
144
+ bbox?: string;
145
+ /**
146
+ * A list of desired categories; maximum of 8
147
+ */
148
+ categories?: string[];
149
+ /**
150
+ * Generically definines remaining/unused properties
151
+ */
152
+ [key: string]: any;
153
+ }
154
+ /**
155
+ * Results of fetching and copying a file associated with an item.
156
+ */
157
+ export interface IAssociatedFileCopyResults extends IAssociatedFileInfo, ICopyResults {
158
+ }
159
+ /**
160
+ * Information for working with a file associated with an item.
161
+ */
162
+ export interface IAssociatedFileInfo {
163
+ /**
164
+ * Resource's "folder"--the prefix before the filename
165
+ */
166
+ folder: string;
167
+ /**
168
+ * Resource's filename
169
+ */
170
+ filename: string;
171
+ /**
172
+ * An internal classification of the type of file: data, metadata, resource
173
+ */
174
+ type?: EFileType;
175
+ /**
176
+ * The mime type of the file
177
+ */
178
+ mimeType?: string;
179
+ /**
180
+ * URL where a resource, metadata, or thumbnail of an item or group can be found
181
+ */
182
+ url?: string;
183
+ /**
184
+ * File holding a resource, metadata, or thumbnail of an item or group
185
+ */
186
+ file?: File;
187
+ }
188
+ /**
189
+ * Describes the results of topologically sorting items to be deployed so that dependencies are created before
190
+ * the items that depend on them.
191
+ */
192
+ export interface IBuildOrdering {
193
+ /**
194
+ * Item ids in order in which items are to be built.
195
+ */
196
+ buildOrder: string[];
197
+ /**
198
+ * Item ids of dependencies that were not supplied to ordering algorithm.
199
+ */
200
+ missingDependencies: string[];
201
+ /**
202
+ * Dictionary of item ids that need dependency patching; each id has a list of the ids of the dependencies to be patched.
203
+ */
204
+ itemsToBePatched: IKeyedListsOfStrings;
205
+ }
206
+ /**
207
+ * Holds a complete AGO item.
208
+ */
209
+ export interface ICompleteItem {
210
+ /**
211
+ * The "base" information of an item as MIME format text/plain JSON
212
+ */
213
+ base: IItem;
214
+ /**
215
+ * The data section of an item as a file even though it may be JSON
216
+ */
217
+ data: File;
218
+ /**
219
+ * The item's thumbnail as MIME format image/*
220
+ */
221
+ thumbnail: File;
222
+ /**
223
+ * The item's metadata as MIME format application/xml
224
+ */
225
+ metadata: File;
226
+ /**
227
+ * The item's resource files
228
+ */
229
+ resources: File[];
230
+ /**
231
+ * list of forward relationshipType/relatedItems[] pairs
232
+ */
233
+ fwdRelatedItems: IRelatedItems[];
234
+ /**
235
+ * list of reverse relationshipType/relatedItems[] pairs
236
+ */
237
+ revRelatedItems: IRelatedItems[];
238
+ /**
239
+ * Additional feature-service-only info
240
+ */
241
+ featureServiceProperties?: IFeatureServiceProperties;
242
+ /**
243
+ * Additional workflow-only info
244
+ */
245
+ workflowConfiguration?: any;
246
+ }
247
+ /**
248
+ * Results of fetching and copying an item.
249
+ */
250
+ export interface ICopyResults {
251
+ /**
252
+ * Status of fetching item from source
253
+ */
254
+ fetchedFromSource: boolean;
255
+ /**
256
+ * Status of copying item to destination; undefined if fetchedFromSource is false
257
+ */
258
+ copiedToDestination?: boolean;
259
+ }
260
+ export interface ICreateItemFromTemplateResponse {
261
+ /**
262
+ * Created item
263
+ */
264
+ item?: IItemTemplate;
265
+ /**
266
+ * Item's AGO id
267
+ */
268
+ id: string;
269
+ /**
270
+ * AGO item type name
271
+ */
272
+ type: string;
273
+ /**
274
+ * Does the item need post processing to handle unresolved variables
275
+ */
276
+ postProcess: boolean;
277
+ }
278
+ /**
279
+ * Options for creating a solution item.
280
+ */
281
+ export interface ICreateSolutionOptions {
282
+ /**
283
+ * Calling-program-supplied id, perhaps used to distinguish between concurrent deployments or deletions;
284
+ * default: id of group used to create Solution
285
+ */
286
+ jobId?: string;
287
+ /**
288
+ * Title to be given to created Solution item; defaults: for a group, group title;
289
+ * for an item, random string from common.createShortId()
290
+ */
291
+ title?: string;
292
+ /**
293
+ * Snippet to be given to created Solution item; defaults: for a group, group snippet; for an item, ""
294
+ */
295
+ snippet?: string;
296
+ /**
297
+ * Description to be given to created Solution item; defaults: for a group, group description; for an item, ""
298
+ */
299
+ description?: string;
300
+ /**
301
+ * Tags to be given to created Solution item; defaults: for a group, group tags; for an item, []
302
+ */
303
+ tags?: string[];
304
+ /**
305
+ * URL to thumbnail to be given to created Solution item, but see `thumbnail` property; default: ""
306
+ */
307
+ thumbnailurl?: string;
308
+ /**
309
+ * Thumbnail file to be given to created Solution item; default: null; has priority over `thumbnailurl`
310
+ */
311
+ thumbnail?: File;
312
+ /**
313
+ * Folder in which to place created Solution item; default is top level
314
+ */
315
+ folderId?: string;
316
+ /**
317
+ * Facts to be used for creating the Solution item; default: \{\}
318
+ */
319
+ templateDictionary?: any;
320
+ /**
321
+ * Should fields be templatized; default: false
322
+ */
323
+ templatizeFields?: boolean;
324
+ /**
325
+ * Additional typeKeywords (beyond always-added ["Solution", "Template"]) to be added to Solution item; default: []
326
+ */
327
+ additionalTypeKeywords?: string[];
328
+ /**
329
+ * Packet of supplemental information provided from certain progress states, e.g., Finished deleting an item
330
+ * or deploying a Solution item
331
+ */
332
+ progressCallback?: ISolutionProgressCallback;
333
+ /**
334
+ * Should progress be echoed to the debugging console? default: false
335
+ */
336
+ consoleProgress?: boolean;
337
+ /**
338
+ * Placeholder for ids of items to be placed into Solution. DO NOT USE--it is overwritten by function createSolution
339
+ */
340
+ itemIds?: string[];
341
+ /**
342
+ * Credentials for the organization with the source items; default: solution item authentication
343
+ */
344
+ sourceItemAuthentication?: UserSession;
345
+ /**
346
+ * Groups to be included in solution; it's an alternate to including tags of the form "group.<embeddedGroupId>"
347
+ * in the top-level group.
348
+ */
349
+ subgroupIds?: string[];
350
+ }
351
+ /**
352
+ * Result of creating a solution item.
353
+ */
354
+ export interface ICreateSolutionResult {
355
+ /**
356
+ * Success or failure
357
+ */
358
+ success: boolean;
359
+ /**
360
+ * Id of created Solution template
361
+ */
362
+ solutionTemplateItemId: string;
363
+ /**
364
+ * When true items with source-itemId type keyword will be reused; default: false
365
+ */
366
+ enableItemReuse?: boolean;
367
+ }
368
+ /**
369
+ * The relevant elements of a data source that are used for templatization
370
+ */
371
+ export interface IDatasourceInfo {
372
+ /**
373
+ * Calculated pattern used for templatization eg. "\{\{itemId.fields.layerId.fieldname\}\}"
374
+ */
375
+ basePath: string;
376
+ /**
377
+ * The portal item id eg. "4efe5f693de34620934787ead6693f19"
378
+ */
379
+ itemId: string;
380
+ /**
381
+ * The id for the layer from the service eg. 0
382
+ */
383
+ layerId: number;
384
+ /**
385
+ * The webmap layer id eg. "TestLayerForDashBoardMap_632"
386
+ */
387
+ id?: string;
388
+ /**
389
+ * The id for the layer from a map could be referenced by more than one map for a solution
390
+ */
391
+ ids: string[];
392
+ /**
393
+ * The url used for fields lookup
394
+ */
395
+ url?: string;
396
+ /**
397
+ * The fields this datasource contains
398
+ */
399
+ fields: any[];
400
+ /**
401
+ * The ralative ids for references to a datasource
402
+ * Application types like dashboard can reference datasources via realtive widget reference ids
403
+ */
404
+ references?: any[];
405
+ /**
406
+ * The details on any relationships that the datasource is involved in
407
+ */
408
+ relationships: any[];
409
+ /**
410
+ * The layers adminLayerInfo
411
+ * Used to fetch relationship info in some cases
412
+ */
413
+ adminLayerInfo: any;
414
+ }
415
+ /**
416
+ * Options for deleting a deployed solution item and all of the items that were created as part of that deployment
417
+ */
418
+ export interface IDeleteSolutionOptions {
419
+ /**
420
+ * Calling-program-supplied id, perhaps used to distinguish between concurrent deployments or deletions;
421
+ * default: id of solution being deleted
422
+ */
423
+ jobId?: string;
424
+ /**
425
+ * Packet of supplemental information provided from certain progress states, e.g., Finished deleting an item
426
+ * or deploying a Solution item
427
+ */
428
+ progressCallback?: ISolutionProgressCallback;
429
+ /**
430
+ * Should progress be echoed to the debugging console? default: false
431
+ */
432
+ consoleProgress?: boolean;
433
+ }
434
+ /**
435
+ * Storage of dependencies.
436
+ */
437
+ export interface IDependency {
438
+ /**
439
+ * Dependency item id for templatization.
440
+ */
441
+ id: string;
442
+ /**
443
+ * Dependency service name for name mapping.
444
+ * This is used to find appropriate source service name for views.
445
+ */
446
+ name: string;
447
+ }
448
+ /**
449
+ * IDeployFilename extended to include the URL to the stored resource.
450
+ */
451
+ export interface IDeployFileCopyPath extends IDeployFilename {
452
+ url: string;
453
+ }
454
+ /**
455
+ * File type, folder, and filename for deploying an item's binary resource.
456
+ */
457
+ export interface IDeployFilename {
458
+ type: EFileType;
459
+ folder: string;
460
+ filename: string;
461
+ }
462
+ /**
463
+ * Options for deploying a solution item and for creating the solution index item representing the deployment
464
+ */
465
+ export interface IDeploySolutionOptions {
466
+ /**
467
+ * Calling-program-supplied id, perhaps used to distinguish between concurrent deployments or deletions;
468
+ * default: id of solution being deployed
469
+ */
470
+ jobId?: string;
471
+ /**
472
+ * Title to be given to deployed Solution item; default: copied from solution item
473
+ */
474
+ title?: string;
475
+ /**
476
+ * Snippet to be given to created Solution item; default: copied from solution item
477
+ */
478
+ snippet?: string;
479
+ /**
480
+ * Description to be given to created Solution item; default: copied from solution item
481
+ */
482
+ description?: string;
483
+ /**
484
+ * Tags to be given to created Solution item; default: copied from solution item
485
+ */
486
+ tags?: string[];
487
+ /**
488
+ * URL to thumbnail to be given to created Solution item, but see `thumbnail` property; default: copied from
489
+ * solution item
490
+ */
491
+ thumbnailurl?: string;
492
+ /**
493
+ * Thumbnail file to be given to created Solution item; default: null; has priority over `thumbnailurl`
494
+ */
495
+ thumbnail?: File;
496
+ /**
497
+ * Facts to be used for creating the Solution item; default: \{\}
498
+ */
499
+ templateDictionary?: any;
500
+ /**
501
+ * Additional typeKeywords (beyond always-added ["Solution", "Deployed"]) to be added to Solution item; default: []
502
+ */
503
+ additionalTypeKeywords?: string[];
504
+ /**
505
+ * When true items with source-itemId type keyword will be reused; default: false
506
+ */
507
+ enableItemReuse?: boolean;
508
+ /**
509
+ * Packet of supplemental information provided from certain progress states, e.g., Finished deleting an item
510
+ * or deploying a Solution item
511
+ */
512
+ progressCallback?: ISolutionProgressCallback;
513
+ /**
514
+ * Should progress be echoed to the debugging console? default: false
515
+ */
516
+ consoleProgress?: boolean;
517
+ /**
518
+ * Credentials for the organization with the source items; default: authentication supplied for deployment destination
519
+ */
520
+ storageAuthentication?: UserSession;
521
+ /**
522
+ * Version of storage read from Solution item. DO NOT USE--it is overwritten by function deploySolutionFromTemplate
523
+ */
524
+ storageVersion?: number;
525
+ }
526
+ /**
527
+ * Result of deploying a solution item.
528
+ */
529
+ export interface IDeploySolutionResult {
530
+ /**
531
+ * Success or failure
532
+ */
533
+ success: boolean;
534
+ /**
535
+ * Id of deployed Solution
536
+ */
537
+ deployedSolutionItemId: string;
538
+ }
539
+ /**
540
+ * Contains feature-service-specific properties.
541
+ */
542
+ export interface IFeatureServiceProperties {
543
+ service: any;
544
+ layers: any[];
545
+ tables: any[];
546
+ workforceInfos?: any;
547
+ contingentValues?: any;
548
+ }
549
+ /**
550
+ * File folder, filename, and data.
551
+ */
552
+ export interface IFile {
553
+ folder: string;
554
+ filename: string;
555
+ blob: Blob;
556
+ }
557
+ /**
558
+ * Filename, MIME type, and data.
559
+ */
560
+ export interface IFileMimeTyped {
561
+ filename: string;
562
+ mimeType: string;
563
+ blob: Blob;
564
+ }
565
+ /**
566
+ * Existing Items promises, associated item Ids and types
567
+ */
568
+ export interface IFindExistingItemsResponse {
569
+ existingItemsDefs: Array<Promise<any>>;
570
+ existingItemInfos: IFindExistingItemInfos[];
571
+ }
572
+ /**
573
+ * Item Id and item type
574
+ */
575
+ export interface IFindExistingItemInfos {
576
+ itemId: string;
577
+ type: string;
578
+ }
579
+ /**
580
+ * Response from removing a folder.
581
+ */
582
+ export interface IFolderStatusResponse {
583
+ /**
584
+ * Success or failure
585
+ */
586
+ success: boolean;
587
+ folder: {
588
+ username: string;
589
+ id: string;
590
+ title: string;
591
+ };
592
+ }
593
+ /**
594
+ * Undocumented property returned by portal function `getRelatedItems`.
595
+ */
596
+ interface IGetRelatedItemsResponseAggregation {
597
+ total: IGetRelatedItemsResponseAggregationTotal;
598
+ }
599
+ /**
600
+ * Undocumented property returned by portal function `getRelatedItems`.
601
+ */
602
+ interface IGetRelatedItemsResponseAggregationTotal {
603
+ /**
604
+ * Number of items returned in this response
605
+ */
606
+ count: number;
607
+ /**
608
+ * Description of `count`, e.g., "total"
609
+ */
610
+ name: string;
611
+ }
612
+ /**
613
+ * Extension of type to represent actual return from portal function `getRelatedItems`.
614
+ */
615
+ export interface IGetRelatedItemsResponseFull extends IGetRelatedItemsResponse {
616
+ /**
617
+ * Undocumented property returned by portal function `getRelatedItems`.
618
+ */
619
+ aggregations: IGetRelatedItemsResponseAggregation;
620
+ /**
621
+ * Property used in conjunction with `start` to request the next batch of related items.
622
+ */
623
+ nextkey: string | null;
624
+ /**
625
+ * Echo of number of related items requested.
626
+ */
627
+ num: number;
628
+ }
629
+ /**
630
+ * Response from getting the resources of a specified item, extended with paging properties
631
+ */
632
+ export interface IGetResourcesResponse {
633
+ /**
634
+ * Total number of responses
635
+ */
636
+ total: number;
637
+ /**
638
+ * Resources
639
+ */
640
+ resources: IResource[];
641
+ /**
642
+ * The number of the first entry requested. The index number is 1-based.
643
+ */
644
+ start: number;
645
+ /**
646
+ * The number of results requested.
647
+ */
648
+ num: number;
649
+ /**
650
+ * The 1-based index of the start of the next batch of results; value is -1 if there are no more results
651
+ * to be fetched
652
+ */
653
+ nextStart: number;
654
+ }
655
+ /**
656
+ * Response from getting the category schema set on a group.
657
+ *
658
+ * @see https://developers.arcgis.com/rest/users-groups-and-items/group-category-schema.htm
659
+ */
660
+ export interface IGroupCategorySchema {
661
+ categorySchema: IGroupCategory[];
662
+ }
663
+ /**
664
+ * Nestable category schema descripion set on a group.
665
+ *
666
+ * @see https://developers.arcgis.com/rest/users-groups-and-items/group-category-schema.htm
667
+ */
668
+ export interface IGroupCategory {
669
+ /**
670
+ * Category title
671
+ */
672
+ title: string;
673
+ /**
674
+ * Category description
675
+ */
676
+ description?: string;
677
+ /**
678
+ * Child categories of this category
679
+ */
680
+ categories?: IGroupCategory[];
681
+ }
682
+ /**
683
+ * Hierarchical arrangement of items and their dependencies.
684
+ */
685
+ export interface IHierarchyElement {
686
+ /**
687
+ * Item id
688
+ */
689
+ id: string;
690
+ /**
691
+ * Items that this item depends on
692
+ */
693
+ dependencies: IHierarchyElement[];
694
+ }
695
+ /**
696
+ * Subset of portal.IItem containing just the properties that are stored in a template--the item's "base" section.
697
+ */
698
+ export interface IItemGeneralized {
699
+ /**
700
+ * Item categories
701
+ */
702
+ categories?: string[];
703
+ /**
704
+ * Specifies the locale for which content is returned.
705
+ */
706
+ culture?: string;
707
+ /**
708
+ * Item description
709
+ */
710
+ description?: string;
711
+ /**
712
+ * _Undocumented AGO item property_
713
+ */
714
+ documentation?: string;
715
+ /**
716
+ * An array that defines the bounding rectangle of the item as [[minx, miny], [maxx, maxy]]. Should always be in WGS84.
717
+ */
718
+ extent?: number[][] | string;
719
+ /**
720
+ * The unique ID for this item.
721
+ */
722
+ id: string;
723
+ /**
724
+ * A JSON object that primarily applies to system requirements, Terms and Conditions, version, supported platforms,
725
+ * YouTube video ID, etc., associated with the application.
726
+ */
727
+ properties?: any;
728
+ /**
729
+ * A short summary description of the item.
730
+ */
731
+ snippet?: string;
732
+ /**
733
+ * The coordinate system of the item.
734
+ */
735
+ spatialReference?: ISpatialReference;
736
+ /**
737
+ * An array of user defined tags that describe the item.
738
+ */
739
+ tags?: string[];
740
+ /**
741
+ * The title of the item. This is the name that's displayed to users and by which they refer to the item.
742
+ */
743
+ title?: string;
744
+ /**
745
+ * The GIS content type of this item. Example types include Web Map, Map Service, Shapefile, and
746
+ * Web Mapping Application.
747
+ */
748
+ type: string;
749
+ /**
750
+ * An array of keywords that further describes the type of this item. Each item is tagged with a set of
751
+ * type keywords that are derived based on its primary type.
752
+ */
753
+ typeKeywords?: string[];
754
+ /**
755
+ * The URL for the resource represented by the item. Applies only to items that represent web-accessible
756
+ * resources such as map services.
757
+ */
758
+ url?: string;
759
+ /**
760
+ * Generically definines remaining/unused properties
761
+ */
762
+ [key: string]: any;
763
+ }
764
+ /**
765
+ * Extends `IItemRelationshipOptions` for the REST JS `getRelatedItems` call because it doesn't include
766
+ * the new `start` and `num` properties.
767
+ */
768
+ export interface IItemRelationshipOptionsPaging extends IItemRelationshipOptions {
769
+ params: {
770
+ /**
771
+ * Relationship direction sought
772
+ */
773
+ direction: "forward" | "reverse";
774
+ /**
775
+ * One-based index of start of next batch to fetch
776
+ */
777
+ start: number;
778
+ /**
779
+ * Number of items requested; maximum value is 100
780
+ */
781
+ num: number;
782
+ /**
783
+ * Key needed by related records search for second and subsequent batches; value comes from previous fetch
784
+ */
785
+ nextkey?: string;
786
+ };
787
+ }
788
+ /**
789
+ * The templatized form of an item or group.
790
+ */
791
+ export interface IItemTemplate {
792
+ /**
793
+ * Item's AGO id
794
+ */
795
+ itemId: string;
796
+ /**
797
+ * AGO item type name
798
+ */
799
+ type: string;
800
+ /**
801
+ * Fairly unique identifier; set to 'i' + chars 2-8 of a random number in base 36
802
+ */
803
+ key: string;
804
+ /**
805
+ * Item base section JSON
806
+ */
807
+ item: IItemGeneralized;
808
+ /**
809
+ * Item data section JSON
810
+ */
811
+ data: any;
812
+ /**
813
+ * References to item resources
814
+ */
815
+ resources: any[];
816
+ /**
817
+ * References to related item
818
+ */
819
+ relatedItems?: IRelatedItems[];
820
+ /**
821
+ * List of ids of AGO items needed by this item
822
+ */
823
+ dependencies: string[];
824
+ /**
825
+ * List of ids of AGO groups the item needs to be shared with
826
+ */
827
+ groups: string[];
828
+ /**
829
+ * Miscellaneous item-specific properties
830
+ */
831
+ properties: any;
832
+ /**
833
+ * Estimated relative cost of deploying this item; corresponds to number of progressCallback
834
+ * function calls made during while deploying it
835
+ */
836
+ estimatedDeploymentCostFactor: number;
837
+ /**
838
+ * Indicates whether this item and the user whose credential was used to fetch this item belong to the same
839
+ * ArcGIS Enterprise Portal or ArcGIS Online Organization.
840
+ */
841
+ isOrgItem?: boolean;
842
+ /**
843
+ * Allow for adhoc properties
844
+ */
845
+ [propName: string]: any;
846
+ }
847
+ /**
848
+ * Function signatures for use in a function lookup array.
849
+ */
850
+ export interface IItemTemplateConversions {
851
+ /**
852
+ * Converts an item into a template for use in a Solution.
853
+ */
854
+ convertItemToTemplate(itemInfo: any, destAuthentication: UserSession, srcAuthentication: UserSession, templateDictionary?: any): Promise<IItemTemplate>;
855
+ /**
856
+ * Creates an item using templatized info in a Solution.
857
+ */
858
+ createItemFromTemplate(template: IItemTemplate, templateDictionary: any, destinationAuthentication: UserSession, itemProgressCallback: IItemProgressCallback): Promise<ICreateItemFromTemplateResponse>;
859
+ }
860
+ /**
861
+ * Structure for mapping from item type to module with type-specific template-handling code
862
+ */
863
+ export type moduleHandler = IItemTemplateConversions | undefined | null;
864
+ /**
865
+ * Mapping from an AGO item type to the code handling that type.
866
+ */
867
+ export interface IItemTypeModuleMap {
868
+ [itemType: string]: moduleHandler;
869
+ }
870
+ export interface IItemUpdate {
871
+ id: string;
872
+ /**
873
+ * Key-value pair for update parameter.
874
+ * N.B.: Use `data` key for binary data; all other keys are serialized, which zeroes out binary data!
875
+ */
876
+ [key: string]: any;
877
+ }
878
+ /**
879
+ * Type with key access to lists of strings
880
+ */
881
+ export interface IKeyedListsOfStrings {
882
+ [key: string]: string[];
883
+ }
884
+ /**
885
+ * Type with key access to strings
886
+ */
887
+ export interface IKeyedStrings {
888
+ [key: string]: string;
889
+ }
890
+ /**
891
+ * A simple interface for a key value pair with number as the key
892
+ */
893
+ export interface INumberValuePair {
894
+ [key: number]: any;
895
+ }
896
+ /**
897
+ * Subset of a esri/portal/Portal used by this library.
898
+ */
899
+ export interface IPortalSubset {
900
+ /**
901
+ * Name of the organization.
902
+ */
903
+ name: string;
904
+ /**
905
+ * The id of the organization that owns this portal. If null then this is the default portal
906
+ * for anonymous and non-organizational users.
907
+ */
908
+ id: string;
909
+ /**
910
+ * The REST URL for the portal, for example "https://www.arcgis.com/sharing/rest" for ArcGIS Online
911
+ * and "https://www.example.com/arcgis/sharing/rest" for your in-house portal.
912
+ */
913
+ restUrl: string;
914
+ /**
915
+ * The URL to the portal instance.
916
+ */
917
+ portalUrl: string;
918
+ /**
919
+ * The prefix selected by the organization's administrator to be used with the custom base URL for the portal.
920
+ */
921
+ urlKey: string;
922
+ }
923
+ /**
924
+ * Storage of arguments for post processing functions
925
+ */
926
+ export interface IPostProcessArgs {
927
+ /**
928
+ * Status message to show after the layerDefinition is updated.
929
+ */
930
+ message: string;
931
+ /**
932
+ * Key objects to add to the layerDefinition.
933
+ */
934
+ objects: any;
935
+ /**
936
+ * Template of item to be created
937
+ */
938
+ itemTemplate: any;
939
+ /**
940
+ * Credentials for the request
941
+ */
942
+ authentication: UserSession;
943
+ }
944
+ /**
945
+ * The relevant elements of a data source that are used for templatization
946
+ */
947
+ export interface IQuickCaptureDatasource {
948
+ /**
949
+ * The portal item id for the datasource eg. "4efe5f693de34620934787ead6693f19"
950
+ */
951
+ featureServiceItemId: string;
952
+ /**
953
+ * The application item id for the datasource eg. "1d4de1e4-ef58-4e02-9159-7a6e6701cada"
954
+ */
955
+ dataSourceId: string;
956
+ /**
957
+ * The url used for the datasource
958
+ */
959
+ url: number;
960
+ }
961
+ /**
962
+ * A mapping between a relationship type and the list of item ids using that relationship.
963
+ */
964
+ export interface IRelatedItems {
965
+ /**
966
+ * The type of relationship between the two items.
967
+ *
968
+ * @see https://developers.arcgis.com/rest/users-groups-and-items/relationship-types.htm
969
+ */
970
+ relationshipType: string;
971
+ /**
972
+ * Ids of related items
973
+ */
974
+ relatedItemIds: string[];
975
+ }
976
+ /**
977
+ * Summary of a resource.
978
+ */
979
+ export interface IResource {
980
+ /**
981
+ * Name of resource
982
+ */
983
+ resource: string;
984
+ /**
985
+ * The date the resource was created. Shown in UNIX time in milliseconds.
986
+ */
987
+ created: number;
988
+ /**
989
+ * The size of the resource in bytes.
990
+ */
991
+ size: number;
992
+ }
993
+ /**
994
+ * A solution template AGO item
995
+ */
996
+ export interface ISolutionItem {
997
+ /**
998
+ * Item base section JSON
999
+ */
1000
+ item: any;
1001
+ /**
1002
+ * Item data section JSON
1003
+ */
1004
+ data: ISolutionItemData;
1005
+ /**
1006
+ * Supplemental information
1007
+ */
1008
+ properties?: IStringValuePair;
1009
+ /**
1010
+ * Generically definines remaining/unused properties
1011
+ */
1012
+ [key: string]: any;
1013
+ }
1014
+ /**
1015
+ * The data section of a solution item.
1016
+ */
1017
+ export interface ISolutionItemData {
1018
+ /**
1019
+ * General information about the solution template
1020
+ */
1021
+ metadata: any;
1022
+ /**
1023
+ * The collection of templates
1024
+ */
1025
+ templates: IItemTemplate[];
1026
+ }
1027
+ /**
1028
+ * A brief form of an item in a deployed Solution item.
1029
+ */
1030
+ export interface ISolutionItemPrecis {
1031
+ /**
1032
+ * The unique ID for this item.
1033
+ */
1034
+ id: string;
1035
+ /**
1036
+ * The GIS content type of this item. Example types include Web Map, Map Service, Shapefile, and
1037
+ * Web Mapping Application.
1038
+ */
1039
+ type: string;
1040
+ /**
1041
+ * The title of the item. This is the name that's displayed to users and by which they refer to the item.
1042
+ */
1043
+ title: string;
1044
+ /**
1045
+ * The date the item was last modified. Shown in UNIX time in milliseconds.
1046
+ */
1047
+ modified: number;
1048
+ /**
1049
+ * The username of the user who owns this item.
1050
+ */
1051
+ owner: string;
1052
+ }
1053
+ /**
1054
+ * A brief form of a deployed Solution item.
1055
+ */
1056
+ export interface ISolutionPrecis {
1057
+ /**
1058
+ * The unique ID for this Solution item.
1059
+ */
1060
+ id: string;
1061
+ /**
1062
+ * The title of the item. This is the name that's displayed to users and by which they refer to the item.
1063
+ */
1064
+ title: string;
1065
+ /**
1066
+ * Folder containing the deployed Solution
1067
+ */
1068
+ folder: string;
1069
+ /**
1070
+ * Items contained in this solution
1071
+ */
1072
+ items: ISolutionItemPrecis[];
1073
+ /**
1074
+ * Ids of groups affiliated with this solution
1075
+ */
1076
+ groups: string[];
1077
+ }
1078
+ /**
1079
+ * Packet of supplemental information provided via a ISolutionProgressCallback call.
1080
+ */
1081
+ export interface ISolutionProgressEvent {
1082
+ /**
1083
+ * Tag describing data
1084
+ */
1085
+ event: string;
1086
+ /**
1087
+ * Data
1088
+ */
1089
+ data?: any;
1090
+ }
1091
+ /**
1092
+ * Information about a resource to be copied into an item.
1093
+ */
1094
+ export interface ISourceFile {
1095
+ /**
1096
+ * The portal item id, e.g., "4efe5f693de34620934787ead6693f19", that supplies the resource
1097
+ */
1098
+ itemId: string;
1099
+ /**
1100
+ * Resource file
1101
+ */
1102
+ file: File;
1103
+ /**
1104
+ * Resource's "folder"--the prefix before the filename
1105
+ */
1106
+ folder: string;
1107
+ /**
1108
+ * Resource's filename
1109
+ */
1110
+ filename: string;
1111
+ }
1112
+ /**
1113
+ * Information for storing a resource in a storage item.
1114
+ */
1115
+ export interface ISourceFileCopyPath {
1116
+ /**
1117
+ * The portal item id, e.g., "4efe5f693de34620934787ead6693f19", that supplies the resource
1118
+ */
1119
+ itemId: string;
1120
+ /**
1121
+ * URL where a resource, metadata, or thumbnail of an item or group can be found
1122
+ */
1123
+ url: string;
1124
+ /**
1125
+ * Resource's "folder"--the prefix before the filename
1126
+ */
1127
+ folder: string;
1128
+ /**
1129
+ * Resource's filename
1130
+ */
1131
+ filename: string;
1132
+ }
1133
+ /**
1134
+ * A simple interface for a key value pair with string as the key
1135
+ */
1136
+ export interface IStringValuePair {
1137
+ [key: string]: any;
1138
+ }
1139
+ /**
1140
+ * A common status response from AGO.
1141
+ */
1142
+ export interface IStatusResponse {
1143
+ /**
1144
+ * Success or failure of request
1145
+ */
1146
+ success: boolean;
1147
+ /**
1148
+ * AGO id of item for which request was made
1149
+ */
1150
+ itemId: string;
1151
+ }
1152
+ /**
1153
+ * Storage of update info
1154
+ */
1155
+ export interface IUpdate {
1156
+ /**
1157
+ * URL for the update request
1158
+ */
1159
+ url: string;
1160
+ /**
1161
+ * object to update the layers definition
1162
+ */
1163
+ params: any;
1164
+ /**
1165
+ * arguments for post processing functions
1166
+ */
1167
+ args: IPostProcessArgs;
1168
+ }
1169
+ /**
1170
+ * Survey 123 create API parameters
1171
+ */
1172
+ export interface ISurvey123CreateParams {
1173
+ /**
1174
+ * Title for the survey Form item & folder
1175
+ */
1176
+ title: string;
1177
+ /**
1178
+ * Array of tags for the survey Form item
1179
+ */
1180
+ tags: string[];
1181
+ /**
1182
+ * Array of typeKeywords for the survey Form item
1183
+ */
1184
+ typeKeywords: string[];
1185
+ /**
1186
+ * Description for the survey Form item
1187
+ */
1188
+ description: string;
1189
+ /**
1190
+ * The survey form configuration schema. This defines configurable
1191
+ * content like the theme, questions, & header/footer text, etc.
1192
+ */
1193
+ form: any;
1194
+ /**
1195
+ * The username from the current session
1196
+ */
1197
+ username: string;
1198
+ /**
1199
+ * The token from the current session
1200
+ */
1201
+ token: string;
1202
+ /**
1203
+ * The portalUrl for Survey123 to direct API requests to
1204
+ */
1205
+ portalUrl: string;
1206
+ }
1207
+ /**
1208
+ * Successful Survey123 create API response
1209
+ */
1210
+ export interface ISurvey123CreateSuccess {
1211
+ /**
1212
+ * Statically defined, always true for success
1213
+ */
1214
+ success: true;
1215
+ /**
1216
+ * Resulting Form item ID
1217
+ */
1218
+ id: string;
1219
+ /**
1220
+ * Subset of resulting Form item details
1221
+ */
1222
+ formItemInfo: {
1223
+ /**
1224
+ * Resulting Form item typeKeywords
1225
+ */
1226
+ typeKeywords: string[];
1227
+ /**
1228
+ * Resulting Form item ownerFolder
1229
+ */
1230
+ ownerFolder: string;
1231
+ /**
1232
+ * Resulting Form item access
1233
+ */
1234
+ access: string;
1235
+ /**
1236
+ * Resulting Form item owner
1237
+ */
1238
+ owner: string;
1239
+ };
1240
+ /**
1241
+ * Subset of resulting Feature Service(s) details
1242
+ */
1243
+ featureService: {
1244
+ /**
1245
+ * Subset of source Feature Service details
1246
+ */
1247
+ source: {
1248
+ /**
1249
+ * Resulting Feature Service item ID
1250
+ */
1251
+ itemId: string;
1252
+ /**
1253
+ * Generically definines remaining/unused properties
1254
+ */
1255
+ [key: string]: any;
1256
+ };
1257
+ /**
1258
+ * Generically definines remaining/unused properties
1259
+ */
1260
+ [key: string]: any;
1261
+ };
1262
+ /**
1263
+ * Generically definines remaining/unused properties
1264
+ */
1265
+ [key: string]: any;
1266
+ }
1267
+ /**
1268
+ * Unsuccessful Survey123 create API response
1269
+ */
1270
+ export interface ISurvey123CreateError {
1271
+ /**
1272
+ * Statically defined, always false when unsuccessful
1273
+ */
1274
+ success: false;
1275
+ /**
1276
+ * Error details
1277
+ */
1278
+ error: {
1279
+ /**
1280
+ * HTTP error code
1281
+ */
1282
+ code: number;
1283
+ /**
1284
+ * Optional, additional details about the error
1285
+ */
1286
+ details: string[];
1287
+ /**
1288
+ * Message describing the error
1289
+ */
1290
+ message: string;
1291
+ };
1292
+ }
1293
+ /**
1294
+ * Result details for a successful Survey123 create
1295
+ * API request
1296
+ */
1297
+ export interface ISurvey123CreateResult {
1298
+ formId: string;
1299
+ featureServiceId: string;
1300
+ folderId: string;
1301
+ }
1302
+ /**
1303
+ * Result of fetching webmap dependencies
1304
+ */
1305
+ export interface IWebmapDependencies {
1306
+ /**
1307
+ * Updated list of dependency ids
1308
+ */
1309
+ dependencies: string[];
1310
+ /**
1311
+ * Hash from URL to AGO item id
1312
+ */
1313
+ urlHash: IKeyedStrings;
1314
+ }
1315
+ /**
1316
+ * Results of sending a zip to an item.
1317
+ */
1318
+ export interface IZipCopyResults extends IZipInfo, ICopyResults {
1319
+ }
1320
+ /**
1321
+ * Information about a zipped file.
1322
+ */
1323
+ export interface IZipInfo {
1324
+ /**
1325
+ * Zip's filename
1326
+ */
1327
+ filename: string;
1328
+ /**
1329
+ * JSZip object
1330
+ */
1331
+ zip: JSZip;
1332
+ /**
1333
+ * List of files included in this zip
1334
+ */
1335
+ filelist: any[];
1336
+ }
1337
+ /**
1338
+ * Title information for Velocity data.
1339
+ */
1340
+ export interface IVelocityTitle {
1341
+ /**
1342
+ * The current label for the object
1343
+ */
1344
+ label: string;
1345
+ /**
1346
+ * Existing titles that have been used in the org
1347
+ */
1348
+ titles: string[];
1349
+ }
1350
+ /**
1351
+ * Relative path and string contents of a file in a zip object.
1352
+ */
1353
+ export interface IZipObjectContentItem {
1354
+ /**
1355
+ * Filename
1356
+ */
1357
+ file: string;
1358
+ /**
1359
+ * Contents of file
1360
+ */
1361
+ content: string;
1362
+ }