@esri/solution-common 1.5.0 → 1.5.2

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 (33) hide show
  1. package/dist/esm/featureServiceHelpers.d.ts +11 -0
  2. package/dist/esm/featureServiceHelpers.js +35 -0
  3. package/dist/esm/featureServiceHelpers.js.map +1 -1
  4. package/dist/esm/interfaces.d.ts +1 -0
  5. package/dist/esm/interfaces.js +1 -0
  6. package/dist/esm/interfaces.js.map +1 -1
  7. package/dist/esm/resourceHelpers.d.ts +23 -2
  8. package/dist/esm/resourceHelpers.js +35 -3
  9. package/dist/esm/resourceHelpers.js.map +1 -1
  10. package/dist/esm/workforceHelpers.d.ts +4 -2
  11. package/dist/esm/workforceHelpers.js +7 -3
  12. package/dist/esm/workforceHelpers.js.map +1 -1
  13. package/dist/node/featureServiceHelpers.d.ts +11 -0
  14. package/dist/node/featureServiceHelpers.js +38 -2
  15. package/dist/node/featureServiceHelpers.js.map +1 -1
  16. package/dist/node/interfaces.d.ts +1 -0
  17. package/dist/node/interfaces.js +2 -1
  18. package/dist/node/interfaces.js.map +1 -1
  19. package/dist/node/resourceHelpers.d.ts +23 -2
  20. package/dist/node/resourceHelpers.js +37 -3
  21. package/dist/node/resourceHelpers.js.map +1 -1
  22. package/dist/node/workforceHelpers.d.ts +4 -2
  23. package/dist/node/workforceHelpers.js +7 -3
  24. package/dist/node/workforceHelpers.js.map +1 -1
  25. package/dist/umd/common.umd.js +15403 -15330
  26. package/dist/umd/common.umd.js.map +1 -1
  27. package/dist/umd/common.umd.min.js +3 -3
  28. package/dist/umd/common.umd.min.js.map +1 -1
  29. package/dist/umd/src/featureServiceHelpers.d.ts +11 -0
  30. package/dist/umd/src/interfaces.d.ts +1 -0
  31. package/dist/umd/src/resourceHelpers.d.ts +23 -2
  32. package/dist/umd/src/workforceHelpers.d.ts +4 -2
  33. package/package.json +2 -2
@@ -85,6 +85,17 @@ export declare function cachePopupInfos(data: any): any;
85
85
  * @private
86
86
  */
87
87
  export declare function _cachePopupInfo(popupInfos: IPopupInfos, type: "layers" | "tables", _items: any): void;
88
+ /**
89
+ * Store basic layer information for potential replacement if we are unable to access a given service
90
+ * added for issue #859
91
+ *
92
+ * @param layerId the id for the layer
93
+ * @param itemId the id for the item
94
+ * @param url the url for the layer
95
+ * @param templateDictionary Hash of key details used for variable replacement
96
+ * @returns templatized itemTemplate
97
+ */
98
+ export declare function cacheLayerInfo(layerId: string, itemId: string, url: string, templateDictionary: any): void;
88
99
  /**
89
100
  * Creates an item in a specified folder (except for Group item type).
90
101
  *
@@ -25,6 +25,7 @@ export { ICreateServiceResult, IExtent, ISpatialReference } from "@esri/arcgis-r
25
25
  import JSZip from "jszip";
26
26
  export declare const SolutionTemplateFormatVersion = 1;
27
27
  export declare const DeployedSolutionFormatVersion = 1;
28
+ export declare const UNREACHABLE = "unreachable";
28
29
  /**
29
30
  * Flags for storing an item's binary resources.
30
31
  */
