@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,607 @@
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 { IAddFolderResponse, IAddGroupResponse, IAdditionalGroupSearchOptions, ICreateItemResponse, ICreateServiceResult, IDependency, IExtent, IFeatureServiceProperties, IFolderStatusResponse, IGroup, IGroupAdd, IItem, IItemTemplate, IItemUpdate, IPostProcessArgs, IRelatedItems, ISpatialReference, IStatusResponse, ItemRelationshipType, IUpdate, IUpdateItemResponse, UserSession } from "./interfaces";
17
+ import { IUserSessionOptions } from "@esri/arcgis-rest-auth";
18
+ import { IPagingParams, ISearchOptions, ISearchResult, SearchQueryBuilder } from "@esri/arcgis-rest-portal";
19
+ import { IParams } from "@esri/arcgis-rest-request";
20
+ export { request as rest_request } from "@esri/arcgis-rest-request";
21
+ export declare function addItemData(id: string, data: any, authentication: UserSession): Promise<IUpdateItemResponse>;
22
+ /**
23
+ * Creates a UserSession via a function so that the global arcgisSolution variable can access authentication.
24
+ *
25
+ * @param options See https://esri.github.io/arcgis-rest-js/api/auth/IUserSessionOptions/
26
+ * @returns UserSession
27
+ */
28
+ export declare function getUserSession(options?: IUserSessionOptions): UserSession;
29
+ /**
30
+ * Adds a forward relationship between two items.
31
+ *
32
+ * @param originItemId Origin of relationship
33
+ * @param destinationItemId Destination of relationship
34
+ * @param relationshipType Type of relationship
35
+ * @param authentication Credentials for the request
36
+ * @returns A Promise to add item resources.
37
+ */
38
+ export declare function addForwardItemRelationship(originItemId: string, destinationItemId: string, relationshipType: ItemRelationshipType, authentication: UserSession): Promise<IStatusResponse>;
39
+ /**
40
+ * Adds forward relationships for an item.
41
+ *
42
+ * @param originItemId Origin of relationship
43
+ * @param destinationRelationships Destinations
44
+ * @param authentication Credentials for the request
45
+ * @returns A Promise to add item resources.
46
+ */
47
+ export declare function addForwardItemRelationships(originItemId: string, destinationRelationships: IRelatedItems[], authentication: UserSession): Promise<IStatusResponse[]>;
48
+ /**
49
+ * Adds a token to the query parameters of a URL.
50
+ *
51
+ * @param url URL to use as base
52
+ * @param authentication Credentials to be used to generate token for URL
53
+ * @returns A promise that will resolve with the supplied URL with `token=&lt;token&gt;` added to its query params
54
+ * unless either the URL doesn't exist or the token can't be generated
55
+ */
56
+ export declare function addTokenToUrl(url: string, authentication: UserSession): Promise<string>;
57
+ /**
58
+ * Calls addToDefinition for the service.
59
+ *
60
+ * Added retry due to some solutions failing to deploy in specific orgs/hives due to timeouts.
61
+ * On the first pass we will use the quicker sync request to add.
62
+ * If it fails we will use an async request that will avoid the timeout errors.
63
+ *
64
+ * @param url URL to use as base
65
+ * @param options the info to add to the services definition
66
+ * @param skipRetry a boolean to control if retry logic will be used. Defaults to false.
67
+ * @param useAsync a boolean to control if we will use an async request
68
+ * @returns A promise that will resolve when the request has completed
69
+ */
70
+ export declare function addToServiceDefinition(url: string, options: any, skipRetry?: boolean, useAsync?: boolean): Promise<void>;
71
+ /**
72
+ * When using an async request we need to poll the status url to know when the request has completed or failed.
73
+ *
74
+ * @param result the result returned from the addToDefinition request.
75
+ * This will contain a status url or the standard sync result.
76
+ * @param authentication Credentials to be used to generate token for URL
77
+ * @returns A promise that will resolve when the request has completed
78
+ */
79
+ export declare function checkRequestStatus(result: any, authentication: any): Promise<void>;
80
+ /**
81
+ * Converts a general search into an ISearchOptions structure.
82
+ *
83
+ * @param search Search specified in one of three ways
84
+ * @returns Recast search
85
+ */
86
+ export declare function convertToISearchOptions(search: string | ISearchOptions | SearchQueryBuilder): ISearchOptions;
87
+ /**
88
+ * Simple validate function to ensure all coordinates are numbers
89
+ * In some cases orgs can have null or undefined coordinate values associated with the org extent
90
+ *
91
+ * @param extent the extent to validate
92
+ * @returns the provided extent or a default global extent if some coordinates are not numbers
93
+ * @private
94
+ */
95
+ export declare function _validateExtent(extent: IExtent): IExtent;
96
+ /**
97
+ * If the request to convert the extent fails it has commonly been due to an invalid extent.
98
+ * This function will first attempt to use the provided extent. If it fails it will default to
99
+ * the source items extent and if that fails it will then use a default global extent.
100
+ *
101
+ * @param extent the extent to convert
102
+ * @param fallbackExtent the extent to convert if the main extent does not project to the outSR
103
+ * @param outSR the spatial reference to project to
104
+ * @param geometryServiceUrl the service url for the geometry service to use
105
+ * @param authentication the credentials for the requests
106
+ * @returns the extent projected to the provided spatial reference
107
+ * or the world extent projected to the provided spatial reference
108
+ * @private
109
+ */
110
+ export declare function convertExtentWithFallback(extent: IExtent, fallbackExtent: any, outSR: ISpatialReference, geometryServiceUrl: string, authentication: UserSession): Promise<any>;
111
+ /**
112
+ * Converts an extent to a specified spatial reference.
113
+ *
114
+ * @param extent Extent object to check and (possibly) to project
115
+ * @param outSR Desired spatial reference
116
+ * @param geometryServiceUrl Path to geometry service providing `findTransformations` and `project` services
117
+ * @param authentication Credentials for the request
118
+ * @returns Original extent if it's already using outSR or the extents projected into the outSR
119
+ */
120
+ export declare function convertExtent(extent: IExtent, outSR: ISpatialReference, geometryServiceUrl: string, authentication: UserSession): Promise<any>;
121
+ /**
122
+ * Publishes a feature service as an AGOL item; it does not include its layers and tables
123
+ *
124
+ * @param newItemTemplate Template of item to be created
125
+ * @param authentication Credentials for the request
126
+ * @param templateDictionary Hash of facts: org URL, adlib replacements, user; .user.folders property contains a list
127
+ * @returns A promise that will resolve with an object reporting success and the Solution id
128
+ */
129
+ export declare function createFeatureService(newItemTemplate: IItemTemplate, authentication: UserSession, templateDictionary: any): Promise<ICreateServiceResult>;
130
+ /**
131
+ * Publishes an item and its data, metadata, and resources as an AGOL item.
132
+ *
133
+ * @param itemInfo Item's `item` section
134
+ * @param folderId Id of folder to receive item; null indicates that the item goes into the root
135
+ * folder; ignored for Group item type
136
+ * @param destinationAuthentication Credentials for for requests to where the item is to be created
137
+ * @param itemThumbnailUrl URL to image to use for item thumbnail
138
+ * @param itemThumbnailAuthentication Credentials for requests to the thumbnail source
139
+ * @param dataFile Item's `data` section
140
+ * @param metadataFile Item's metadata file
141
+ * @param resourcesFiles Item's resources
142
+ * @param access Access to set for item: "public", "org", "private"
143
+ * @returns A promise that will resolve with an object reporting success or failure and the Solution id
144
+ */
145
+ export declare function createFullItem(itemInfo: any, folderId: string | undefined, destinationAuthentication: UserSession, itemThumbnailUrl?: string, itemThumbnailAuthentication?: UserSession, dataFile?: File, metadataFile?: File, resourcesFiles?: File[], access?: string): Promise<ICreateItemResponse>;
146
+ /**
147
+ * Publishes an item and its data as an AGOL item.
148
+ *
149
+ * @param itemInfo Item's `item` section
150
+ * @param dataInfo Item's `data` section
151
+ * @param authentication Credentials for the request
152
+ * @param folderId Id of folder to receive item; null indicates that the item goes into the root
153
+ * folder; ignored for Group item type
154
+ * @param access Access to set for item: "public", "org", "private"
155
+ * @returns A promise that will resolve with an object reporting success and the Solution id
156
+ */
157
+ export declare function createItemWithData(itemInfo: any, dataInfo: any, authentication: UserSession, folderId: string | undefined, access?: string): Promise<ICreateItemResponse>;
158
+ /**
159
+ * Creates a folder using a numeric suffix to ensure uniqueness if necessary.
160
+ *
161
+ * @param title Folder title, used as-is if possible and with suffix otherwise
162
+ * @param templateDictionary Hash of facts: org URL, adlib replacements, user; .user.folders property contains a list
163
+ * of known folder names; function updates list with existing names not yet known, and creates .user.folders if it
164
+ * doesn't exist in the dictionary
165
+ * @param authentication Credentials for creating folder
166
+ * @returns Id of created folder
167
+ */
168
+ export declare function createUniqueFolder(title: string, templateDictionary: any, authentication: UserSession): Promise<IAddFolderResponse>;
169
+ /**
170
+ * Creates a group using numeric suffix to ensure uniqueness.
171
+ *
172
+ * @param title Group title, used as-is if possible and with suffix otherwise
173
+ * @param templateDictionary Hash of facts: org URL, adlib replacements, user
174
+ * @param authentication Credentials for creating group
175
+ * @param owner Optional arg for the Tracking owner
176
+ * If the tracking owner is not the one deploying the solution
177
+ * tracker groups will be created under the deployment user but
178
+ * will be reassigned to the tracking owner.
179
+ * @returns Information about created group
180
+ */
181
+ export declare function createUniqueGroup(title: string, groupItem: IGroupAdd, templateDictionary: any, authentication: UserSession, owner?: string): Promise<IAddGroupResponse>;
182
+ /**
183
+ * Gets the ids of the dependencies of an AGOL feature service item.
184
+ * Dependencies will only exist when the service is a view.
185
+ *
186
+ * @param itemTemplate Template of item to be created
187
+ * @param authentication Credentials for the request
188
+ * @returns A promise that will resolve a list of dependencies
189
+ */
190
+ export declare function extractDependencies(itemTemplate: IItemTemplate, authentication?: UserSession): Promise<IDependency[]>;
191
+ /**
192
+ * Get json info for the services layers
193
+ *
194
+ * @param serviceUrl the url for the service
195
+ * @param layerList list of base layer info
196
+ * @param authentication Credentials for the request
197
+ * @returns A promise that will resolve a list of dependencies
198
+ */
199
+ export declare function getLayers(serviceUrl: string, layerList: any[], authentication: UserSession): Promise<any[]>;
200
+ /**
201
+ * Add additional options to a layers definition.
202
+ *
203
+ * @param args The IPostProcessArgs for the request(s)
204
+ * @param isPortal boolean to indicate if we are deploying to portal
205
+ *
206
+ * @returns An array of update instructions
207
+ * @private
208
+ */
209
+ export declare function getLayerUpdates(args: IPostProcessArgs, isPortal: boolean): IUpdate[];
210
+ /**
211
+ * Sorts relationships based on order of supporting layers and tables in the service definition
212
+ *
213
+ * @param layers the layers from the service
214
+ * @param tables the tables from the service
215
+ * @param relUpdates the relationships to add for the service
216
+ *
217
+ * @returns An array with relationships that have been sorted
218
+ * @private
219
+ */
220
+ export declare function _sortRelationships(layers: any[], tables: any[], relUpdates: any): any[];
221
+ /**
222
+ * Add additional options to a layers definition
223
+ *
224
+ * Added retry due to some solutions failing to deploy in specific orgs/hives
225
+ *
226
+ *
227
+ * @param Update will contain either add, update, or delete from service definition call
228
+ * @param skipRetry defaults to false. when true the retry logic will be ignored
229
+ * @returns A promise that will resolve when service definition call has completed
230
+ * @private
231
+ */
232
+ export declare function getRequest(update: IUpdate, skipRetry?: boolean, useAsync?: boolean): Promise<void>;
233
+ /**
234
+ * Fills in missing data, including full layer and table definitions, in a feature services' definition.
235
+ *
236
+ * @param itemTemplate Feature service item, data, dependencies definition to be modified
237
+ * @param authentication Credentials for the request to AGOL
238
+ * @returns A promise that will resolve when fullItem has been updated
239
+ * @private
240
+ */
241
+ export declare function getServiceLayersAndTables(itemTemplate: IItemTemplate, authentication: UserSession): Promise<IItemTemplate>;
242
+ /**
243
+ * Get service properties for the given url and update key props
244
+ *
245
+ * @param serviceUrl the feature service url
246
+ * @param authentication Credentials for the request to AGOL
247
+ * @param workforceService boolean to indicate if extra workforce service steps should be handled
248
+ * @returns A promise that will resolve with the service properties
249
+ * @private
250
+ */
251
+ export declare function getFeatureServiceProperties(serviceUrl: string, authentication: UserSession, workforceService?: boolean): Promise<IFeatureServiceProperties>;
252
+ /**
253
+ * Fetches the configuration of a workflow.
254
+ *
255
+ * @param itemId Id of the workflow item
256
+ * @param authentication Credentials for the request to AGOL
257
+ * @returns Promise resolving with the workflow configuration in a zip file
258
+ */
259
+ export declare function getWorkflowConfigurationZip(itemId: string, authentication: UserSession): Promise<File>;
260
+ /**
261
+ * Sets the configuration of a workflow.
262
+ *
263
+ * @param configurationZipFile Configuration files in a zip file
264
+ * @param itemId Id of the workflow item
265
+ * @param authentication Credentials for the request to AGOL
266
+ * @returns Promise resolving with the workflow configuration in a zip file
267
+ */
268
+ export declare function setWorkflowConfigurationZip(configurationZipFile: File, itemId: string, authentication: UserSession): Promise<IStatusResponse>;
269
+ /**
270
+ * Parses the layers array and will filter subsets of Layers and Tables
271
+ * Layers and Tables are both returned in the layers array when we access a feature service from the admin api.
272
+ *
273
+ * @param adminData The data of the feature service
274
+ * @returns A mutated version of the provided adminData
275
+ * @private
276
+ */
277
+ export declare function _parseAdminServiceData(adminData: any): any;
278
+ /**
279
+ * livingatlas designation test.
280
+ * These layers should not be templatized or depolyed
281
+ *
282
+ * @param groupDesignations the items group designations to evaluate
283
+ * @returns A boolean indicating if the invalid designation is found in the item info
284
+ */
285
+ export declare function hasInvalidGroupDesignations(groupDesignations: string): boolean;
286
+ /**
287
+ * Removes a folder from AGO.
288
+ *
289
+ * @param folderId Id of a folder to delete
290
+ * @param authentication Credentials for the request to AGO
291
+ * @returns A promise that will resolve with the result of the request
292
+ */
293
+ export declare function removeFolder(folderId: string, authentication: UserSession): Promise<IFolderStatusResponse>;
294
+ /**
295
+ * Removes a group from AGO.
296
+ *
297
+ * @param groupId Id of a group to delete
298
+ * @param authentication Credentials for the request to AGO
299
+ * @returns A promise that will resolve with the result of the request
300
+ */
301
+ export declare function removeGroup(groupId: string, authentication: UserSession): Promise<IStatusResponse>;
302
+ /**
303
+ * Removes an item from AGO.
304
+ *
305
+ * @param itemId Id of an item to delete
306
+ * @param authentication Credentials for the request to AGO
307
+ * @param permanentDelete If true (the default), the item is permanently deleted; if false and the item type
308
+ * supports the recycle bin, the item will be put into the recycle bin
309
+ * @returns A promise that will resolve with the result of the request
310
+ */
311
+ export declare function removeItem(itemId: string, authentication: UserSession, permanentDelete?: boolean): Promise<IStatusResponse>;
312
+ /**
313
+ * Removes an item or group from AGO.
314
+ *
315
+ * @param itemId Id of an item or group to delete
316
+ * @param authentication Credentials for the request to AGO
317
+ * @param permanentDelete If true (the default), the item is permanently deleted; if false and the item type
318
+ * supports the recycle bin, the item will be put into the recycle bin; note that this does not apply to groups
319
+ * @returns A promise that will resolve with the result of the request
320
+ */
321
+ export declare function removeItemOrGroup(itemId: string, authentication: UserSession, permanentDelete?: boolean): Promise<IStatusResponse>;
322
+ /**
323
+ * Searches for items matching a query and that the caller has access to.
324
+ *
325
+ * @param search Search string (e.g., "q=redlands+map") or a more detailed structure that can include authentication
326
+ * @returns Promise resolving with search results
327
+ * @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
328
+ */
329
+ export declare function searchItems(search: string | ISearchOptions | SearchQueryBuilder): Promise<ISearchResult<IItem>>;
330
+ /**
331
+ * Searches for items matching a query and that the caller has access to, continuing recursively until done.
332
+ *
333
+ * @param search Search string (e.g., "q=redlands+map") or a more detailed structure that can include authentication
334
+ * @param accumulatedResponse Response built from previous requests
335
+ * @returns Promise resolving with search results
336
+ * @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
337
+ */
338
+ export declare function searchAllItems(search: string | ISearchOptions | SearchQueryBuilder, accumulatedResponse?: ISearchResult<IItem>): Promise<ISearchResult<IItem>>;
339
+ /**
340
+ * Searches for groups matching criteria.
341
+ *
342
+ * @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
343
+ * @param authentication Credentials for the request to AGO
344
+ * @param additionalSearchOptions Adjustments to search, such as tranche size
345
+ * @returns A promise that will resolve with a structure with a tranche of results and
346
+ * describing how many items are available
347
+ * @see https://developers.arcgis.com/rest/users-groups-and-items/group-search.htm
348
+ * @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
349
+ */
350
+ export declare function searchGroups(searchString: string, authentication: UserSession, additionalSearchOptions?: IAdditionalGroupSearchOptions): Promise<ISearchResult<IGroup>>;
351
+ /**
352
+ * Searches for groups matching criteria recurusively.
353
+ *
354
+ * @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
355
+ * @param authentication Credentials for the request to AGO
356
+ * @param groups List of groups that have been found from previous requests
357
+ * @param inPagingParams The paging params for the recurisve searching
358
+ *
359
+ * @returns A promise that will resolve with all groups that meet the search criteria
360
+ */
361
+ export declare function searchAllGroups(searchString: string, authentication: UserSession, groups?: IGroup[], inPagingParams?: IPagingParams): Promise<IGroup[]>;
362
+ /**
363
+ * Searches for group contents matching criteria recursively.
364
+ *
365
+ * @param groupId Group whose contents are to be searched
366
+ * @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
367
+ * @param authentication Credentials for the request to AGO
368
+ * @param additionalSearchOptions Adjustments to search, such as tranche size and categories of interest; categories
369
+ * are supplied as an array: each array element consists of one or more categories to be ORed; array elements are ANDed
370
+ * @param portalUrl Rest Url of the portal to perform the search
371
+ * @param accumulatedResponse Response built from previous requests
372
+ * @returns A promise that will resolve with a structure with a tranche of results and
373
+ * describing how many items are available
374
+ * @see https://developers.arcgis.com/rest/users-groups-and-items/group-content-search.htm
375
+ * @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
376
+ */
377
+ export declare function searchGroupAllContents(groupId: string, searchString: string, authentication: UserSession, additionalSearchOptions?: IAdditionalGroupSearchOptions, portalUrl?: string, accumulatedResponse?: ISearchResult<IItem>): Promise<ISearchResult<IItem>>;
378
+ /**
379
+ * Searches for group contents matching criteria.
380
+ *
381
+ * @param groupId Group whose contents are to be searched
382
+ * @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
383
+ * @param authentication Credentials for the request to AGO
384
+ * @param additionalSearchOptions Adjustments to search, such as tranche size and categories of interest; categories
385
+ * are supplied as an array: each array element consists of one or more categories to be ORed; array elements are ANDed
386
+ * @param portalUrl Rest Url of the portal to perform the search
387
+ * @returns A promise that will resolve with a structure with a tranche of results and
388
+ * describing how many items are available
389
+ * @see https://developers.arcgis.com/rest/users-groups-and-items/group-content-search.htm
390
+ * @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
391
+ */
392
+ export declare function searchGroupContents(groupId: string, searchString: string, authentication: UserSession, additionalSearchOptions?: IAdditionalGroupSearchOptions, portalUrl?: string): Promise<ISearchResult<IItem>>;
393
+ /**
394
+ * Reassign ownership of a group
395
+ *
396
+ * @param groupId Group to remove users from
397
+ * @param userName The new owner for the group
398
+ * @param authentication Credentials for the request to
399
+ *
400
+ * @returns A promise that will resolve after the group ownership has been assigned
401
+ *
402
+ */
403
+ export declare function reassignGroup(groupId: string, userName: string, authentication: UserSession): Promise<any>;
404
+ /**
405
+ * Remove users from a group
406
+ *
407
+ * @param groupId Group to remove users from
408
+ * @param users List of users to remove from the group
409
+ * @param authentication Credentials for the request to
410
+ *
411
+ * @returns A promise that will resolve after the users have been removed
412
+ *
413
+ */
414
+ export declare function removeUsers(groupId: string, users: string[], authentication: UserSession): Promise<any>;
415
+ /**
416
+ * Shares an item to the defined group
417
+ *
418
+ * @param groupId Group to share with
419
+ * @param id the item id to share with the group
420
+ * @param destinationAuthentication Credentials for the request to AGO
421
+ * @param owner owner of the group when sharing tracking items (can be different from the deploying user)
422
+ *
423
+ * @returns A promise that will resolve after the item has been shared
424
+ *
425
+ */
426
+ export declare function shareItem(groupId: string, id: string, destinationAuthentication: UserSession, owner?: string): Promise<void>;
427
+ /**
428
+ * Updates an item.
429
+ *
430
+ * @param itemInfo The base info of an item; note that this content will be serialized, which doesn't work
431
+ * for binary content
432
+ * @param authentication Credentials for request
433
+ * @param folderId Item's folder
434
+ * @param additionalParams Updates that are put under the `params` property, which is not serialized
435
+ * @return
436
+ */
437
+ export declare function updateItem(itemInfo: IItemUpdate, authentication: UserSession, folderId?: string, additionalParams?: any): Promise<IUpdateItemResponse>;
438
+ /**
439
+ * Updates a group.
440
+ *
441
+ * @param groupInfo The base info of a group; note that this content will be serialized, which doesn't work
442
+ * for binary content
443
+ * @param authentication Credentials for request
444
+ * @param additionalParams Updates that are put under the `params` property, which is not serialized
445
+ * @returns A Promise that will resolve with the success/failure status of the request
446
+ */
447
+ export declare function updateGroup(groupInfo: IGroup, authentication: UserSession, additionalParams?: any): Promise<{
448
+ success: boolean;
449
+ groupId: string;
450
+ }>;
451
+ /**
452
+ * Updates an item.
453
+ *
454
+ * @param itemInfo The base info of an item
455
+ * @param data The items data section
456
+ * @param authentication Credentials for requests
457
+ * @param thumbnail optional thumbnail to update
458
+ * @param access "public" or "org"
459
+ * @return
460
+ */
461
+ export declare function updateItemExtended(itemInfo: IItemUpdate, data: any, authentication: UserSession, thumbnail?: File, access?: string | undefined, templateDictionary?: any): Promise<IUpdateItemResponse>;
462
+ /**
463
+ * Update an item's base and data using a dictionary.
464
+ *
465
+ * @param {string} itemId The item ID
466
+ * @param {any} templateDictionary The template dictionary
467
+ * @param {UserSession} authentication The destination session info
468
+ * @returns Promise resolving to successfulness of update
469
+ */
470
+ export declare function updateItemTemplateFromDictionary(itemId: string, templateDictionary: any, authentication: UserSession): Promise<IUpdateItemResponse>;
471
+ /**
472
+ * Updates the URL of an item.
473
+ *
474
+ * @param id AGOL id of item to update
475
+ * @param url URL to assign to item's base section
476
+ * @param authentication Credentials for the request
477
+ * @returns A promise that will resolve with the item id when the item has been updated or an AGO-style JSON failure
478
+ * response
479
+ */
480
+ export declare function updateItemURL(id: string, url: string, authentication: UserSession): Promise<string>;
481
+ /**
482
+ * Adds a data section to an item.
483
+ *
484
+ * @param itemId Id of item to receive data file
485
+ * @param dataFile Data to be added
486
+ * @param authentication Credentials for the request
487
+ * @returns Promise reporting success or failure
488
+ * @private
489
+ */
490
+ export declare function _addItemDataFile(itemId: string, dataFile: File, authentication: UserSession): Promise<IUpdateItemResponse>;
491
+ /**
492
+ * Adds a metadata file to an item.
493
+ *
494
+ * @param itemId Id of item to receive data file
495
+ * @param metadataFile Metadata to be added
496
+ * @param authentication Credentials for the request
497
+ * @returns Promise reporting success or failure
498
+ * @private
499
+ */
500
+ export declare function _addItemMetadataFile(itemId: string, metadataFile: File, authentication: UserSession): Promise<IUpdateItemResponse>;
501
+ /**
502
+ * Accumulates the number of relationships in a collection of layers.
503
+ *
504
+ * @param List of layers to examine
505
+ * @returns The number of relationships
506
+ * @private
507
+ */
508
+ export declare function _countRelationships(layers: any[]): number;
509
+ /**
510
+ * Gets the full definitions of the layers affiliated with a hosted service.
511
+ *
512
+ * @param serviceUrl URL to hosted service
513
+ * @param layerList List of layers at that service...must contain id
514
+ * @param authentication Credentials for the request
515
+ * @returns A promise that will resolve with a list of the layers from the admin api
516
+ * @private
517
+ */
518
+ export declare function _getCreateServiceOptions(newItemTemplate: IItemTemplate, authentication: UserSession, templateDictionary: any): Promise<any>;
519
+ /**
520
+ * When the services spatial reference does not match that of it's default extent
521
+ * use the out SRs default extent if it exists in the templateDictionary
522
+ * this should be set when adding a custom out wkid to the params before calling deploy
523
+ * this will help avoid situations where the orgs default extent and default world extent
524
+ * will not project successfully to the out SR
525
+ *
526
+ * @param serviceInfo the object that contains the spatial reference to evaluate
527
+ * @param templateDictionary the template dictionary
528
+ * @returns the extent to use as the fallback
529
+ * @private
530
+ */
531
+ export declare function _getFallbackExtent(serviceInfo: any, templateDictionary: any): any;
532
+ /**
533
+ * Add relationships to all layers in one call to retain fully functioning composite relationships
534
+ *
535
+ * @param args The IPostProcessArgs for the request(s)
536
+ * @returns Any relationships that should be updated for the service
537
+ * @private
538
+ */
539
+ export declare function _getRelationshipUpdates(args: IPostProcessArgs): any;
540
+ /**
541
+ * Get the stored contingent values and structure them to be added to the services layers.
542
+ *
543
+ * @param args The IPostProcessArgs for the request(s)
544
+ * @returns Any contingent values that should be added to the service.
545
+ * @private
546
+ */
547
+ export declare function _getContingentValuesUpdates(args: IPostProcessArgs): any;
548
+ /**
549
+ * Get refresh, add, update, or delete definition info
550
+ *
551
+ * @param url the base admin url for the service
552
+ * @param id the id of the layer
553
+ * @param obj parameters for the request
554
+ * @param args various arguments to help support the request
555
+ * @param type type of update the request will handle
556
+ * @returns IUpdate that has the request url and arguments
557
+ * @private
558
+ */
559
+ export declare function _getUpdate(url: string, id: any, obj: any, args: any, type: "delete" | "update" | "add" | "refresh"): IUpdate;
560
+ /**
561
+ * Changes just the domain part of a URL to lowercase.
562
+ *
563
+ * @param url URL to modify
564
+ * @return Adjusted URL
565
+ * @see From `getServerRootUrl` in arcgis-rest-js' ArcGISIdentityManager.ts
566
+ * @private
567
+ */
568
+ export declare function _lowercaseDomain(url: string): string;
569
+ /**
570
+ * Checks the two main parts of an item for unresolved variables and reports any found.
571
+ *
572
+ * @param base Item's base section
573
+ * @param data Item's data section
574
+ * @private
575
+ */
576
+ export declare function _reportVariablesInItem(itemId: string, itemType: string, base: any, data: any): void;
577
+ /**
578
+ * Updates a feature service item.
579
+ *
580
+ * @param item Item to update
581
+ * @param itemTemplate item template for the new item
582
+ * @param serviceInfo Service information
583
+ * @param params arcgis-rest-js params to update
584
+ * @param isPortal Is the service hosted in a portal?
585
+ * @returns Updated item
586
+ * @private
587
+ */
588
+ export declare function _setItemProperties(item: any, itemTemplate: IItemTemplate, serviceInfo: any, params: IParams, isPortal: boolean): any;
589
+ /**
590
+ * Set isUnique as true for indexes that reference origin relationship keyFields.
591
+ *
592
+ * @param serviceInfo Service information
593
+ * @private
594
+ */
595
+ export declare function _updateIndexesForRelationshipKeyFields(serviceInfo: any): void;
596
+ /**
597
+ * Updates the URL of an item.
598
+ *
599
+ * @param id AGOL id of item to update
600
+ * @param url URL to assign to item's base section
601
+ * @param authentication Credentials for the request
602
+ * @param numAttempts Number of times to try to set the URL if AGO says that it updated the URL, but really didn't
603
+ * @returns A promise that will resolve with the item id when the item has been updated or an AGO-style JSON failure
604
+ * response
605
+ * @private
606
+ */
607
+ export declare function _updateItemURL(id: string, url: string, authentication: UserSession, numAttempts?: number): Promise<string>;