@esri/hub-common 11.0.0-beta.3 → 11.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/core/PermissionManager.js +4 -4
- package/dist/esm/core/PermissionManager.js.map +1 -1
- package/dist/esm/core/behaviors/IWithPermissionBehavior.js +2 -2
- package/dist/esm/core/behaviors/IWithPermissionBehavior.js.map +1 -1
- package/dist/esm/projects/HubProject.js +10 -175
- package/dist/esm/projects/HubProject.js.map +1 -1
- package/dist/esm/projects/HubProjects.js +1 -36
- package/dist/esm/projects/HubProjects.js.map +1 -1
- package/dist/esm/projects/defaults.js +2 -2
- package/dist/esm/projects/defaults.js.map +1 -1
- package/dist/esm/search/_internal/index.js +0 -2
- package/dist/esm/search/_internal/index.js.map +1 -1
- package/dist/esm/sites/HubSites.js +7 -34
- package/dist/esm/sites/HubSites.js.map +1 -1
- package/dist/node/core/PermissionManager.js +4 -4
- package/dist/node/core/PermissionManager.js.map +1 -1
- package/dist/node/core/behaviors/IWithPermissionBehavior.js +2 -2
- package/dist/node/core/behaviors/IWithPermissionBehavior.js.map +1 -1
- package/dist/node/projects/HubProject.js +10 -175
- package/dist/node/projects/HubProject.js.map +1 -1
- package/dist/node/projects/HubProjects.js +2 -38
- package/dist/node/projects/HubProjects.js.map +1 -1
- package/dist/node/projects/defaults.js +2 -2
- package/dist/node/projects/defaults.js.map +1 -1
- package/dist/node/search/_internal/index.js +0 -2
- package/dist/node/search/_internal/index.js.map +1 -1
- package/dist/node/sites/HubSites.js +9 -37
- package/dist/node/sites/HubSites.js.map +1 -1
- package/dist/types/core/PermissionManager.d.ts +1 -1
- package/dist/types/core/behaviors/IWithPermissionBehavior.d.ts +1 -1
- package/dist/types/core/traits/IWithCatalogDefinition.d.ts +2 -2
- package/dist/types/core/traits/IWithPermissions.d.ts +1 -1
- package/dist/types/core/types/IHubProject.d.ts +2 -2
- package/dist/types/projects/HubProject.d.ts +1 -1
- package/dist/types/projects/HubProjects.d.ts +2 -12
- package/dist/types/search/_internal/index.d.ts +0 -2
- package/dist/types/sites/HubSites.d.ts +2 -9
- package/package.json +1 -1
- package/dist/esm/projects/HubProjectManager.js +0 -240
- package/dist/esm/projects/HubProjectManager.js.map +0 -1
- package/dist/esm/search/_internal/createQueryFromString.js +0 -22
- package/dist/esm/search/_internal/createQueryFromString.js.map +0 -1
- package/dist/esm/search/_internal/searchEntities.js +0 -73
- package/dist/esm/search/_internal/searchEntities.js.map +0 -1
- package/dist/esm/sites/HubSiteManager.js +0 -155
- package/dist/esm/sites/HubSiteManager.js.map +0 -1
- package/dist/node/projects/HubProjectManager.js +0 -244
- package/dist/node/projects/HubProjectManager.js.map +0 -1
- package/dist/node/search/_internal/createQueryFromString.js +0 -26
- package/dist/node/search/_internal/createQueryFromString.js.map +0 -1
- package/dist/node/search/_internal/searchEntities.js +0 -78
- package/dist/node/search/_internal/searchEntities.js.map +0 -1
- package/dist/node/sites/HubSiteManager.js +0 -159
- package/dist/node/sites/HubSiteManager.js.map +0 -1
- package/dist/types/projects/HubProjectManager.d.ts +0 -152
- package/dist/types/search/_internal/createQueryFromString.d.ts +0 -10
- package/dist/types/search/_internal/searchEntities.d.ts +0 -23
- package/dist/types/sites/HubSiteManager.d.ts +0 -104
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { EntityType, IQuery } from "../types";
|
|
2
|
-
/**
|
|
3
|
-
* @private
|
|
4
|
-
* Construct a query from a string
|
|
5
|
-
* @param value
|
|
6
|
-
* @param predicateKey
|
|
7
|
-
* @param targetEntity
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
export declare function createQueryFromString(value: string, predicateKey: string, targetEntity: EntityType): IQuery;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ISearchOptions } from "@esri/arcgis-rest-portal";
|
|
2
|
-
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
3
|
-
import { IItem } from "@esri/arcgis-rest-types";
|
|
4
|
-
import { IHubSearchOptions, IHubSearchResponse, IQuery } from "../types";
|
|
5
|
-
/**
|
|
6
|
-
* @private
|
|
7
|
-
*/
|
|
8
|
-
export declare type ConversionFunction<T> = (i: IItem, ro?: IRequestOptions) => Promise<T>;
|
|
9
|
-
/**
|
|
10
|
-
* @private
|
|
11
|
-
* Execute a search and convert to a specific entity
|
|
12
|
-
* @param query
|
|
13
|
-
* @param convertFn
|
|
14
|
-
* @param options
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
|
-
export declare function searchEntities<T>(query: IQuery, convertFn: ConversionFunction<T>, options: IHubSearchOptions): Promise<IHubSearchResponse<T>>;
|
|
18
|
-
/**
|
|
19
|
-
* @private
|
|
20
|
-
* @param convertFn
|
|
21
|
-
* @returns
|
|
22
|
-
*/
|
|
23
|
-
export declare function createEntitySearchFn<T>(convertFn: ConversionFunction<T>): (v: ISearchOptions) => Promise<IHubSearchResponse<T>>;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
|
-
import { IArcGISContext } from "../ArcGISContext";
|
|
3
|
-
import { IHubEntityManager, IHubItemEntityManager, IHubSite } from "../core/types";
|
|
4
|
-
import { ArcGISContextManager } from "../ArcGISContextManager";
|
|
5
|
-
import { IHubSearchOptions, IQuery } from "../search";
|
|
6
|
-
import { IHubRequestOptions, ISearchResponse } from "../types";
|
|
7
|
-
import { IItem } from "@esri/arcgis-rest-types";
|
|
8
|
-
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
9
|
-
export declare class HubSiteManager implements IHubEntityManager<IHubSite>, IHubItemEntityManager<IHubSite> {
|
|
10
|
-
/**
|
|
11
|
-
* Hold a context manager, which should be a single instance for
|
|
12
|
-
* an application. When authentication changes, the .context
|
|
13
|
-
* property on the context manager will be replaced. As long as
|
|
14
|
-
* all the fns in this class leverage properties on .context
|
|
15
|
-
* everything be kept in sync.
|
|
16
|
-
*/
|
|
17
|
-
private _contextManager;
|
|
18
|
-
/**
|
|
19
|
-
* Hold context directly. Allows the class to be used in places
|
|
20
|
-
* where an `ArcGISContextManager` is not directly available, but
|
|
21
|
-
* an `IArcGISContext` is
|
|
22
|
-
*/
|
|
23
|
-
private _context;
|
|
24
|
-
/**
|
|
25
|
-
* Private so we can employ a factory function should we need
|
|
26
|
-
* async work during creation
|
|
27
|
-
* @param contextOrManager
|
|
28
|
-
*/
|
|
29
|
-
private constructor();
|
|
30
|
-
/**
|
|
31
|
-
* Factory function to construct a new HubProjectManager instance.
|
|
32
|
-
*
|
|
33
|
-
* Note: Used so that we could do async actions in the ctor.
|
|
34
|
-
* @param contextOrManager
|
|
35
|
-
* @returns
|
|
36
|
-
*/
|
|
37
|
-
static init(contextOrManager: ArcGISContextManager | IArcGISContext): HubSiteManager;
|
|
38
|
-
/**
|
|
39
|
-
* Getter to abstract how we store the context
|
|
40
|
-
*/
|
|
41
|
-
private get context();
|
|
42
|
-
/**
|
|
43
|
-
* Create and store a new Site
|
|
44
|
-
*
|
|
45
|
-
* This also registers the item for oAuth and
|
|
46
|
-
* registers domain names with the hub Domain system
|
|
47
|
-
*
|
|
48
|
-
* Sites are stored as Items in the Sharing API
|
|
49
|
-
* @param site
|
|
50
|
-
* @param requestOptions
|
|
51
|
-
* @returns
|
|
52
|
-
*/
|
|
53
|
-
create(site: Partial<IHubSite>, requestOptions?: IHubRequestOptions): Promise<IHubSite>;
|
|
54
|
-
/**
|
|
55
|
-
* Update a Site
|
|
56
|
-
* @param site
|
|
57
|
-
* @param requestOptions
|
|
58
|
-
* @returns
|
|
59
|
-
*/
|
|
60
|
-
update(site: IHubSite, requestOptions?: IHubRequestOptions): Promise<IHubSite>;
|
|
61
|
-
/**
|
|
62
|
-
* Destroy a Site
|
|
63
|
-
* This permanently removes the backing Item,
|
|
64
|
-
* and clears the domain entries for it.
|
|
65
|
-
* @param id
|
|
66
|
-
* @param requestOptions
|
|
67
|
-
* @returns
|
|
68
|
-
*/
|
|
69
|
-
delete(id: string, requestOptions?: IHubRequestOptions): Promise<void>;
|
|
70
|
-
/**
|
|
71
|
-
* Fetch a Site via Id, slug or domain
|
|
72
|
-
*
|
|
73
|
-
* This function does not require a user to be
|
|
74
|
-
* authenticated, but it does require an `IRequestOptions`
|
|
75
|
-
* which contains the portal instance to communicate with
|
|
76
|
-
* @param identifier
|
|
77
|
-
* @param requestOptions
|
|
78
|
-
* @returns
|
|
79
|
-
*/
|
|
80
|
-
fetch(identifier: string, requestOptions?: IHubRequestOptions): Promise<IHubSite>;
|
|
81
|
-
/**
|
|
82
|
-
* Search for Sites
|
|
83
|
-
*
|
|
84
|
-
* @param filter
|
|
85
|
-
* @param opts
|
|
86
|
-
*/
|
|
87
|
-
search(query: string | IQuery, options: IHubSearchOptions): Promise<ISearchResponse<IHubSite>>;
|
|
88
|
-
/**
|
|
89
|
-
* Set the thumbnail for the Site
|
|
90
|
-
* @param id
|
|
91
|
-
* @param file
|
|
92
|
-
* @param filename
|
|
93
|
-
* @param requestOptions
|
|
94
|
-
* @returns
|
|
95
|
-
*/
|
|
96
|
-
updateThumbnail(site: IHubSite, file: any, filename: string, requestOptions?: IUserRequestOptions): Promise<IHubSite>;
|
|
97
|
-
/**
|
|
98
|
-
* Convert a Hub Project Item to a IHubProject
|
|
99
|
-
* @param item
|
|
100
|
-
* @param requestOptions
|
|
101
|
-
* @returns
|
|
102
|
-
*/
|
|
103
|
-
fromItem(item: IItem, requestOptions?: IRequestOptions): Promise<IHubSite>;
|
|
104
|
-
}
|