@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.
Files changed (144) hide show
  1. package/dist/esm/ArcGISContextManager.js +2 -0
  2. package/dist/esm/ArcGISContextManager.js.map +1 -1
  3. package/dist/esm/content/_internal/ContentBusinessRules.js +6 -0
  4. package/dist/esm/content/_internal/ContentBusinessRules.js.map +1 -1
  5. package/dist/esm/content/_internal/computeProps.js +8 -1
  6. package/dist/esm/content/_internal/computeProps.js.map +1 -1
  7. package/dist/esm/content/_internal/internalContentUtils.js.map +1 -1
  8. package/dist/esm/content/fetch.js +2 -2
  9. package/dist/esm/content/fetch.js.map +1 -1
  10. package/dist/esm/core/types/ISystemStatus.js +1 -0
  11. package/dist/esm/core/types/ISystemStatus.js.map +1 -1
  12. package/dist/esm/downloads/_internal/_types.js +55 -0
  13. package/dist/esm/downloads/_internal/_types.js.map +1 -0
  14. package/dist/esm/downloads/_internal/canCreateExportItem.js +15 -0
  15. package/dist/esm/downloads/_internal/canCreateExportItem.js.map +1 -0
  16. package/dist/esm/downloads/_internal/canUseExportImageFlow.js +10 -0
  17. package/dist/esm/downloads/_internal/canUseExportImageFlow.js.map +1 -0
  18. package/dist/esm/downloads/_internal/canUseExportItemFlow.js +11 -0
  19. package/dist/esm/downloads/_internal/canUseExportItemFlow.js.map +1 -0
  20. package/dist/esm/downloads/_internal/file-url-fetchers/fetchExportImageDownloadFileUrl.js +46 -0
  21. package/dist/esm/downloads/_internal/file-url-fetchers/fetchExportImageDownloadFileUrl.js.map +1 -0
  22. package/dist/esm/downloads/_internal/file-url-fetchers/fetchExportItemDownloadFileUrl.js +79 -0
  23. package/dist/esm/downloads/_internal/file-url-fetchers/fetchExportItemDownloadFileUrl.js.map +1 -0
  24. package/dist/esm/downloads/_internal/file-url-fetchers/fetchHubApiDownloadFileUrl.js +136 -0
  25. package/dist/esm/downloads/_internal/file-url-fetchers/fetchHubApiDownloadFileUrl.js.map +1 -0
  26. package/dist/esm/downloads/_internal/format-fetchers/fetchAvailableExportItemFormats.js +56 -0
  27. package/dist/esm/downloads/_internal/format-fetchers/fetchAvailableExportItemFormats.js.map +1 -0
  28. package/dist/esm/downloads/_internal/format-fetchers/fetchExportItemFormats.js +28 -0
  29. package/dist/esm/downloads/_internal/format-fetchers/fetchExportItemFormats.js.map +1 -0
  30. package/dist/esm/downloads/_internal/format-fetchers/getAllExportItemFormats.js +12 -0
  31. package/dist/esm/downloads/_internal/format-fetchers/getAllExportItemFormats.js.map +1 -0
  32. package/dist/esm/downloads/_internal/format-fetchers/getCreateReplicaFormats.js +14 -0
  33. package/dist/esm/downloads/_internal/format-fetchers/getCreateReplicaFormats.js.map +1 -0
  34. package/dist/esm/downloads/_internal/format-fetchers/getExportImageFormats.js +11 -0
  35. package/dist/esm/downloads/_internal/format-fetchers/getExportImageFormats.js.map +1 -0
  36. package/dist/esm/downloads/_internal/format-fetchers/getHubDownloadApiFormats.js +18 -0
  37. package/dist/esm/downloads/_internal/format-fetchers/getHubDownloadApiFormats.js.map +1 -0
  38. package/dist/esm/downloads/_internal/format-fetchers/getPagingJobFormats.js +10 -0
  39. package/dist/esm/downloads/_internal/format-fetchers/getPagingJobFormats.js.map +1 -0
  40. package/dist/esm/downloads/_internal/getExportItemDataUrl.js +14 -0
  41. package/dist/esm/downloads/_internal/getExportItemDataUrl.js.map +1 -0
  42. package/dist/esm/downloads/build-existing-exports-portal-query.js +1 -37
  43. package/dist/esm/downloads/build-existing-exports-portal-query.js.map +1 -1
  44. package/dist/esm/downloads/canUseCreateReplica.js +13 -0
  45. package/dist/esm/downloads/canUseCreateReplica.js.map +1 -0
  46. package/dist/esm/downloads/canUseHubDownloadApi.js +15 -0
  47. package/dist/esm/downloads/canUseHubDownloadApi.js.map +1 -0
  48. package/dist/esm/downloads/fetchDownloadFileUrl.js +29 -0
  49. package/dist/esm/downloads/fetchDownloadFileUrl.js.map +1 -0
  50. package/dist/esm/downloads/fetchDownloadFormats.js +37 -0
  51. package/dist/esm/downloads/fetchDownloadFormats.js.map +1 -0
  52. package/dist/esm/downloads/index.js +5 -0
  53. package/dist/esm/downloads/index.js.map +1 -1
  54. package/dist/esm/downloads/types.js +97 -0
  55. package/dist/esm/downloads/types.js.map +1 -0
  56. package/dist/esm/events/api/orval/api/orval-events.js.map +1 -1
  57. package/dist/esm/events/edit.js +8 -4
  58. package/dist/esm/events/edit.js.map +1 -1
  59. package/dist/node/ArcGISContextManager.js +2 -0
  60. package/dist/node/ArcGISContextManager.js.map +1 -1
  61. package/dist/node/content/_internal/ContentBusinessRules.js +6 -0
  62. package/dist/node/content/_internal/ContentBusinessRules.js.map +1 -1
  63. package/dist/node/content/_internal/computeProps.js +7 -0
  64. package/dist/node/content/_internal/computeProps.js.map +1 -1
  65. package/dist/node/content/_internal/internalContentUtils.js.map +1 -1
  66. package/dist/node/content/fetch.js +2 -2
  67. package/dist/node/content/fetch.js.map +1 -1
  68. package/dist/node/core/types/ISystemStatus.js +1 -0
  69. package/dist/node/core/types/ISystemStatus.js.map +1 -1
  70. package/dist/node/downloads/_internal/_types.js +58 -0
  71. package/dist/node/downloads/_internal/_types.js.map +1 -0
  72. package/dist/node/downloads/_internal/canCreateExportItem.js +19 -0
  73. package/dist/node/downloads/_internal/canCreateExportItem.js.map +1 -0
  74. package/dist/node/downloads/_internal/canUseExportImageFlow.js +14 -0
  75. package/dist/node/downloads/_internal/canUseExportImageFlow.js.map +1 -0
  76. package/dist/node/downloads/_internal/canUseExportItemFlow.js +15 -0
  77. package/dist/node/downloads/_internal/canUseExportItemFlow.js.map +1 -0
  78. package/dist/node/downloads/_internal/file-url-fetchers/fetchExportImageDownloadFileUrl.js +50 -0
  79. package/dist/node/downloads/_internal/file-url-fetchers/fetchExportImageDownloadFileUrl.js.map +1 -0
  80. package/dist/node/downloads/_internal/file-url-fetchers/fetchExportItemDownloadFileUrl.js +83 -0
  81. package/dist/node/downloads/_internal/file-url-fetchers/fetchExportItemDownloadFileUrl.js.map +1 -0
  82. package/dist/node/downloads/_internal/file-url-fetchers/fetchHubApiDownloadFileUrl.js +140 -0
  83. package/dist/node/downloads/_internal/file-url-fetchers/fetchHubApiDownloadFileUrl.js.map +1 -0
  84. package/dist/node/downloads/_internal/format-fetchers/fetchAvailableExportItemFormats.js +60 -0
  85. package/dist/node/downloads/_internal/format-fetchers/fetchAvailableExportItemFormats.js.map +1 -0
  86. package/dist/node/downloads/_internal/format-fetchers/fetchExportItemFormats.js +32 -0
  87. package/dist/node/downloads/_internal/format-fetchers/fetchExportItemFormats.js.map +1 -0
  88. package/dist/node/downloads/_internal/format-fetchers/getAllExportItemFormats.js +16 -0
  89. package/dist/node/downloads/_internal/format-fetchers/getAllExportItemFormats.js.map +1 -0
  90. package/dist/node/downloads/_internal/format-fetchers/getCreateReplicaFormats.js +18 -0
  91. package/dist/node/downloads/_internal/format-fetchers/getCreateReplicaFormats.js.map +1 -0
  92. package/dist/node/downloads/_internal/format-fetchers/getExportImageFormats.js +15 -0
  93. package/dist/node/downloads/_internal/format-fetchers/getExportImageFormats.js.map +1 -0
  94. package/dist/node/downloads/_internal/format-fetchers/getHubDownloadApiFormats.js +22 -0
  95. package/dist/node/downloads/_internal/format-fetchers/getHubDownloadApiFormats.js.map +1 -0
  96. package/dist/node/downloads/_internal/format-fetchers/getPagingJobFormats.js +14 -0
  97. package/dist/node/downloads/_internal/format-fetchers/getPagingJobFormats.js.map +1 -0
  98. package/dist/node/downloads/_internal/getExportItemDataUrl.js +18 -0
  99. package/dist/node/downloads/_internal/getExportItemDataUrl.js.map +1 -0
  100. package/dist/node/downloads/build-existing-exports-portal-query.js +3 -39
  101. package/dist/node/downloads/build-existing-exports-portal-query.js.map +1 -1
  102. package/dist/node/downloads/canUseCreateReplica.js +17 -0
  103. package/dist/node/downloads/canUseCreateReplica.js.map +1 -0
  104. package/dist/node/downloads/canUseHubDownloadApi.js +19 -0
  105. package/dist/node/downloads/canUseHubDownloadApi.js.map +1 -0
  106. package/dist/node/downloads/fetchDownloadFileUrl.js +33 -0
  107. package/dist/node/downloads/fetchDownloadFileUrl.js.map +1 -0
  108. package/dist/node/downloads/fetchDownloadFormats.js +41 -0
  109. package/dist/node/downloads/fetchDownloadFormats.js.map +1 -0
  110. package/dist/node/downloads/index.js +5 -0
  111. package/dist/node/downloads/index.js.map +1 -1
  112. package/dist/node/downloads/types.js +101 -0
  113. package/dist/node/downloads/types.js.map +1 -0
  114. package/dist/node/events/api/orval/api/orval-events.js.map +1 -1
  115. package/dist/node/events/edit.js +8 -4
  116. package/dist/node/events/edit.js.map +1 -1
  117. package/dist/types/content/_internal/ContentBusinessRules.d.ts +1 -1
  118. package/dist/types/content/_internal/internalContentUtils.d.ts +7 -0
  119. package/dist/types/core/types/IHubEditableContent.d.ts +10 -0
  120. package/dist/types/core/types/ISystemStatus.d.ts +1 -1
  121. package/dist/types/downloads/_internal/_types.d.ts +22 -0
  122. package/dist/types/downloads/_internal/canCreateExportItem.d.ts +13 -0
  123. package/dist/types/downloads/_internal/canUseExportImageFlow.d.ts +8 -0
  124. package/dist/types/downloads/_internal/canUseExportItemFlow.d.ts +8 -0
  125. package/dist/types/downloads/_internal/file-url-fetchers/fetchExportImageDownloadFileUrl.d.ts +12 -0
  126. package/dist/types/downloads/_internal/file-url-fetchers/fetchExportItemDownloadFileUrl.d.ts +20 -0
  127. package/dist/types/downloads/_internal/file-url-fetchers/fetchHubApiDownloadFileUrl.d.ts +16 -0
  128. package/dist/types/downloads/_internal/format-fetchers/fetchAvailableExportItemFormats.d.ts +26 -0
  129. package/dist/types/downloads/_internal/format-fetchers/fetchExportItemFormats.d.ts +25 -0
  130. package/dist/types/downloads/_internal/format-fetchers/getAllExportItemFormats.d.ts +6 -0
  131. package/dist/types/downloads/_internal/format-fetchers/getCreateReplicaFormats.d.ts +10 -0
  132. package/dist/types/downloads/_internal/format-fetchers/getExportImageFormats.d.ts +8 -0
  133. package/dist/types/downloads/_internal/format-fetchers/getHubDownloadApiFormats.d.ts +12 -0
  134. package/dist/types/downloads/_internal/format-fetchers/getPagingJobFormats.d.ts +7 -0
  135. package/dist/types/downloads/_internal/getExportItemDataUrl.d.ts +9 -0
  136. package/dist/types/downloads/build-existing-exports-portal-query.d.ts +0 -37
  137. package/dist/types/downloads/canUseCreateReplica.d.ts +7 -0
  138. package/dist/types/downloads/canUseHubDownloadApi.d.ts +9 -0
  139. package/dist/types/downloads/fetchDownloadFileUrl.d.ts +8 -0
  140. package/dist/types/downloads/fetchDownloadFormats.d.ts +7 -0
  141. package/dist/types/downloads/index.d.ts +5 -0
  142. package/dist/types/downloads/types.d.ts +152 -0
  143. package/dist/types/events/api/orval/api/orval-events.d.ts +24 -8
  144. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canUseCreateReplica.js","sourceRoot":"","sources":["../../../src/downloads/canUseCreateReplica.ts"],"names":[],"mappings":";;;AAAA,sEAA6E;AAG7E;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,MAA2B;IAC7D,4FAA4F;IAC5F,kGAAkG;IAClG,mFAAmF;IACnF,OAAO,CACL,iDAA4B,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,uBAAuB,CACzE,CAAC;AACJ,CAAC;AAPD,kDAOC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.canUseHubDownloadApi = void 0;
