@esri/hub-common 9.24.2 → 9.25.2
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/README.md +6 -6
- package/dist/es2017/ArcGISContext.js +7 -8
- package/dist/es2017/ArcGISContext.js.map +1 -1
- package/dist/es2017/Hub.js +19 -2
- package/dist/es2017/Hub.js.map +1 -1
- package/dist/es2017/content/_fetch.js +16 -3
- package/dist/es2017/content/_fetch.js.map +1 -1
- package/dist/es2017/content/_internal.js +7 -17
- package/dist/es2017/content/_internal.js.map +1 -1
- package/dist/es2017/content/compose.js +5 -8
- package/dist/es2017/content/compose.js.map +1 -1
- package/dist/es2017/content/fetch.js +27 -23
- package/dist/es2017/content/fetch.js.map +1 -1
- package/dist/es2017/core/{helpers → _internal}/PropertyMapper.js +0 -0
- package/dist/es2017/core/_internal/PropertyMapper.js.map +1 -0
- package/dist/es2017/core/types/IHubSiteTheme.js +1 -0
- package/dist/es2017/core/types/IHubSiteTheme.js.map +1 -0
- package/dist/es2017/core/types/index.js +5 -3
- package/dist/es2017/core/types/index.js.map +1 -1
- package/dist/es2017/items/_enrichments.js +29 -14
- package/dist/es2017/items/_enrichments.js.map +1 -1
- package/dist/es2017/items/index.js +1 -0
- package/dist/es2017/items/index.js.map +1 -1
- package/dist/es2017/items/registerBrowserApp.js +25 -0
- package/dist/es2017/items/registerBrowserApp.js.map +1 -0
- package/dist/es2017/projects/HubProjectManager.js +11 -1
- package/dist/es2017/projects/HubProjectManager.js.map +1 -1
- package/dist/es2017/projects/HubProjects.js +34 -82
- package/dist/es2017/projects/HubProjects.js.map +1 -1
- package/dist/es2017/search/_internal/searchContentEntities.js +77 -0
- package/dist/es2017/search/_internal/searchContentEntities.js.map +1 -0
- package/dist/es2017/search/_searchContent.js +1 -0
- package/dist/es2017/search/_searchContent.js.map +1 -1
- package/dist/es2017/search/group-utils.js.map +1 -1
- package/dist/es2017/search/utils.js.map +1 -1
- package/dist/es2017/sites/HubSiteManager.js +155 -0
- package/dist/es2017/sites/HubSiteManager.js.map +1 -0
- package/dist/es2017/sites/HubSites.js +396 -0
- package/dist/es2017/sites/HubSites.js.map +1 -0
- package/dist/es2017/sites/{_apply-site-schema.js → _internal/_apply-site-schema.js} +2 -2
- package/dist/es2017/sites/_internal/_apply-site-schema.js.map +1 -0
- package/dist/es2017/sites/{_enforce-lowercase-domains.js → _internal/_enforce-lowercase-domains.js} +1 -1
- package/dist/es2017/sites/_internal/_enforce-lowercase-domains.js.map +1 -0
- package/dist/es2017/sites/{_ensure-catalog.js → _internal/_ensure-catalog.js} +1 -1
- package/dist/es2017/sites/_internal/_ensure-catalog.js.map +1 -0
- package/dist/es2017/sites/{_ensure-telemetry.js → _internal/_ensure-telemetry.js} +1 -1
- package/dist/es2017/sites/_internal/_ensure-telemetry.js.map +1 -0
- package/dist/es2017/sites/{_migrate-feed-config.js → _internal/_migrate-feed-config.js} +1 -1
- package/dist/es2017/sites/_internal/_migrate-feed-config.js.map +1 -0
- package/dist/es2017/sites/{_purge-non-guids-from-catalog.js → _internal/_purge-non-guids-from-catalog.js} +1 -1
- package/dist/es2017/sites/_internal/_purge-non-guids-from-catalog.js.map +1 -0
- package/dist/es2017/sites/_internal/handleDomainChanges.js +44 -0
- package/dist/es2017/sites/_internal/handleDomainChanges.js.map +1 -0
- package/dist/es2017/sites/_internal/index.js +2 -0
- package/dist/es2017/sites/_internal/index.js.map +1 -0
- package/dist/es2017/sites/domains/addSiteDomains.js +36 -0
- package/dist/es2017/sites/domains/addSiteDomains.js.map +1 -0
- package/dist/es2017/sites/domains/index.js +2 -0
- package/dist/es2017/sites/domains/index.js.map +1 -1
- package/dist/es2017/sites/domains/removeDomainByHostname.js +29 -0
- package/dist/es2017/sites/domains/removeDomainByHostname.js.map +1 -0
- package/dist/es2017/sites/fetchSiteModel.js +31 -0
- package/dist/es2017/sites/fetchSiteModel.js.map +1 -0
- package/dist/es2017/sites/index.js +6 -25
- package/dist/es2017/sites/index.js.map +1 -1
- package/dist/es2017/sites/registerSiteAsApplication.js +23 -0
- package/dist/es2017/sites/registerSiteAsApplication.js.map +1 -0
- package/dist/es2017/sites/themes.js +46 -0
- package/dist/es2017/sites/themes.js.map +1 -0
- package/dist/es2017/sites/upgrade-site-schema.js +6 -6
- package/dist/es2017/sites/upgrade-site-schema.js.map +1 -1
- package/dist/es2017/utils/_array.js +13 -0
- package/dist/es2017/utils/_array.js.map +1 -0
- package/dist/esm/ArcGISContext.js +7 -8
- package/dist/esm/ArcGISContext.js.map +1 -1
- package/dist/esm/Hub.js +23 -2
- package/dist/esm/Hub.js.map +1 -1
- package/dist/esm/content/_fetch.js +14 -3
- package/dist/esm/content/_fetch.js.map +1 -1
- package/dist/esm/content/_internal.js +7 -17
- package/dist/esm/content/_internal.js.map +1 -1
- package/dist/esm/content/compose.js +6 -7
- package/dist/esm/content/compose.js.map +1 -1
- package/dist/esm/content/fetch.js +40 -31
- package/dist/esm/content/fetch.js.map +1 -1
- package/dist/esm/core/{helpers → _internal}/PropertyMapper.js +0 -0
- package/dist/esm/core/_internal/PropertyMapper.js.map +1 -0
- package/dist/esm/core/types/IHubSiteTheme.js +1 -0
- package/dist/esm/core/types/IHubSiteTheme.js.map +1 -0
- package/dist/esm/core/types/index.js +5 -3
- package/dist/esm/core/types/index.js.map +1 -1
- package/dist/esm/items/_enrichments.js +29 -14
- package/dist/esm/items/_enrichments.js.map +1 -1
- package/dist/esm/items/index.js +1 -0
- package/dist/esm/items/index.js.map +1 -1
- package/dist/esm/items/registerBrowserApp.js +25 -0
- package/dist/esm/items/registerBrowserApp.js.map +1 -0
- package/dist/esm/projects/HubProjectManager.js +16 -1
- package/dist/esm/projects/HubProjectManager.js.map +1 -1
- package/dist/esm/projects/HubProjects.js +38 -81
- package/dist/esm/projects/HubProjects.js.map +1 -1
- package/dist/esm/search/_internal/searchContentEntities.js +89 -0
- package/dist/esm/search/_internal/searchContentEntities.js.map +1 -0
- package/dist/esm/search/_searchContent.js +1 -0
- package/dist/esm/search/_searchContent.js.map +1 -1
- package/dist/esm/search/group-utils.js.map +1 -1
- package/dist/esm/search/utils.js.map +1 -1
- package/dist/esm/sites/HubSiteManager.js +201 -0
- package/dist/esm/sites/HubSiteManager.js.map +1 -0
- package/dist/esm/sites/HubSites.js +448 -0
- package/dist/esm/sites/HubSites.js.map +1 -0
- package/dist/esm/sites/{_apply-site-schema.js → _internal/_apply-site-schema.js} +2 -2
- package/dist/esm/sites/_internal/_apply-site-schema.js.map +1 -0
- package/dist/esm/sites/{_enforce-lowercase-domains.js → _internal/_enforce-lowercase-domains.js} +1 -1
- package/dist/esm/sites/_internal/_enforce-lowercase-domains.js.map +1 -0
- package/dist/esm/sites/{_ensure-catalog.js → _internal/_ensure-catalog.js} +1 -1
- package/dist/esm/sites/_internal/_ensure-catalog.js.map +1 -0
- package/dist/esm/sites/{_ensure-telemetry.js → _internal/_ensure-telemetry.js} +1 -1
- package/dist/esm/sites/_internal/_ensure-telemetry.js.map +1 -0
- package/dist/esm/sites/{_migrate-feed-config.js → _internal/_migrate-feed-config.js} +1 -1
- package/dist/esm/sites/_internal/_migrate-feed-config.js.map +1 -0
- package/dist/esm/sites/{_purge-non-guids-from-catalog.js → _internal/_purge-non-guids-from-catalog.js} +1 -1
- package/dist/esm/sites/_internal/_purge-non-guids-from-catalog.js.map +1 -0
- package/dist/esm/sites/_internal/handleDomainChanges.js +49 -0
- package/dist/esm/sites/_internal/handleDomainChanges.js.map +1 -0
- package/dist/esm/sites/_internal/index.js +2 -0
- package/dist/esm/sites/_internal/index.js.map +1 -0
- package/dist/esm/sites/domains/addSiteDomains.js +36 -0
- package/dist/esm/sites/domains/addSiteDomains.js.map +1 -0
- package/dist/esm/sites/domains/index.js +2 -0
- package/dist/esm/sites/domains/index.js.map +1 -1
- package/dist/esm/sites/domains/removeDomainByHostname.js +42 -0
- package/dist/esm/sites/domains/removeDomainByHostname.js.map +1 -0
- package/dist/esm/sites/fetchSiteModel.js +34 -0
- package/dist/esm/sites/fetchSiteModel.js.map +1 -0
- package/dist/esm/sites/index.js +6 -28
- package/dist/esm/sites/index.js.map +1 -1
- package/dist/esm/sites/registerSiteAsApplication.js +23 -0
- package/dist/esm/sites/registerSiteAsApplication.js.map +1 -0
- package/dist/esm/sites/themes.js +46 -0
- package/dist/esm/sites/themes.js.map +1 -0
- package/dist/esm/sites/upgrade-site-schema.js +6 -6
- package/dist/esm/sites/upgrade-site-schema.js.map +1 -1
- package/dist/esm/utils/_array.js +13 -0
- package/dist/esm/utils/_array.js.map +1 -0
- package/dist/node/ArcGISContext.js +7 -8
- package/dist/node/ArcGISContext.js.map +1 -1
- package/dist/node/Hub.js +19 -2
- package/dist/node/Hub.js.map +1 -1
- package/dist/node/content/_fetch.js +16 -3
- package/dist/node/content/_fetch.js.map +1 -1
- package/dist/node/content/_internal.js +8 -18
- package/dist/node/content/_internal.js.map +1 -1
- package/dist/node/content/compose.js +4 -7
- package/dist/node/content/compose.js.map +1 -1
- package/dist/node/content/fetch.js +27 -23
- package/dist/node/content/fetch.js.map +1 -1
- package/dist/node/core/{helpers → _internal}/PropertyMapper.js +0 -0
- package/dist/node/core/_internal/PropertyMapper.js.map +1 -0
- package/dist/node/core/types/IHubSiteTheme.js +3 -0
- package/dist/node/core/types/IHubSiteTheme.js.map +1 -0
- package/dist/node/core/types/index.js +5 -3
- package/dist/node/core/types/index.js.map +1 -1
- package/dist/node/items/_enrichments.js +30 -15
- package/dist/node/items/_enrichments.js.map +1 -1
- package/dist/node/items/index.js +1 -0
- package/dist/node/items/index.js.map +1 -1
- package/dist/node/items/registerBrowserApp.js +29 -0
- package/dist/node/items/registerBrowserApp.js.map +1 -0
- package/dist/node/projects/HubProjectManager.js +10 -0
- package/dist/node/projects/HubProjectManager.js.map +1 -1
- package/dist/node/projects/HubProjects.js +32 -79
- package/dist/node/projects/HubProjects.js.map +1 -1
- package/dist/node/search/_internal/searchContentEntities.js +82 -0
- package/dist/node/search/_internal/searchContentEntities.js.map +1 -0
- package/dist/node/search/_searchContent.js +1 -0
- package/dist/node/search/_searchContent.js.map +1 -1
- package/dist/node/search/group-utils.js.map +1 -1
- package/dist/node/search/utils.js.map +1 -1
- package/dist/node/sites/HubSiteManager.js +159 -0
- package/dist/node/sites/HubSiteManager.js.map +1 -0
- package/dist/node/sites/HubSites.js +405 -0
- package/dist/node/sites/HubSites.js.map +1 -0
- package/dist/node/sites/{_apply-site-schema.js → _internal/_apply-site-schema.js} +2 -2
- package/dist/node/sites/_internal/_apply-site-schema.js.map +1 -0
- package/dist/node/sites/{_enforce-lowercase-domains.js → _internal/_enforce-lowercase-domains.js} +1 -1
- package/dist/node/sites/_internal/_enforce-lowercase-domains.js.map +1 -0
- package/dist/node/sites/{_ensure-catalog.js → _internal/_ensure-catalog.js} +1 -1
- package/dist/node/sites/_internal/_ensure-catalog.js.map +1 -0
- package/dist/node/sites/{_ensure-telemetry.js → _internal/_ensure-telemetry.js} +1 -1
- package/dist/node/sites/_internal/_ensure-telemetry.js.map +1 -0
- package/dist/node/sites/{_migrate-feed-config.js → _internal/_migrate-feed-config.js} +1 -1
- package/dist/node/sites/_internal/_migrate-feed-config.js.map +1 -0
- package/dist/node/sites/{_purge-non-guids-from-catalog.js → _internal/_purge-non-guids-from-catalog.js} +1 -1
- package/dist/node/sites/_internal/_purge-non-guids-from-catalog.js.map +1 -0
- package/dist/node/sites/_internal/handleDomainChanges.js +48 -0
- package/dist/node/sites/_internal/handleDomainChanges.js.map +1 -0
- package/dist/node/sites/_internal/index.js +5 -0
- package/dist/node/sites/_internal/index.js.map +1 -0
- package/dist/node/sites/domains/addSiteDomains.js +40 -0
- package/dist/node/sites/domains/addSiteDomains.js.map +1 -0
- package/dist/node/sites/domains/index.js +2 -0
- package/dist/node/sites/domains/index.js.map +1 -1
- package/dist/node/sites/domains/removeDomainByHostname.js +33 -0
- package/dist/node/sites/domains/removeDomainByHostname.js.map +1 -0
- package/dist/node/sites/fetchSiteModel.js +36 -0
- package/dist/node/sites/fetchSiteModel.js.map +1 -0
- package/dist/node/sites/index.js +6 -27
- package/dist/node/sites/index.js.map +1 -1
- package/dist/node/sites/registerSiteAsApplication.js +27 -0
- package/dist/node/sites/registerSiteAsApplication.js.map +1 -0
- package/dist/node/sites/themes.js +50 -0
- package/dist/node/sites/themes.js.map +1 -0
- package/dist/node/sites/upgrade-site-schema.js +6 -6
- package/dist/node/sites/upgrade-site-schema.js.map +1 -1
- package/dist/node/utils/_array.js +16 -0
- package/dist/node/utils/_array.js.map +1 -0
- package/dist/types/Hub.d.ts +15 -2
- package/dist/types/content/_fetch.d.ts +9 -4
- package/dist/types/content/_internal.d.ts +0 -8
- package/dist/types/core/{helpers → _internal}/PropertyMapper.d.ts +0 -0
- package/dist/types/core/types/IHubEntityManager.d.ts +2 -5
- package/dist/types/core/types/IHubItemEntityManager.d.ts +10 -0
- package/dist/types/core/types/IHubSite.d.ts +68 -4
- package/dist/types/core/types/IHubSiteTheme.d.ts +28 -0
- package/dist/types/core/types/index.d.ts +5 -3
- package/dist/types/items/_enrichments.d.ts +10 -1
- package/dist/types/items/index.d.ts +1 -0
- package/dist/types/items/registerBrowserApp.d.ts +11 -0
- package/dist/types/projects/HubProjectManager.d.ts +8 -0
- package/dist/types/projects/HubProjects.d.ts +18 -0
- package/dist/types/search/_internal/searchContentEntities.d.ts +32 -0
- package/dist/types/search/utils.d.ts +1 -1
- package/dist/types/sites/HubSiteManager.d.ts +104 -0
- package/dist/types/sites/HubSites.d.ts +56 -0
- package/dist/types/sites/{_apply-site-schema.d.ts → _internal/_apply-site-schema.d.ts} +1 -1
- package/dist/types/sites/{_enforce-lowercase-domains.d.ts → _internal/_enforce-lowercase-domains.d.ts} +1 -1
- package/dist/types/sites/{_ensure-catalog.d.ts → _internal/_ensure-catalog.d.ts} +1 -1
- package/dist/types/sites/{_ensure-telemetry.d.ts → _internal/_ensure-telemetry.d.ts} +1 -1
- package/dist/types/sites/{_migrate-feed-config.d.ts → _internal/_migrate-feed-config.d.ts} +1 -1
- package/dist/types/sites/{_purge-non-guids-from-catalog.d.ts → _internal/_purge-non-guids-from-catalog.d.ts} +1 -1
- package/dist/types/sites/_internal/handleDomainChanges.d.ts +9 -0
- package/dist/types/sites/_internal/index.d.ts +1 -0
- package/dist/types/sites/domains/addSiteDomains.d.ts +11 -0
- package/dist/types/sites/domains/index.d.ts +2 -0
- package/dist/types/sites/domains/removeDomainByHostname.d.ts +10 -0
- package/dist/types/sites/fetchSiteModel.d.ts +12 -0
- package/dist/types/sites/index.d.ts +6 -9
- package/dist/types/sites/registerSiteAsApplication.d.ts +8 -0
- package/dist/types/sites/themes.d.ts +11 -0
- package/dist/types/utils/_array.d.ts +9 -0
- package/dist/umd/common.umd.js +3002 -2018
- package/dist/umd/common.umd.js.map +1 -1
- package/dist/umd/common.umd.min.js +1 -1
- package/dist/umd/common.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/es2017/core/helpers/PropertyMapper.js.map +0 -1
- package/dist/es2017/sites/_apply-site-schema.js.map +0 -1
- package/dist/es2017/sites/_enforce-lowercase-domains.js.map +0 -1
- package/dist/es2017/sites/_ensure-catalog.js.map +0 -1
- package/dist/es2017/sites/_ensure-telemetry.js.map +0 -1
- package/dist/es2017/sites/_migrate-feed-config.js.map +0 -1
- package/dist/es2017/sites/_purge-non-guids-from-catalog.js.map +0 -1
- package/dist/esm/core/helpers/PropertyMapper.js.map +0 -1
- package/dist/esm/sites/_apply-site-schema.js.map +0 -1
- package/dist/esm/sites/_enforce-lowercase-domains.js.map +0 -1
- package/dist/esm/sites/_ensure-catalog.js.map +0 -1
- package/dist/esm/sites/_ensure-telemetry.js.map +0 -1
- package/dist/esm/sites/_migrate-feed-config.js.map +0 -1
- package/dist/esm/sites/_purge-non-guids-from-catalog.js.map +0 -1
- package/dist/node/core/helpers/PropertyMapper.js.map +0 -1
- package/dist/node/sites/_apply-site-schema.js.map +0 -1
- package/dist/node/sites/_enforce-lowercase-domains.js.map +0 -1
- package/dist/node/sites/_ensure-catalog.js.map +0 -1
- package/dist/node/sites/_ensure-telemetry.js.map +0 -1
- package/dist/node/sites/_migrate-feed-config.js.map +0 -1
- package/dist/node/sites/_purge-non-guids-from-catalog.js.map +0 -1
|
@@ -1,11 +1,75 @@
|
|
|
1
|
+
import { IExtent } from "@esri/arcgis-rest-feature-layer";
|
|
2
|
+
import { IWithSlug } from "../traits/WithSlug";
|
|
1
3
|
import { IWithLayout } from "../traits/WithLayout";
|
|
2
4
|
import { IHubItemEntity } from "./IHubItemEntity";
|
|
3
5
|
/**
|
|
4
6
|
* DRAFT: Under development and more properties will likely be added
|
|
5
7
|
* @internal
|
|
6
8
|
*/
|
|
7
|
-
export interface IHubSite extends IHubItemEntity, IWithLayout {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
export interface IHubSite extends IHubItemEntity, IWithSlug, IWithLayout {
|
|
10
|
+
/**
|
|
11
|
+
* Array of minimal page objects
|
|
12
|
+
*/
|
|
13
|
+
pages: Array<{
|
|
14
|
+
title: string;
|
|
15
|
+
id: string;
|
|
16
|
+
slug: string;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Site Theme as json
|
|
20
|
+
*/
|
|
21
|
+
theme: Record<string, any>;
|
|
22
|
+
/**
|
|
23
|
+
* Array of capabilities enabled for the site
|
|
24
|
+
*/
|
|
25
|
+
capabilities: string[];
|
|
26
|
+
/**
|
|
27
|
+
* Currently not an actual ICatalog
|
|
28
|
+
*/
|
|
29
|
+
catalog: {
|
|
30
|
+
groups: string[];
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Subdomain of the site
|
|
35
|
+
* Will be prepended to `<org-key>.hub.arcgis.com`
|
|
36
|
+
*/
|
|
37
|
+
subdomain: string;
|
|
38
|
+
/**
|
|
39
|
+
* Full hostname
|
|
40
|
+
* Looks like`<subdomain>-<org-key>.hub.arcgis.com`
|
|
41
|
+
*/
|
|
42
|
+
defaultHostname: string;
|
|
43
|
+
/**
|
|
44
|
+
* Custom Domain Name
|
|
45
|
+
*/
|
|
46
|
+
customHostname: string;
|
|
47
|
+
/**
|
|
48
|
+
* oAuth Client Id for the Site
|
|
49
|
+
*/
|
|
50
|
+
clientId: string;
|
|
51
|
+
/**
|
|
52
|
+
* Feed configurations
|
|
53
|
+
*/
|
|
54
|
+
feeds: Record<string, any>;
|
|
55
|
+
/**
|
|
56
|
+
* Default extent used when loading maps on the site
|
|
57
|
+
*/
|
|
58
|
+
defaultExtent: IExtent;
|
|
59
|
+
/**
|
|
60
|
+
* Default map configuration for the site
|
|
61
|
+
*/
|
|
62
|
+
map: Record<string, any>;
|
|
63
|
+
/**
|
|
64
|
+
* Content Views settings
|
|
65
|
+
*/
|
|
66
|
+
contentViews: Record<string, any>;
|
|
67
|
+
/**
|
|
68
|
+
* Site Telemetry Settings
|
|
69
|
+
*/
|
|
70
|
+
telemetry: Record<string, any>;
|
|
71
|
+
/**
|
|
72
|
+
* Header CSS
|
|
73
|
+
*/
|
|
74
|
+
headerSass: string;
|
|
11
75
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface IHubSiteTheme {
|
|
2
|
+
header: {
|
|
3
|
+
background: string;
|
|
4
|
+
text: string;
|
|
5
|
+
};
|
|
6
|
+
body: {
|
|
7
|
+
background: string;
|
|
8
|
+
text: string;
|
|
9
|
+
link: string;
|
|
10
|
+
};
|
|
11
|
+
button: {
|
|
12
|
+
background: string;
|
|
13
|
+
text: string;
|
|
14
|
+
};
|
|
15
|
+
logo: {
|
|
16
|
+
small: string;
|
|
17
|
+
};
|
|
18
|
+
fonts: {
|
|
19
|
+
base: {
|
|
20
|
+
url: string;
|
|
21
|
+
family: string;
|
|
22
|
+
};
|
|
23
|
+
heading: {
|
|
24
|
+
url: string;
|
|
25
|
+
family: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
export * from "./IItemEnrichments";
|
|
2
|
-
export * from "./IHubContentEnrichments";
|
|
3
1
|
export * from "./IHubContent";
|
|
2
|
+
export * from "./IHubContentEnrichments";
|
|
4
3
|
export * from "./IHubEntityBase";
|
|
5
|
-
export * from "./IHubItemEntity";
|
|
6
4
|
export * from "./IHubEntityManager";
|
|
7
5
|
export * from "./IHubEvent";
|
|
8
6
|
export * from "./IHubImage";
|
|
9
7
|
export * from "./IHubInitiative";
|
|
8
|
+
export * from "./IHubItemEntity";
|
|
9
|
+
export * from "./IHubItemEntityManager";
|
|
10
10
|
export * from "./IHubLayout";
|
|
11
11
|
export * from "./IHubPage";
|
|
12
12
|
export * from "./IHubProject";
|
|
13
13
|
export * from "./IHubSite";
|
|
14
|
+
export * from "./IHubSiteTheme";
|
|
14
15
|
export * from "./IHubTimeline";
|
|
16
|
+
export * from "./IItemEnrichments";
|
|
15
17
|
export * from "./IServerEnrichments";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IItem } from "@esri/arcgis-rest-portal";
|
|
2
2
|
import { IItemEnrichments, IServerEnrichments } from "../core";
|
|
3
|
-
import { IHubRequestOptions } from "../types";
|
|
3
|
+
import { IEnrichmentErrorInfo, IHubRequestOptions } from "../types";
|
|
4
4
|
/**
|
|
5
5
|
* An object containing the item and fetched enrichments
|
|
6
6
|
*/
|
|
@@ -13,6 +13,15 @@ export interface IItemAndEnrichments extends IItemEnrichments, IServerEnrichment
|
|
|
13
13
|
* or from the server that the item points to
|
|
14
14
|
*/
|
|
15
15
|
export declare type ItemOrServerEnrichment = keyof IItemEnrichments | keyof IServerEnrichments;
|
|
16
|
+
/**
|
|
17
|
+
* convert an error to an enrichment error info format
|
|
18
|
+
* and optionally append it to an existing array of those
|
|
19
|
+
* @param error
|
|
20
|
+
* @param errors an array of existing enrichment error info
|
|
21
|
+
* @returns a new array of enrichment error info
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
export declare const getEnrichmentErrors: (error: Error | string, errors?: IEnrichmentErrorInfo[]) => IEnrichmentErrorInfo[];
|
|
16
25
|
/**
|
|
17
26
|
* Fetch enrichments for an item
|
|
18
27
|
* @param item
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
+
/**
|
|
3
|
+
* Register an Item as an application, enabling oAuth flows at custom
|
|
4
|
+
* domains. Only item types with "Application" in the name are valid
|
|
5
|
+
* with this API call.
|
|
6
|
+
* @param {string} itemId Item Id of item to create an application for
|
|
7
|
+
* @param {Array} redirectUris Array of valid redirect uris for the app
|
|
8
|
+
* @param {string} appType Defaults to "browser"
|
|
9
|
+
* @param {IRequestOptions} requestOptions
|
|
10
|
+
*/
|
|
11
|
+
export declare function registerBrowserApp(itemId: string, redirectUris: string[], requestOptions: IRequestOptions): Promise<any>;
|
|
@@ -4,6 +4,7 @@ import { ArcGISContextManager } from "../ArcGISContextManager";
|
|
|
4
4
|
import { Filter, IArcGISContext, IHubSearchOptions, ISearchResponse } from "..";
|
|
5
5
|
import { IHubEntityManager, IHubProject } from "../core/types";
|
|
6
6
|
import { IHubItemEntityManager } from "../core/types/IHubItemEntityManager";
|
|
7
|
+
import { IItem } from "@esri/arcgis-rest-types";
|
|
7
8
|
/**
|
|
8
9
|
* Centralized functions used to manage IHubProject instances
|
|
9
10
|
*
|
|
@@ -96,4 +97,11 @@ export declare class HubProjectManager implements IHubEntityManager<IHubProject>
|
|
|
96
97
|
* @returns
|
|
97
98
|
*/
|
|
98
99
|
updateThumbnail(project: IHubProject, file: any, filename: string, requestOptions?: IUserRequestOptions): Promise<IHubProject>;
|
|
100
|
+
/**
|
|
101
|
+
* Convert a Hub Project Item to a IHubProject
|
|
102
|
+
* @param item
|
|
103
|
+
* @param requestOptions
|
|
104
|
+
* @returns
|
|
105
|
+
*/
|
|
106
|
+
fromItem(item: IItem, requestOptions?: IRequestOptions): Promise<IHubProject>;
|
|
99
107
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
2
|
import { Filter, IHubSearchOptions, ISearchResponse } from "..";
|
|
3
|
+
import { IItem } from "@esri/arcgis-rest-portal";
|
|
3
4
|
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
4
5
|
import { IHubProject } from "../core/types";
|
|
5
6
|
export declare const HUB_PROJECT_ITEM_TYPE = "Hub Project";
|
|
@@ -30,4 +31,21 @@ export declare function fetchProject(identifier: string, requestOptions: IReques
|
|
|
30
31
|
* @param requestOptions
|
|
31
32
|
*/
|
|
32
33
|
export declare function destroyProject(id: string, requestOptions: IUserRequestOptions): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Search for Projects, and get IHubProject results
|
|
36
|
+
*
|
|
37
|
+
* Different from `searchContent` in that this returns the specific entity type
|
|
38
|
+
*
|
|
39
|
+
* @param filter
|
|
40
|
+
* @param options
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
33
43
|
export declare function searchProjects(filter: Filter<"content">, options: IHubSearchOptions): Promise<ISearchResponse<IHubProject>>;
|
|
44
|
+
/**
|
|
45
|
+
* Convert an Hub Project Item into a Hub Project, fetching any additional
|
|
46
|
+
* information that may be required
|
|
47
|
+
* @param item
|
|
48
|
+
* @param auth
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
export declare function convertItemToProject(item: IItem, requestOptions: IRequestOptions): Promise<IHubProject>;
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { ISearchResponse } from "../../types";
|
|
5
|
+
import { Filter, IHubSearchOptions } from "../../search/types";
|
|
6
|
+
/**
|
|
7
|
+
* Definition of `convertItemTo<T>` functions
|
|
8
|
+
*/
|
|
9
|
+
export declare type ItemToEntityFunction<T> = (i: IItem, ro?: IRequestOptions) => Promise<T>;
|
|
10
|
+
/**
|
|
11
|
+
* Generic search that returns Hub Entity types converted from items
|
|
12
|
+
* by the passed in `ItemToEntityFunction`
|
|
13
|
+
*
|
|
14
|
+
* This abstraction is used to ensure that searching from any of the
|
|
15
|
+
* entity managers / modules is consistent, and returns the entity
|
|
16
|
+
* types, instead of `IItem` or `IHubContent`
|
|
17
|
+
*
|
|
18
|
+
* @param filter
|
|
19
|
+
* @param convertFn
|
|
20
|
+
* @param options
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
export declare function searchContentEntities<T>(filter: Filter<"content">, convertFn: ItemToEntityFunction<T>, options: IHubSearchOptions): Promise<ISearchResponse<T>>;
|
|
24
|
+
/**
|
|
25
|
+
* Return a function that holds a closure containing
|
|
26
|
+
* a hub entity specific conversion function. This
|
|
27
|
+
* allows the `.next()` function to use the function on
|
|
28
|
+
* subsequent calls
|
|
29
|
+
* @param convertFn
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
export declare function createContentEntitySearchFn<T>(convertFn: ItemToEntityFunction<T>): (v: ISearchOptions) => Promise<ISearchResponse<T>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IUser } from "@esri/arcgis-rest-auth";
|
|
2
2
|
import { IGroup, ISearchOptions } from "@esri/arcgis-rest-portal";
|
|
3
|
-
import { ISearchResponse } from "
|
|
3
|
+
import { ISearchResponse } from "../types";
|
|
4
4
|
import { IMatchOptions, IDateRange, IRelativeDate, IWellKnownApis, IApiDefinition, NamedApis } from "./types";
|
|
5
5
|
/**
|
|
6
6
|
* Well known APIs
|
|
@@ -0,0 +1,104 @@
|
|
|
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 { Filter, IHubSearchOptions } 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
|
+
destroy(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(filter: Filter<"content">, 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
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { IItem } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { Filter, IHubRequestOptions, IHubSearchOptions, IHubSite, ISearchResponse } from "..";
|
|
3
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
4
|
+
export declare const HUB_SITE_ITEM_TYPE = "Hub Site Application";
|
|
5
|
+
export declare const ENTERPRISE_SITE_ITEM_TYPE = "Site Application";
|
|
6
|
+
/**
|
|
7
|
+
* Create a new Hub Site
|
|
8
|
+
*
|
|
9
|
+
* Minimum properties are `name` and `org`
|
|
10
|
+
* @param partialSite
|
|
11
|
+
* @param requestOptions
|
|
12
|
+
*/
|
|
13
|
+
export declare function createSite(partialSite: Partial<IHubSite>, requestOptions: IHubRequestOptions): Promise<IHubSite>;
|
|
14
|
+
/**
|
|
15
|
+
* Update a Hub Site
|
|
16
|
+
*
|
|
17
|
+
* This checks for and applies domain changes
|
|
18
|
+
* @param site
|
|
19
|
+
* @param requestOptions
|
|
20
|
+
* @returns
|
|
21
|
+
*/
|
|
22
|
+
export declare function updateSite(site: IHubSite, requestOptions: IHubRequestOptions): Promise<IHubSite>;
|
|
23
|
+
/**
|
|
24
|
+
* Remove a Hub Site
|
|
25
|
+
*
|
|
26
|
+
* This simply removes the Site item, and it's associated domain records.
|
|
27
|
+
* This does not remove any Teams/Groups or content associated with the
|
|
28
|
+
* Site
|
|
29
|
+
* @param id
|
|
30
|
+
* @param requestOptions
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
export declare function destroySite(id: string, requestOptions: IHubRequestOptions): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* Returns site model given various kinds of identifier
|
|
36
|
+
*
|
|
37
|
+
* @param identifier - a site item ID, site hostname, enterprise site slug, or full site URL
|
|
38
|
+
* @param requestOptions
|
|
39
|
+
* @private // remove when we remove existing fetchSite function
|
|
40
|
+
*/
|
|
41
|
+
export declare function _fetchSite(identifier: string, requestOptions: IHubRequestOptions): Promise<IHubSite>;
|
|
42
|
+
/**
|
|
43
|
+
* Convert a Hub Site Application item into a Hub Site, fetching any
|
|
44
|
+
* additional information that may be required
|
|
45
|
+
* @param item
|
|
46
|
+
* @param auth
|
|
47
|
+
* @returns
|
|
48
|
+
*/
|
|
49
|
+
export declare function convertItemToSite(item: IItem, requestOptions: IRequestOptions): Promise<IHubSite>;
|
|
50
|
+
/**
|
|
51
|
+
* Search for Sites and get IHubSite results
|
|
52
|
+
* @param filter
|
|
53
|
+
* @param options
|
|
54
|
+
* @returns
|
|
55
|
+
*/
|
|
56
|
+
export declare function searchSites(filter: Filter<"content">, options: IHubSearchOptions): Promise<ISearchResponse<IHubSite>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IHubRequestOptions, IModel } from "../..";
|
|
2
|
+
/**
|
|
3
|
+
* Given two site models, determine the domain changes and apply them
|
|
4
|
+
* @param currentModel
|
|
5
|
+
* @param updatedModel
|
|
6
|
+
* @param requestOptions
|
|
7
|
+
* @private
|
|
8
|
+
*/
|
|
9
|
+
export declare function handleDomainChanges(updatedModel: IModel, currentModel: IModel, requestOptions: IHubRequestOptions): Promise<any[]>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./handleDomainChanges";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IHubRequestOptions, IModel } from "../..";
|
|
2
|
+
/**
|
|
3
|
+
* Given a Site Model, register the domains with the Domain Service.
|
|
4
|
+
*
|
|
5
|
+
* This should only be used when creating a site. To update domains related
|
|
6
|
+
* to a site, use the `addDomain` and `removeDomain` functions directly
|
|
7
|
+
*
|
|
8
|
+
* @param {Object} model site model
|
|
9
|
+
* @param {IHubRequestOptions} hubRequestOptions
|
|
10
|
+
*/
|
|
11
|
+
export declare function addSiteDomains(model: IModel, hubRequestOptions: IHubRequestOptions): Promise<any[]>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IHubRequestOptions } from "../../types";
|
|
2
|
+
/**
|
|
3
|
+
* Remove an entry from the domain service, based on a hostname
|
|
4
|
+
*
|
|
5
|
+
* Callers must ensure the user is a member of the org that
|
|
6
|
+
* owns the domain entry else the call will fail.
|
|
7
|
+
* @param hostname
|
|
8
|
+
* @param hubRequestOptions
|
|
9
|
+
*/
|
|
10
|
+
export declare function removeDomainByHostname(hostname: string, hubRequestOptions: IHubRequestOptions): Promise<void>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IHubRequestOptions, IModel } from "..";
|
|
2
|
+
/**
|
|
3
|
+
* Returns site model given various kinds of identifier
|
|
4
|
+
*
|
|
5
|
+
* @param identifier - a site item ID, site hostname, enterprise site slug, or full site URL
|
|
6
|
+
* @param hubRequestOptions
|
|
7
|
+
*/
|
|
8
|
+
export declare function fetchSiteModel(identifier: string, hubRequestOptions: IHubRequestOptions): Promise<IModel>;
|
|
9
|
+
/**
|
|
10
|
+
* @private // keep out of docs
|
|
11
|
+
*/
|
|
12
|
+
export declare function fetchSite(identifier: string, hubRequestOptions: IHubRequestOptions): Promise<IModel>;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Returns site model given various kinds of identifier
|
|
4
|
-
*
|
|
5
|
-
* @param identifier - a site item ID, site hostname, enterprise site slug, or full site URL
|
|
6
|
-
* @param hubRequestOptions
|
|
7
|
-
*/
|
|
8
|
-
export declare function fetchSite(identifier: string, hubRequestOptions: IHubRequestOptions): Promise<import("../types").IModel>;
|
|
1
|
+
export * from "./_internal/_ensure-telemetry";
|
|
9
2
|
export * from "./domains";
|
|
10
3
|
export * from "./drafts";
|
|
11
|
-
export * from "./
|
|
4
|
+
export * from "./fetchSiteModel";
|
|
12
5
|
export * from "./get-site-by-id";
|
|
6
|
+
export * from "./HubSiteManager";
|
|
7
|
+
export * from "./HubSites";
|
|
8
|
+
export * from "./registerSiteAsApplication";
|
|
13
9
|
export * from "./site-schema-version";
|
|
10
|
+
export * from "./themes";
|
|
14
11
|
export * from "./upgrade-site-schema";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IHubRequestOptions, IModel } from "..";
|
|
2
|
+
/**
|
|
3
|
+
* Register the Site item as an application so we can oauth against it
|
|
4
|
+
* @param {string} siteId Item Id of the site
|
|
5
|
+
* @param {Array} uris Arrayf valid uris for the site
|
|
6
|
+
* @param {IHubRequestOptions} hubRequestOptions
|
|
7
|
+
*/
|
|
8
|
+
export declare function registerSiteAsApplication(model: IModel, hubRequestOptions: IHubRequestOptions): Promise<any>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IPortal } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IHubSiteTheme } from "..";
|
|
3
|
+
/**
|
|
4
|
+
* Default Site Theme
|
|
5
|
+
*/
|
|
6
|
+
export declare const DEFAULT_THEME: IHubSiteTheme;
|
|
7
|
+
/**
|
|
8
|
+
* Return the default theme, extended with values from the Org's shared theme
|
|
9
|
+
* @param {Object} portalSelf Org's Portal object
|
|
10
|
+
*/
|
|
11
|
+
export declare function getOrgDefaultTheme(portalSelf: IPortal): IHubSiteTheme;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* concat an array of arrays
|
|
3
|
+
* excluding any elements of the top level array
|
|
4
|
+
* that are not actually arrays
|
|
5
|
+
* @param arrays An array of arrays
|
|
6
|
+
* @returns concatenated array
|
|
7
|
+
* @private
|
|
8
|
+
*/
|
|
9
|
+
export declare const maybeConcat: (arrays: any[][]) => any[];
|