@esri/hub-common 15.33.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.
- package/dist/esm/access/can-edit-item.js +1 -1
- package/dist/esm/access/can-edit-site-content.js +2 -2
- package/dist/esm/access/can-edit-site-content.js.map +1 -1
- package/dist/esm/content/get-family.js +3 -0
- package/dist/esm/content/get-family.js.map +1 -1
- package/dist/esm/core/fetchHubEntity.js +4 -0
- package/dist/esm/core/fetchHubEntity.js.map +1 -1
- package/dist/esm/core/types/HubEntityType.js +1 -0
- package/dist/esm/core/types/HubEntityType.js.map +1 -1
- package/dist/esm/core/types/IHubOrganization.js +1 -0
- package/dist/esm/core/types/IHubOrganization.js.map +1 -0
- package/dist/esm/core/types/Metrics.js.map +1 -1
- package/dist/esm/core/types/index.js +1 -0
- package/dist/esm/core/types/index.js.map +1 -1
- package/dist/esm/discussions/api/channels/channels.js +1 -0
- package/dist/esm/discussions/api/channels/channels.js.map +1 -1
- package/dist/esm/discussions/api/settings/getDefaultEntitySettings.js +1 -0
- package/dist/esm/discussions/api/settings/getDefaultEntitySettings.js.map +1 -1
- package/dist/esm/discussions/api/settings/settings.js +7 -0
- package/dist/esm/discussions/api/settings/settings.js.map +1 -1
- package/dist/esm/extent.js.map +1 -1
- package/dist/esm/items/normalize-solution-template-item.js +2 -2
- package/dist/esm/items/normalize-solution-template-item.js.map +1 -1
- package/dist/esm/metrics/resolveMetric.js.map +1 -1
- package/dist/esm/org/fetch.js +77 -0
- package/dist/esm/org/fetch.js.map +1 -0
- package/dist/esm/org/index.js +1 -0
- package/dist/esm/org/index.js.map +1 -1
- package/dist/esm/resources/get-item-assets.js +3 -3
- package/dist/esm/resources/get-item-assets.js.map +1 -1
- package/dist/esm/search/_internal/portalFetchOrgs.js +33 -0
- package/dist/esm/search/_internal/portalFetchOrgs.js.map +1 -0
- package/dist/esm/search/hubSearch.js +2 -0
- package/dist/esm/search/hubSearch.js.map +1 -1
- package/dist/esm/search/types/IHubCatalog.js +1 -0
- package/dist/esm/search/types/IHubCatalog.js.map +1 -1
- package/dist/esm/search/utils.js +4 -3
- package/dist/esm/search/utils.js.map +1 -1
- package/dist/esm/types.js +1 -0
- package/dist/esm/types.js.map +1 -1
- package/dist/node/access/can-edit-item.js +1 -1
- package/dist/node/access/can-edit-site-content.js +2 -2
- package/dist/node/access/can-edit-site-content.js.map +1 -1
- package/dist/node/content/get-family.js +3 -0
- package/dist/node/content/get-family.js.map +1 -1
- package/dist/node/core/fetchHubEntity.js +4 -0
- package/dist/node/core/fetchHubEntity.js.map +1 -1
- package/dist/node/core/types/HubEntityType.js +1 -0
- package/dist/node/core/types/HubEntityType.js.map +1 -1
- package/dist/node/core/types/IHubOrganization.js +3 -0
- package/dist/node/core/types/IHubOrganization.js.map +1 -0
- package/dist/node/core/types/Metrics.js.map +1 -1
- package/dist/node/core/types/index.js +1 -0
- package/dist/node/core/types/index.js.map +1 -1
- package/dist/node/discussions/api/channels/channels.js +1 -0
- package/dist/node/discussions/api/channels/channels.js.map +1 -1
- package/dist/node/discussions/api/settings/getDefaultEntitySettings.js +1 -0
- package/dist/node/discussions/api/settings/getDefaultEntitySettings.js.map +1 -1
- package/dist/node/discussions/api/settings/settings.js +7 -0
- package/dist/node/discussions/api/settings/settings.js.map +1 -1
- package/dist/node/extent.js.map +1 -1
- package/dist/node/items/normalize-solution-template-item.js +2 -2
- package/dist/node/items/normalize-solution-template-item.js.map +1 -1
- package/dist/node/metrics/resolveMetric.js.map +1 -1
- package/dist/node/org/fetch.js +83 -0
- package/dist/node/org/fetch.js.map +1 -0
- package/dist/node/org/index.js +1 -0
- package/dist/node/org/index.js.map +1 -1
- package/dist/node/resources/get-item-assets.js +3 -3
- package/dist/node/resources/get-item-assets.js.map +1 -1
- package/dist/node/search/_internal/portalFetchOrgs.js +37 -0
- package/dist/node/search/_internal/portalFetchOrgs.js.map +1 -0
- package/dist/node/search/hubSearch.js +2 -0
- package/dist/node/search/hubSearch.js.map +1 -1
- package/dist/node/search/types/IHubCatalog.js +1 -0
- package/dist/node/search/types/IHubCatalog.js.map +1 -1
- package/dist/node/search/utils.js +4 -3
- package/dist/node/search/utils.js.map +1 -1
- package/dist/node/types.js +1 -0
- package/dist/node/types.js.map +1 -1
- package/dist/types/access/can-edit-event.d.ts +1 -1
- package/dist/types/access/can-edit-item.d.ts +1 -1
- package/dist/types/access/can-edit-site-content.d.ts +1 -1
- package/dist/types/access/can-edit-site.d.ts +1 -1
- package/dist/types/access/has-base-priv.d.ts +1 -1
- package/dist/types/associations/internal/getIdsFromAssociationGroups.d.ts +1 -1
- package/dist/types/categories.d.ts +1 -1
- package/dist/types/content/_internal/internalContentUtils.d.ts +3 -2
- package/dist/types/content/get-family.d.ts +1 -1
- package/dist/types/content/search.d.ts +1 -1
- package/dist/types/core/_internal/computeItemLinks.d.ts +1 -1
- package/dist/types/core/_internal/computeItemProps.d.ts +1 -1
- package/dist/types/core/behaviors/IWithFollowersBehavior.d.ts +1 -1
- package/dist/types/core/enrichEntity.d.ts +1 -1
- package/dist/types/core/types/HubEntity.d.ts +2 -1
- package/dist/types/core/types/HubEntityType.d.ts +1 -1
- package/dist/types/core/types/IHubEditableContent.d.ts +1 -1
- package/dist/types/core/types/IHubLocation.d.ts +1 -1
- package/dist/types/core/types/IHubOrganization.d.ts +61 -0
- package/dist/types/core/types/Metrics.d.ts +2 -1
- package/dist/types/core/types/index.d.ts +1 -0
- package/dist/types/discussions/api/channels/channels.d.ts +1 -0
- package/dist/types/discussions/api/settings/settings.d.ts +7 -0
- package/dist/types/discussions/api/types.d.ts +1 -1
- package/dist/types/discussions/utils.d.ts +1 -1
- package/dist/types/downloads/build-existing-exports-portal-query.d.ts +1 -1
- package/dist/types/events/HubEvent.d.ts +1 -1
- package/dist/types/extent.d.ts +2 -1
- package/dist/types/groups/HubGroups.d.ts +1 -1
- package/dist/types/groups/_internal/computeLinks.d.ts +1 -1
- package/dist/types/groups/_internal/computeProps.d.ts +1 -1
- package/dist/types/groups/_internal/convertGroupToHubGroup.d.ts +1 -1
- package/dist/types/groups/_internal/convertHubGroupToGroup.d.ts +1 -1
- package/dist/types/groups/defaults.d.ts +1 -1
- package/dist/types/groups/isOpenDataGroup.d.ts +1 -1
- package/dist/types/initiative-templates/_internal/computeLinks.d.ts +1 -1
- package/dist/types/initiative-templates/_internal/getRecommendedTemplatesCatalog.d.ts +1 -1
- package/dist/types/initiatives/_internal/computeLinks.d.ts +1 -1
- package/dist/types/items/apply-properties-to-items.d.ts +1 -1
- package/dist/types/items/create-item-from-file.d.ts +1 -1
- package/dist/types/items/create-item-from-url-or-file.d.ts +1 -1
- package/dist/types/items/create-item-from-url.d.ts +1 -1
- package/dist/types/items/is-services-directory-disabled.d.ts +1 -1
- package/dist/types/items/normalize-solution-template-item.d.ts +1 -1
- package/dist/types/items/slugs.d.ts +1 -1
- package/dist/types/models/serializeModel.d.ts +1 -1
- package/dist/types/org/fetch.d.ts +26 -0
- package/dist/types/org/index.d.ts +1 -0
- package/dist/types/pages/_internal/computeLinks.d.ts +1 -1
- package/dist/types/projects/_internal/computeLinks.d.ts +1 -1
- package/dist/types/resources/_internal/_validate-url-helpers.d.ts +1 -1
- package/dist/types/resources/get-item-assets.d.ts +1 -1
- package/dist/types/resources/get-item-thumbnail-url.d.ts +1 -1
- package/dist/types/search/_internal/portalFetchOrgs.d.ts +9 -0
- package/dist/types/search/getUserGroupsByMembership.d.ts +1 -1
- package/dist/types/search/getUserGroupsFromQuery.d.ts +1 -1
- package/dist/types/search/types/IHubCatalog.d.ts +1 -1
- package/dist/types/search/wellKnownCatalog.d.ts +1 -1
- package/dist/types/sites/_internal/computeLinks.d.ts +1 -1
- package/dist/types/surveys/fetch.d.ts +1 -1
- package/dist/types/surveys/utils/is-draft.d.ts +1 -1
- package/dist/types/surveys/utils/is-fieldworker-view.d.ts +1 -1
- package/dist/types/surveys/utils/is-survey123-connect.d.ts +1 -1
- package/dist/types/surveys/utils/should-display-map.d.ts +1 -1
- package/dist/types/templates/_internal/computeLinks.d.ts +1 -1
- package/dist/types/templates/utils.d.ts +1 -1
- package/dist/types/types.d.ts +4 -2
- package/dist/types/users/HubUsers.d.ts +1 -1
- package/dist/types/users/_internal/computeProps.d.ts +1 -1
- package/dist/types/utils/is-update-group.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
-
import { IItem } from "@esri/arcgis-rest-
|
|
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-
|
|
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-
|
|
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-
|
|
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>>;
|
|
@@ -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
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { IItem, IUser, IGroup
|
|
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-
|
|
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";
|