4
+ const canUseCreateReplica_1 = require("./canUseCreateReplica");
5
+ /**
6
+ * Determines if the Hub Download API can be used for the given entity.
7
+ * @param entity entity to check if Hub Download API can be used
8
+ * @param context ArcGIS context
9
+ * @returns whether the Hub Download API can be used
10
+ */
11
+ function canUseHubDownloadApi(entity, context) {
12
+ var _a;
13
+ const isDownloadApiAvailable = ((_a = context.serviceStatus) === null || _a === void 0 ? void 0 : _a["hub-downloads"]) === "online";
14
+ const canUsePagingJobs = ["Feature Service", "Map Service"].includes(entity.type) &&
15
+ entity.access === "public";
16
+ return (isDownloadApiAvailable && (canUsePagingJobs || canUseCreateReplica_1.canUseCreateReplica(entity)));
17
+ }
18
+ exports.canUseHubDownloadApi = canUseHubDownloadApi;
19
+ //# sourceMappingURL=canUseHubDownloadApi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canUseHubDownloadApi.js","sourceRoot":"","sources":["../../../src/downloads/canUseHubDownloadApi.ts"],"names":[],"mappings":";;;AAEA,+DAA4D;AAE5D;;;;;GAKG;AACH,SAAgB,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,yCAAmB,CAAC,MAAM,CAAC,CAAC,CAC5E,CAAC;AACJ,CAAC;AAbD,oDAaC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchDownloadFileUrl = void 0;
4
+ const HubError_1 = require("../HubError");
5
+ const canUseExportImageFlow_1 = require("./_internal/canUseExportImageFlow");
6
+ const canUseExportItemFlow_1 = require("./_internal/canUseExportItemFlow");
7
+ const canUseHubDownloadApi_1 = require("./canUseHubDownloadApi");
8
+ /**
9
+ * Fetches a download file URL for the given entity and format.
10
+ * @param options options to refine / filter the results of the fetchDownloadFileUrl operation
11
+ * @returns a promise that resolves with the download file URL
12
+ * @throws {ArcgisHubDownloadError} if the download file URL cannot be fetched for a well-known reason
13
+ */
14
+ async function fetchDownloadFileUrl(options) {
15
+ // If the pollInterval is not set, default to 3 seconds
16
+ const withPollInterval = options.pollInterval == null ? Object.assign(Object.assign({}, options), { pollInterval: 3000 }) : options;
17
+ let fetchingFn;
18
+ if (canUseHubDownloadApi_1.canUseHubDownloadApi(withPollInterval.entity, withPollInterval.context)) {
19
+ fetchingFn = (await Promise.resolve().then(() => require("./_internal/file-url-fetchers/fetchHubApiDownloadFileUrl"))).fetchHubApiDownloadFileUrl;
20
+ }
21
+ else if (canUseExportItemFlow_1.canUseExportItemFlow(withPollInterval.entity)) {
22
+ fetchingFn = (await Promise.resolve().then(() => require("./_internal/file-url-fetchers/fetchExportItemDownloadFileUrl"))).fetchExportItemDownloadFileUrl;
23
+ }
24
+ else if (canUseExportImageFlow_1.canUseExportImageFlow(withPollInterval.entity)) {
25
+ fetchingFn = (await Promise.resolve().then(() => require("./_internal/file-url-fetchers/fetchExportImageDownloadFileUrl"))).fetchExportImageDownloadFileUrl;
26
+ }
27
+ else {
28
+ throw new HubError_1.default("fetchDownloadFileUrl", "Downloads are not supported for this item in this environment");
29
+ }
30
+ return fetchingFn(withPollInterval);
31
+ }
32
+ exports.fetchDownloadFileUrl = fetchDownloadFileUrl;
33
+ //# sourceMappingURL=fetchDownloadFileUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchDownloadFileUrl.js","sourceRoot":"","sources":["../../../src/downloads/fetchDownloadFileUrl.ts"],"names":[],"mappings":";;;AAAA,0CAAmC;AAEnC,6EAA0E;AAC1E,2EAAwE;AACxE,iEAA8D;AAG9D;;;;;GAKG;AACI,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,2CAAoB,CAAC,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE;QAC3E,UAAU,GAAG,CACX,2CAAa,0DAA0D,EAAC,CACzE,CAAC,0BAA0B,CAAC;KAC9B;SAAM,IAAI,2CAAoB,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE;QACxD,UAAU,GAAG,CACX,2CACE,8DAA8D,EAC/D,CACF,CAAC,8BAA8B,CAAC;KAClC;SAAM,IAAI,6CAAqB,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE;QACzD,UAAU,GAAG,CACX,2CACE,+DAA+D,EAChE,CACF,CAAC,+BAA+B,CAAC;KACnC;SAAM;QACL,MAAM,IAAI,kBAAQ,CAChB,sBAAsB,EACtB,+DAA+D,CAChE,CAAC;KACH;IACD,OAAO,UAAU,CAAC,gBAAgB,CAAC,CAAC;AACtC,CAAC;AA/BD,oDA+BC"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fetchDownloadFormats = void 0;
4
+ const canUseExportImageFlow_1 = require("./_internal/canUseExportImageFlow");
5
+ const canUseExportItemFlow_1 = require("./_internal/canUseExportItemFlow");
6
+ const canUseHubDownloadApi_1 = require("./canUseHubDownloadApi");
7
+ /**
8
+ * Fetches download formats for the given entity. Also folds in any additional resources defined on the entity.
9
+ * @param options options to refine / filter the results of the fetchDownloadFormats operation
10
+ * @returns a promise that resolves with the download formats
11
+ */
12
+ async function fetchDownloadFormats(options) {
13
+ const { entity, context, layers } = options;
14
+ // fetch base formats for the item
15
+ let baseFormats = [];
16
+ if (canUseHubDownloadApi_1.canUseHubDownloadApi(entity, context)) {
17
+ const { getHubDownloadApiFormats } = await Promise.resolve().then(() => require("./_internal/format-fetchers/getHubDownloadApiFormats"));
18
+ baseFormats = getHubDownloadApiFormats(entity);
19
+ }
20
+ else if (canUseExportItemFlow_1.canUseExportItemFlow(entity)) {
21
+ const { fetchExportItemFormats } = await Promise.resolve().then(() => require("./_internal/format-fetchers/fetchExportItemFormats"));
22
+ baseFormats = await fetchExportItemFormats(entity, context, layers);
23
+ }
24
+ else if (canUseExportImageFlow_1.canUseExportImageFlow(entity)) {
25
+ const { getExportImageFormats } = await Promise.resolve().then(() => require("./_internal/format-fetchers/getExportImageFormats"));
26
+ baseFormats = getExportImageFormats();
27
+ }
28
+ // add additional resource links as static formats
29
+ const additionalFormats = (entity.additionalResources || []).map(toStaticFormat);
30
+ // combine formats into single list
31
+ return [...baseFormats, ...additionalFormats];
32
+ }
33
+ exports.fetchDownloadFormats = fetchDownloadFormats;
34
+ function toStaticFormat(resource) {
35
+ return {
36
+ type: "static",
37
+ label: resource.name,
38
+ url: resource.url,
39
+ };
40
+ }
41
+ //# sourceMappingURL=fetchDownloadFormats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchDownloadFormats.js","sourceRoot":"","sources":["../../../src/downloads/fetchDownloadFormats.ts"],"names":[],"mappings":";;;AACA,6EAA0E;AAC1E,2EAAwE;AACxE,iEAA8D;AAO9D;;;;GAIG;AACI,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,2CAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;QACzC,MAAM,EAAE,wBAAwB,EAAE,GAAG,2CACnC,sDAAsD,EACvD,CAAC;QACF,WAAW,GAAG,wBAAwB,CAAC,MAAM,CAAC,CAAC;KAChD;SAAM,IAAI,2CAAoB,CAAC,MAAM,CAAC,EAAE;QACvC,MAAM,EAAE,sBAAsB,EAAE,GAAG,2CACjC,oDAAoD,EACrD,CAAC;QACF,WAAW,GAAG,MAAM,sBAAsB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;KACrE;SAAM,IAAI,6CAAqB,CAAC,MAAM,CAAC,EAAE;QACxC,MAAM,EAAE,qBAAqB,EAAE,GAAG,2CAChC,mDAAmD,EACpD,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;AA9BD,oDA8BC;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"}
@@ -2,4 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./build-existing-exports-portal-query"), exports);
5
+ tslib_1.__exportStar(require("./types"), exports);
6
+ tslib_1.__exportStar(require("./fetchDownloadFileUrl"), exports);
7
+ tslib_1.__exportStar(require("./fetchDownloadFormats"), exports);
8
+ tslib_1.__exportStar(require("./canUseCreateReplica"), exports);
9
+ tslib_1.__exportStar(require("./canUseHubDownloadApi"), exports);
5
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/downloads/index.ts"],"names":[],"mappings":";;;AAAA,gFAAsD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/downloads/index.ts"],"names":[],"mappings":";;;AAAA,gFAAsD;AACtD,kDAAwB;AACxB,iEAAuC;AACvC,iEAAuC;AACvC,gEAAsC;AACtC,iEAAuC"}
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ArcgisHubDownloadError = exports.DownloadOperationStatus = exports.ServiceDownloadFormat = exports.PORTAL_EXPORT_TYPES = void 0;
4
+ /**
5
+ * This hash map was defined to support the previous implementation of the export item flow.
6
+ * We are currently working on a new implementation that will replace this hash map, but we
7
+ * need to keep this around for now to support the existing implementation.
8
+ */
9
+ exports.PORTAL_EXPORT_TYPES = {
10
+ csv: {
11
+ name: "CSV",
12
+ itemTypes: ["CSV", "CSV Collection"],
13
+ supportsProjection: true,
14
+ },
15
+ kml: {
16
+ name: "KML",
17
+ itemTypes: ["KML", "KML Collection"],
18
+ supportsProjection: false,
19
+ },
20
+ shapefile: {
21
+ name: "Shapefile",
22
+ itemTypes: ["Shapefile"],
23
+ supportsProjection: true,
24
+ },
25
+ fileGeodatabase: {
26
+ name: "File Geodatabase",
27
+ itemTypes: ["File Geodatabase"],
28
+ supportsProjection: true,
29
+ },
30
+ geojson: {
31
+ name: "GeoJson",
32
+ itemTypes: ["GeoJson"],
33
+ supportsProjection: false,
34
+ },
35
+ excel: {
36
+ name: "Excel",
37
+ itemTypes: ["Microsoft Excel"],
38
+ supportsProjection: true,
39
+ },
40
+ featureCollection: {
41
+ name: "Feature Collection",
42
+ itemTypes: ["Feature Collection"],
43
+ supportsProjection: true,
44
+ },
45
+ };
46
+ /**
47
+ * Comprehensive enum of all the download formats that are supported by service-backed items across the ArcGIS platform.
48
+ */
49
+ var ServiceDownloadFormat;
50
+ (function (ServiceDownloadFormat) {
51
+ // Image Service Formats
52
+ ServiceDownloadFormat["BIP"] = "bip";
53
+ ServiceDownloadFormat["BMP"] = "bmp";
54
+ ServiceDownloadFormat["BSQ"] = "bsq";
55
+ ServiceDownloadFormat["GIF"] = "gif";
56
+ ServiceDownloadFormat["JPG"] = "jpg";
57
+ ServiceDownloadFormat["JPG_PNG"] = "jpgpng";
58
+ ServiceDownloadFormat["LERC"] = "lerc";
59
+ ServiceDownloadFormat["PNG"] = "png";
60
+ ServiceDownloadFormat["PNG8"] = "png8";
61
+ ServiceDownloadFormat["PNG24"] = "png24";
62
+ ServiceDownloadFormat["PNG32"] = "png32";
63
+ ServiceDownloadFormat["TIFF"] = "tiff";
64
+ // Map & Feature Service Formats
65
+ ServiceDownloadFormat["CSV"] = "csv";
66
+ ServiceDownloadFormat["EXCEL"] = "excel";
67
+ ServiceDownloadFormat["FEATURE_COLLECTION"] = "featureCollection";
68
+ ServiceDownloadFormat["FILE_GDB"] = "filegdb";
69
+ ServiceDownloadFormat["GEOJSON"] = "geojson";
70
+ ServiceDownloadFormat["GEO_PACKAGE"] = "geoPackage";
71
+ ServiceDownloadFormat["JSON"] = "json";
72
+ ServiceDownloadFormat["KML"] = "kml";
73
+ ServiceDownloadFormat["SHAPEFILE"] = "shapefile";
74
+ ServiceDownloadFormat["SQLITE"] = "sqlite";
75
+ })(ServiceDownloadFormat = exports.ServiceDownloadFormat || (exports.ServiceDownloadFormat = {}));
76
+ /**
77
+ * Human-readable status of a download operation. Operation specific statuses
78
+ * should be converted to one of these statuses before being reported to the user.
79
+ */
80
+ var DownloadOperationStatus;
81
+ (function (DownloadOperationStatus) {
82
+ DownloadOperationStatus["PENDING"] = "pending";
83
+ DownloadOperationStatus["PROCESSING"] = "processing";
84
+ DownloadOperationStatus["CONVERTING"] = "converting";
85
+ DownloadOperationStatus["COMPLETED"] = "completed";
86
+ DownloadOperationStatus["FAILED"] = "failed";
87
+ })(DownloadOperationStatus = exports.DownloadOperationStatus || (exports.DownloadOperationStatus = {}));
88
+ /**
89
+ * Error class for reporting well-known download errors that occur during the download process.
90
+ */
91
+ class ArcgisHubDownloadError extends Error {
92
+ constructor(options) {
93
+ super(options.rawMessage);
94
+ this.name = "ArcgisHubDownloadError";
95
+ this.message = options.rawMessage;
96
+ this.messageId = options.messageId;
97
+ this.operation = options.operation;
98
+ }
99
+ }
100
+ exports.ArcgisHubDownloadError = ArcgisHubDownloadError;
101
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/downloads/types.ts"],"names":[],"mappings":";;;AAGA;;;;GAIG;AACU,QAAA,mBAAmB,GAAG;IACjC,GAAG,EAAE;QACH,IAAI,EAAE,KAAK;QACX,SAAS,EAAE,CAAC,KAAK,EAAE,gBAAgB,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;AACnB,CAAC,EA1BW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QA0BhC;AAqDD;;;GAGG;AACH,IAAY,uBAMX;AAND,WAAY,uBAAuB;IACjC,8CAAmB,CAAA;IACnB,oDAAyB,CAAA;IACzB,oDAAyB,CAAA;IACzB,kDAAuB,CAAA;IACvB,4CAAiB,CAAA;AACnB,CAAC,EANW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAMlC;AAoBD;;GAEG;AACH,MAAa,sBAAuB,SAAQ,KAAK;IAK/C,YAAY,OAAuC;QACjD,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IACrC,CAAC;CACF;AAZD,wDAYC"}
@@ -1 +1 @@
1
- {"version":3,"file":"orval-events.js","sourceRoot":"","sources":["../../../../../../src/events/api/orval/api/orval-events.ts"],"names":[],"mappings":";;;AAQA,oDAAgD;AAOhD,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,2CAAuB,CAAA;IACvB,2CAAuB,CAAA;IACvB,yCAAqB,CAAA;IACrB,yCAAqB,CAAA;AACvB,CAAC,EANW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAM3B;AAuHD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AACD,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,4CAA+B,CAAA;IAC/B,oCAAuB,CAAA;IACvB,oCAAuB,CAAA;AACzB,CAAC,EALW,SAAS,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B,EAAU,EACV,OAA8C,EAC9C,EAAE;IACF,OAAO,4BAAY,CACjB,EAAE,GAAG,EAAE,gCAAgC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAC5D,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,kBAAkB,GAAG,CAChC,EAAU,EACV,mBAAwC,EACxC,OAA8C,EAC9C,EAAE;IACF,OAAO,4BAAY,CACjB;QACE,GAAG,EAAE,gCAAgC,EAAE,EAAE;QACzC,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,mBAAmB;KAC1B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,kBAAkB,GAAG,CAChC,EAAU,EACV,OAA8C,EAC9C,EAAE;IACF,OAAO,4BAAY,CACjB,EAAE,GAAG,EAAE,gCAAgC,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAC/D,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"orval-events.js","sourceRoot":"","sources":["../../../../../../src/events/api/orval/api/orval-events.ts"],"names":[],"mappings":";;;AAQA,oDAAgD;AAOhD,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,2CAAuB,CAAA;IACvB,2CAAuB,CAAA;IACvB,yCAAqB,CAAA;IACrB,yCAAqB,CAAA;AACvB,CAAC,EANW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAM3B;AA2HD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AACD,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,4CAA+B,CAAA;IAC/B,oCAAuB,CAAA;IACvB,oCAAuB,CAAA;AACzB,CAAC,EALW,SA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AC7B,EAAU,EACV,OAA8C,EAC9C,EAAE;IACF,OAAO,4BAAY,CACjB,EAAE,GAAG,EAAE,gCAAgC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAC5D,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,kBAAkB,GAAG,CAChC,EAAU,EACV,mBAAwC,EACxC,OAA8C,EAC9C,EAAE;IACF,OAAO,4BAAY,CACjB;QACE,GAAG,EAAE,gCAAgC,EAAE,EAAE;QACzC,MAAM,EAAE,OAAO;QACf,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,mBAAmB;KAC1B,EACD,OAAO,CACR,CAAC;AACJ,CAAC,CAAC;AAEW,QAAA,kBAAkB,GAAG,CAChC,EAAU,EACV,OAA8C,EAC9C,EAAE;IACF,OAAO,4BAAY,CACjB,EAAE,GAAG,EAAE,gCAAgC,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAC/D,OAAO,CACR,CAAC;AACJ,CAAC,CAAC"}
@@ -33,11 +33,13 @@ async function createHubEvent(partialEvent, requestOptions) {
33
33
  categories: model.categories,
34
34
  description: model.description,
35
35
  editGroups: model.editGroups,
36
- endDateTime: model.endDateTime,
36
+ endDate: model.endDate,
37
+ endTime: model.endTime,
37
38
  notifyAttendees: model.notifyAttendees,
38
39
  onlineMeetings: model.onlineMeetings,
39
40
  readGroups: model.readGroups,
40
- startDateTime: model.startDateTime,
41
+ startDate: model.startDate,
42
+ startTime: model.startTime,
41
43
  summary: model.summary,
42
44
  tags: model.tags,
43
45
  timeZone: model.timeZone,
@@ -69,11 +71,13 @@ async function updateHubEvent(event, requestOptions) {
69
71
  categories: model.categories,
70
72
  description: model.description,
71
73
  editGroups: model.editGroups,
72
- endDateTime: model.endDateTime,
74
+ endDate: model.endDate,
75
+ endTime: model.endTime,
73
76
  notifyAttendees: model.notifyAttendees,
74
77
  onlineMeetings: model.onlineMeetings,
75
78
  readGroups: model.readGroups,
76
- startDateTime: model.startDateTime,
79
+ startDate: model.startDate,
80
+ startTime: model.startTime,
77
81
  status: model.status,
78
82
  summary: model.summary,
79
83
  tags: model.tags,
@@ -1 +1 @@
1
- {"version":3,"file":"edit.js","sourceRoot":"","sources":["../../../src/events/edit.ts"],"names":[],"mappings":";;;AAEA,+DAA4D;AAC5D,+DAAiE;AACjE,yCAA8E;AAC9E,yCAGsB;AAEtB;;;;;;;;;GASG;AACI,KAAK,UAAU,cAAc,CAClC,YAAgC,EAChC,cAAkC;IAElC,MAAM,KAAK,mCAAQ,kCAAuB,EAAE,GAAK,YAAY,CAAE,CAAC;IAEhE,8EAA8E;IAC9E,8BAA8B;IAC9B,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC;IAEhC,4BAA4B;IAC5B,kEAAkE;IAElE,MAAM,MAAM,GAAG,IAAI,oCAAmB,CAAC,+BAAc,EAAE,CAAC,CAAC;IAEzD,IAAI,KAAK,GAAG,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,kCAAuB,EAAE,CAAC,CAAC;IAEnE,MAAM,IAAI,GAAG;QACX,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;QAC1C,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,IAAI,EA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C,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,KAAK,EAAE,KAAK,CAAC,KAAK;KAEnB,CAAC;IAEF,KAAK,GAAG,MAAM,oBAAc,iBAC1B,OAAO,EAAE,KAAK,CAAC,EAAE,EACjB,IAAI,IACD,cAAc,EACjB,CAAC;IAEH,OAAO,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,CAAc,CAAC;AACtD,CAAC;AA5CD,wCA4CC"}
@@ -8,7 +8,7 @@ export declare const ContentDefaultFeatures: IFeatureFlags;
8
8
  * These define the requirements any user must meet to perform related actions
9
9
  * @private
10
10
  */
11
- export declare const ContentPermissions: readonly ["hub:content:create", "hub:content:delete", "hub:content:edit", "hub:content:view", "hub:content:canChangeAccess", "hub:content:workspace", "hub:content:workspace:overview", "hub:content:workspace:dashboard", "hub:content:workspace:details", "hub:content:workspace:discussion", "hub:content:workspace:settings", "hub:content:workspace:settings:schedule", "hub:content:workspace:collaborators", "hub:content:manage", "hub:content:canRecordDownloadErrors", "hub:content:downloads:displayErrors"];
11
+ export declare const ContentPermissions: readonly ["hub:content:create", "hub:content:delete", "hub:content:edit", "hub:content:view", "hub:content:canChangeAccess", "hub:content:workspace", "hub:content:workspace:overview", "hub:content:workspace:dashboard", "hub:content:workspace:details", "hub:content:workspace:discussion", "hub:content:workspace:settings", "hub:content:workspace:settings:schedule", "hub:content:workspace:collaborators", "hub:content:manage", "hub:content:canRecordDownloadErrors", "hub:content:downloads:displayErrors", "temp:hub:content:downloads:unifiedList"];
12
12
  /**
13
13
  * Content permission policies
14
14
  * No need to specify license for permissions that are available to all licenses
@@ -53,6 +53,13 @@ export declare const setContentBoundary: (content: IHubContent, boundary: Geogra
53
53
  publisher?: {
54
54
  name?: string;
55
55
  username?: string;
56
+ /**
57
+ * Derives proper IHubLocation given an ArcGIS Item. If no
58
+ * location (item.properties.location) is present, one will be
59
+ * constructed from the item's extent.
60
+ * @param item ArcGIS Item
61
+ * @returns IHubLocation
62
+ */
56
63
  nameSource: PublisherSource;
57
64
  organization?: string;
58
65
  orgId?: string;
@@ -1,4 +1,5 @@
1
1
  import { IWithPermissions, IWithSlug } from "../traits/index";
2
+ import { IHubAdditionalResource } from "./IHubAdditionalResource";
2
3
  import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
3
4
  import { IHubSchedule } from "./IHubSchedule";
4
5
  /**
@@ -15,6 +16,15 @@ export interface IHubEditableContent extends IHubItemEntity, IWithSlug, IWithPer
15
16
  * capability enabled. This is a pre-requisite for Hosted Downloads to work.
16
17
  */
17
18
  serverExtractCapability?: boolean;
19
+ /**
20
+ * If the item represents a hosted feature service with "Extract enabled", shows the formats that
21
+ * can be extracted from the service via the "createReplica" operation.
22
+ */
23
+ serverExtractFormats?: string[];
24
+ /**
25
+ * links to additional resources specified in the formal item metadata
26
+ */
27
+ additionalResources?: IHubAdditionalResource[];
18
28
  /**
19
29
  * The schedule at which the reharvest of the item will occur
20
30
  */
@@ -8,7 +8,7 @@ export declare type SystemStatus = "online" | "offline" | "maintenance" | "not-a
8
8
  export declare type HubServiceStatus = {
9
9
  [key in HubService]: SystemStatus;
10
10
  };
11
- declare const validServices: readonly ["portal", "discussions", "events", "metrics", "notifications", "hub-search", "domains"];
11
+ declare const validServices: readonly ["portal", "discussions", "events", "metrics", "notifications", "hub-search", "domains", "hub-downloads"];
12
12
  export declare type HubService = (typeof validServices)[number];
13
13
  /**
14
14
  * Validate a Service
@@ -0,0 +1,22 @@
1
+ import { ServiceDownloadFormat } from "../types";
2
+ /**
3
+ * Formats supported by the /export endpoint of the Portal API.
4
+ */
5
+ export declare const EXPORT_ITEM_FORMATS: readonly [ServiceDownloadFormat.CSV, ServiceDownloadFormat.KML, ServiceDownloadFormat.SHAPEFILE, ServiceDownloadFormat.FILE_GDB, ServiceDownloadFormat.GEOJSON, ServiceDownloadFormat.EXCEL, ServiceDownloadFormat.FEATURE_COLLECTION];
6
+ export declare type ExportItemFormat = (typeof EXPORT_ITEM_FORMATS)[number];
7
+ /**
8
+ * Formats supported by the /exportImage endpoint of Image Services.
9
+ */
10
+ export declare const EXPORT_IMAGE_FORMATS: readonly [ServiceDownloadFormat.BIP, ServiceDownloadFormat.BMP, ServiceDownloadFormat.BSQ, ServiceDownloadFormat.GIF, ServiceDownloadFormat.JPG, ServiceDownloadFormat.JPG_PNG, ServiceDownloadFormat.LERC, ServiceDownloadFormat.PNG, ServiceDownloadFormat.PNG24, ServiceDownloadFormat.PNG32, ServiceDownloadFormat.PNG8, ServiceDownloadFormat.TIFF];
11
+ export declare type ExportImageFormat = (typeof EXPORT_IMAGE_FORMATS)[number];
12
+ /**
13
+ * Formats supported by the paging operation endpoint of the Hub Download API.
14
+ */
15
+ export declare const HUB_PAGING_JOB_FORMATS: readonly [ServiceDownloadFormat.CSV, ServiceDownloadFormat.GEOJSON, ServiceDownloadFormat.KML, ServiceDownloadFormat.SHAPEFILE];
16
+ export declare type HubPagingJobFormat = (typeof HUB_PAGING_JOB_FORMATS)[number];
17
+ /**
18
+ * Known formats supported by the /createReplica endpoint of the Hub Download API.
19
+ * NOTE: this is may be incomplete and should be updated as needed.
20
+ */
21
+ export declare const CREATE_REPLICA_FORMATS: readonly [ServiceDownloadFormat.CSV, ServiceDownloadFormat.EXCEL, ServiceDownloadFormat.FEATURE_COLLECTION, ServiceDownloadFormat.FILE_GDB, ServiceDownloadFormat.GEOJSON, ServiceDownloadFormat.GEO_PACKAGE, ServiceDownloadFormat.JSON, ServiceDownloadFormat.SHAPEFILE, ServiceDownloadFormat.SQLITE];
22
+ export declare type CreateReplicaFormat = (typeof CREATE_REPLICA_FORMATS)[number];
@@ -0,0 +1,13 @@
1
+ import { IArcGISContext } from "../../ArcGISContext";
2
+ import { IHubEditableContent } from "../../core/types/IHubEditableContent";
3
+ /**
4
+ * @private
5
+ * Determines if the current user can create an export item for the given entity.
6
+ *
7
+ * NOTE: This function is a placeholder. Various permissions and logic branches are not yet implemented.
8
+ *
9
+ * @param _entity
10
+ * @param _context
11
+ * @returns
12
+ */
13
+ export declare function canCreateExportItem(_entity: IHubEditableContent, _context: IArcGISContext): boolean;
@@ -0,0 +1,8 @@
1
+ import { IHubEditableContent } from "../../core/types/IHubEditableContent";
2
+ /**
3
+ * @private
4
+ * Determines if the export image flow can be used for the given entity.
5
+ * @param entity entity to check if export image flow can be used
6
+ * @returns whether the export image flow can be used
7
+ */
8
+ export declare function canUseExportImageFlow(entity: IHubEditableContent): boolean;
@@ -0,0 +1,8 @@
1
+ import { IHubEditableContent } from "../../core/types/IHubEditableContent";
2
+ /**
3
+ * @private
4
+ * Determines if the export item flow can be used for the given entity.
5
+ * @param entity entity to check if export item flow can be used
6
+ * @returns whether the export item flow can be used
7
+ */
8
+ export declare function canUseExportItemFlow(entity: IHubEditableContent): boolean;
@@ -0,0 +1,12 @@
1
+ import { IFetchDownloadFileUrlOptions } from "../../types";
2
+ /**
3
+ * @private
4
+ * Fetches a download file url from an Image Service via the exportImage endpoint
5
+ *
6
+ * NOTE: This function is incomplete and needs various parameters to be validated
7
+ * and implemented. It is a work in progress.
8
+ *
9
+ * @param options options for refining / filtering the resulting download file
10
+ * @returns a url to download the file
11
+ */
12
+ export declare function fetchExportImageDownloadFileUrl(options: IFetchDownloadFileUrlOptions): Promise<string>;
@@ -0,0 +1,20 @@
1
+ import { IFetchDownloadFileUrlOptions } from "../../types";
2
+ /**
3
+ * @private
4
+ * Fetches a download file url the Portal API via the item /export endpoint.
5
+ *
6
+ * NOTE: This function is incomplete and various permissions / branching paths need to be
7
+ * validated and implemented. It is a work in progress.
8
+ *
9
+ * NOTE: This is a last resort approach for current Enterprise environments, but it will be replaced
10
+ * by calling the service's /createReplica endpoint directly in the future (i.e., once the Enterprise
11
+ * 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
14
+ * with the "Extract" capability enabled, which means the service will also have the /createReplica
15
+ * endpoint available. As /createReplica is a more flexible operation, /export becomes obsolete.
16
+ *
17
+ * @param options options for refining / filtering the resulting download file
18
+ * @returns a url to download the file
19
+ */
20
+ export declare function fetchExportItemDownloadFileUrl(options: IFetchDownloadFileUrlOptions): Promise<string>;
@@ -0,0 +1,16 @@
1
+ import { IFetchDownloadFileUrlOptions } from "../../types";
2
+ /**
3
+ * @private
4
+ * Fetches a download file url from the Hub Download API
5
+ *
6
+ * NOTE: The Hub Download API only works with a certain subset of Feature and Map services
7
+ * and performs different operations (i.e., calling createReplica or paging the service's
8
+ * features) depending on the service type and capabilities.
9
+ *
10
+ * This function does it's best to abstract those differences and provide a consistent
11
+ * interface for downloading data from any service supported by the Hub Download API.
12
+ *
13
+ * @param options options for refining / filtering the resulting download file
14
+ * @returns a url to download the file
15
+ */
16
+ export declare function fetchHubApiDownloadFileUrl(options: IFetchDownloadFileUrlOptions): Promise<string>;
@@ -0,0 +1,26 @@
1
+ import { IStaticDownloadFormat } from "../../types";
2
+ import { IHubEditableContent } from "../../../core/types/IHubEditableContent";
3
+ import { IArcGISContext } from "../../../ArcGISContext";
4
+ /**
5
+ * @private
6
+ * Fetches an entity's available download formats that were previously created by the Portal API's item /export
7
+ * endpoint. This is useful for anonymous enterprise users who need to download data from a Hosted Feature Service,
8
+ * but do not have the privileges to create their own item export. As the exports have been previously created, they
9
+ * can be downloaded statically by anyone with the URL.
10
+ *
11
+ * NOTE: This function is a work-in-progress. Various permissions and logic branches are not yet implemented.
12
+ *
13
+ * NOTE: This is a last resort approach for current Enterprise environments, but it will be replaced
14
+ * with using the formats defined the service's /createReplica endpoint directly in the future (i.e.,
15
+ * once the Enterprise team achieves feature parity with the Online team's implementation).
16
+ *
17
+ * This is because The item /export endpoint can only be used on Hosted Feature Services with the "Extract" capability
18
+ * enabled, which means the service will also have the /createReplica endpoint available. As /createReplica is a more
19
+ * flexible operation that can be invoked by anonymous users, /export becomes obsolete.
20
+ *
21
+ * @param entity Hosted Feature Service entity to fetch download formats for
22
+ * @param context ArcGIS application context
23
+ * @param layers target layers that the download will be filtered to
24
+ * @returns available download formats for the entity
25
+ */
26
+ export declare function fetchAvailableExportItemFormats(entity: IHubEditableContent, context: IArcGISContext, layers: number[]): Promise<IStaticDownloadFormat[]>;
@@ -0,0 +1,25 @@
1
+ import { IArcGISContext } from "../../../ArcGISContext";
2
+ import { IHubEditableContent } from "../../../core/types/IHubEditableContent";
3
+ import { IDownloadFormat } from "../../types";
4
+ /**
5
+ * @private
6
+ * Fetches an entity's available download formats. Owners of the entity can create all formats supported by
7
+ * the Portal API's item /export endpoint, while users that don't have privileges to the item /export endpoint
8
+ * can only download formats that were previously exported by the entity's owner.
9
+ *
10
+ * NOTE: This function is a work-in-progress. Various permissions and logic branches are not yet implemented.
11
+ *
12
+ * NOTE: This is a last resort approach for current Enterprise environments, but it will be replaced
13
+ * with using the formats defined the service's /createReplica endpoint directly in the future (i.e.,
14
+ * once the Enterprise team achieves feature parity with the Online team's implementation).
15
+ *
16
+ * This is because The item /export endpoint can only be used on Hosted Feature Services with the "Extract" capability
17
+ * enabled, which means the service will also have the /createReplica endpoint available. As /createReplica is a more
18
+ * flexible operation that can be invoked by anonymous users, /export becomes obsolete.
19
+ *
20
+ * @param entity Hosted Feature Service entity to fetch download formats for
21
+ * @param context ArcGIS application context
22
+ * @param layers target layers that the download will be filtered to
23
+ * @returns available download formats for the entity
24
+ */
25
+ export declare function fetchExportItemFormats(_entity: IHubEditableContent, _context: IArcGISContext, _layers?: number[]): Promise<IDownloadFormat[]>;
@@ -0,0 +1,6 @@
1
+ import { IDynamicDownloadFormat } 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 declare function getAllExportItemFormats(): IDynamicDownloadFormat[];
@@ -0,0 +1,10 @@
1
+ import { IHubEditableContent } from "../../../core/types/IHubEditableContent";
2
+ import { IDynamicDownloadFormat } from "../../types";
3
+ /**
4
+ * @private
5
+ * Returns all the download formats that are defined by the service's /createReplica endpoint.
6
+ *
7
+ * @param entity Hosted Feature Service entity to return download formats for
8
+ * @returns available download formats for the entity
9
+ */
10
+ export declare function getCreateReplicaFormats(entity: IHubEditableContent): IDynamicDownloadFormat[];
@@ -0,0 +1,8 @@
1
+ import { IDynamicDownloadFormat } from "../../types";
2
+ /**
3
+ * @private
4
+ * Returns all the download formats that are exposed by Image Services via the /exportImage operation.
5
+ *
6
+ * NOTE: This function is a work-in-progress. Various permissions and logic branches are not yet implemented.
7
+ */
8
+ export declare function getExportImageFormats(): IDynamicDownloadFormat[];
@@ -0,0 +1,12 @@
1
+ import { IDynamicDownloadFormat } from "../../types";
2
+ import { IHubEditableContent } from "../../../core/types/IHubEditableContent";
3
+ /**
4
+ * @private
5
+ * Returns all the formats that are available for download via the Hub Download API for a given entity.
6
+ * Formats will vary from entity to entity depending on actual operation that the Hub Download API will
7
+ * perform under the hood (e.g., hitting /createReplica or paging through the service's features).
8
+ *
9
+ * @param entity Service entity to return download formats for
10
+ * @returns available download formats for the entity
11
+ */
12
+ export declare function getHubDownloadApiFormats(entity: IHubEditableContent): IDynamicDownloadFormat[];
@@ -0,0 +1,7 @@
1
+ import { IDynamicDownloadFormat } 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 declare function getPagingJobFormats(): IDynamicDownloadFormat[];
@@ -0,0 +1,9 @@
1
+ import { IArcGISContext } from "../../ArcGISContext";
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 declare function getExportItemDataUrl(exportItemId: string, context: IArcGISContext): string;