@esri/hub-common 12.33.0 → 13.0.0-next.1
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/items/index.js +4 -1
- package/dist/esm/items/index.js.map +1 -1
- package/dist/esm/items/registerBrowserApp.js +2 -0
- package/dist/esm/items/registerBrowserApp.js.map +1 -1
- package/dist/esm/projects/edit.js +0 -16
- package/dist/esm/projects/edit.js.map +1 -1
- package/dist/esm/search/Catalog.js +0 -1
- package/dist/esm/search/Catalog.js.map +1 -1
- package/dist/esm/search/_internal/commonHelpers/getApi.js +4 -12
- package/dist/esm/search/_internal/commonHelpers/getApi.js.map +1 -1
- package/dist/esm/search/_internal/expandPredicate.js +1 -1
- package/dist/esm/search/_internal/expandPredicate.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItems.js +3 -3
- package/dist/esm/search/_internal/hubSearchItems.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.js +2 -2
- package/dist/esm/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getNextOgcCallback.js +2 -2
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getNextOgcCallback.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js +3 -4
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.js +2 -2
- package/dist/esm/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/searchOgcItems.js +3 -3
- package/dist/esm/search/_internal/hubSearchItemsHelpers/searchOgcItems.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchGroups.js +1 -1
- package/dist/esm/search/_internal/portalSearchGroups.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchItems.js +1 -1
- package/dist/esm/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchUsers.js +1 -1
- package/dist/esm/search/_internal/portalSearchUsers.js.map +1 -1
- package/dist/esm/search/_internal/utils.js +95 -0
- package/dist/esm/search/_internal/utils.js.map +1 -0
- package/dist/esm/search/hubSearch.js +4 -12
- package/dist/esm/search/hubSearch.js.map +1 -1
- package/dist/esm/search/utils.js +0 -156
- package/dist/esm/search/utils.js.map +1 -1
- package/dist/esm/sites/HubSites.js +5 -21
- package/dist/esm/sites/HubSites.js.map +1 -1
- package/dist/esm/sites/index.js +3 -1
- package/dist/esm/sites/index.js.map +1 -1
- package/dist/esm/sites/registerSiteAsApplication.js +2 -0
- package/dist/esm/sites/registerSiteAsApplication.js.map +1 -1
- package/dist/node/items/index.js +4 -1
- package/dist/node/items/index.js.map +1 -1
- package/dist/node/items/registerBrowserApp.js +2 -0
- package/dist/node/items/registerBrowserApp.js.map +1 -1
- package/dist/node/projects/edit.js +1 -18
- package/dist/node/projects/edit.js.map +1 -1
- package/dist/node/search/Catalog.js +0 -1
- package/dist/node/search/Catalog.js.map +1 -1
- package/dist/node/search/_internal/commonHelpers/getApi.js +4 -12
- package/dist/node/search/_internal/commonHelpers/getApi.js.map +1 -1
- package/dist/node/search/_internal/expandPredicate.js +1 -1
- package/dist/node/search/_internal/expandPredicate.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItems.js +3 -3
- package/dist/node/search/_internal/hubSearchItems.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.js +2 -2
- package/dist/node/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getNextOgcCallback.js +2 -2
- package/dist/node/search/_internal/hubSearchItemsHelpers/getNextOgcCallback.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js +3 -4
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.js +2 -2
- package/dist/node/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/searchOgcItems.js +3 -3
- package/dist/node/search/_internal/hubSearchItemsHelpers/searchOgcItems.js.map +1 -1
- package/dist/node/search/_internal/portalSearchGroups.js +1 -1
- package/dist/node/search/_internal/portalSearchGroups.js.map +1 -1
- package/dist/node/search/_internal/portalSearchItems.js +1 -1
- package/dist/node/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/node/search/_internal/portalSearchUsers.js +1 -1
- package/dist/node/search/_internal/portalSearchUsers.js.map +1 -1
- package/dist/node/search/_internal/utils.js +101 -0
- package/dist/node/search/_internal/utils.js.map +1 -0
- package/dist/node/search/hubSearch.js +4 -12
- package/dist/node/search/hubSearch.js.map +1 -1
- package/dist/node/search/utils.js +1 -162
- package/dist/node/search/utils.js.map +1 -1
- package/dist/node/sites/HubSites.js +6 -23
- package/dist/node/sites/HubSites.js.map +1 -1
- package/dist/node/sites/index.js +3 -1
- package/dist/node/sites/index.js.map +1 -1
- package/dist/node/sites/registerSiteAsApplication.js +2 -0
- package/dist/node/sites/registerSiteAsApplication.js.map +1 -1
- package/dist/types/core/behaviors/IWithEditorBehavior.d.ts +0 -6
- package/dist/types/core/types/IHubLocation.d.ts +0 -5
- package/dist/types/items/index.d.ts +0 -1
- package/dist/types/items/registerBrowserApp.d.ts +2 -0
- package/dist/types/projects/edit.d.ts +0 -13
- package/dist/types/search/_internal/commonHelpers/getApi.d.ts +1 -2
- package/dist/types/search/_internal/hubSearchItems.d.ts +2 -2
- package/dist/types/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.d.ts +2 -1
- package/dist/types/search/_internal/hubSearchItemsHelpers/getNextOgcCallback.d.ts +2 -1
- package/dist/types/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.d.ts +3 -3
- package/dist/types/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.d.ts +2 -1
- package/dist/types/search/_internal/hubSearchItemsHelpers/searchOgcItems.d.ts +2 -1
- package/dist/types/search/_internal/utils.d.ts +28 -0
- package/dist/types/search/types/IHubSearchOptions.d.ts +0 -12
- package/dist/types/search/utils.d.ts +2 -48
- package/dist/types/sites/HubSites.d.ts +0 -12
- package/dist/types/sites/index.d.ts +0 -1
- package/dist/types/sites/registerSiteAsApplication.d.ts +2 -0
- package/dist/types/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,6 @@ export * from "./get-structured-license";
|
|
|
16
16
|
export * from "./slugs";
|
|
17
17
|
export * from "./normalize-solution-template-item";
|
|
18
18
|
export * from "./setItemThumbnail";
|
|
19
|
-
export * from "./registerBrowserApp";
|
|
20
19
|
export * from "./create-item-from-file";
|
|
21
20
|
export * from "./create-item-from-url";
|
|
22
21
|
export * from "./create-item-from-url-or-file";
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
2
|
import { IHubProject } from "../core/types";
|
|
3
|
-
import { UiSchemaElementOptions } from "../core/schemas";
|
|
4
|
-
import { EditorConfigType, IEditorConfig } from "../core/behaviors/IWithEditorBehavior";
|
|
5
3
|
/**
|
|
6
4
|
* @private
|
|
7
5
|
* Create a new Hub Project item
|
|
@@ -26,14 +24,3 @@ export declare function updateProject(project: IHubProject, requestOptions: IUse
|
|
|
26
24
|
* @param requestOptions
|
|
27
25
|
*/
|
|
28
26
|
export declare function deleteProject(id: string, requestOptions: IUserRequestOptions): Promise<void>;
|
|
29
|
-
/**
|
|
30
|
-
* DEPRECATED: the following will be removed at next breaking version
|
|
31
|
-
* use the getEntityEditorSchemas function instead (which this function
|
|
32
|
-
* has already been refactored to consume)
|
|
33
|
-
*
|
|
34
|
-
* Get the editor config for for the HubProject entity.
|
|
35
|
-
* @param i18nScope translation scope to be interpolated into the uiSchema
|
|
36
|
-
* @param type editor type - corresonds to the returned uiSchema
|
|
37
|
-
* @param options optional hash of dynamic uiSchema element options
|
|
38
|
-
*/
|
|
39
|
-
export declare function getHubProjectEditorConfig(i18nScope: string, type: EditorConfigType, options?: UiSchemaElementOptions[]): Promise<IEditorConfig>;
|
|
@@ -5,8 +5,7 @@ import { IApiDefinition } from "../../types/types";
|
|
|
5
5
|
* @private
|
|
6
6
|
* Determines Which API should be hit for the given search parameters.
|
|
7
7
|
* Hierarchy:
|
|
8
|
-
* - Target
|
|
9
|
-
* - Target the OGC API current parameters allow
|
|
8
|
+
* - Target the OGC API if current parameters allow
|
|
10
9
|
* - Target the Portal API based off options.requestOptions.portal
|
|
11
10
|
* @param targetEntity target entity of the query
|
|
12
11
|
* @param options search options
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHubSearchOptions, IHubSearchResponse, IHubSearchResult, IQuery } from "../types";
|
|
1
|
+
import { IApiDefinition, IHubSearchOptions, IHubSearchResponse, IHubSearchResult, IQuery } from "../types";
|
|
2
2
|
/**
|
|
3
3
|
* @private
|
|
4
4
|
* Execute item search against the Hub API
|
|
@@ -6,4 +6,4 @@ import { IHubSearchOptions, IHubSearchResponse, IHubSearchResult, IQuery } from
|
|
|
6
6
|
* @param options
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
|
-
export declare function hubSearchItems(query: IQuery, options: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
9
|
+
export declare function hubSearchItems(query: IQuery, options: IHubSearchOptions, api: IApiDefinition): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { IApiDefinition } from "../../types";
|
|
1
2
|
import { IQuery } from "../../types/IHubCatalog";
|
|
2
3
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
3
4
|
import { IHubSearchResponse } from "../../types/IHubSearchResponse";
|
|
4
5
|
import { IHubSearchResult } from "../../types/IHubSearchResult";
|
|
5
6
|
import { IOgcItemsResponse } from "./interfaces";
|
|
6
|
-
export declare function formatOgcItemsResponse(response: IOgcItemsResponse, originalQuery: IQuery, originalOptions: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
7
|
+
export declare function formatOgcItemsResponse(response: IOgcItemsResponse, originalQuery: IQuery, originalOptions: IHubSearchOptions, api: IApiDefinition): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { IApiDefinition } from "../../types";
|
|
1
2
|
import { IQuery } from "../../types/IHubCatalog";
|
|
2
3
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
3
4
|
import { IHubSearchResponse } from "../../types/IHubSearchResponse";
|
|
4
5
|
import { IHubSearchResult } from "../../types/IHubSearchResult";
|
|
5
6
|
import { IOgcItemsResponse } from "./interfaces";
|
|
6
|
-
export declare function getNextOgcCallback(response: IOgcItemsResponse, originalQuery: IQuery, originalOptions: IHubSearchOptions): (params?: any) => Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
7
|
+
export declare function getNextOgcCallback(response: IOgcItemsResponse, originalQuery: IQuery, originalOptions: IHubSearchOptions, api: IApiDefinition): (params?: any) => Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IQuery } from "../../types/IHubCatalog";
|
|
2
|
-
import {
|
|
2
|
+
import { IApiDefinition } from "../../types/types";
|
|
3
3
|
/**
|
|
4
4
|
* @private
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@ import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
|
8
8
|
* the all collection is targeted.
|
|
9
9
|
*
|
|
10
10
|
* @param query the query the request is based on
|
|
11
|
-
* @param
|
|
11
|
+
* @param api definition object for the OGC API to be targeted
|
|
12
12
|
* @returns the collection url
|
|
13
13
|
*/
|
|
14
|
-
export declare function getOgcCollectionUrl(query: IQuery,
|
|
14
|
+
export declare function getOgcCollectionUrl(query: IQuery, api: IApiDefinition): string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { IApiDefinition } from "../../types";
|
|
1
2
|
import { IQuery } from "../../types/IHubCatalog";
|
|
2
3
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
3
4
|
import { IHubSearchResponse } from "../../types/IHubSearchResponse";
|
|
4
5
|
import { IHubSearchResult } from "../../types/IHubSearchResult";
|
|
5
|
-
export declare function searchOgcAggregations(query: IQuery, options: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
6
|
+
export declare function searchOgcAggregations(query: IQuery, options: IHubSearchOptions, api: IApiDefinition): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { IApiDefinition } from "../../types";
|
|
1
2
|
import { IQuery } from "../../types/IHubCatalog";
|
|
2
3
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
3
4
|
import { IHubSearchResponse } from "../../types/IHubSearchResponse";
|
|
4
5
|
import { IHubSearchResult } from "../../types/IHubSearchResult";
|
|
5
|
-
export declare function searchOgcItems(query: IQuery, options: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
6
|
+
export declare function searchOgcItems(query: IQuery, options: IHubSearchOptions, api: IApiDefinition): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UserSession } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import { ISearchOptions } from "@esri/arcgis-rest-portal";
|
|
3
|
+
import { ISearchResponse } from "../../types";
|
|
4
|
+
import { IMatchOptions, IDateRange, IRelativeDate } from "../types/types";
|
|
5
|
+
/**
|
|
6
|
+
* @private
|
|
7
|
+
* Convert a field value into a MatchOptions if it's not already one
|
|
8
|
+
* @param value
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function valueToMatchOptions(value: string | string[] | IMatchOptions): IMatchOptions;
|
|
12
|
+
/**
|
|
13
|
+
* @private
|
|
14
|
+
* Convert a RelativeDate to a DateRange<number>
|
|
15
|
+
* @param relative
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
export declare function relativeDateToDateRange(relative: IRelativeDate): IDateRange<number>;
|
|
19
|
+
/**
|
|
20
|
+
* @private
|
|
21
|
+
* Create a `.next()` function for a type
|
|
22
|
+
* @param request
|
|
23
|
+
* @param nextStart
|
|
24
|
+
* @param total
|
|
25
|
+
* @param fn
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
export declare function getNextFunction<T>(request: ISearchOptions, nextStart: number, total: number, fn: (r: any) => Promise<ISearchResponse<T>>): (authentication?: UserSession) => Promise<ISearchResponse<T>>;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { UserSession } from "@esri/arcgis-rest-auth";
|
|
2
1
|
import { IHubRequestOptions } from "../../types";
|
|
3
2
|
import { EntityType } from "./IHubCatalog";
|
|
4
|
-
import { NamedApis, IApiDefinition } from "./types";
|
|
5
|
-
export declare type Enrichments = "data" | "metadata" | "org" | "service" | "layers";
|
|
6
3
|
/**
|
|
7
4
|
* Search Options
|
|
8
5
|
*/
|
|
@@ -16,20 +13,11 @@ export interface IHubSearchOptions {
|
|
|
16
13
|
* Portal API only supports a single value
|
|
17
14
|
*/
|
|
18
15
|
aggLimit?: number;
|
|
19
|
-
/**
|
|
20
|
-
* TODO: Deprecate in favor of `requestOptions` and `siteUrl`
|
|
21
|
-
* Specify API to call. Defaults to ArcGIS Online Portal API
|
|
22
|
-
*/
|
|
23
|
-
api?: NamedApis | IApiDefinition;
|
|
24
16
|
/**
|
|
25
17
|
* Site whose API should be targeted. Ignored in an enterprise context.
|
|
26
18
|
* e.g., https://my-site.hub.arcgis.com
|
|
27
19
|
*/
|
|
28
20
|
site?: string;
|
|
29
|
-
/**
|
|
30
|
-
* DEPRECATE in favor of requestOptions
|
|
31
|
-
*/
|
|
32
|
-
authentication?: UserSession;
|
|
33
21
|
/**
|
|
34
22
|
* While hubSearch requires requestOptions, it is not marked
|
|
35
23
|
* required because that is a breaking change to this
|
|
@@ -1,51 +1,5 @@
|
|
|
1
|
-
import { IUser
|
|
2
|
-
import { IGroup
|
|
3
|
-
import { ISearchResponse } from "../types";
|
|
4
|
-
import { IMatchOptions, IDateRange, IRelativeDate, IWellKnownApis, IApiDefinition, NamedApis } from "./types/types";
|
|
5
|
-
/**
|
|
6
|
-
* Well known APIs
|
|
7
|
-
* Short-forms for specifying common APIs
|
|
8
|
-
* We will likely deprecate this
|
|
9
|
-
*/
|
|
10
|
-
export declare const SEARCH_APIS: IWellKnownApis;
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
* Convert array of api "names" into full ApiDefinitions
|
|
14
|
-
* @param apis
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
|
-
export declare function expandApis(apis: Array<NamedApis | IApiDefinition>): IApiDefinition[];
|
|
18
|
-
/**
|
|
19
|
-
* @private
|
|
20
|
-
* Convert an api "name" into a full ApiDefinition
|
|
21
|
-
* @param api
|
|
22
|
-
* @returns
|
|
23
|
-
*/
|
|
24
|
-
export declare function expandApi(api: NamedApis | IApiDefinition): IApiDefinition;
|
|
25
|
-
/**
|
|
26
|
-
* @private
|
|
27
|
-
* Convert a field value into a MatchOptions if it's not already one
|
|
28
|
-
* @param value
|
|
29
|
-
* @returns
|
|
30
|
-
*/
|
|
31
|
-
export declare function valueToMatchOptions(value: string | string[] | IMatchOptions): IMatchOptions;
|
|
32
|
-
/**
|
|
33
|
-
* @private
|
|
34
|
-
* Convert a RelativeDate to a DateRange<number>
|
|
35
|
-
* @param relative
|
|
36
|
-
* @returns
|
|
37
|
-
*/
|
|
38
|
-
export declare function relativeDateToDateRange(relative: IRelativeDate): IDateRange<number>;
|
|
39
|
-
/**
|
|
40
|
-
* @private
|
|
41
|
-
* Create a `.next()` function for a type
|
|
42
|
-
* @param request
|
|
43
|
-
* @param nextStart
|
|
44
|
-
* @param total
|
|
45
|
-
* @param fn
|
|
46
|
-
* @returns
|
|
47
|
-
*/
|
|
48
|
-
export declare function getNextFunction<T>(request: ISearchOptions, nextStart: number, total: number, fn: (r: any) => Promise<ISearchResponse<T>>): (authentication?: UserSession) => Promise<ISearchResponse<T>>;
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import { IGroup } from "@esri/arcgis-rest-portal";
|
|
49
3
|
/**
|
|
50
4
|
* Construct a the full url to a group thumbnail
|
|
51
5
|
*
|
|
@@ -22,18 +22,6 @@ export declare function createSite(partialSite: Partial<IHubSite>, requestOption
|
|
|
22
22
|
* @returns
|
|
23
23
|
*/
|
|
24
24
|
export declare function updateSite(site: IHubSite, requestOptions: IHubRequestOptions): Promise<IHubSite>;
|
|
25
|
-
/**
|
|
26
|
-
* @private
|
|
27
|
-
* Remove a Hub Site
|
|
28
|
-
*
|
|
29
|
-
* This simply removes the Site item, and it's associated domain records.
|
|
30
|
-
* This does not remove any Teams/Groups or content associated with the
|
|
31
|
-
* Site
|
|
32
|
-
* @param id
|
|
33
|
-
* @param requestOptions
|
|
34
|
-
* @returns
|
|
35
|
-
*/
|
|
36
|
-
export declare function destroySite(id: string, requestOptions: IHubRequestOptions): Promise<void>;
|
|
37
25
|
/**
|
|
38
26
|
* Remove a Hub Site
|
|
39
27
|
*
|
|
@@ -7,7 +7,6 @@ export * from "./fetchSiteModel";
|
|
|
7
7
|
export * from "./get-site-by-id";
|
|
8
8
|
export * from "./HubSite";
|
|
9
9
|
export * from "./HubSites";
|
|
10
|
-
export * from "./registerSiteAsApplication";
|
|
11
10
|
export * from "./site-schema-version";
|
|
12
11
|
export * from "./themes";
|
|
13
12
|
export * from "./upgrade-site-schema";
|
package/dist/types/types.d.ts
CHANGED