@esri/hub-common 15.34.0 → 15.35.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 (141) hide show
  1. package/dist/esm/access/can-edit-item.js +1 -1
  2. package/dist/esm/access/can-edit-site-content.js +2 -2
  3. package/dist/esm/access/can-edit-site-content.js.map +1 -1
  4. package/dist/esm/content/get-family.js +3 -0
  5. package/dist/esm/content/get-family.js.map +1 -1
  6. package/dist/esm/core/fetchHubEntity.js +4 -0
  7. package/dist/esm/core/fetchHubEntity.js.map +1 -1
  8. package/dist/esm/core/types/HubEntityType.js +1 -0
  9. package/dist/esm/core/types/HubEntityType.js.map +1 -1
  10. package/dist/esm/core/types/IHubOrganization.js +1 -0
  11. package/dist/esm/core/types/IHubOrganization.js.map +1 -0
  12. package/dist/esm/core/types/Metrics.js.map +1 -1
  13. package/dist/esm/core/types/index.js +1 -0
  14. package/dist/esm/core/types/index.js.map +1 -1
  15. package/dist/esm/discussions/api/settings/getDefaultEntitySettings.js +1 -0
  16. package/dist/esm/discussions/api/settings/getDefaultEntitySettings.js.map +1 -1
  17. package/dist/esm/extent.js.map +1 -1
  18. package/dist/esm/items/normalize-solution-template-item.js +2 -2
  19. package/dist/esm/items/normalize-solution-template-item.js.map +1 -1
  20. package/dist/esm/metrics/resolveMetric.js.map +1 -1
  21. package/dist/esm/org/fetch.js +77 -0
  22. package/dist/esm/org/fetch.js.map +1 -0
  23. package/dist/esm/org/index.js +1 -0
  24. package/dist/esm/org/index.js.map +1 -1
  25. package/dist/esm/resources/get-item-assets.js +3 -3
  26. package/dist/esm/resources/get-item-assets.js.map +1 -1
  27. package/dist/esm/search/_internal/portalFetchOrgs.js +33 -0
  28. package/dist/esm/search/_internal/portalFetchOrgs.js.map +1 -0
  29. package/dist/esm/search/hubSearch.js +2 -0
  30. package/dist/esm/search/hubSearch.js.map +1 -1
  31. package/dist/esm/search/types/IHubCatalog.js +1 -0
  32. package/dist/esm/search/types/IHubCatalog.js.map +1 -1
  33. package/dist/esm/search/utils.js +4 -3
  34. package/dist/esm/search/utils.js.map +1 -1
  35. package/dist/esm/types.js +1 -0
  36. package/dist/esm/types.js.map +1 -1
  37. package/dist/node/access/can-edit-item.js +1 -1
  38. package/dist/node/access/can-edit-site-content.js +2 -2
  39. package/dist/node/access/can-edit-site-content.js.map +1 -1
  40. package/dist/node/content/get-family.js +3 -0
  41. package/dist/node/content/get-family.js.map +1 -1
  42. package/dist/node/core/fetchHubEntity.js +4 -0
  43. package/dist/node/core/fetchHubEntity.js.map +1 -1
  44. package/dist/node/core/types/HubEntityType.js +1 -0
  45. package/dist/node/core/types/HubEntityType.js.map +1 -1
  46. package/dist/node/core/types/IHubOrganization.js +3 -0
  47. package/dist/node/core/types/IHubOrganization.js.map +1 -0
  48. package/dist/node/core/types/Metrics.js.map +1 -1
  49. package/dist/node/core/types/index.js +1 -0
  50. package/dist/node/core/types/index.js.map +1 -1
  51. package/dist/node/discussions/api/settings/getDefaultEntitySettings.js +1 -0
  52. package/dist/node/discussions/api/settings/getDefaultEntitySettings.js.map +1 -1
  53. package/dist/node/extent.js.map +1 -1
  54. package/dist/node/items/normalize-solution-template-item.js +2 -2
  55. package/dist/node/items/normalize-solution-template-item.js.map +1 -1
  56. package/dist/node/metrics/resolveMetric.js.map +1 -1
  57. package/dist/node/org/fetch.js +83 -0
  58. package/dist/node/org/fetch.js.map +1 -0
  59. package/dist/node/org/index.js +1 -0
  60. package/dist/node/org/index.js.map +1 -1
  61. package/dist/node/resources/get-item-assets.js +3 -3
  62. package/dist/node/resources/get-item-assets.js.map +1 -1
  63. package/dist/node/search/_internal/portalFetchOrgs.js +37 -0
  64. package/dist/node/search/_internal/portalFetchOrgs.js.map +1 -0
  65. package/dist/node/search/hubSearch.js +2 -0
  66. package/dist/node/search/hubSearch.js.map +1 -1
  67. package/dist/node/search/types/IHubCatalog.js +1 -0
  68. package/dist/node/search/types/IHubCatalog.js.map +1 -1
  69. package/dist/node/search/utils.js +4 -3
  70. package/dist/node/search/utils.js.map +1 -1
  71. package/dist/node/types.js +1 -0
  72. package/dist/node/types.js.map +1 -1
  73. package/dist/types/access/can-edit-event.d.ts +1 -1
  74. package/dist/types/access/can-edit-item.d.ts +1 -1
  75. package/dist/types/access/can-edit-site-content.d.ts +1 -1
  76. package/dist/types/access/can-edit-site.d.ts +1 -1
  77. package/dist/types/access/has-base-priv.d.ts +1 -1
  78. package/dist/types/associations/internal/getIdsFromAssociationGroups.d.ts +1 -1
  79. package/dist/types/categories.d.ts +1 -1
  80. package/dist/types/content/_internal/internalContentUtils.d.ts +3 -2
  81. package/dist/types/content/get-family.d.ts +1 -1
  82. package/dist/types/content/search.d.ts +1 -1
  83. package/dist/types/core/_internal/computeItemLinks.d.ts +1 -1
  84. package/dist/types/core/_internal/computeItemProps.d.ts +1 -1
  85. package/dist/types/core/behaviors/IWithFollowersBehavior.d.ts +1 -1
  86. package/dist/types/core/enrichEntity.d.ts +1 -1
  87. package/dist/types/core/types/HubEntity.d.ts +2 -1
  88. package/dist/types/core/types/HubEntityType.d.ts +1 -1
  89. package/dist/types/core/types/IHubEditableContent.d.ts +1 -1
  90. package/dist/types/core/types/IHubLocation.d.ts +1 -1
  91. package/dist/types/core/types/IHubOrganization.d.ts +61 -0
  92. package/dist/types/core/types/Metrics.d.ts +2 -1
  93. package/dist/types/core/types/index.d.ts +1 -0
  94. package/dist/types/discussions/api/types.d.ts +1 -1
  95. package/dist/types/discussions/utils.d.ts +1 -1
  96. package/dist/types/downloads/build-existing-exports-portal-query.d.ts +1 -1
  97. package/dist/types/events/HubEvent.d.ts +1 -1
  98. package/dist/types/extent.d.ts +2 -1
  99. package/dist/types/groups/HubGroups.d.ts +1 -1
  100. package/dist/types/groups/_internal/computeLinks.d.ts +1 -1
  101. package/dist/types/groups/_internal/computeProps.d.ts +1 -1
  102. package/dist/types/groups/_internal/convertGroupToHubGroup.d.ts +1 -1
  103. package/dist/types/groups/_internal/convertHubGroupToGroup.d.ts +1 -1
  104. package/dist/types/groups/defaults.d.ts +1 -1
  105. package/dist/types/groups/isOpenDataGroup.d.ts +1 -1
  106. package/dist/types/initiative-templates/_internal/computeLinks.d.ts +1 -1
  107. package/dist/types/initiative-templates/_internal/getRecommendedTemplatesCatalog.d.ts +1 -1
  108. package/dist/types/initiatives/_internal/computeLinks.d.ts +1 -1
  109. package/dist/types/items/apply-properties-to-items.d.ts +1 -1
  110. package/dist/types/items/create-item-from-file.d.ts +1 -1
  111. package/dist/types/items/create-item-from-url-or-file.d.ts +1 -1
  112. package/dist/types/items/create-item-from-url.d.ts +1 -1
  113. package/dist/types/items/is-services-directory-disabled.d.ts +1 -1
  114. package/dist/types/items/normalize-solution-template-item.d.ts +1 -1
  115. package/dist/types/items/slugs.d.ts +1 -1
  116. package/dist/types/models/serializeModel.d.ts +1 -1
  117. package/dist/types/org/fetch.d.ts +26 -0
  118. package/dist/types/org/index.d.ts +1 -0
  119. package/dist/types/pages/_internal/computeLinks.d.ts +1 -1
  120. package/dist/types/projects/_internal/computeLinks.d.ts +1 -1
  121. package/dist/types/resources/_internal/_validate-url-helpers.d.ts +1 -1
  122. package/dist/types/resources/get-item-assets.d.ts +1 -1
  123. package/dist/types/resources/get-item-thumbnail-url.d.ts +1 -1
  124. package/dist/types/search/_internal/portalFetchOrgs.d.ts +9 -0
  125. package/dist/types/search/getUserGroupsByMembership.d.ts +1 -1
  126. package/dist/types/search/getUserGroupsFromQuery.d.ts +1 -1
  127. package/dist/types/search/types/IHubCatalog.d.ts +1 -1
  128. package/dist/types/search/wellKnownCatalog.d.ts +1 -1
  129. package/dist/types/sites/_internal/computeLinks.d.ts +1 -1
  130. package/dist/types/surveys/fetch.d.ts +1 -1
  131. package/dist/types/surveys/utils/is-draft.d.ts +1 -1
  132. package/dist/types/surveys/utils/is-fieldworker-view.d.ts +1 -1
  133. package/dist/types/surveys/utils/is-survey123-connect.d.ts +1 -1
  134. package/dist/types/surveys/utils/should-display-map.d.ts +1 -1
  135. package/dist/types/templates/_internal/computeLinks.d.ts +1 -1
  136. package/dist/types/templates/utils.d.ts +1 -1
  137. package/dist/types/types.d.ts +4 -2
  138. package/dist/types/users/HubUsers.d.ts +1 -1
  139. package/dist/types/users/_internal/computeProps.d.ts +1 -1
  140. package/dist/types/utils/is-update-group.d.ts +1 -1
  141. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { IItem, IUser } from "@esri/arcgis-rest-types";
