@esri/hub-common 14.177.1 → 14.179.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 (88) hide show
  1. package/dist/esm/content/HubContent.js +5 -0
  2. package/dist/esm/content/HubContent.js.map +1 -1
  3. package/dist/esm/content/_internal/ContentSchema.js +5 -0
  4. package/dist/esm/content/_internal/ContentSchema.js.map +1 -1
  5. package/dist/esm/content/_internal/ContentUiSchemaSettings.js +5 -23
  6. package/dist/esm/content/_internal/ContentUiSchemaSettings.js.map +1 -1
  7. package/dist/esm/content/_internal/computeProps.js +1 -0
  8. package/dist/esm/content/_internal/computeProps.js.map +1 -1
  9. package/dist/esm/content/_internal/getDownloadsSection.js +135 -0
  10. package/dist/esm/content/_internal/getDownloadsSection.js.map +1 -0
  11. package/dist/esm/content/_internal/shouldShowDownloadsConfiguration.js +23 -0
  12. package/dist/esm/content/_internal/shouldShowDownloadsConfiguration.js.map +1 -0
  13. package/dist/esm/content/edit.js +40 -3
  14. package/dist/esm/content/edit.js.map +1 -1
  15. package/dist/esm/downloads/_internal/additional-resources/utils.js +23 -0
  16. package/dist/esm/downloads/_internal/additional-resources/utils.js.map +1 -0
  17. package/dist/esm/downloads/_internal/getDownloadConfigurationDisplayFormats.js +75 -0
  18. package/dist/esm/downloads/_internal/getDownloadConfigurationDisplayFormats.js.map +1 -0
  19. package/dist/esm/downloads/_internal/getDownloadFlow.js +26 -0
  20. package/dist/esm/downloads/_internal/getDownloadFlow.js.map +1 -0
  21. package/dist/esm/downloads/_internal/getDownloadFormatsByFlow.js +28 -0
  22. package/dist/esm/downloads/_internal/getDownloadFormatsByFlow.js.map +1 -0
  23. package/dist/esm/downloads/fetchDownloadFile.js +20 -0
  24. package/dist/esm/downloads/fetchDownloadFile.js.map +1 -1
  25. package/dist/esm/downloads/fetchDownloadFormats.js +4 -0
  26. package/dist/esm/downloads/fetchDownloadFormats.js.map +1 -1
  27. package/dist/esm/downloads/getDownloadConfiguration.js +52 -0
  28. package/dist/esm/downloads/getDownloadConfiguration.js.map +1 -0
  29. package/dist/esm/downloads/getDownloadFormats.js +59 -0
  30. package/dist/esm/downloads/getDownloadFormats.js.map +1 -0
  31. package/dist/esm/downloads/index.js +2 -0
  32. package/dist/esm/downloads/index.js.map +1 -1
  33. package/dist/esm/events/HubEvent.js +2 -2
  34. package/dist/esm/events/HubEvent.js.map +1 -1
  35. package/dist/esm/events/api/orval/api/orval-events.js.map +1 -1
  36. package/dist/esm/events/edit.js +6 -1
  37. package/dist/esm/events/edit.js.map +1 -1
  38. package/dist/node/content/HubContent.js +5 -0
  39. package/dist/node/content/HubContent.js.map +1 -1
  40. package/dist/node/content/_internal/ContentSchema.js +5 -0
  41. package/dist/node/content/_internal/ContentSchema.js.map +1 -1
  42. package/dist/node/content/_internal/ContentUiSchemaSettings.js +5 -23
  43. package/dist/node/content/_internal/ContentUiSchemaSettings.js.map +1 -1
  44. package/dist/node/content/_internal/computeProps.js +1 -0
  45. package/dist/node/content/_internal/computeProps.js.map +1 -1
  46. package/dist/node/content/_internal/getDownloadsSection.js +139 -0
  47. package/dist/node/content/_internal/getDownloadsSection.js.map +1 -0
  48. package/dist/node/content/_internal/shouldShowDownloadsConfiguration.js +27 -0
  49. package/dist/node/content/_internal/shouldShowDownloadsConfiguration.js.map +1 -0
  50. package/dist/node/content/edit.js +39 -2
  51. package/dist/node/content/edit.js.map +1 -1
  52. package/dist/node/downloads/_internal/additional-resources/utils.js +28 -0
  53. package/dist/node/downloads/_internal/additional-resources/utils.js.map +1 -0
  54. package/dist/node/downloads/_internal/getDownloadConfigurationDisplayFormats.js +79 -0
  55. package/dist/node/downloads/_internal/getDownloadConfigurationDisplayFormats.js.map +1 -0
  56. package/dist/node/downloads/_internal/getDownloadFlow.js +30 -0
  57. package/dist/node/downloads/_internal/getDownloadFlow.js.map +1 -0
  58. package/dist/node/downloads/_internal/getDownloadFormatsByFlow.js +32 -0
  59. package/dist/node/downloads/_internal/getDownloadFormatsByFlow.js.map +1 -0
  60. package/dist/node/downloads/fetchDownloadFile.js +20 -0
  61. package/dist/node/downloads/fetchDownloadFile.js.map +1 -1
  62. package/dist/node/downloads/fetchDownloadFormats.js +4 -0
  63. package/dist/node/downloads/fetchDownloadFormats.js.map +1 -1
  64. package/dist/node/downloads/getDownloadConfiguration.js +56 -0
  65. package/dist/node/downloads/getDownloadConfiguration.js.map +1 -0
  66. package/dist/node/downloads/getDownloadFormats.js +63 -0
  67. package/dist/node/downloads/getDownloadFormats.js.map +1 -0
  68. package/dist/node/downloads/index.js +2 -0
  69. package/dist/node/downloads/index.js.map +1 -1
  70. package/dist/node/events/HubEvent.js +2 -2
  71. package/dist/node/events/HubEvent.js.map +1 -1
  72. package/dist/node/events/api/orval/api/orval-events.js.map +1 -1
  73. package/dist/node/events/edit.js +7 -1
  74. package/dist/node/events/edit.js.map +1 -1
  75. package/dist/types/content/_internal/getDownloadsSection.d.ts +13 -0
  76. package/dist/types/content/_internal/shouldShowDownloadsConfiguration.d.ts +13 -0
  77. package/dist/types/core/types/IHubEditableContent.d.ts +57 -1
  78. package/dist/types/downloads/_internal/additional-resources/utils.d.ts +19 -0
  79. package/dist/types/downloads/_internal/getDownloadConfigurationDisplayFormats.d.ts +10 -0
  80. package/dist/types/downloads/_internal/getDownloadFlow.d.ts +11 -0
  81. package/dist/types/downloads/_internal/getDownloadFormatsByFlow.d.ts +11 -0
  82. package/dist/types/downloads/fetchDownloadFormats.d.ts +2 -0
  83. package/dist/types/downloads/getDownloadConfiguration.d.ts +11 -0
  84. package/dist/types/downloads/getDownloadFormats.d.ts +9 -0
  85. package/dist/types/downloads/index.d.ts +2 -0
  86. package/dist/types/events/api/orval/api/orval-events.d.ts +9 -1
  87. package/dist/types/events/edit.d.ts +1 -0
  88. package/package.json +1 -1
