@esri/hub-common 16.5.3 → 17.0.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/ArcGISContext.js +2 -2
- package/dist/esm/ArcGISContextManager.js +8 -8
- package/dist/esm/ArcGISContextManager.js.map +1 -1
- package/dist/esm/content/_internal/computeProps.js.map +1 -1
- package/dist/esm/content/_internal/internalContentUtils.js +1 -1
- package/dist/esm/content/_internal/internalContentUtils.js.map +1 -1
- package/dist/esm/content/compose.js +1 -1
- package/dist/esm/content/compose.js.map +1 -1
- package/dist/esm/content/contentUtils.js +1 -1
- package/dist/esm/content/contentUtils.js.map +1 -1
- package/dist/esm/content/edit.js +2 -2
- package/dist/esm/content/edit.js.map +1 -1
- package/dist/esm/content/fetchContent.js +1 -1
- package/dist/esm/content/fetchContent.js.map +1 -1
- package/dist/esm/core/_internal/computeItemLinks.js.map +1 -1
- package/dist/esm/core/_internal/getAuthedImageUrl.js.map +1 -1
- package/dist/esm/core/schemas/index.js +5 -0
- package/dist/esm/core/schemas/index.js.map +1 -1
- package/dist/esm/discussions/_internal/computeProps.js.map +1 -1
- package/dist/esm/extent.js +1 -1
- package/dist/esm/extent.js.map +1 -1
- package/dist/esm/groups/_internal/computeLinks.js.map +1 -1
- package/dist/esm/groups/_internal/computeProps.js.map +1 -1
- package/dist/esm/groups/_internal/enrichments.js +2 -2
- package/dist/esm/groups/_internal/enrichments.js.map +1 -1
- package/dist/esm/hub-types.js.map +1 -1
- package/dist/esm/initiative-templates/_internal/computeProps.js.map +1 -1
- package/dist/esm/initiatives/_internal/computeProps.js.map +1 -1
- package/dist/esm/items/_enrichments.js +2 -2
- package/dist/esm/items/_enrichments.js.map +1 -1
- package/dist/esm/items/is-services-directory-disabled.js +1 -1
- package/dist/esm/items/is-services-directory-disabled.js.map +1 -1
- package/dist/esm/metrics/resolveMetric.js +1 -1
- package/dist/esm/metrics/resolveMetric.js.map +1 -1
- package/dist/esm/org/fetch.js.map +1 -1
- package/dist/esm/pages/_internal/computeProps.js.map +1 -1
- package/dist/esm/projects/_internal/computeProps.js.map +1 -1
- package/dist/esm/search/hubSearch.js +1 -1
- package/dist/esm/search/hubSearch.js.map +1 -1
- package/dist/esm/search/utils.js +2 -2
- package/dist/esm/search/utils.js.map +1 -1
- package/dist/esm/search/wellKnownCatalog.js +161 -4
- package/dist/esm/search/wellKnownCatalog.js.map +1 -1
- package/dist/esm/sites/_internal/computeProps.js.map +1 -1
- package/dist/esm/surveys/_internal/computeProps.js.map +1 -1
- package/dist/esm/utils/internal/resolveServiceQueryValues.js +1 -1
- package/dist/esm/utils/internal/resolveServiceQueryValues.js.map +1 -1
- package/dist/esm/utils/internal/userAppResources.js +1 -1
- package/dist/esm/utils/internal/userAppResources.js.map +1 -1
- package/dist/node/ArcGISContext.js +2 -2
- package/dist/node/ArcGISContextManager.js +11 -11
- package/dist/node/ArcGISContextManager.js.map +1 -1
- package/dist/node/content/_internal/computeProps.js.map +1 -1
- package/dist/node/content/_internal/internalContentUtils.js +2 -2
- package/dist/node/content/_internal/internalContentUtils.js.map +1 -1
- package/dist/node/content/compose.js +2 -2
- package/dist/node/content/compose.js.map +1 -1
- package/dist/node/content/contentUtils.js +2 -2
- package/dist/node/content/contentUtils.js.map +1 -1
- package/dist/node/content/edit.js +4 -4
- package/dist/node/content/edit.js.map +1 -1
- package/dist/node/content/fetchContent.js +4 -4
- package/dist/node/content/fetchContent.js.map +1 -1
- package/dist/node/core/_internal/computeItemLinks.js.map +1 -1
- package/dist/node/core/_internal/getAuthedImageUrl.js.map +1 -1
- package/dist/node/core/schemas/index.js +5 -0
- package/dist/node/core/schemas/index.js.map +1 -1
- package/dist/node/discussions/_internal/computeProps.js.map +1 -1
- package/dist/node/extent.js +1 -1
- package/dist/node/extent.js.map +1 -1
- package/dist/node/groups/_internal/computeLinks.js.map +1 -1
- package/dist/node/groups/_internal/computeProps.js.map +1 -1
- package/dist/node/groups/_internal/enrichments.js +2 -2
- package/dist/node/groups/_internal/enrichments.js.map +1 -1
- package/dist/node/hub-types.js.map +1 -1
- package/dist/node/initiative-templates/_internal/computeProps.js.map +1 -1
- package/dist/node/initiatives/_internal/computeProps.js.map +1 -1
- package/dist/node/items/_enrichments.js +5 -5
- package/dist/node/items/_enrichments.js.map +1 -1
- package/dist/node/items/is-services-directory-disabled.js +2 -2
- package/dist/node/items/is-services-directory-disabled.js.map +1 -1
- package/dist/node/metrics/resolveMetric.js +2 -2
- package/dist/node/metrics/resolveMetric.js.map +1 -1
- package/dist/node/org/fetch.js.map +1 -1
- package/dist/node/pages/_internal/computeProps.js.map +1 -1
- package/dist/node/projects/_internal/computeProps.js.map +1 -1
- package/dist/node/search/hubSearch.js +1 -1
- package/dist/node/search/hubSearch.js.map +1 -1
- package/dist/node/search/utils.js +2 -2
- package/dist/node/search/utils.js.map +1 -1
- package/dist/node/search/wellKnownCatalog.js +162 -4
- package/dist/node/search/wellKnownCatalog.js.map +1 -1
- package/dist/node/sites/_internal/computeProps.js.map +1 -1
- package/dist/node/surveys/_internal/computeProps.js.map +1 -1
- package/dist/node/utils/internal/resolveServiceQueryValues.js +2 -2
- package/dist/node/utils/internal/resolveServiceQueryValues.js.map +1 -1
- package/dist/node/utils/internal/userAppResources.js +1 -1
- package/dist/node/utils/internal/userAppResources.js.map +1 -1
- package/dist/types/ArcGISContext.d.ts +4 -4
- package/dist/types/ArcGISContextManager.d.ts +6 -6
- package/dist/types/content/_internal/internalContentUtils.d.ts +3 -3
- package/dist/types/content/compose.d.ts +1 -1
- package/dist/types/content/contentUtils.d.ts +1 -1
- package/dist/types/content/edit.d.ts +1 -1
- package/dist/types/content/hostedServiceUtils.d.ts +1 -1
- package/dist/types/content/manageSchedule.d.ts +1 -1
- package/dist/types/core/schemas/index.d.ts +5 -0
- package/dist/types/core/schemas/internal/getLocationExtent.d.ts +1 -1
- package/dist/types/core/traits/IWithBannerImage.d.ts +1 -1
- package/dist/types/core/traits/IWithLayout.d.ts +1 -1
- package/dist/types/core/types/IHubContent.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/IHubSite.d.ts +1 -1
- package/dist/types/core/types/IServerEnrichments.d.ts +1 -1
- package/dist/types/core/types/Metrics.d.ts +2 -2
- package/dist/types/downloads/build-existing-exports-portal-query.d.ts +1 -1
- package/dist/types/extent.d.ts +2 -2
- package/dist/types/groups/HubGroups.d.ts +1 -1
- package/dist/types/groups/_internal/getUniqueGroupTitle.d.ts +1 -1
- package/dist/types/groups/addGroupMembers.d.ts +1 -1
- package/dist/types/groups/deleteGroupThumbnail.d.ts +1 -1
- package/dist/types/groups/setGroupThumbnail.d.ts +1 -1
- package/dist/types/hub-types.d.ts +8 -7
- package/dist/types/initiative-templates/edit.d.ts +1 -1
- package/dist/types/initiatives/HubInitiatives.d.ts +1 -1
- package/dist/types/items/_enrichments.d.ts +1 -1
- package/dist/types/items/_internal/_prepare-upload-requests.d.ts +1 -1
- package/dist/types/items/_internal/_wait-for-item-ready.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/deleteItemThumbnail.d.ts +1 -1
- package/dist/types/items/fail-safe-update.d.ts +1 -1
- package/dist/types/items/is-services-directory-disabled.d.ts +2 -2
- package/dist/types/items/setItemThumbnail.d.ts +1 -1
- package/dist/types/items/uploadImageResource.d.ts +1 -1
- package/dist/types/models/index.d.ts +1 -1
- package/dist/types/org/fetchOrgLimits.d.ts +1 -1
- package/dist/types/pages/HubPages.d.ts +1 -1
- package/dist/types/projects/edit.d.ts +1 -1
- package/dist/types/resources/_internal/_validate-url-helpers.d.ts +1 -1
- package/dist/types/resources/doesResourceExist.d.ts +1 -1
- package/dist/types/resources/fetch-and-upload-resource.d.ts +2 -2
- package/dist/types/resources/fetch-and-upload-thumbnail.d.ts +2 -2
- package/dist/types/resources/removeResource.d.ts +1 -1
- package/dist/types/resources/upsertResource.d.ts +1 -1
- package/dist/types/search/types/IHubSearchOptions.d.ts +2 -2
- package/dist/types/search/utils.d.ts +2 -2
- package/dist/types/search/wellKnownCatalog.d.ts +23 -5
- package/dist/types/surveys/edit.d.ts +1 -1
- package/dist/types/templates/edit.d.ts +1 -1
- package/dist/types/types/IArcGISContext.d.ts +3 -3
- package/dist/types/types/IArcGISContextManagerOptions.d.ts +6 -6
- package/dist/types/types/IArcGISContextOptions.d.ts +3 -3
- package/package.json +4 -7
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type { IItem,
|
|
2
|
-
import type { IPolygon,
|
|
3
|
-
import { IPortal, ISearchResult } from "@esri/arcgis-rest-portal";
|
|
4
|
-
import type { UserSession } from "@esri/arcgis-rest-auth";
|
|
5
|
-
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
1
|
+
import type { IGroup, IItem, IPortal, ISearchResult, IUser } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import type { ArcGISIdentityManager, IGeometry, IPolygon, IRequestOptions, ISpatialReference } from "@esri/arcgis-rest-request";
|
|
6
3
|
/**
|
|
7
4
|
* App keys for User Resources used in Hub
|
|
8
5
|
*/
|
|
@@ -96,16 +93,20 @@ export interface IHubRequestOptionsPortalSelf extends IPortal {
|
|
|
96
93
|
user?: IUser;
|
|
97
94
|
}
|
|
98
95
|
export interface IHubRequestOptions extends IRequestOptions {
|
|
99
|
-
authentication?:
|
|
96
|
+
authentication?: ArcGISIdentityManager;
|
|
100
97
|
isPortal?: boolean;
|
|
101
98
|
hubApiUrl?: string;
|
|
102
99
|
portalSelf?: IHubRequestOptionsPortalSelf;
|
|
100
|
+
/**
|
|
101
|
+
* The implementation of `fetch` to use. Defaults to a global `fetch`.
|
|
102
|
+
*/
|
|
103
|
+
fetch?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
103
104
|
}
|
|
104
105
|
/**
|
|
105
106
|
* Options for requests that require an authenticated user.
|
|
106
107
|
*/
|
|
107
108
|
export interface IHubUserRequestOptions extends IHubRequestOptions {
|
|
108
|
-
authentication:
|
|
109
|
+
authentication: ArcGISIdentityManager;
|
|
109
110
|
}
|
|
110
111
|
export interface IHubTrustedOrgsResponse {
|
|
111
112
|
from: IHubTrustedOrgsRelationship;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IUserRequestOptions } from "@esri/arcgis-rest-
|
|
1
|
+
import type { IUserRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { IHubRequestOptions, IHubInitiativeEditor } from "../index";
|
|
3
3
|
import { IQuery } from "../search/types/IHubCatalog";
|
|
4
4
|
import { IItem } from "@esri/arcgis-rest-portal";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IItem } from "@esri/arcgis-rest-portal";
|
|
1
|
+
import type { IItem } from "@esri/arcgis-rest-portal";
|
|
2
2
|
import { IItemEnrichments, IServerEnrichments } from "../core";
|
|
3
3
|
import { IEnrichmentErrorInfo, IHubRequestOptions } from "../hub-types";
|
|
4
4
|
import { IHubSchedule } from "../core/types/IHubSchedule";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IUserRequestOptions } from "@esri/arcgis-rest-
|
|
1
|
+
import type { IUserRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function which takes an itemId and checks the status
|
|
4
4
|
* of the item every 2 seconds until it is either complete or failed.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IUserRequestOptions } from "@esri/arcgis-rest-
|
|
1
|
+
import type { IUserRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { ICreateItemResponse, ISharingResponse } from "@esri/arcgis-rest-portal";
|
|
3
3
|
import type { IGroup, IItemAdd } from "@esri/arcgis-rest-portal";
|
|
4
4
|
interface ICreateItemFromUrlOrFileOptions extends IUserRequestOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IModel } from "../hub-types";
|
|
2
|
-
import type { IUserRequestOptions } from "@esri/arcgis-rest-
|
|
2
|
+
import type { IUserRequestOptions } from "@esri/arcgis-rest-request";
|
|
3
3
|
/**
|
|
4
4
|
* Update a model's item, wrapped in a failSafe so this will not blow up if
|
|
5
5
|
* the user lacks rights somehow. This should be used in places where there is
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IUserRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
import type { IItem } from "@esri/arcgis-rest-portal";
|
|
3
3
|
/**
|
|
4
4
|
* Checks if a server's services directory is disabled. Consider hoisting this to RESTJS
|
|
@@ -6,4 +6,4 @@ import type { IItem } from "@esri/arcgis-rest-portal";
|
|
|
6
6
|
* @param requestOptions Request options
|
|
7
7
|
* @returns Promise that resolves boolean
|
|
8
8
|
*/
|
|
9
|
-
export declare const isServicesDirectoryDisabled: (idOrItem: string | IItem, requestOptions:
|
|
9
|
+
export declare const isServicesDirectoryDisabled: (idOrItem: string | IItem, requestOptions: IUserRequestOptions) => Promise<boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "./serializeModel";
|
|
2
|
-
import type { IUserRequestOptions } from "@esri/arcgis-rest-
|
|
2
|
+
import type { IUserRequestOptions } from "@esri/arcgis-rest-request";
|
|
3
3
|
import { IItem } from "@esri/arcgis-rest-portal";
|
|
4
4
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
5
5
|
import { IModel } from "../hub-types";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IUserRequestOptions } from "@esri/arcgis-rest-
|
|
1
|
+
import type { IUserRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
export declare type OrgLimitType = "ScheduleTask" | "Collaboration" | "Community" | "Groups" | "Content";
|
|
3
3
|
/**
|
|
4
4
|
* Definiton of the org limits response.
|
|
@@ -3,7 +3,7 @@ import { IHubRequestOptions, IModel } from "../hub-types";
|
|
|
3
3
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
4
4
|
import { IItem } from "@esri/arcgis-rest-portal";
|
|
5
5
|
import { IHubPage } from "../core";
|
|
6
|
-
import type { IUserRequestOptions } from "@esri/arcgis-rest-
|
|
6
|
+
import type { IUserRequestOptions } from "@esri/arcgis-rest-request";
|
|
7
7
|
import { IFetchItemOptions } from "../items/fetch";
|
|
8
8
|
/**
|
|
9
9
|
* @private
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IExtent, IFeatureServiceDefinition, ILayerDefinition } from "@esri/arcgis-rest-feature-
|
|
1
|
+
import type { IExtent, IFeatureServiceDefinition, ILayerDefinition } from "@esri/arcgis-rest-feature-service";
|
|
2
2
|
import { ItemType } from "../../hub-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 { IItemResourceResponse } from "@esri/arcgis-rest-portal";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ArcGISIdentityManager } from "@esri/arcgis-rest-request";
|
|
3
3
|
/**
|
|
4
4
|
* Fetch image from a url, and upload as a resource
|
|
5
5
|
* @param {Object} options {id, owner, fileName, url, authentication}
|
|
@@ -9,5 +9,5 @@ export declare function fetchAndUploadResource(options: {
|
|
|
9
9
|
owner: string;
|
|
10
10
|
fileName: string;
|
|
11
11
|
url: string;
|
|
12
|
-
authentication:
|
|
12
|
+
authentication: ArcGISIdentityManager;
|
|
13
13
|
}): Promise<IItemResourceResponse>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ArcGISIdentityManager } from "@esri/arcgis-rest-request";
|
|
2
2
|
/**
|
|
3
3
|
* Fetch image from a url, then upload to an item as it's thumbnail
|
|
4
4
|
* @param {object} options
|
|
@@ -8,5 +8,5 @@ export declare function fetchAndUploadThumbnail(options: {
|
|
|
8
8
|
owner: string;
|
|
9
9
|
fileName: string;
|
|
10
10
|
url: string;
|
|
11
|
-
authentication:
|
|
11
|
+
authentication: ArcGISIdentityManager;
|
|
12
12
|
}): Promise<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IUserRequestOptions } from "@esri/arcgis-rest-
|
|
1
|
+
import type { IUserRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
/**
|
|
3
3
|
* Given an item, and owner, Search for if the resource exists
|
|
4
4
|
* and if does, update it, otherwise add it. Returns a url for the item.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ArcGISIdentityManager } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { IHubRequestOptions } from "../../hub-types";
|
|
3
3
|
import { EntityType } from "./IHubCatalog";
|
|
4
4
|
import { NamedApis, IApiDefinition } from "./types";
|
|
@@ -58,7 +58,7 @@ export interface IHubSearchOptions extends IPagingOptions, ISortOptions {
|
|
|
58
58
|
/**
|
|
59
59
|
* DEPRECATE in favor of requestOptions
|
|
60
60
|
*/
|
|
61
|
-
authentication?:
|
|
61
|
+
authentication?: ArcGISIdentityManager;
|
|
62
62
|
/**
|
|
63
63
|
* While hubSearch requires requestOptions, it is not marked
|
|
64
64
|
* required because that is a breaking change to this
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IUser,
|
|
1
|
+
import { IUser, ArcGISIdentityManager } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { IGroup, ISearchGroupUsersOptions, ISearchOptions, SearchQueryBuilder } from "@esri/arcgis-rest-portal";
|
|
3
3
|
import { IHubSite } from "../core";
|
|
4
4
|
import { ISearchResponse } from "../hub-types";
|
|
@@ -50,7 +50,7 @@ export declare function relativeDateToDateRange(relative: IRelativeDate): IDateR
|
|
|
50
50
|
* @param fn
|
|
51
51
|
* @returns
|
|
52
52
|
*/
|
|
53
|
-
export declare function getNextFunction<T>(request: ISearchOptions | ISearchGroupUsersOptions, nextStart: number, total: number, fn: (r: any) => Promise<ISearchResponse<T>>): (authentication?:
|
|
53
|
+
export declare function getNextFunction<T>(request: ISearchOptions | ISearchGroupUsersOptions, nextStart: number, total: number, fn: (r: any) => Promise<ISearchResponse<T>>): (authentication?: ArcGISIdentityManager) => Promise<ISearchResponse<T>>;
|
|
54
54
|
/**
|
|
55
55
|
* Construct a the full url to a group thumbnail
|
|
56
56
|
*
|
|
@@ -2,11 +2,17 @@ import type { IUser } from "@esri/arcgis-rest-portal";
|
|
|
2
2
|
import { HubFamily } from "../hub-types";
|
|
3
3
|
import { EntityType, IFilter, IHubCatalog, IHubCollection } from "./types";
|
|
4
4
|
import type { IArcGISContext } from "../types/IArcGISContext";
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
export declare
|
|
5
|
+
/** well-known item catalogs */
|
|
6
|
+
export declare const WELL_KNOWN_ITEM_CATALOGS: readonly ["myContent", "favorites", "organization", "world", "partners", "community", "livingAtlas"];
|
|
7
|
+
export declare type WellKnownItemCatalog = (typeof WELL_KNOWN_ITEM_CATALOGS)[number];
|
|
8
|
+
/** well-known group catalogs */
|
|
9
|
+
export declare const WELL_KNOWN_GROUP_CATALOGS: readonly ["editGroups", "viewGroups", "allGroups", "myGroups", "orgGroups", "communityGroups", "publicGroups"];
|
|
10
|
+
export declare type WellKnownGroupCatalog = (typeof WELL_KNOWN_GROUP_CATALOGS)[number];
|
|
11
|
+
/** well-known event catalogs */
|
|
12
|
+
export declare const WELL_KNOWN_EVENT_CATALOGS: readonly ["myEvents", "orgEvents", "worldEvents"];
|
|
13
|
+
export declare type WellKnownEventCatalog = (typeof WELL_KNOWN_EVENT_CATALOGS)[number];
|
|
14
|
+
/** well known catalogs */
|
|
15
|
+
export declare type WellKnownCatalog = WellKnownItemCatalog | WellKnownGroupCatalog | WellKnownEventCatalog;
|
|
10
16
|
/**
|
|
11
17
|
* This is used to determine what IHubCollection definition JSON object
|
|
12
18
|
* can be created. We use HubFamily here to define most of the collections
|
|
@@ -38,6 +44,18 @@ export interface IGetWellKnownCatalogOptions {
|
|
|
38
44
|
* @returns i18nScope with a "." at the end if it is defined
|
|
39
45
|
*/
|
|
40
46
|
export declare function dotifyString(i18nScope: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* Helper function to build an array of well-known Catalogs
|
|
49
|
+
* note: requested well-known Catalogs must be for the same
|
|
50
|
+
* targetEntity type
|
|
51
|
+
*
|
|
52
|
+
* @param i18nScope Translation scope to be interpolated into the catalog
|
|
53
|
+
* @param targetEntity The type of entity to query for
|
|
54
|
+
* @param catalogNames Names of the catalogs requested
|
|
55
|
+
* @param context contextual portal & auth information
|
|
56
|
+
* @param opts optional IGetWellKnownCatalogOptions args
|
|
57
|
+
*/
|
|
58
|
+
export declare function getWellKnownCatalogs(i18nScope: string, targetEntity: EntityType, catalogNames: WellKnownCatalog[], context: IArcGISContext, opts?: Exclude<IGetWellKnownCatalogOptions, "context" | "user">): IHubCatalog[];
|
|
41
59
|
/** Get a single catalog based on the catalog name, entity type and optional requests
|
|
42
60
|
* @param i18nScope Translation scope to be interpolated into the catalog
|
|
43
61
|
* @param name Name of the catalog requested
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IUserRequestOptions } from "@esri/arcgis-rest-
|
|
1
|
+
import type { IUserRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { IHubTemplate, IHubTemplateEditor } from "../core/types/IHubTemplate";
|
|
3
3
|
import { IPortal } from "@esri/arcgis-rest-portal";
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArcGISIdentityManager, IUserRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
2
|
import type { IPortal } from "@esri/arcgis-rest-portal";
|
|
3
3
|
import type { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
4
4
|
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
@@ -26,9 +26,9 @@ export interface IArcGISContext {
|
|
|
26
26
|
*/
|
|
27
27
|
id: number;
|
|
28
28
|
/**
|
|
29
|
-
* Return the
|
|
29
|
+
* Return the ArcGISIdentityManager if authenticated
|
|
30
30
|
*/
|
|
31
|
-
session:
|
|
31
|
+
session: ArcGISIdentityManager;
|
|
32
32
|
/**
|
|
33
33
|
* Return boolean indicating if authenticatio is present
|
|
34
34
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ArcGISIdentityManager } from "@esri/arcgis-rest-request";
|
|
2
2
|
import { IPortal } from "@esri/arcgis-rest-portal";
|
|
3
3
|
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
4
4
|
import { IUserResourceToken } from "./IUserResourceToken";
|
|
@@ -13,9 +13,9 @@ import { IUserHubSettings } from "../utils/IUserHubSettings";
|
|
|
13
13
|
export interface IArcGISContextManagerOptions {
|
|
14
14
|
/**
|
|
15
15
|
* Existing user session, which may be created from Identity Manager
|
|
16
|
-
* `const session =
|
|
16
|
+
* `const session = ArcGISIdentityManager.fromCredential(idMgr.getCredential());`
|
|
17
17
|
*/
|
|
18
|
-
authentication?:
|
|
18
|
+
authentication?: ArcGISIdentityManager;
|
|
19
19
|
/**
|
|
20
20
|
* ArcGIS Online or ArcGIS Enterprise portal url.
|
|
21
21
|
* Do not include `/sharing/rest`
|
|
@@ -23,17 +23,17 @@ export interface IArcGISContextManagerOptions {
|
|
|
23
23
|
* For ArcGIS Enterprise, you must include the webadaptor name.
|
|
24
24
|
* i.e. https://gis.mytown.gov/portal
|
|
25
25
|
*
|
|
26
|
-
* When Authentication is present, the
|
|
26
|
+
* When Authentication is present, the ArcGISIdentityManager.portal value is
|
|
27
27
|
* used instead of this property.
|
|
28
28
|
*/
|
|
29
29
|
portalUrl?: string;
|
|
30
30
|
/**
|
|
31
31
|
* Portal self for the authenticated user. If not passed into `.create`
|
|
32
|
-
* with the
|
|
32
|
+
* with the ArcGISIdentityManager, it will be fetched
|
|
33
33
|
*/
|
|
34
34
|
portal?: IPortal;
|
|
35
35
|
/**
|
|
36
|
-
* Current user as `IUser`. If not passed into `.create` with the
|
|
36
|
+
* Current user as `IUser`. If not passed into `.create` with the ArcGISIdentityManager
|
|
37
37
|
* it will be fetched.
|
|
38
38
|
*/
|
|
39
39
|
currentUser?: IUser;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ArcGISIdentityManager } from "@esri/arcgis-rest-request";
|
|
2
2
|
import type { IPortal } from "@esri/arcgis-rest-portal";
|
|
3
3
|
import type { IUser } from "@esri/arcgis-rest-portal";
|
|
4
4
|
import type { IUserResourceToken } from "./IUserResourceToken";
|
|
@@ -28,9 +28,9 @@ export interface IArcGISContextOptions {
|
|
|
28
28
|
*/
|
|
29
29
|
hubUrl?: string;
|
|
30
30
|
/**
|
|
31
|
-
* The current
|
|
31
|
+
* The current ArcGISIdentityManager
|
|
32
32
|
*/
|
|
33
|
-
authentication?:
|
|
33
|
+
authentication?: ArcGISIdentityManager;
|
|
34
34
|
/**
|
|
35
35
|
* If the user is authenticated, the portal should be passed in
|
|
36
36
|
* so various getters can work as expected.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esri/hub-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.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",
|
|
@@ -22,12 +22,9 @@
|
|
|
22
22
|
"tslib": "^1.13.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@esri/arcgis-rest-
|
|
26
|
-
"@esri/arcgis-rest-
|
|
27
|
-
"@esri/arcgis-rest-
|
|
28
|
-
"@esri/arcgis-rest-request": "^2.14.0 || 3",
|
|
29
|
-
"@esri/arcgis-rest-service-admin": "^3.6.0",
|
|
30
|
-
"@esri/arcgis-rest-types": "^2.15.0 || 3"
|
|
25
|
+
"@esri/arcgis-rest-feature-service": "~4.0.5",
|
|
26
|
+
"@esri/arcgis-rest-portal": "~4.4.0",
|
|
27
|
+
"@esri/arcgis-rest-request": "~4.2.3"
|
|
31
28
|
},
|
|
32
29
|
"devDependencies": {
|
|
33
30
|
"@types/adlib": "^3.0.1",
|