1
+ import { IItem, IUser } from "@esri/arcgis-rest-portal";
2
2
  import { IInitiativeModel } from "../types";
3
3
  export interface IEventModel {
4
4
  initiative: IInitiativeModel;
@@ -1,4 +1,4 @@
1
- import { IItem, IUser } from "@esri/arcgis-rest-types";
1
+ import { IItem, IUser } from "@esri/arcgis-rest-portal";
2
2
  /**
3
3
  * Checks if user has access to edit an item in Hub
4
4
  * @param {IItem} item
@@ -1,4 +1,4 @@
1
- import { IItem, IUser } from "@esri/arcgis-rest-types";
1
+ import { IItem, IUser } from "@esri/arcgis-rest-portal";
2
2
  export declare const REQUIRED_PRIVS: string[];
3
3
  /**
4
4
  * Checks if user has access to content library in Hub
@@ -1,4 +1,4 @@
1
- import { IItem, IUser } from "@esri/arcgis-rest-types";
1
+ import { IItem, IUser } from "@esri/arcgis-rest-portal";
2
2
  /**
3
3
  * Checks if user has access to edit site in Hub
4
4
  * Currently, Hub Home sites are not editable
@@ -1,4 +1,4 @@
1
- import { IUser } from "@esri/arcgis-rest-types";
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
2
  /**
3
3
  * Checks for fundamental privilege required by all access checks
4
4
  * @param {IUser} user
@@ -1,4 +1,4 @@
1
- import { IGroup } from "@esri/arcgis-rest-types";
1
+ import { IGroup } from "@esri/arcgis-rest-portal";
2
2
  import { HubEntityType } from "../../core";
3
3
  /**
4
4
  * given an array of groups, this util maps over them,
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  export declare const categories: {
3
3
  [key: string]: string[];
4
4
  };
@@ -1,5 +1,6 @@
1
1
  import { IItem, IPortal } from "@esri/arcgis-rest-portal";
2
- import { IExtent, ILayerDefinition, ISpatialReference, IUser } from "@esri/arcgis-rest-types";
2
+ import { IUser } from "@esri/arcgis-rest-portal";
3
+ import { IExtent, ILayerDefinition, ISpatialReference } from "@esri/arcgis-rest-types";
3
4
  import { IHubContent, IHubLocation, PublisherSource } from "../../core/types";
4
5
  import { IHubGeography, GeographyProvenance, IHubRequestOptions } from "../../types";
5
6
  import { IHubAdditionalResource } from "../../core/types/IHubAdditionalResource";
@@ -44,7 +45,7 @@ export declare const setContentBoundary: (content: IHubContent, boundary: Geogra
44
45
  control?: import("../../types").AccessControl;
45
46
  groups?: import("@esri/arcgis-rest-portal").IGroup[];
46
47
  };
47
- family?: "map" | "template" | "document" | "content" | "discussion" | "event" | "initiative" | "project" | "site" | "app" | "dataset" | "feedback" | "people" | "team" | "channel" | "eventAttendee";
48
+ family?: "map" | "template" | "document" | "content" | "discussion" | "event" | "initiative" | "organization" | "project" | "site" | "app" | "dataset" | "feedback" | "people" | "team" | "channel" | "eventAttendee";
48
49
  categories?: string[];
49
50
  isDownloadable: boolean;
50
51
  structuredLicense?: import("../..").IStructuredLicense;
@@ -4,7 +4,7 @@ import { HubFamily } from "../types";
4
4
  * @param type item type
5
5
  * @returns Hub family
6
6
  */
7
- export declare function getFamily(type: string): "map" | "template" | "document" | "content" | "discussion" | "event" | "initiative" | "project" | "site" | "app" | "dataset" | "feedback" | "people" | "team" | "channel" | "eventAttendee";
7
+ export declare function getFamily(type: string): "map" | "template" | "document" | "content" | "discussion" | "event" | "initiative" | "organization" | "project" | "site" | "app" | "dataset" | "feedback" | "people" | "team" | "channel" | "eventAttendee";
8
8
  /**
9
9
  * return the types associated with a provided Hub Family
10
10
  * Overrides are provided to match getFamily implementation
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  import { IHubSearchResult } from "../search";
3
3
  import { IHubRequestOptions } from "../types";
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  import { IRequestOptions } from "@esri/arcgis-rest-request";
3
3
  import { IHubEntityLinks } from "../../core/types";
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  import { IHubItemEntity } from "../types";
3
3
  /**
4
4
  * Base property mapping for item backed entity types
@@ -1,4 +1,4 @@
1
- import { IGroup } from "@esri/arcgis-rest-types";
1
+ import { IGroup } from "@esri/arcgis-rest-portal";
2
2
  import { SettableAccessLevel } from "../types";
3
3
  /**
4
4
  * Followers behavior for Item-Backed Entities
@@ -1,4 +1,4 @@
1
- import { IGroup } from "@esri/arcgis-rest-types";
1
+ import { IGroup } from "@esri/arcgis-rest-portal";
2
2
  import { HubEntity } from "./types";
3
3
  import { IHubRequestOptions } from "../types";
4
4
  interface IEntityEnrichments {
@@ -8,4 +8,5 @@ import { IHubTemplate } from "./IHubTemplate";
8
8
  import { IHubSurvey } from "./IHubSurvey";
9
9
  import { IHubEvent } from "./IHubEvent";
10
10
  import { IHubUser } from "./IHubUser";
11
- export declare type HubEntity = IHubSite | IHubProject | IHubDiscussion | IHubInitiative | IHubPage | IHubGroup | IHubTemplate | IHubSurvey | IHubEvent | IHubUser;
11
+ import { IHubOrganization } from "../..";
12
+ export declare type HubEntity = IHubDiscussion | IHubEvent | IHubGroup | IHubInitiative | IHubOrganization | IHubPage | IHubProject | IHubSite | IHubSurvey | IHubTemplate | IHubUser;
@@ -1,2 +1,2 @@
1
- export declare const HUB_ENTITY_TYPES: readonly ["content", "discussion", "event", "group", "initiative", "initiativeTemplate", "org", "page", "project", "site", "survey", "template", "user"];
1
+ export declare const HUB_ENTITY_TYPES: readonly ["content", "discussion", "event", "group", "initiative", "initiativeTemplate", "org", "organization", "page", "project", "site", "survey", "template", "user"];
2
2
  export declare type HubEntityType = (typeof HUB_ENTITY_TYPES)[number];
@@ -1,4 +1,4 @@
1
- import { IFeatureServiceDefinition } from "@esri/arcgis-rest-types";
1
+ import { IFeatureServiceDefinition } from "@esri/arcgis-rest-feature-layer";
2
2
  import { IWithPermissions, IWithSlug } from "../traits/index";
3
3
  import { IHubAdditionalResource } from "./IHubAdditionalResource";
4
4
  import { IHubItemEntity, IHubItemEntityEditor } from "./IHubItemEntity";
@@ -1,7 +1,7 @@
1
1
  import { ISpatialReference } from "@esri/arcgis-rest-types";
2
2
  import { IHubLocationType } from "./types";
3
3
  import { HubEntityType } from "./HubEntityType";
4
- import { IGeometryInstance } from "../..";
4
+ import { IGeometryInstance } from "./IGeometryInstance";
5
5
  /**
6
6
  * A location associated with an item and stored as a json resource.
7
7
  */
@@ -0,0 +1,61 @@
1
+ import { IPortal } from "@esri/arcgis-rest-portal";
2
+ import { IHubEntityBase } from "./IHubEntityBase";
3
+ import { AccessLevel } from "./types";
4
+ import { IWithViewSettings } from "../traits/IWithViewSettings";
5
+ import { IHubLocation } from "./IHubLocation";
6
+ /**
7
+ * read-only interface for a subset of the IPortal object
8
+ * This is not meant to be a complete representation of the
9
+ * IPortal object, but rather a subset of properties that
10
+ * are useful for display in the arcgu-hub-entity-card
11
+ */
12
+ export interface IHubOrganization extends IHubEntityBase {
13
+ /**
14
+ * Access level of the org - only public or private
15
+ */
16
+ access: AccessLevel;
17
+ /**
18
+ * Access to the whole Portal object
19
+ */
20
+ portal: IPortal;
21
+ /**
22
+ * URL to the thumbnail image
23
+ */
24
+ thumbnailUrl?: string;
25
+ /**
26
+ * URL to the org
27
+ */
28
+ url: string;
29
+ /**
30
+ * ID of the org, same as the id property
31
+ */
32
+ orgId?: string;
33
+ /**
34
+ * thumbnail image w/o URL
35
+ */
36
+ thumbnail?: string;
37
+ /**
38
+ * description of the org
39
+ */
40
+ description?: string;
41
+ /**
42
+ * owner. Always null for an org
43
+ */
44
+ owner?: string;
45
+ /**
46
+ * typeKeywords. Always empty for an org
47
+ */
48
+ typeKeywords: string[];
49
+ /**
50
+ * tags. Always empty for an org
51
+ */
52
+ tags: string[];
53
+ /**
54
+ * view settings - always null for an org
55
+ */
56
+ view?: IWithViewSettings;
57
+ /**
58
+ * location - always null for an org
59
+ */
60
+ location?: IHubLocation;
61
+ }
@@ -1,5 +1,6 @@
1
1
  import { IQuery } from "../../search/types/IHubCatalog";
2
- import { FieldType, IField } from "@esri/arcgis-rest-types";
2
+ import { IField } from "@esri/arcgis-rest-feature-layer";
3
+ import { FieldType } from "@esri/arcgis-rest-types";
3
4
  import { IReference } from "./IReference";
4
5
  import { IGeometryInstance, ServiceAggregation } from "../../core/types";
5
6
  /**
@@ -19,6 +19,7 @@ export * from "./IHubItemEntity";
19
19
  export * from "./IHubLayout";
20
20
  export * from "./IHubLocation";
21
21
  export * from "./IHubMapSettings";
22
+ export * from "./IHubOrganization";
22
23
  export * from "./IHubPage";
23
24
  export * from "./IHubProject";
24
25
  export * from "./IHubTemplate";
@@ -1,4 +1,4 @@
1
- import { IPagingParams, IPagedResponse as IRestPagedResponse, IUser } from "@esri/arcgis-rest-types";
1
+ import { IPagingParams, IPagedResponse as IRestPagedResponse, IUser } from "@esri/arcgis-rest-portal";
2
2
  import { Geometry, Polygon } from "geojson";
3
3
  import { IHubRequestOptions } from "../../types";
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { IGroup, IItem } from "@esri/arcgis-rest-types";
1
+ import { IGroup, IItem } from "@esri/arcgis-rest-portal";
2
2
  import { IHubContent, IHubItemEntity } from "../core";
3
3
  import { IChannel, SharingAccess } from "./api/types";
4
4
  import { IHubSearchResult, IQuery } from "../search";
@@ -1,4 +1,4 @@
1
- import { ISpatialReference } from "@esri/arcgis-rest-types";
1
+ import { ISpatialReference } from "@esri/arcgis-rest-feature-layer";
2
2
  export declare const WGS84_WKID = "4326";
3
3
  interface IExistingExportsPortalQueryOptions {
4
4
  layerId?: number | string;
@@ -1,4 +1,4 @@
1
- import { IGroup } from "@esri/arcgis-rest-types";
1
+ import { IGroup } from "@esri/arcgis-rest-portal";
2
2
  import { HubItemEntity } from "../core/HubItemEntity";
3
3
  import { IHubEventEditor, IHubEvent } from "../core/types/IHubEvent";
4
4
  import { IWithEditorBehavior } from "../core/behaviors";
@@ -1,6 +1,7 @@
1
- import { IExtent, IPoint, IPolygon } from "@esri/arcgis-rest-types";
1
+ import { IExtent } from "@esri/arcgis-rest-feature-layer";
2
2
  import { IHubRequestOptions, BBox } from "./types";
3
3
  import { Polygon } from "geojson";
4
+ import { IPoint, IPolygon } from "@esri/arcgis-rest-types";
4
5
  /**
5
6
  * Turns an bounding box coordinate array into an extent object
6
7
  * @param bBox bounding box coordinate array
@@ -1,4 +1,4 @@
1
- import { IGroup } from "@esri/arcgis-rest-types";
1
+ import { IGroup } from "@esri/arcgis-rest-portal";
2
2
  import { IHubRequestOptions } from "../types";
3
3
  import { IRequestOptions } from "@esri/arcgis-rest-request";
4
4
  import { IHubGroup } from "../core/types/IHubGroup";
@@ -1,4 +1,4 @@
1
- import { IGroup } from "@esri/arcgis-rest-types";
1
+ import { IGroup } from "@esri/arcgis-rest-portal";
2
2
  import { IRequestOptions } from "@esri/arcgis-rest-request";
3
3
  import { IHubEntityLinks } from "../../core/types";
4
4
  /**
@@ -1,6 +1,6 @@
1
1
  import { IRequestOptions } from "@esri/arcgis-rest-request";
2
2
  import { IHubGroup } from "../../core/types/IHubGroup";
3
- import { IGroup } from "@esri/arcgis-rest-types";
3
+ import { IGroup } from "@esri/arcgis-rest-portal";
4
4
  /**
5
5
  * Given a model and a group, set various computed properties that can't be directly mapped
6
6
  * @private
@@ -1,4 +1,4 @@
1
- import { IGroup } from "@esri/arcgis-rest-types";
1
+ import { IGroup } from "@esri/arcgis-rest-portal";
2
2
  import { IHubGroup } from "../../core/types/IHubGroup";
3
3
  import { IHubRequestOptions } from "../../types";
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { IGroup } from "@esri/arcgis-rest-types";
1
+ import { IGroup } from "@esri/arcgis-rest-portal";
2
2
  import { IHubGroup } from "../../core/types/IHubGroup";
3
3
  /**
4
4
  * Convert a Hub Group to an IGroup
@@ -1,4 +1,4 @@
1
- import { IGroup } from "@esri/arcgis-rest-types";
1
+ import { IGroup } from "@esri/arcgis-rest-portal";
2
2
  import { IHubGroup } from "../core/types/IHubGroup";
3
3
  export declare const HUB_GROUP_TYPE = "Hub Group";
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { IGroup } from "@esri/arcgis-rest-types";
1
+ import { IGroup } from "@esri/arcgis-rest-portal";
2
2
  export declare const isOpenDataGroup: (group: IGroup) => boolean;
@@ -1,5 +1,5 @@
1
1
  import { IRequestOptions } from "@esri/arcgis-rest-request";
2
- import { IItem } from "@esri/arcgis-rest-types";
2
+ import { IItem } from "@esri/arcgis-rest-portal";
3
3
  import { IHubEntityLinks } from "../../core";
4
4
  /**
5
5
  * Compute the links that get appended to a Hub Initiative Template
@@ -1,2 +1,2 @@
1
- import { IUser } from "@esri/arcgis-rest-types";
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
2
  export declare const getRecommendedTemplatesCatalog: (user: IUser, i18nScope: string) => import("../../search").IHubCatalog[];
@@ -1,5 +1,5 @@
1
1
  import { IRequestOptions } from "@esri/arcgis-rest-request";
2
- import { IItem } from "@esri/arcgis-rest-types";
2
+ import { IItem } from "@esri/arcgis-rest-portal";
3
3
  import { IHubEntityLinks } from "../../core";
4
4
  /**
5
5
  * Compute the links that get appended to a Hub Initiative
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  /**
3
3
  * Apply a hash of properties to an array of items.
4
4
  * Extracted to simplify testing.
@@ -1,6 +1,6 @@
1
1
  import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
2
2
  import { ICreateItemResponse } from "@esri/arcgis-rest-portal";
3
- import { IItemAdd } from "@esri/arcgis-rest-types";
3
+ import { IItemAdd } from "@esri/arcgis-rest-portal";
4
4
  /**
5
5
  * Creates an item in online from a local file/item.
6
6
  * Upload is multithreaded as the item is chunked up.
@@ -1,6 +1,6 @@
1
1
  import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
2
2
  import { ICreateItemResponse, ISharingResponse } from "@esri/arcgis-rest-portal";
3
- import { IGroup, IItemAdd } from "@esri/arcgis-rest-types";
3
+ import { IGroup, IItemAdd } from "@esri/arcgis-rest-portal";
4
4
  interface ICreateItemFromUrlOrFileOptions extends IUserRequestOptions {
5
5
  item: IItemAdd;
6
6
  groups?: IGroup[];
@@ -1,6 +1,6 @@
1
1
  import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
2
2
  import { ICreateItemResponse } from "@esri/arcgis-rest-portal";
3
- import { IItemAdd } from "@esri/arcgis-rest-types";
3
+ import { IItemAdd } from "@esri/arcgis-rest-portal";
4
4
  /**
5
5
  * Create AGO item from a URL
6
6
  *
@@ -1,5 +1,5 @@
1
1
  import { IRequestOptions } from "@esri/arcgis-rest-request";
2
- import { IItem } from "@esri/arcgis-rest-types";
2
+ import { IItem } from "@esri/arcgis-rest-portal";
3
3
  /**
4
4
  * Checks if a server's services directory is disabled. Consider hoisting this to RESTJS
5
5
  * @param idOrItem A feature service ID or item
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  import { IItemTemplate } from "../types";
3
3
  export declare const itemPropsNotInTemplates: string[];
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { IRequestOptions } from "@esri/arcgis-rest-request";
2
- import { IItem } from "@esri/arcgis-rest-types";
2
+ import { IItem } from "@esri/arcgis-rest-portal";
3
3
  /**
4
4
  * Create a slug, namespaced to an org and accounting for the 256 character limit
5
5
  * of individual typekeywords. Typically used to lookup items by a human readable name in urls
@@ -1,5 +1,5 @@
1
1
  import { IModel } from "../types";
2
- import { IItem } from "@esri/arcgis-rest-types";
2
+ import { IItem } from "@esri/arcgis-rest-portal";
3
3
  interface ISerializedModel extends IItem {
4
4
  text: string;
5
5
  }
@@ -0,0 +1,26 @@
1
+ import { IRequestOptions } from "@esri/arcgis-rest-request";
2
+ import { IHubOrganization } from "../core/types/IHubOrganization";
3
+ import { IPortal } from "@esri/arcgis-rest-portal";
4
+ import { IHubSearchResult } from "../search/types/IHubSearchResult";
5
+ /**
6
+ * Fetch an organization from the portal
7
+ * Note: IHubOrganization is a read-only interface for a subset of the IPortal object
8
+ * The full portal is exposed as the `portal` property on the IHubOrganization object.
9
+ * @param identifier
10
+ * @param requestOptions
11
+ * @returns
12
+ */
13
+ export declare function fetchOrganization(identifier: string, requestOptions: IRequestOptions): Promise<IHubOrganization>;
14
+ /**
15
+ * Convert an IHubOrganization to an IHubSearchResult
16
+ * @param org
17
+ * @returns
18
+ */
19
+ export declare function organizationToSearchResult(org: IHubOrganization): IHubSearchResult;
20
+ /**
21
+ * Convert an IPortal to an IHubOrganization
22
+ * @param portal
23
+ * @param token
24
+ * @returns
25
+ */
26
+ export declare function portalToOrganization(portal: IPortal, token?: string): IHubOrganization;
@@ -1,2 +1,3 @@
1
1
  export * from "./fetch-org";
2
2
  export * from "./fetchOrgLimits";
3
+ export * from "./fetch";
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  import { IRequestOptions } from "@esri/arcgis-rest-request";
3
3
  import { IHubEntityLinks } from "../../core/types";
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { IRequestOptions } from "@esri/arcgis-rest-request";
2
- import { IItem } from "@esri/arcgis-rest-types";
2
+ import { IItem } from "@esri/arcgis-rest-portal";
3
3
  import { IHubEntityLinks } from "../../core";
4
4
  /**
5
5
  * Compute the links that get appended to a Hub Project
@@ -1,4 +1,4 @@
1
- import { IExtent, IFeatureServiceDefinition, ILayerDefinition } from "@esri/arcgis-rest-types";
1
+ import { IExtent, IFeatureServiceDefinition, ILayerDefinition } from "@esri/arcgis-rest-feature-layer";
2
2
  import { ItemType } from "../../types";
3
3
  /**
4
4
  * Feature service / Doc Links Should not have data urls. Let"s exclude them from that.
@@ -1,5 +1,5 @@
1
1
  import { IHubRequestOptions, ITemplateAsset } from "../types";
2
- import { IItem } from "@esri/arcgis-rest-types";
2
+ import { IItem } from "@esri/arcgis-rest-portal";
3
3
  /**
4
4
  * Given an item, return an array of assets that includes
5
5
  * all the resources, as well as the thumbnail
@@ -1,5 +1,5 @@
1
1
  import { IRequestOptions } from "@esri/arcgis-rest-request";
2
- import { IItem } from "@esri/arcgis-rest-types";
2
+ import { IItem } from "@esri/arcgis-rest-portal";
3
3
  import { IPortal } from "@esri/arcgis-rest-portal";
4
4
  import { IHubRequestOptions } from "../types";
5
5
  export interface IThumbnailOptions {
@@ -0,0 +1,9 @@
1
+ import { IHubSearchOptions, IHubSearchResponse, IHubSearchResult, IQuery } from "../types";
2
+ /**
3
+ * Since the portal api does not actually have a search endpoint for orgs,
4
+ * this function simply extracts the id predicate from the query and
5
+ * fetches the orgs that match that ids.
6
+ * @param query
7
+ * @param options
8
+ */
9
+ export declare function portalFetchOrgs(query: IQuery, options: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
@@ -1,4 +1,4 @@
1
- import { IUser } from "@esri/arcgis-rest-types";
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
2
  import { IGroupsByMembership } from "./types/IGroupsByMembership";
3
3
  /**
4
4
  * Retrieves the user's groups categorized by their membership type.
@@ -1,4 +1,4 @@
1
- import { IUser } from "@esri/arcgis-rest-types";
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
2
  import { IGroupsByMembership } from "./types/IGroupsByMembership";
3
3
  import { IQuery } from "./types/IHubCatalog";
4
4
  /**
@@ -75,7 +75,7 @@ export interface IHubCollection {
75
75
  */
76
76
  displayConfig?: IGalleryDisplayConfig;
77
77
  }
78
- export declare const targetEntities: readonly ["item", "group", "user", "portalUser", "communityUser", "groupMember", "event", "channel", "discussionPost", "eventAttendee"];
78
+ export declare const targetEntities: readonly ["item", "group", "user", "portalUser", "communityUser", "groupMember", "event", "channel", "discussionPost", "eventAttendee", "organization"];
79
79
  export declare type EntityType = (typeof targetEntities)[number];
80
80
  /**
81
81
  * @private
@@ -1,4 +1,4 @@
1
- import { IUser } from "@esri/arcgis-rest-types";
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
2
  import { HubFamily } from "../types";
3
3
  import { EntityType, IFilter, IHubCatalog, IHubCollection } from "./types";
4
4
  import { IArcGISContext } from "..";
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  import { IRequestOptions } from "@esri/arcgis-rest-request";
3
3
  import { IHubEntityLinks } from "../../core/types";
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  import { IHubSurvey } from "../core/types/IHubSurvey";
3
3
  import { IHubRequestOptions } from "../types";
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  /**
3
3
  * Determines if a given Form item is a draft
4
4
  * @param {IItem} formItem A Form item
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  /**
3
3
  * Determines if the provided Feature Service item is a
4
4
  * Fieldworker View
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  /**
3
3
  * Returns true if the given Form item is a Survey123 Connect
4
4
  * survey
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  /**
3
3
  * Determines the display mode of the given survey
4
4
  * @param {Object} formItem A Form item
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  import { IRequestOptions } from "@esri/arcgis-rest-request";
3
3
  import { IHubEntityLinks } from "../../core/types";
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { IItem } from "@esri/arcgis-rest-types";
1
+ import { IItem } from "@esri/arcgis-rest-portal";
2
2
  /**
3
3
  * We do our best to glean what the solution template
4
4
  * is supposed to become when deployed. This util
@@ -1,7 +1,9 @@
1
- import { IItem, IUser, IGroup, IPolygon, ISpatialReference, IGeometry } from "@esri/arcgis-rest-types";
1
+ import { IItem, IUser, IGroup } from "@esri/arcgis-rest-portal";
2
2
  import { IPortal, ISearchResult } from "@esri/arcgis-rest-portal";
3
3
  import { UserSession } from "@esri/arcgis-rest-auth";
4
4
  import { IRequestOptions } from "@esri/arcgis-rest-request";
5
+ import { IGeometry } from "@esri/arcgis-rest-feature-layer";
6
+ import { IPolygon, ISpatialReference } from "@esri/arcgis-rest-types";
5
7
  /**
6
8
  * Generic Model, used with all items that have a json
7
9
  * `/data` payload
@@ -146,7 +148,7 @@ export declare type IRevertableTaskResult = IRevertableTaskSuccess | IRevertable
146
148
  /**
147
149
  * All Hub families
148
150
  */
149
- export declare const HubFamilies: readonly ["app", "content", "dataset", "document", "event", "feedback", "initiative", "map", "people", "site", "team", "template", "project", "channel", "discussion", "eventAttendee"];
151
+ export declare const HubFamilies: readonly ["app", "content", "dataset", "document", "event", "feedback", "initiative", "map", "people", "site", "team", "template", "project", "channel", "discussion", "eventAttendee", "organization"];
150
152
  /**
151
153
  * All Hub families
152
154
  */
@@ -1,4 +1,4 @@
1
- import { IUser } from "@esri/arcgis-rest-types";
1
+ import { IUser } from "@esri/arcgis-rest-portal";
2
2
  import { IHubUser } from "../core/types/IHubUser";
3
3
  import { IHubRequestOptions } from "../types";
4
4
  import { IHubSearchResult } from "../search/types/IHubSearchResult";