@@ -52,6 +52,49 @@ export interface IHubEditableContent extends IHubItemEntity, IWithSlug, IWithPer
52
52
  * This is a discriminated union of the possible additional props.
53
53
  */
54
54
  export declare type IExtendedProps = IContentExtendedProps | IServiceExtendedProps;
55
+ /**
56
+ * Represents the download process that the configuration was created for
57
+ */
58
+ export declare type DownloadFlowType = "createReplica" | "paging" | "exportImage";
59
+ /**
60
+ * Represents the storage object for configuring a single download format
61
+ * TODO: Should this be IDownloadFormatConfigurationStorage?
62
+ */
63
+ export interface IDownloadFormatConfiguration {
64
+ /**
65
+ * Key that identifies the download format.
66
+ */
67
+ key: string;
68
+ /**
69
+ * Whether the download format should be hidden from the UI
70
+ */
71
+ hidden?: boolean;
72
+ }
73
+ /**
74
+ * Represents the display object for configuring a single download format.
75
+ * To be used in editing contexts rather than user-facing contexts.
76
+ */
77
+ export interface IDownloadFormatConfigurationDisplay extends IDownloadFormatConfiguration {
78
+ /**
79
+ * Translated label to display for the download format
80
+ */
81
+ label: string;
82
+ }
83
+ /**
84
+ * Represents the configurations for downloading an item
85
+ */
86
+ export interface IEntityDownloadConfiguration {
87
+ /**
88
+ * Indicates the download flow that the configuration was created for
89
+ * (i.e., the download process that would have been used at the time of configuration)
90
+ */
91
+ flowType: DownloadFlowType;
92
+ /**
93
+ * Configuration for the download formats that are available for the item.
94
+ * Saved in the order that they should be displayed in the UI.
95
+ */
96
+ formats: IDownloadFormatConfiguration[];
97
+ }
55
98
  /**
56
99
  * Optional enrichments that are common to all content types
57
100
  */
