@esri/hub-common 14.121.1 → 14.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/ArcGISContextManager.js +2 -0
- package/dist/esm/ArcGISContextManager.js.map +1 -1
- package/dist/esm/content/_internal/ContentBusinessRules.js +6 -0
- package/dist/esm/content/_internal/ContentBusinessRules.js.map +1 -1
- package/dist/esm/content/_internal/computeProps.js +8 -1
- package/dist/esm/content/_internal/computeProps.js.map +1 -1
- package/dist/esm/content/_internal/internalContentUtils.js.map +1 -1
- package/dist/esm/content/fetch.js +2 -2
- package/dist/esm/content/fetch.js.map +1 -1
- package/dist/esm/core/types/ISystemStatus.js +1 -0
- package/dist/esm/core/types/ISystemStatus.js.map +1 -1
- package/dist/esm/downloads/_internal/_types.js +55 -0
- package/dist/esm/downloads/_internal/_types.js.map +1 -0
- package/dist/esm/downloads/_internal/canCreateExportItem.js +15 -0
- package/dist/esm/downloads/_internal/canCreateExportItem.js.map +1 -0
- package/dist/esm/downloads/_internal/canUseExportImageFlow.js +10 -0
- package/dist/esm/downloads/_internal/canUseExportImageFlow.js.map +1 -0
- package/dist/esm/downloads/_internal/canUseExportItemFlow.js +11 -0
- package/dist/esm/downloads/_internal/canUseExportItemFlow.js.map +1 -0
- package/dist/esm/downloads/_internal/file-url-fetchers/fetchExportImageDownloadFileUrl.js +46 -0
- package/dist/esm/downloads/_internal/file-url-fetchers/fetchExportImageDownloadFileUrl.js.map +1 -0
- package/dist/esm/downloads/_internal/file-url-fetchers/fetchExportItemDownloadFileUrl.js +79 -0
- package/dist/esm/downloads/_internal/file-url-fetchers/fetchExportItemDownloadFileUrl.js.map +1 -0
- package/dist/esm/downloads/_internal/file-url-fetchers/fetchHubApiDownloadFileUrl.js +136 -0
- package/dist/esm/downloads/_internal/file-url-fetchers/fetchHubApiDownloadFileUrl.js.map +1 -0
- package/dist/esm/downloads/_internal/format-fetchers/fetchAvailableExportItemFormats.js +56 -0
- package/dist/esm/downloads/_internal/format-fetchers/fetchAvailableExportItemFormats.js.map +1 -0
- package/dist/esm/downloads/_internal/format-fetchers/fetchExportItemFormats.js +28 -0
- package/dist/esm/downloads/_internal/format-fetchers/fetchExportItemFormats.js.map +1 -0
- package/dist/esm/downloads/_internal/format-fetchers/getAllExportItemFormats.js +12 -0
- package/dist/esm/downloads/_internal/format-fetchers/getAllExportItemFormats.js.map +1 -0
- package/dist/esm/downloads/_internal/format-fetchers/getCreateReplicaFormats.js +14 -0
- package/dist/esm/downloads/_internal/format-fetchers/getCreateReplicaFormats.js.map +1 -0
- package/dist/esm/downloads/_internal/format-fetchers/getExportImageFormats.js +11 -0
- package/dist/esm/downloads/_internal/format-fetchers/getExportImageFormats.js.map +1 -0
- package/dist/esm/downloads/_internal/format-fetchers/getHubDownloadApiFormats.js +18 -0
- package/dist/esm/downloads/_internal/format-fetchers/getHubDownloadApiFormats.js.map +1 -0
- package/dist/esm/downloads/_internal/format-fetchers/getPagingJobFormats.js +10 -0
- package/dist/esm/downloads/_internal/format-fetchers/getPagingJobFormats.js.map +1 -0
- package/dist/esm/downloads/_internal/getExportItemDataUrl.js +14 -0
- package/dist/esm/downloads/_internal/getExportItemDataUrl.js.map +1 -0
- package/dist/esm/downloads/build-existing-exports-portal-query.js +1 -37
- package/dist/esm/downloads/build-existing-exports-portal-query.js.map +1 -1
- package/dist/esm/downloads/canUseCreateReplica.js +13 -0
- package/dist/esm/downloads/canUseCreateReplica.js.map +1 -0
- package/dist/esm/downloads/canUseHubDownloadApi.js +15 -0
- package/dist/esm/downloads/canUseHubDownloadApi.js.map +1 -0
- package/dist/esm/downloads/fetchDownloadFileUrl.js +29 -0
- package/dist/esm/downloads/fetchDownloadFileUrl.js.map +1 -0
- package/dist/esm/downloads/fetchDownloadFormats.js +37 -0
- package/dist/esm/downloads/fetchDownloadFormats.js.map +1 -0
- package/dist/esm/downloads/index.js +5 -0
- package/dist/esm/downloads/index.js.map +1 -1
- package/dist/esm/downloads/types.js +97 -0
- package/dist/esm/downloads/types.js.map +1 -0
- package/dist/esm/events/api/orval/api/orval-events.js.map +1 -1
- package/dist/esm/events/edit.js +8 -4
- package/dist/esm/events/edit.js.map +1 -1
- package/dist/node/ArcGISContextManager.js +2 -0
- package/dist/node/ArcGISContextManager.js.map +1 -1
- package/dist/node/content/_internal/ContentBusinessRules.js +6 -0
- package/dist/node/content/_internal/ContentBusinessRules.js.map +1 -1
- package/dist/node/content/_internal/computeProps.js +7 -0
- package/dist/node/content/_internal/computeProps.js.map +1 -1
- package/dist/node/content/_internal/internalContentUtils.js.map +1 -1
- package/dist/node/content/fetch.js +2 -2
- package/dist/node/content/fetch.js.map +1 -1
- package/dist/node/core/types/ISystemStatus.js +1 -0
- package/dist/node/core/types/ISystemStatus.js.map +1 -1
- package/dist/node/downloads/_internal/_types.js +58 -0
- package/dist/node/downloads/_internal/_types.js.map +1 -0
- package/dist/node/downloads/_internal/canCreateExportItem.js +19 -0
- package/dist/node/downloads/_internal/canCreateExportItem.js.map +1 -0
- package/dist/node/downloads/_internal/canUseExportImageFlow.js +14 -0
- package/dist/node/downloads/_internal/canUseExportImageFlow.js.map +1 -0
- package/dist/node/downloads/_internal/canUseExportItemFlow.js +15 -0
- package/dist/node/downloads/_internal/canUseExportItemFlow.js.map +1 -0
- package/dist/node/downloads/_internal/file-url-fetchers/fetchExportImageDownloadFileUrl.js +50 -0
- package/dist/node/downloads/_internal/file-url-fetchers/fetchExportImageDownloadFileUrl.js.map +1 -0
- package/dist/node/downloads/_internal/file-url-fetchers/fetchExportItemDownloadFileUrl.js +83 -0
- package/dist/node/downloads/_internal/file-url-fetchers/fetchExportItemDownloadFileUrl.js.map +1 -0
- package/dist/node/downloads/_internal/file-url-fetchers/fetchHubApiDownloadFileUrl.js +140 -0
- package/dist/node/downloads/_internal/file-url-fetchers/fetchHubApiDownloadFileUrl.js.map +1 -0
- package/dist/node/downloads/_internal/format-fetchers/fetchAvailableExportItemFormats.js +60 -0
- package/dist/node/downloads/_internal/format-fetchers/fetchAvailableExportItemFormats.js.map +1 -0
- package/dist/node/downloads/_internal/format-fetchers/fetchExportItemFormats.js +32 -0
- package/dist/node/downloads/_internal/format-fetchers/fetchExportItemFormats.js.map +1 -0
- package/dist/node/downloads/_internal/format-fetchers/getAllExportItemFormats.js +16 -0
- package/dist/node/downloads/_internal/format-fetchers/getAllExportItemFormats.js.map +1 -0
- package/dist/node/downloads/_internal/format-fetchers/getCreateReplicaFormats.js +18 -0
- package/dist/node/downloads/_internal/format-fetchers/getCreateReplicaFormats.js.map +1 -0
- package/dist/node/downloads/_internal/format-fetchers/getExportImageFormats.js +15 -0
- package/dist/node/downloads/_internal/format-fetchers/getExportImageFormats.js.map +1 -0
- package/dist/node/downloads/_internal/format-fetchers/getHubDownloadApiFormats.js +22 -0
- package/dist/node/downloads/_internal/format-fetchers/getHubDownloadApiFormats.js.map +1 -0
- package/dist/node/downloads/_internal/format-fetchers/getPagingJobFormats.js +14 -0
- package/dist/node/downloads/_internal/format-fetchers/getPagingJobFormats.js.map +1 -0
- package/dist/node/downloads/_internal/getExportItemDataUrl.js +18 -0
- package/dist/node/downloads/_internal/getExportItemDataUrl.js.map +1 -0
- package/dist/node/downloads/build-existing-exports-portal-query.js +3 -39
- package/dist/node/downloads/build-existing-exports-portal-query.js.map +1 -1
- package/dist/node/downloads/canUseCreateReplica.js +17 -0
- package/dist/node/downloads/canUseCreateReplica.js.map +1 -0
- package/dist/node/downloads/canUseHubDownloadApi.js +19 -0
- package/dist/node/downloads/canUseHubDownloadApi.js.map +1 -0
- package/dist/node/downloads/fetchDownloadFileUrl.js +33 -0
- package/dist/node/downloads/fetchDownloadFileUrl.js.map +1 -0
- package/dist/node/downloads/fetchDownloadFormats.js +41 -0
- package/dist/node/downloads/fetchDownloadFormats.js.map +1 -0
- package/dist/node/downloads/index.js +5 -0
- package/dist/node/downloads/index.js.map +1 -1
- package/dist/node/downloads/types.js +101 -0
- package/dist/node/downloads/types.js.map +1 -0
- package/dist/node/events/api/orval/api/orval-events.js.map +1 -1
- package/dist/node/events/edit.js +8 -4
- package/dist/node/events/edit.js.map +1 -1
- package/dist/types/content/_internal/ContentBusinessRules.d.ts +1 -1
- package/dist/types/content/_internal/internalContentUtils.d.ts +7 -0
- package/dist/types/core/types/IHubEditableContent.d.ts +10 -0
- package/dist/types/core/types/ISystemStatus.d.ts +1 -1
- package/dist/types/downloads/_internal/_types.d.ts +22 -0
- package/dist/types/downloads/_internal/canCreateExportItem.d.ts +13 -0
- package/dist/types/downloads/_internal/canUseExportImageFlow.d.ts +8 -0
- package/dist/types/downloads/_internal/canUseExportItemFlow.d.ts +8 -0
- package/dist/types/downloads/_internal/file-url-fetchers/fetchExportImageDownloadFileUrl.d.ts +12 -0
- package/dist/types/downloads/_internal/file-url-fetchers/fetchExportItemDownloadFileUrl.d.ts +20 -0
- package/dist/types/downloads/_internal/file-url-fetchers/fetchHubApiDownloadFileUrl.d.ts +16 -0
- package/dist/types/downloads/_internal/format-fetchers/fetchAvailableExportItemFormats.d.ts +26 -0
- package/dist/types/downloads/_internal/format-fetchers/fetchExportItemFormats.d.ts +25 -0
- package/dist/types/downloads/_internal/format-fetchers/getAllExportItemFormats.d.ts +6 -0
- package/dist/types/downloads/_internal/format-fetchers/getCreateReplicaFormats.d.ts +10 -0
- package/dist/types/downloads/_internal/format-fetchers/getExportImageFormats.d.ts +8 -0
- package/dist/types/downloads/_internal/format-fetchers/getHubDownloadApiFormats.d.ts +12 -0
- package/dist/types/downloads/_internal/format-fetchers/getPagingJobFormats.d.ts +7 -0
- package/dist/types/downloads/_internal/getExportItemDataUrl.d.ts +9 -0
- package/dist/types/downloads/build-existing-exports-portal-query.d.ts +0 -37
- package/dist/types/downloads/canUseCreateReplica.d.ts +7 -0
- package/dist/types/downloads/canUseHubDownloadApi.d.ts +9 -0
- package/dist/types/downloads/fetchDownloadFileUrl.d.ts +8 -0
- package/dist/types/downloads/fetchDownloadFormats.d.ts +7 -0
- package/dist/types/downloads/index.d.ts +5 -0
- package/dist/types/downloads/types.d.ts +152 -0
- package/dist/types/events/api/orval/api/orval-events.d.ts +24 -8
- package/package.json +1 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import HubError from "../../../HubError";
|
|
2
|
+
import { getProp } from "../../../objects/get-prop";
|
|
3
|
+
import { ArcgisHubDownloadError, DownloadOperationStatus, ServiceDownloadFormat, } from "../../types";
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* Fetches a download file url from the Hub Download API
|
|
7
|
+
*
|
|
8
|
+
* NOTE: The Hub Download API only works with a certain subset of Feature and Map services
|
|
9
|
+
* and performs different operations (i.e., calling createReplica or paging the service's
|
|
10
|
+
* features) depending on the service type and capabilities.
|
|
11
|
+
*
|
|
12
|
+
* This function does it's best to abstract those differences and provide a consistent
|
|
13
|
+
* interface for downloading data from any service supported by the Hub Download API.
|
|
14
|
+
*
|
|
15
|
+
* @param options options for refining / filtering the resulting download file
|
|
16
|
+
* @returns a url to download the file
|
|
17
|
+
*/
|
|
18
|
+
export async function fetchHubApiDownloadFileUrl(options) {
|
|
19
|
+
validateOptions(options);
|
|
20
|
+
const requestUrl = getDownloadApiRequestUrl(options);
|
|
21
|
+
const { pollInterval, progressCallback } = options;
|
|
22
|
+
return pollDownloadApi(requestUrl, pollInterval, progressCallback);
|
|
23
|
+
}
|
|
24
|
+
function validateOptions(options) {
|
|
25
|
+
const { layers = [] } = options;
|
|
26
|
+
// The Hub Download API currently requires a target layer to be specified
|
|
27
|
+
if (layers.length === 0) {
|
|
28
|
+
throw new HubError("fetchHubApiDownloadFileUrl", "No layers provided for download");
|
|
29
|
+
}
|
|
30
|
+
// The Hub Download API currently only supports downloading one
|
|
31
|
+
// layer at a time, though it could allow multiple in the future
|
|
32
|
+
if (layers.length > 1) {
|
|
33
|
+
throw new HubError("fetchHubApiDownloadFileUrl", "Multiple layer downloads are not yet supported");
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @private
|
|
38
|
+
* Generates a URL to the Hub Download API that can be polled until the download is ready
|
|
39
|
+
*
|
|
40
|
+
* @param options options for refining / filtering the resulting download file
|
|
41
|
+
* @returns a download api url that can be polled
|
|
42
|
+
*/
|
|
43
|
+
function getDownloadApiRequestUrl(options) {
|
|
44
|
+
const { entity, format, context, layers, geometry, where } = options;
|
|
45
|
+
const searchParams = new URLSearchParams({
|
|
46
|
+
redirect: "false",
|
|
47
|
+
layers: layers[0].toString(),
|
|
48
|
+
});
|
|
49
|
+
if (geometry) {
|
|
50
|
+
const geometryJSON = geometry.toJSON();
|
|
51
|
+
// Not sure why type isn't included in the toJSON() output, but our API expects it
|
|
52
|
+
geometryJSON.type = geometry.type;
|
|
53
|
+
searchParams.append("geometry", JSON.stringify(geometryJSON));
|
|
54
|
+
}
|
|
55
|
+
// GeoJSON and KML are only supported in WGS84, so we need to specify the spatial reference here
|
|
56
|
+
if ([ServiceDownloadFormat.GEOJSON, ServiceDownloadFormat.KML].includes(format)) {
|
|
57
|
+
searchParams.append("spatialRefId", "4326");
|
|
58
|
+
}
|
|
59
|
+
where && searchParams.append("where", where);
|
|
60
|
+
const token = getProp(context, "hubRequestOptions.authentication.token");
|
|
61
|
+
token && searchParams.append("token", token);
|
|
62
|
+
return `${context.hubUrl}/api/download/v1/items/${entity.id}/${format}?${searchParams.toString()}`;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* @private
|
|
66
|
+
* Polls the Hub Download API until the download is ready, then returns the download file URL
|
|
67
|
+
*
|
|
68
|
+
* @param requestUrl Hub Download Api URL to poll
|
|
69
|
+
* @param progressCallback an optional callback to report download generation progress
|
|
70
|
+
* @returns the final file URL
|
|
71
|
+
*/
|
|
72
|
+
async function pollDownloadApi(requestUrl, pollInterval, progressCallback) {
|
|
73
|
+
const response = await fetch(requestUrl);
|
|
74
|
+
if (!response.ok) {
|
|
75
|
+
const errorBody = await response.json();
|
|
76
|
+
// TODO: Add standarized messageId when available
|
|
77
|
+
throw new ArcgisHubDownloadError({
|
|
78
|
+
rawMessage: errorBody.message,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
const { status, progressInPercent, resultUrl } = await response.json();
|
|
82
|
+
const operationStatus = toDownloadOperationStatus(status);
|
|
83
|
+
if (operationStatus === DownloadOperationStatus.FAILED) {
|
|
84
|
+
throw new HubError("fetchHubApiDownloadFileUrl", "Download operation failed with a 200");
|
|
85
|
+
}
|
|
86
|
+
progressCallback && progressCallback(operationStatus, progressInPercent);
|
|
87
|
+
// Operation complete, return the download URL
|
|
88
|
+
if (resultUrl) {
|
|
89
|
+
return resultUrl;
|
|
90
|
+
}
|
|
91
|
+
// Operation still in progress, poll again
|
|
92
|
+
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
93
|
+
return pollDownloadApi(requestUrl, pollInterval, progressCallback);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* @private
|
|
97
|
+
* Returns a standardized status string based on what is returned by the Hub Download API.
|
|
98
|
+
* This is necessary because the Hub Download API returns a variety of statuses that are too
|
|
99
|
+
* technical in nature that need to be translated into a more user-friendly status.
|
|
100
|
+
*
|
|
101
|
+
* @param status status returned by the Hub Download API
|
|
102
|
+
* @returns a standardized download operation status
|
|
103
|
+
*/
|
|
104
|
+
function toDownloadOperationStatus(status) {
|
|
105
|
+
// Statuses that come back if the Download API uses createReplica under the hood
|
|
106
|
+
const createReplicaStatusMap = {
|
|
107
|
+
// Statuses that we expect to see (listed in the order they could occur)
|
|
108
|
+
Pending: DownloadOperationStatus.PENDING,
|
|
109
|
+
InProgress: DownloadOperationStatus.PROCESSING,
|
|
110
|
+
ExportingData: DownloadOperationStatus.PROCESSING,
|
|
111
|
+
ExportAttachments: DownloadOperationStatus.PROCESSING,
|
|
112
|
+
Completed: DownloadOperationStatus.COMPLETED,
|
|
113
|
+
CompletedWithErrors: DownloadOperationStatus.FAILED,
|
|
114
|
+
Failed: DownloadOperationStatus.FAILED,
|
|
115
|
+
// These statuses are not expected to be returned by the API, but are included in the documentation
|
|
116
|
+
ProvisioningReplica: DownloadOperationStatus.PROCESSING,
|
|
117
|
+
ImportChanges: DownloadOperationStatus.PROCESSING,
|
|
118
|
+
ExportChanges: DownloadOperationStatus.PROCESSING,
|
|
119
|
+
ExportingSnapshot: DownloadOperationStatus.PROCESSING,
|
|
120
|
+
ImportAttachments: DownloadOperationStatus.PROCESSING,
|
|
121
|
+
UnRegisteringReplica: DownloadOperationStatus.PROCESSING,
|
|
122
|
+
};
|
|
123
|
+
// Statuses that come back if the Download API pages the service's features
|
|
124
|
+
// under the hood They are listed in the order they are expected to occur
|
|
125
|
+
const pagingJobStatusMap = {
|
|
126
|
+
Pending: DownloadOperationStatus.PENDING,
|
|
127
|
+
InProgress: DownloadOperationStatus.PROCESSING,
|
|
128
|
+
PagingData: DownloadOperationStatus.PROCESSING,
|
|
129
|
+
ConvertingData: DownloadOperationStatus.CONVERTING,
|
|
130
|
+
Failed: DownloadOperationStatus.FAILED,
|
|
131
|
+
Completed: DownloadOperationStatus.COMPLETED,
|
|
132
|
+
};
|
|
133
|
+
return (createReplicaStatusMap[status] ||
|
|
134
|
+
pagingJobStatusMap[status]);
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=fetchHubApiDownloadFileUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchHubApiDownloadFileUrl.js","sourceRoot":"","sources":["../../../../../src/downloads/_internal/file-url-fetchers/fetchHubApiDownloadFileUrl.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EAEvB,qBAAqB,GAEtB,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,OAAqC;IAErC,eAAe,CAAC,OAAO,CAAC,CAAC;IAC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AC;AACJ,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { buildExistingExportsPortalQuery } from "../../build-existing-exports-portal-query";
|
|
2
|
+
import { PORTAL_EXPORT_TYPES, ServiceDownloadFormat, } from "../../types";
|
|
3
|
+
import { searchItems } from "@esri/arcgis-rest-portal";
|
|
4
|
+
import { getExportItemDataUrl } from "../getExportItemDataUrl";
|
|
5
|
+
import HubError from "../../../HubError";
|
|
6
|
+
import { fetchAllPages } from "../../../items/fetch-all-pages";
|
|
7
|
+
/**
|
|
8
|
+
* @private
|
|
9
|
+
* Fetches an entity's available download formats that were previously created by the Portal API's item /export
|
|
10
|
+
* endpoint. This is useful for anonymous enterprise users who need to download data from a Hosted Feature Service,
|
|
11
|
+
* but do not have the privileges to create their own item export. As the exports have been previously created, they
|
|
12
|
+
* can be downloaded statically by anyone with the URL.
|
|
13
|
+
*
|
|
14
|
+
* NOTE: This function is a work-in-progress. Various permissions and logic branches are not yet implemented.
|
|
15
|
+
*
|
|
16
|
+
* NOTE: This is a last resort approach for current Enterprise environments, but it will be replaced
|
|
17
|
+
* with using the formats defined the service's /createReplica endpoint directly in the future (i.e.,
|
|
18
|
+
* once the Enterprise team achieves feature parity with the Online team's implementation).
|
|
19
|
+
*
|
|
20
|
+
* This is because The item /export endpoint can only be used on Hosted Feature Services with the "Extract" capability
|
|
21
|
+
* enabled, which means the service will also have the /createReplica endpoint available. As /createReplica is a more
|
|
22
|
+
* flexible operation that can be invoked by anonymous users, /export becomes obsolete.
|
|
23
|
+
*
|
|
24
|
+
* @param entity Hosted Feature Service entity to fetch download formats for
|
|
25
|
+
* @param context ArcGIS application context
|
|
26
|
+
* @param layers target layers that the download will be filtered to
|
|
27
|
+
* @returns available download formats for the entity
|
|
28
|
+
*/
|
|
29
|
+
export async function fetchAvailableExportItemFormats(entity, context, layers) {
|
|
30
|
+
if (layers.length > 1) {
|
|
31
|
+
throw new HubError("fetchAvailableExportItemFormats", "Multi-layer downloads are not supported for this item");
|
|
32
|
+
}
|
|
33
|
+
// NOTE: we _need_ to pass the spatialRefId otherwise we're going to default to 4326
|
|
34
|
+
// Dang it, we'll need to pass the layerId as well... should we support multiple layers?
|
|
35
|
+
const q = buildExistingExportsPortalQuery(entity.id, { layerId: layers[0] });
|
|
36
|
+
const exportItems = (await fetchAllPages(searchItems, Object.assign({ q }, context.requestOptions)));
|
|
37
|
+
// TODO: Do we need to worry about duplicates here?
|
|
38
|
+
return exportItems.map((item) => ({
|
|
39
|
+
type: "static",
|
|
40
|
+
label: null,
|
|
41
|
+
format: getExportItemFormat(item.type),
|
|
42
|
+
url: getExportItemDataUrl(item.id, context),
|
|
43
|
+
})); // TODO: change export formats to use the ServiceDownloadFormat type
|
|
44
|
+
}
|
|
45
|
+
function getExportItemFormat(itemType) {
|
|
46
|
+
const legacyExportItemFormat = Object.keys(PORTAL_EXPORT_TYPES).find((format) => {
|
|
47
|
+
return PORTAL_EXPORT_TYPES[format].itemTypes.includes(itemType);
|
|
48
|
+
});
|
|
49
|
+
return migrateExportItemFormat(legacyExportItemFormat);
|
|
50
|
+
}
|
|
51
|
+
function migrateExportItemFormat(format) {
|
|
52
|
+
return format === "fileGeodatabase"
|
|
53
|
+
? ServiceDownloadFormat.FILE_GDB
|
|
54
|
+
: format;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=fetchAvailableExportItemFormats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchAvailableExportItemFormats.js","sourceRoot":"","sources":["../../../../../src/downloads/_internal/format-fetchers/fetchAvailableExportItemFormats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAC5F,OAAO,EAGL,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAS,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,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C9B,MAA8B;IAE9B,OAAO,MAAM,KAAK,iBAAiB;QACjC,CAAC,CAAC,qBAAqB,CAAC,QAAQ;QAChC,CAAC,CAAE,MAA2B,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @private
|
|
3
|
+
* Fetches an entity's available download formats. Owners of the entity can create all formats supported by
|
|
4
|
+
* the Portal API's item /export endpoint, while users that don't have privileges to the item /export endpoint
|
|
5
|
+
* can only download formats that were previously exported by the entity's owner.
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This function is a work-in-progress. Various permissions and logic branches are not yet implemented.
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This is a last resort approach for current Enterprise environments, but it will be replaced
|
|
10
|
+
* with using the formats defined the service's /createReplica endpoint directly in the future (i.e.,
|
|
11
|
+
* once the Enterprise team achieves feature parity with the Online team's implementation).
|
|
12
|
+
*
|
|
13
|
+
* This is because The item /export endpoint can only be used on Hosted Feature Services with the "Extract" capability
|
|
14
|
+
* enabled, which means the service will also have the /createReplica endpoint available. As /createReplica is a more
|
|
15
|
+
* flexible operation that can be invoked by anonymous users, /export becomes obsolete.
|
|
16
|
+
*
|
|
17
|
+
* @param entity Hosted Feature Service entity to fetch download formats for
|
|
18
|
+
* @param context ArcGIS application context
|
|
19
|
+
* @param layers target layers that the download will be filtered to
|
|
20
|
+
* @returns available download formats for the entity
|
|
21
|
+
*/
|
|
22
|
+
export async function fetchExportItemFormats(_entity, _context, _layers) {
|
|
23
|
+
throw new Error("Not implemented");
|
|
24
|
+
// return canCreateExport(entity, context)
|
|
25
|
+
// ? getAllExportItemFormats()
|
|
26
|
+
// : fetchAvailableExportItemFormats(entity, context, layers);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=fetchExportItemFormats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchExportItemFormats.js","sourceRoot":"","sources":["../../../../../src/downloads/_internal/format-fetchers/fetchExportItemFormats.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,OAA4B,EAC5B,QAAwB,EACxB,OAAkB;IAElB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACnC,0CAA0C;IAC1C,gCAAgC;IAChC,gEAAgE;AAClE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EXPORT_ITEM_FORMATS } from "../_types";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Returns all the download formats that are available via the Portal API's item /export endpoint.
|
|
5
|
+
*/
|
|
6
|
+
export function getAllExportItemFormats() {
|
|
7
|
+
return EXPORT_ITEM_FORMATS.map((format) => ({
|
|
8
|
+
type: "dynamic",
|
|
9
|
+
format,
|
|
10
|
+
}));
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=getAllExportItemFormats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAllExportItemFormats.js","sourceRoot":"","sources":["../../../../../src/downloads/_internal/format-fetchers/getAllExportItemFormats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEhD;;;GAGG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAC1C,IAAI,EAAE,SAAS;QACf,MAAM;KACP,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @private
|
|
3
|
+
* Returns all the download formats that are defined by the service's /createReplica endpoint.
|
|
4
|
+
*
|
|
5
|
+
* @param entity Hosted Feature Service entity to return download formats for
|
|
6
|
+
* @returns available download formats for the entity
|
|
7
|
+
*/
|
|
8
|
+
export function getCreateReplicaFormats(entity) {
|
|
9
|
+
return (entity.serverExtractFormats || []).map((format) => ({
|
|
10
|
+
type: "dynamic",
|
|
11
|
+
format: format,
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=getCreateReplicaFormats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCreateReplicaFormats.js","sourceRoot":"","sources":["../../../../../src/downloads/_internal/format-fetchers/getCreateReplicaFormats.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAA2B;IAE3B,OAAO,CAAC,MAAM,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC;QAClE,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,MAA6B;KACtC,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @private
|
|
3
|
+
* Returns all the download formats that are exposed by Image Services via the /exportImage operation.
|
|
4
|
+
*
|
|
5
|
+
* NOTE: This function is a work-in-progress. Various permissions and logic branches are not yet implemented.
|
|
6
|
+
*/
|
|
7
|
+
export function getExportImageFormats() {
|
|
8
|
+
throw new Error("Not implemented");
|
|
9
|
+
// return EXPORT_IMAGE_FORMATS.map((format) => ({ type: "dynamic", format }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=getExportImageFormats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getExportImageFormats.js","sourceRoot":"","sources":["../../../../../src/downloads/_internal/format-fetchers/getExportImageFormats.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB;IACnC,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACnC,8EAA8E;AAChF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { getCreateReplicaFormats } from "./getCreateReplicaFormats";
|
|
2
|
+
import { getPagingJobFormats } from "./getPagingJobFormats";
|
|
3
|
+
import { canUseCreateReplica } from "../../canUseCreateReplica";
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* Returns all the formats that are available for download via the Hub Download API for a given entity.
|
|
7
|
+
* Formats will vary from entity to entity depending on actual operation that the Hub Download API will
|
|
8
|
+
* perform under the hood (e.g., hitting /createReplica or paging through the service's features).
|
|
9
|
+
*
|
|
10
|
+
* @param entity Service entity to return download formats for
|
|
11
|
+
* @returns available download formats for the entity
|
|
12
|
+
*/
|
|
13
|
+
export function getHubDownloadApiFormats(entity) {
|
|
14
|
+
return canUseCreateReplica(entity)
|
|
15
|
+
? getCreateReplicaFormats(entity)
|
|
16
|
+
: getPagingJobFormats();
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=getHubDownloadApiFormats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getHubDownloadApiFormats.js","sourceRoot":"","sources":["../../../../../src/downloads/_internal/format-fetchers/getHubDownloadApiFormats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE;;;;;;;;GAQG;AACH,MAAM,UAAU,wBAAwB,CACtC,MAA2B;IAE3B,OAAO,mBAAmB,CAAC,MAAM,CAAC;QAChC,CAAC,CAAC,uBAAuB,CAAC,MAAM,CAAC;QACjC,CAAC,CAAC,mBAAmB,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HUB_PAGING_JOB_FORMATS } from "../_types";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Returns all the download formats that are available for the Hub Download API's paging job operation.
|
|
5
|
+
* @returns available download formats for the paging job operation
|
|
6
|
+
*/
|
|
7
|
+
export function getPagingJobFormats() {
|
|
8
|
+
return HUB_PAGING_JOB_FORMATS.map((format) => ({ type: "dynamic", format }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=getPagingJobFormats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getPagingJobFormats.js","sourceRoot":"","sources":["../../../../../src/downloads/_internal/format-fetchers/getPagingJobFormats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAEnD;;;;GAIG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,sBAAsB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getProp } from "../../objects";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Generates a URL to download the data of an export item.
|
|
5
|
+
* @param exportItemId ID of the export item
|
|
6
|
+
* @param context ArcGIS application context
|
|
7
|
+
* @returns URL to download the data of the export item
|
|
8
|
+
*/
|
|
9
|
+
export function getExportItemDataUrl(exportItemId, context) {
|
|
10
|
+
const baseUrl = `${context.portalUrl}/sharing/rest/content/items/${exportItemId}/data`;
|
|
11
|
+
const token = getProp(context, "hubRequestOptions.authentication.token");
|
|
12
|
+
return token ? `${baseUrl}?token=${token}` : baseUrl;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=getExportItemDataUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getExportItemDataUrl.js","sourceRoot":"","sources":["../../../../src/downloads/_internal/getExportItemDataUrl.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,YAAoB,EACpB,OAAuB;IAEvB,MAAM,OAAO,GAAG,GAAG,OAAO,CAAC,SAAS,+BAA+B,YAAY,OAAO,CAAC;IACvF,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,EAAE,wCAAwC,CAAC,CAAC;IACzE,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,UAAU,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;AACvD,CAAC"}
|
|
@@ -1,44 +1,8 @@
|
|
|
1
1
|
import { SearchQueryBuilder } from "@esri/arcgis-rest-portal";
|
|
2
2
|
import { btoa } from "abab";
|
|
3
3
|
import { flattenArray } from "../util";
|
|
4
|
+
import { PORTAL_EXPORT_TYPES } from "./types";
|
|
4
5
|
export const WGS84_WKID = "4326";
|
|
5
|
-
export const PORTAL_EXPORT_TYPES = {
|
|
6
|
-
csv: {
|
|
7
|
-
name: "CSV",
|
|
8
|
-
itemTypes: ["CSV", "CSV Collection"],
|
|
9
|
-
supportsProjection: true,
|
|
10
|
-
},
|
|
11
|
-
kml: {
|
|
12
|
-
name: "KML",
|
|
13
|
-
itemTypes: ["KML", "KML Collection"],
|
|
14
|
-
supportsProjection: false,
|
|
15
|
-
},
|
|
16
|
-
shapefile: {
|
|
17
|
-
name: "Shapefile",
|
|
18
|
-
itemTypes: ["Shapefile"],
|
|
19
|
-
supportsProjection: true,
|
|
20
|
-
},
|
|
21
|
-
fileGeodatabase: {
|
|
22
|
-
name: "File Geodatabase",
|
|
23
|
-
itemTypes: ["File Geodatabase"],
|
|
24
|
-
supportsProjection: true,
|
|
25
|
-
},
|
|
26
|
-
geojson: {
|
|
27
|
-
name: "GeoJson",
|
|
28
|
-
itemTypes: ["GeoJson"],
|
|
29
|
-
supportsProjection: false,
|
|
30
|
-
},
|
|
31
|
-
excel: {
|
|
32
|
-
name: "Excel",
|
|
33
|
-
itemTypes: ["Microsoft Excel"],
|
|
34
|
-
supportsProjection: true,
|
|
35
|
-
},
|
|
36
|
-
featureCollection: {
|
|
37
|
-
name: "Feature Collection",
|
|
38
|
-
itemTypes: ["Feature Collection"],
|
|
39
|
-
supportsProjection: true,
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
6
|
/**
|
|
43
7
|
* Puts a spatial reference into a serialized format that can be used
|
|
44
8
|
* for item typeKeywords.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-existing-exports-portal-query.js","sourceRoot":"","sources":["../../../src/downloads/build-existing-exports-portal-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"build-existing-exports-portal-query.js","sourceRoot":"","sources":["../../../src/downloads/build-existing-exports-portal-query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC;AAQjC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,yBAAyB,CACvC,gBAA4C;IAE5C,IAAI,OAAO,gBAAgB,KAAK,QAAQ,EAAE;QACxC,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,gBAAgB,CAAC;QACvC,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACrC;SAAM;QACL,OAAO,gBAAgB,CAAC;KACzB;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,iBAAiB,CAAC,YAAoB;IAC7C,IAAI,aAAa,CAAC;IAClB,IAAI;QACF,aAAa,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,EAAE,EAAE;QACxB,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACjC,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YACxB,OAAO,CAAC,EAAE,EAAE,CAAC;SACd;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,YAAoB;IAC3D,MAAM,sBAAsB,GAAG,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAC/D,MAAM,0BAA0B,GAAG,yBAAyB,CAC1D,sBAAsB,CACvB,CAAC;IACF,OAAO,gBAAgB,0BAA0B,EAAE,CAAC;AACtD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAAc;IACrD,OAAO,cAAc,MAAM,EAAE,CAAC;AAChC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,OAAyB;IACjE,8IAA8I;IAC9I,oEAAoE;IACpE,0DAA0D;IAC1D,OAAO,OAAO,CAAC,CAAC,CAAC,gBAAgB,OAAO,EAAE,CAAC,CAAC,CAAC,kBAAkB,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { isHostedFeatureServiceEntity } from "../content/hostedServiceUtils";
|
|
2
|
+
/**
|
|
3
|
+
* Determines whether Hub can perform the /createReplica operation on a given service entity.
|
|
4
|
+
* @param entity entity to check
|
|
5
|
+
* @returns whether the /createReplica operation can be used
|
|
6
|
+
*/
|
|
7
|
+
export function canUseCreateReplica(entity) {
|
|
8
|
+
// NOTE: We currently do not allow Hub to perform the /createReplica operation on non-hosted
|
|
9
|
+
// feature services due to known limitations with the enterprise implementation of /createReplica.
|
|
10
|
+
// This is a temporary restriction until the enterprise implementation is improved.
|
|
11
|
+
return (isHostedFeatureServiceEntity(entity) && !!entity.serverExtractCapability);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=canUseCreateReplica.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canUseCreateReplica.js","sourceRoot":"","sources":["../../../src/downloads/canUseCreateReplica.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAG7E;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAA2B;IAC7D,4FAA4F;IAC5F,kGAAkG;IAClG,mFAAmF;IACnF,OAAO,CACL,4BAA4B,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,uBAAuB,CACzE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { canUseCreateReplica } from "./canUseCreateReplica";
|
|
2
|
+
/**
|
|
3
|
+
* Determines if the Hub Download API can be used for the given entity.
|
|
4
|
+
* @param entity entity to check if Hub Download API can be used
|
|
5
|
+
* @param context ArcGIS context
|
|
6
|
+
* @returns whether the Hub Download API can be used
|
|
7
|
+
*/
|
|
8
|
+
export function canUseHubDownloadApi(entity, context) {
|
|
9
|
+
var _a;
|
|
10
|
+
const isDownloadApiAvailable = ((_a = context.serviceStatus) === null || _a === void 0 ? void 0 : _a["hub-downloads"]) === "online";
|
|
11
|
+
const canUsePagingJobs = ["Feature Service", "Map Service"].includes(entity.type) &&
|
|
12
|
+
entity.access === "public";
|
|
13
|
+
return (isDownloadApiAvailable && (canUsePagingJobs || canUseCreateReplica(entity)));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=canUseHubDownloadApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canUseHubDownloadApi.js","sourceRoot":"","sources":["../../../src/downloads/canUseHubDownloadApi.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAA2B,EAC3B,OAAuB;;IAEvB,MAAM,sBAAsB,GAC1B,OAAA,OAAO,CAAC,aAAa,0CAAG,eAAe,OAAM,QAAQ,CAAC;IACxD,MAAM,gBAAgB,GACpB,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;QACxD,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC;IAE7B,OAAO,CACL,sBAAsB,IAAI,CAAC,gBAAgB,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAC5E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import HubError from "../HubError";
|
|
2
|
+
import { canUseExportImageFlow } from "./_internal/canUseExportImageFlow";
|
|
3
|
+
import { canUseExportItemFlow } from "./_internal/canUseExportItemFlow";
|
|
4
|
+
import { canUseHubDownloadApi } from "./canUseHubDownloadApi";
|
|
5
|
+
/**
|
|
6
|
+
* Fetches a download file URL for the given entity and format.
|
|
7
|
+
* @param options options to refine / filter the results of the fetchDownloadFileUrl operation
|
|
8
|
+
* @returns a promise that resolves with the download file URL
|
|
9
|
+
* @throws {ArcgisHubDownloadError} if the download file URL cannot be fetched for a well-known reason
|
|
10
|
+
*/
|
|
11
|
+
export async function fetchDownloadFileUrl(options) {
|
|
12
|
+
// If the pollInterval is not set, default to 3 seconds
|
|
13
|
+
const withPollInterval = options.pollInterval == null ? Object.assign(Object.assign({}, options), { pollInterval: 3000 }) : options;
|
|
14
|
+
let fetchingFn;
|
|
15
|
+
if (canUseHubDownloadApi(withPollInterval.entity, withPollInterval.context)) {
|
|
16
|
+
fetchingFn = (await import("./_internal/file-url-fetchers/fetchHubApiDownloadFileUrl")).fetchHubApiDownloadFileUrl;
|
|
17
|
+
}
|
|
18
|
+
else if (canUseExportItemFlow(withPollInterval.entity)) {
|
|
19
|
+
fetchingFn = (await import("./_internal/file-url-fetchers/fetchExportItemDownloadFileUrl")).fetchExportItemDownloadFileUrl;
|
|
20
|
+
}
|
|
21
|
+
else if (canUseExportImageFlow(withPollInterval.entity)) {
|
|
22
|
+
fetchingFn = (await import("./_internal/file-url-fetchers/fetchExportImageDownloadFileUrl")).fetchExportImageDownloadFileUrl;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
throw new HubError("fetchDownloadFileUrl", "Downloads are not supported for this item in this environment");
|
|
26
|
+
}
|
|
27
|
+
return fetchingFn(withPollInterval);
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=fetchDownloadFileUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchDownloadFileUrl.js","sourceRoot":"","sources":["../../../src/downloads/fetchDownloadFileUrl.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,OAAqC;IAErC,uDAAuD;IACvD,MAAM,gBAAgB,GACpB,OAAO,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,iCAAM,OAAO,KAAE,YAAY,EAAE,IAAI,IAAG,CAAC,CAAC,OAAO,CAAC;IAE9E,IAAI,UAAU,CAAC;IACf,IAAI,oBAAoB,CAAC,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE;QAC3E,UAAU,GAAG,CACX,MAAM,MAAM,CAAC,0DAA0D,CAAC,CACzE,CAAC,0BAA0B,CAAC;KAC9B;SAAM,IAAI,oBAAoB,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE;QACxD,UAAU,GAAG,CACX,MAAM,MAAM,CACV,8DAA8D,CAC/D,CACF,CAAC,8BAA8B,CAAC;KAClC;SAAM,IAAI,qBAAqB,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE;QACzD,UAAU,GAAG,CACX,MAAM,MAAM,CACV,+DAA+D,CAChE,CACF,CAAC,+BAA+B,CAAC;KACnC;SAAM;QACL,MAAM,IAAI,QAAQ,CAChB,sBAAsB,EACtB,+DAA+D,CAChE,CAAC;KACH;IACD,OAAO,UAAU,CAAC,gBAAgB,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { canUseExportImageFlow } from "./_internal/canUseExportImageFlow";
|
|
2
|
+
import { canUseExportItemFlow } from "./_internal/canUseExportItemFlow";
|
|
3
|
+
import { canUseHubDownloadApi } from "./canUseHubDownloadApi";
|
|
4
|
+
/**
|
|
5
|
+
* Fetches download formats for the given entity. Also folds in any additional resources defined on the entity.
|
|
6
|
+
* @param options options to refine / filter the results of the fetchDownloadFormats operation
|
|
7
|
+
* @returns a promise that resolves with the download formats
|
|
8
|
+
*/
|
|
9
|
+
export async function fetchDownloadFormats(options) {
|
|
10
|
+
const { entity, context, layers } = options;
|
|
11
|
+
// fetch base formats for the item
|
|
12
|
+
let baseFormats = [];
|
|
13
|
+
if (canUseHubDownloadApi(entity, context)) {
|
|
14
|
+
const { getHubDownloadApiFormats } = await import("./_internal/format-fetchers/getHubDownloadApiFormats");
|
|
15
|
+
baseFormats = getHubDownloadApiFormats(entity);
|
|
16
|
+
}
|
|
17
|
+
else if (canUseExportItemFlow(entity)) {
|
|
18
|
+
const { fetchExportItemFormats } = await import("./_internal/format-fetchers/fetchExportItemFormats");
|
|
19
|
+
baseFormats = await fetchExportItemFormats(entity, context, layers);
|
|
20
|
+
}
|
|
21
|
+
else if (canUseExportImageFlow(entity)) {
|
|
22
|
+
const { getExportImageFormats } = await import("./_internal/format-fetchers/getExportImageFormats");
|
|
23
|
+
baseFormats = getExportImageFormats();
|
|
24
|
+
}
|
|
25
|
+
// add additional resource links as static formats
|
|
26
|
+
const additionalFormats = (entity.additionalResources || []).map(toStaticFormat);
|
|
27
|
+
// combine formats into single list
|
|
28
|
+
return [...baseFormats, ...additionalFormats];
|
|
29
|
+
}
|
|
30
|
+
function toStaticFormat(resource) {
|
|
31
|
+
return {
|
|
32
|
+
type: "static",
|
|
33
|
+
label: resource.name,
|
|
34
|
+
url: resource.url,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=fetchDownloadFormats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchDownloadFormats.js","sourceRoot":"","sources":["../../../src/downloads/fetchDownloadFormats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAO9D;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,OAAqC;IAErC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC5C,kCAAkC;IAClC,IAAI,WAAW,GAAsB,EAAE,CAAC;IACxC,IAAI,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;QACzC,MAAM,EAAE,wBAAwB,EAAE,GAAG,MAAM,MAAM,CAC/C,sDAAsD,CACvD,CAAC;QACF,WAAW,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;KAChD;SAAM,IAAI,oBAAoB,CAAC,MAAM,CAAC,EAAE;QACvC,MAAM,EAAE,sBAAsB,EAAE,GAAG,MAAM,MAAM,CAC7C,oDAAoD,CACrD,CAAC;QACF,WAAW,GAAG,MAAM,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;KACrE;SAAM,IAAI,qBAAqB,CAAC,MAAM,CAAC,EAAE;QACxC,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,MAAM,CAC5C,mDAAmD,CACpD,CAAC;QACF,WAAW,GAAG,qBAAqB,EAAE,CAAC;KACvC;IAED,kDAAkD;IAClD,MAAM,iBAAiB,GAAG,CAAC,MAAM,CAAC,mBAAmB,IAAI,EAAE,CAAC,CAAC,GAAG,CAC9D,cAAc,CACf,CAAC;IAEF,mCAAmC;IACnC,OAAO,CAAC,GAAG,WAAW,EAAE,GAAG,iBAAiB,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,cAAc,CACrB,QAAgC;IAEhC,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,QAAQ,CAAC,IAAI;QACpB,GAAG,EAAE,QAAQ,CAAC,GAAG;KAClB,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
export * from "./build-existing-exports-portal-query";
|
|
2
|
+
export * from "./types";
|
|
3
|
+
export * from "./fetchDownloadFileUrl";
|
|
4
|
+
export * from "./fetchDownloadFormats";
|
|
5
|
+
export * from "./canUseCreateReplica";
|
|
6
|
+
export * from "./canUseHubDownloadApi";
|
|
2
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/downloads/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/downloads/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,SAAS,CAAC;AACxB,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC"}
|