@@ -139,7 +139,7 @@ export declare function generateStorageFilePaths(portalSharingUrl: string, stora
139
139
  * Generates a folder and filename for storing a copy of an item's thumbnail in a storage item.
140
140
  *
141
141
  * @param itemId Id of item
142
- * @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON
142
+ * @param thumbnailUrlPart Partial path to the thumbnail held in an item's JSON; can also be a filename
143
143
  * @returns Folder and filename for storage; folder is the itemID suffixed with "_info_thumbnail";
144
144
  * file is URI-encoded thumbnailUrlPart
145
145
  * @see convertStorageResourceToItemResource
@@ -158,7 +158,28 @@ export declare function isSupportedFileType(filename: string): boolean;
158
158
  */
159
159
  export declare function getThumbnailFromStorageItem(authentication: UserSession, filePaths: IDeployFileCopyPath[]): Promise<File>;
160
160
  /**
161
- * Updates the items resource that matches the filename with new content
161
+ * Removes the item's resource that matches the filename with new content
162
+ *
163
+ * @param itemId Id of the item to remove
164
+ * @param filename Name of the resource file to remove
165
+ * @param authentication Credentials for the request to the storage
166
+ * @returns A promise which resolves with a success true/false response
167
+ */
168
+ export declare function removeItemResourceFile(itemId: string, filename: string, authentication: UserSession): Promise<{
169
+ success: boolean;
170
+ }>;
171
+ /**
172
+ * Updates the item's resource that matches the filename with new content
173
+ *
174
+ * @param itemId Id of the item to update
175
+ * @param filename Name of the resource file to update
176
+ * @param resource The new content to update the resource with
177
+ * @param authentication Credentials for the request to the storage
178
+ * @returns A promise which resolves with a success true/false response
179
+ */
180
+ export declare function updateItemResourceFile(itemId: string, filename: string, resource: File, authentication: UserSession): Promise<IItemResourceResponse>;
181
+ /**
182
+ * Updates the item's resource that matches the filename with new content
162
183
  *
163
184
  * @param itemId Id of the item to update
164
185
  * @param filename Name of the resource file to update
@@ -19,9 +19,10 @@ import { IItemTemplate, IFeatureServiceProperties, UserSession } from "./interfa
19
19
  *
20
20
  * @param itemTemplate template for the workforce project item
21
21
  * @param authentication credentials for any requests
22
+ * @param templateDictionary Hash of key details used for variable replacement
22
23
  * @returns templatized itemTemplate
23
24
  */
24
- export declare function convertWorkforceItemToTemplate(itemTemplate: IItemTemplate, authentication: UserSession): Promise<IItemTemplate>;
25
+ export declare function convertWorkforceItemToTemplate(itemTemplate: IItemTemplate, authentication: UserSession, templateDictionary: any): Promise<IItemTemplate>;
25
26
  /**
26
27
  * Gets the ids of the dependencies of the workforce project.
27
28
  *
@@ -37,9 +38,10 @@ export declare function extractWorkforceDependencies(data: any, keyProperties: s
37
38
  * @param data itemTemplate data
38
39
  * @param keyProperties workforce project properties that should be templatized
39
40
  * @param urlHash a key value pair of url and itemId
41
+ * @param templateDictionary Hash of key details used for variable replacement
40
42
  * @returns an updated data object to be stored in the template
41
43
  */
42
- export declare function templatizeWorkforce(data: any, keyProperties: string[], urlHash: any): any;
44
+ export declare function templatizeWorkforce(data: any, keyProperties: string[], urlHash: any, templateDictionary: any): any;
43
45
  /**
44
46
  * Evaluate key properties in the workforce service of additional items that are needed
45
47
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/solution-common",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Provides general helper functions for @esri/solution.js.",
5
5
  "main": "dist/node/index.js",
6
6
  "unpkg": "dist/umd/common.umd.min.js",
@@ -96,5 +96,5 @@
96
96
  "esri",
97
97
  "ES6"
98
98
  ],
99
- "gitHead": "9af59d933c317bf4608d3f7d2046f48a9a8a2d35"
99
+ "gitHead": "90f2c36c7b1b367dad73a5d2349193841596eefd"
100
100
  }