@@ -68,6 +111,10 @@ export interface IBaseExtendedProps {
68
111
  * Convenience links to additional resources specified in the formal item metadata
69
112
  */
70
113
  additionalResources?: IHubAdditionalResource[];
114
+ /**
115
+ * Download configuration for the item
116
+ */
117
+ downloads?: IEntityDownloadConfiguration;
71
118
  }
72
119
  /**
73
120
  * Enrichments specific to items that are not backed by a service
@@ -104,4 +151,13 @@ export interface IServiceExtendedProps extends IBaseExtendedProps {
104
151
  */
105
152
  serverExtractFormats?: string[];
106
153
  }
107
- export declare type IHubContentEditor = IHubItemEntityEditor<IHubEditableContent> & {};
154
+ export declare type IHubContentEditor = IHubItemEntityEditor<IHubEditableContent> & {
155
+ /**
156
+ * Download formats that should be rendered in the editing UI.
157
+ *
158
+ * NOTE: The formats present in this array may or may not be actually accessible.
159
+ * Product has asked that in certain cases, we display formats that _could_ be available
160
+ * if the user were to make the necessary changes to the item / service.
161
+ */
162
+ downloadFormats?: IDownloadFormatConfigurationDisplay[];
163
+ };
@@ -0,0 +1,19 @@
1
+ import { IDownloadFormatConfiguration } from "../../../core/types/IHubEditableContent";
2
+ /**
3
+ * @private
4
+ * Determines if the given download format configuration is for
5
+ * an additional resource.
6
+ *
7
+ * @param config IDownloadFormatConfiguration
8
+ * @returns boolean
9
+ */
10
+ export declare function isAdditionalResourceConfiguration(config: IDownloadFormatConfiguration): boolean;
11
+ /**
12
+ * @private
13
+ * Get's the index of the additional resource from the given
14
+ * download format configuration.
15
+ *
16
+ * @param config IDownloadFormatConfiguration
17
+ * @returns number - The index of the additional resource
18
+ */
19
+ export declare function getAdditionalResourceIndex(config: IDownloadFormatConfiguration): number;
@@ -0,0 +1,10 @@
1
+ import { IDownloadFormatConfigurationDisplay, IHubEditableContent } from "../../core/types/IHubEditableContent";
2
+ /**
3
+ * @private
4
+ * Returns configuration objects for each download format that should be displayed
5
+ * in the editing experience of a content entity. This function should not be used
6
+ * to calculate the download formats that should be present on the live UI.
7
+ * @param entity entity to get download format configurations for
8
+ * @returns download format configurations to display
9
+ */
10
+ export declare function getDownloadConfigurationDisplayFormats(entity: IHubEditableContent): IDownloadFormatConfigurationDisplay[];
@@ -0,0 +1,11 @@
1
+ import { DownloadFlowType, IHubEditableContent } from "../../core";
2
+ /**
3
+ * @private
4
+ * Determines the download flow that will be used for the current entity.
5
+ * If the entity cannot be downloaded, returns null.
6
+ *
7
+ * @param entity the entity to get the download flow for
8
+ * @param isEnterprise whether the the download will be executed in an enterprise environment
9
+ * @returns the download flow that will be used for the current entity
10
+ */
11
+ export declare function getDownloadFlow(entity: IHubEditableContent, isEnterprise?: boolean): DownloadFlowType;
@@ -0,0 +1,11 @@
1
+ import { DownloadFlowType, IHubEditableContent } from "../../core/types/IHubEditableContent";
2
+ import { IDynamicDownloadFormat } from "../types";
3
+ /**
4
+ * @private
5
+ * Get the download formats for a given download flow and entity.
6
+ *
7
+ * @param downloadFlow DownloadFlowType
8
+ * @param entity IHubEditableContent
9
+ * @returns IDynamicDownloadFormat[]
10
+ */
11
+ export declare function getDownloadFormatsByFlow(downloadFlow: DownloadFlowType, entity: IHubEditableContent): IDynamicDownloadFormat[];
@@ -1,5 +1,7 @@
1
1
  import { IDownloadFormat, IFetchDownloadFormatsOptions } from "./types";
2
2
  /**
3
+ * DEPRECATED: This will be removed in the next breaking version. Use "getDownloadFormats()" instead.
4
+ *
3
5
  * Fetches download formats for the given entity. Also folds in any additional resources defined on the entity.
4
6
  * @param options options to refine / filter the results of the fetchDownloadFormats operation
5
7
  * @returns a promise that resolves with the download formats
@@ -0,0 +1,11 @@
1
+ import { IEntityDownloadConfiguration, IHubEditableContent } from "../core/types/IHubEditableContent";
2
+ /**
3
+ * Returns the download configuration for an entity at this moment in time.
4
+ *
5
+ * If no configuration exists, a default configuration is returned based on the entity's current download flow.
6
+ * If a configuration exists but is no longer valid, the default configuration will also be returned.
7
+ *
8
+ * @param entity entity to get download configuration for
9
+ * @returns the current download configuration for the entity
10
+ */
11
+ export declare function getDownloadConfiguration(entity: IHubEditableContent): IEntityDownloadConfiguration;
@@ -0,0 +1,9 @@
1
+ import { IDownloadFormat, IFetchDownloadFormatsOptions } from "./types";
2
+ /**
3
+ * Gets available download formats / additional resources for the given entity in the order they have been configured.
4
+ * If a format has been configured to be hidden, it will not be included in the results.
5
+ *
6
+ * @param options options to refine / filter the results of the fetchDownloadFormats operation
7
+ * @returns The available download formats and additional resources
8
+ */
9
+ export declare function getDownloadFormats(options: IFetchDownloadFormatsOptions): IDownloadFormat[];
@@ -6,3 +6,5 @@ export * from "./canUseCreateReplica";
6
6
  export * from "./canUseHubDownloadSystem";
7
7
  export * from "./canUseHubDownloadApi";
8
8
  export * from "./getHubDownloadApiFormats";
9
+ export * from "./getDownloadConfiguration";
10
+ export * from "./getDownloadFormats";
@@ -212,6 +212,14 @@ export declare type GetEventsParams = {
212
212
  * Comma separated string list of relation fields to include in response. Example: associations,creator,location,onlineMeeting,registrations
213
213
  */
214
214
  include?: string;
215
+ /**
216
+ * Comma separated string list of edit groupIds that event is not shared to
217
+ */
218
+ withoutEditGroups?: string;
219
+ /**
220
+ * Comma separated string list of read groupIds that event is not shared to
221
+ */
222
+ withoutReadGroups?: string;
215
223
  /**
216
224
  * the max amount of events to return
217
225
  */
@@ -241,7 +249,7 @@ export declare type GetEventsParams = {
241
249
  */
242
250
  startDateTimeBefore?: string;
243
251
  /**
244
- * comma separated string list of event statuses. Example: PRIVATE,ORG,PUBLIC
252
+ * comma separated string list of event statuses. Example: PLANNED,CANCELED,REMOVED
245
253
  */
246
254
  status?: string;
247
255
  /**
@@ -25,6 +25,7 @@ export declare function createHubEvent(partialEvent: Partial<IHubEvent>, request
25
25
  * @returns promise that resolves a IHubEvent
26
26
  */
27
27
  export declare function updateHubEvent(partialEvent: Partial<IHubEvent>, requestOptions: IHubRequestOptions): Promise<IHubEvent>;
28
+ export declare function deleteHubEvent(id: string, requestOptions: IHubRequestOptions): Promise<void>;
28
29
  /**
29
30
  * @private
30
31
  * Create an Event registration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/hub-common",
3
- "version": "14.177.1",
3
+ "version": "14.179.0",
4
4
  "description": "Common TypeScript types and utility functions for @esri/hub.js.",
5
5
  "main": "dist/node/index.js",
6
6
  "module": "dist/esm/index.js",