@esri/hub-common 20.5.1 → 20.5.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/dist/esm/access/compareAccess.js +15 -0
- package/dist/esm/access/compareAccess.js.map +1 -0
- package/dist/esm/channels/_internal/channelEditorTypes.js +9 -0
- package/dist/esm/channels/_internal/channelEditorTypes.js.map +1 -0
- package/dist/esm/content/HubContent.js +1 -1
- package/dist/esm/content/HubContent.js.map +1 -1
- package/dist/esm/content/_internal/ContentUiSchemaSettings.js +4 -2
- package/dist/esm/content/_internal/ContentUiSchemaSettings.js.map +1 -1
- package/dist/esm/content/_internal/contentEditorTypes.js +7 -0
- package/dist/esm/content/_internal/contentEditorTypes.js.map +1 -0
- package/dist/esm/content/_internal/shouldFetchData.js +29 -0
- package/dist/esm/content/_internal/shouldFetchData.js.map +1 -0
- package/dist/esm/content/_internal/shouldShowDownloadsConfiguration.js +6 -1
- package/dist/esm/content/_internal/shouldShowDownloadsConfiguration.js.map +1 -1
- package/dist/esm/content/edit.js +11 -7
- package/dist/esm/content/edit.js.map +1 -1
- package/dist/esm/content/isSiteType.js +12 -0
- package/dist/esm/content/isSiteType.js.map +1 -0
- package/dist/esm/core/_internal/getTemplate.js +212 -0
- package/dist/esm/core/_internal/getTemplate.js.map +1 -0
- package/dist/esm/core/schemas/internal/embed/EmbedSchema.js +8 -0
- package/dist/esm/core/schemas/internal/embed/EmbedSchema.js.map +1 -0
- package/dist/esm/core/schemas/internal/embed/EmbedUiSchema.js +15 -0
- package/dist/esm/core/schemas/internal/embed/EmbedUiSchema.js.map +1 -0
- package/dist/esm/core/schemas/internal/getLayoutSetupUiSchemaElement.js +31 -0
- package/dist/esm/core/schemas/internal/getLayoutSetupUiSchemaElement.js.map +1 -0
- package/dist/esm/core/types/IServiceQueryOptions.js +1 -0
- package/dist/esm/core/types/IServiceQueryOptions.js.map +1 -0
- package/dist/esm/core/types/ServiceAggregation.js +1 -0
- package/dist/esm/core/types/ServiceAggregation.js.map +1 -0
- package/dist/esm/discussions/_internal/discussionEditorTypes.js +7 -0
- package/dist/esm/discussions/_internal/discussionEditorTypes.js.map +1 -0
- package/dist/esm/events/_internal/eventEditorTypes.js +6 -0
- package/dist/esm/events/_internal/eventEditorTypes.js.map +1 -0
- package/dist/esm/groups/_internal/groupEditorTypes.js +13 -0
- package/dist/esm/groups/_internal/groupEditorTypes.js.map +1 -0
- package/dist/esm/groups/enrichGroupSearchResult.js +61 -0
- package/dist/esm/groups/enrichGroupSearchResult.js.map +1 -0
- package/dist/esm/initiative-templates/_internal/initiativeTemplateEditorTypes.js +4 -0
- package/dist/esm/initiative-templates/_internal/initiativeTemplateEditorTypes.js.map +1 -0
- package/dist/esm/initiatives/_internal/initiativeEditorTypes.js +9 -0
- package/dist/esm/initiatives/_internal/initiativeEditorTypes.js.map +1 -0
- package/dist/esm/models/createModel.js +28 -0
- package/dist/esm/models/createModel.js.map +1 -0
- package/dist/esm/models/fetchModelFromItem.js +18 -0
- package/dist/esm/models/fetchModelFromItem.js.map +1 -0
- package/dist/esm/models/fetchModelResource.js +34 -0
- package/dist/esm/models/fetchModelResource.js.map +1 -0
- package/dist/esm/models/getModel.js +19 -0
- package/dist/esm/models/getModel.js.map +1 -0
- package/dist/esm/models/getModelBySlug.js +40 -0
- package/dist/esm/models/getModelBySlug.js.map +1 -0
- package/dist/esm/models/updateModel.js +55 -0
- package/dist/esm/models/updateModel.js.map +1 -0
- package/dist/esm/models/upsertModelResource.js +37 -0
- package/dist/esm/models/upsertModelResource.js.map +1 -0
- package/dist/esm/pages/_internal/pageEditorTypes.js +2 -0
- package/dist/esm/pages/_internal/pageEditorTypes.js.map +1 -0
- package/dist/esm/permissions/_internal/checkPlatformVersion.js +43 -0
- package/dist/esm/permissions/_internal/checkPlatformVersion.js.map +1 -0
- package/dist/esm/permissions/_internal/checkReleaseGating.js +61 -0
- package/dist/esm/permissions/_internal/checkReleaseGating.js.map +1 -0
- package/dist/esm/projects/_internal/projectEditorTypes.js +8 -0
- package/dist/esm/projects/_internal/projectEditorTypes.js.map +1 -0
- package/dist/esm/search/_internal/applyWellKnownItemPredicates.js +104 -0
- package/dist/esm/search/_internal/applyWellKnownItemPredicates.js.map +1 -0
- package/dist/esm/search/_internal/bboxStringToGeoJSONPolygon.js +28 -0
- package/dist/esm/search/_internal/bboxStringToGeoJSONPolygon.js.map +1 -0
- package/dist/esm/search/_internal/constants.js +145 -0
- package/dist/esm/search/_internal/constants.js.map +1 -0
- package/dist/esm/search/_internal/expandPredicates.js +17 -0
- package/dist/esm/search/_internal/expandPredicates.js.map +1 -0
- package/dist/esm/search/_internal/hubDiscussionsHelpers/postToSearchResult.js +28 -0
- package/dist/esm/search/_internal/hubDiscussionsHelpers/postToSearchResult.js.map +1 -0
- package/dist/esm/search/_internal/hubDiscussionsHelpers/processPostFilters.js +87 -0
- package/dist/esm/search/_internal/hubDiscussionsHelpers/processPostFilters.js.map +1 -0
- package/dist/esm/search/_internal/hubDiscussionsHelpers/processPostOptions.js +48 -0
- package/dist/esm/search/_internal/hubDiscussionsHelpers/processPostOptions.js.map +1 -0
- package/dist/esm/search/_internal/hubDiscussionsHelpers/processRelations.js +25 -0
- package/dist/esm/search/_internal/hubDiscussionsHelpers/processRelations.js.map +1 -0
- package/dist/esm/search/_internal/hubSearchPosts.js +83 -0
- package/dist/esm/search/_internal/hubSearchPosts.js.map +1 -0
- package/dist/esm/search/_internal/isFamilyExpansionType.js +20 -0
- package/dist/esm/search/_internal/isFamilyExpansionType.js.map +1 -0
- package/dist/esm/search/_internal/isWellKnownTypeFilter.js +18 -0
- package/dist/esm/search/_internal/isWellKnownTypeFilter.js.map +1 -0
- package/dist/esm/search/_internal/types.js +1 -0
- package/dist/esm/search/_internal/types.js.map +1 -0
- package/dist/esm/search/getCOrgOrEOrgId.js +17 -0
- package/dist/esm/search/getCOrgOrEOrgId.js.map +1 -0
- package/dist/esm/search/relativeDateToDateRange.js +44 -0
- package/dist/esm/search/relativeDateToDateRange.js.map +1 -0
- package/dist/esm/search/types/ICatalogSearchResponse.js +1 -0
- package/dist/esm/search/types/ICatalogSearchResponse.js.map +1 -0
- package/dist/esm/search/types/IHubSearchResponseHash.js +1 -0
- package/dist/esm/search/types/IHubSearchResponseHash.js.map +1 -0
- package/dist/esm/search/types/ISearchAssociatedContentOptions.js +1 -0
- package/dist/esm/search/types/ISearchAssociatedContentOptions.js.map +1 -0
- package/dist/esm/search/valueToMatchOptions.js +26 -0
- package/dist/esm/search/valueToMatchOptions.js.map +1 -0
- package/dist/esm/sites/_internal/removeCatalogFromUpgradedSite.js +20 -0
- package/dist/esm/sites/_internal/removeCatalogFromUpgradedSite.js.map +1 -0
- package/dist/esm/sites/_internal/removeCatalogV1FromUpgradedSite.js +20 -0
- package/dist/esm/sites/_internal/removeCatalogV1FromUpgradedSite.js.map +1 -0
- package/dist/esm/sites/_internal/siteEditorTypes.js +9 -0
- package/dist/esm/sites/_internal/siteEditorTypes.js.map +1 -0
- package/dist/esm/templates/_internal/templateEditorTypes.js +2 -0
- package/dist/esm/templates/_internal/templateEditorTypes.js.map +1 -0
- package/dist/esm/urls/feature-service-urls.js +22 -0
- package/dist/esm/urls/feature-service-urls.js.map +1 -0
- package/dist/esm/users/_internal/userEditorTypes.js +2 -0
- package/dist/esm/users/_internal/userEditorTypes.js.map +1 -0
- package/dist/node/access/compareAccess.js +19 -0
- package/dist/node/access/compareAccess.js.map +1 -0
- package/dist/node/channels/_internal/channelEditorTypes.js +12 -0
- package/dist/node/channels/_internal/channelEditorTypes.js.map +1 -0
- package/dist/node/content/HubContent.js +1 -1
- package/dist/node/content/HubContent.js.map +1 -1
- package/dist/node/content/_internal/ContentUiSchemaSettings.js +4 -2
- package/dist/node/content/_internal/ContentUiSchemaSettings.js.map +1 -1
- package/dist/node/content/_internal/contentEditorTypes.js +10 -0
- package/dist/node/content/_internal/contentEditorTypes.js.map +1 -0
- package/dist/node/content/_internal/shouldFetchData.js +32 -0
- package/dist/node/content/_internal/shouldFetchData.js.map +1 -0
- package/dist/node/content/_internal/shouldShowDownloadsConfiguration.js +6 -1
- package/dist/node/content/_internal/shouldShowDownloadsConfiguration.js.map +1 -1
- package/dist/node/content/edit.js +11 -7
- package/dist/node/content/edit.js.map +1 -1
- package/dist/node/content/isSiteType.js +16 -0
- package/dist/node/content/isSiteType.js.map +1 -0
- package/dist/node/core/_internal/getTemplate.js +216 -0
- package/dist/node/core/_internal/getTemplate.js.map +1 -0
- package/dist/node/core/schemas/internal/embed/EmbedSchema.js +11 -0
- package/dist/node/core/schemas/internal/embed/EmbedSchema.js.map +1 -0
- package/dist/node/core/schemas/internal/embed/EmbedUiSchema.js +18 -0
- package/dist/node/core/schemas/internal/embed/EmbedUiSchema.js.map +1 -0
- package/dist/node/core/schemas/internal/getLayoutSetupUiSchemaElement.js +35 -0
- package/dist/node/core/schemas/internal/getLayoutSetupUiSchemaElement.js.map +1 -0
- package/dist/node/core/types/IServiceQueryOptions.js +3 -0
- package/dist/node/core/types/IServiceQueryOptions.js.map +1 -0
- package/dist/node/core/types/ServiceAggregation.js +3 -0
- package/dist/node/core/types/ServiceAggregation.js.map +1 -0
- package/dist/node/discussions/_internal/discussionEditorTypes.js +10 -0
- package/dist/node/discussions/_internal/discussionEditorTypes.js.map +1 -0
- package/dist/node/events/_internal/eventEditorTypes.js +9 -0
- package/dist/node/events/_internal/eventEditorTypes.js.map +1 -0
- package/dist/node/groups/_internal/groupEditorTypes.js +16 -0
- package/dist/node/groups/_internal/groupEditorTypes.js.map +1 -0
- package/dist/node/groups/enrichGroupSearchResult.js +65 -0
- package/dist/node/groups/enrichGroupSearchResult.js.map +1 -0
- package/dist/node/initiative-templates/_internal/initiativeTemplateEditorTypes.js +7 -0
- package/dist/node/initiative-templates/_internal/initiativeTemplateEditorTypes.js.map +1 -0
- package/dist/node/initiatives/_internal/initiativeEditorTypes.js +12 -0
- package/dist/node/initiatives/_internal/initiativeEditorTypes.js.map +1 -0
- package/dist/node/models/createModel.js +32 -0
- package/dist/node/models/createModel.js.map +1 -0
- package/dist/node/models/fetchModelFromItem.js +22 -0
- package/dist/node/models/fetchModelFromItem.js.map +1 -0
- package/dist/node/models/fetchModelResource.js +38 -0
- package/dist/node/models/fetchModelResource.js.map +1 -0
- package/dist/node/models/getModel.js +23 -0
- package/dist/node/models/getModel.js.map +1 -0
- package/dist/node/models/getModelBySlug.js +44 -0
- package/dist/node/models/getModelBySlug.js.map +1 -0
- package/dist/node/models/updateModel.js +59 -0
- package/dist/node/models/updateModel.js.map +1 -0
- package/dist/node/models/upsertModelResource.js +41 -0
- package/dist/node/models/upsertModelResource.js.map +1 -0
- package/dist/node/pages/_internal/pageEditorTypes.js +5 -0
- package/dist/node/pages/_internal/pageEditorTypes.js.map +1 -0
- package/dist/node/permissions/_internal/checkPlatformVersion.js +47 -0
- package/dist/node/permissions/_internal/checkPlatformVersion.js.map +1 -0
- package/dist/node/permissions/_internal/checkReleaseGating.js +65 -0
- package/dist/node/permissions/_internal/checkReleaseGating.js.map +1 -0
- package/dist/node/projects/_internal/projectEditorTypes.js +11 -0
- package/dist/node/projects/_internal/projectEditorTypes.js.map +1 -0
- package/dist/node/search/_internal/applyWellKnownItemPredicates.js +108 -0
- package/dist/node/search/_internal/applyWellKnownItemPredicates.js.map +1 -0
- package/dist/node/search/_internal/bboxStringToGeoJSONPolygon.js +32 -0
- package/dist/node/search/_internal/bboxStringToGeoJSONPolygon.js.map +1 -0
- package/dist/node/search/_internal/constants.js +148 -0
- package/dist/node/search/_internal/constants.js.map +1 -0
- package/dist/node/search/_internal/expandPredicates.js +21 -0
- package/dist/node/search/_internal/expandPredicates.js.map +1 -0
- package/dist/node/search/_internal/hubDiscussionsHelpers/postToSearchResult.js +32 -0
- package/dist/node/search/_internal/hubDiscussionsHelpers/postToSearchResult.js.map +1 -0
- package/dist/node/search/_internal/hubDiscussionsHelpers/processPostFilters.js +91 -0
- package/dist/node/search/_internal/hubDiscussionsHelpers/processPostFilters.js.map +1 -0
- package/dist/node/search/_internal/hubDiscussionsHelpers/processPostOptions.js +52 -0
- package/dist/node/search/_internal/hubDiscussionsHelpers/processPostOptions.js.map +1 -0
- package/dist/node/search/_internal/hubDiscussionsHelpers/processRelations.js +29 -0
- package/dist/node/search/_internal/hubDiscussionsHelpers/processRelations.js.map +1 -0
- package/dist/node/search/_internal/hubSearchPosts.js +87 -0
- package/dist/node/search/_internal/hubSearchPosts.js.map +1 -0
- package/dist/node/search/_internal/isFamilyExpansionType.js +24 -0
- package/dist/node/search/_internal/isFamilyExpansionType.js.map +1 -0
- package/dist/node/search/_internal/isWellKnownTypeFilter.js +22 -0
- package/dist/node/search/_internal/isWellKnownTypeFilter.js.map +1 -0
- package/dist/node/search/_internal/types.js +3 -0
- package/dist/node/search/_internal/types.js.map +1 -0
- package/dist/node/search/getCOrgOrEOrgId.js +21 -0
- package/dist/node/search/getCOrgOrEOrgId.js.map +1 -0
- package/dist/node/search/relativeDateToDateRange.js +48 -0
- package/dist/node/search/relativeDateToDateRange.js.map +1 -0
- package/dist/node/search/types/ICatalogSearchResponse.js +3 -0
- package/dist/node/search/types/ICatalogSearchResponse.js.map +1 -0
- package/dist/node/search/types/IHubSearchResponseHash.js +3 -0
- package/dist/node/search/types/IHubSearchResponseHash.js.map +1 -0
- package/dist/node/search/types/ISearchAssociatedContentOptions.js +3 -0
- package/dist/node/search/types/ISearchAssociatedContentOptions.js.map +1 -0
- package/dist/node/search/valueToMatchOptions.js +30 -0
- package/dist/node/search/valueToMatchOptions.js.map +1 -0
- package/dist/node/sites/_internal/removeCatalogFromUpgradedSite.js +24 -0
- package/dist/node/sites/_internal/removeCatalogFromUpgradedSite.js.map +1 -0
- package/dist/node/sites/_internal/removeCatalogV1FromUpgradedSite.js +24 -0
- package/dist/node/sites/_internal/removeCatalogV1FromUpgradedSite.js.map +1 -0
- package/dist/node/sites/_internal/siteEditorTypes.js +12 -0
- package/dist/node/sites/_internal/siteEditorTypes.js.map +1 -0
- package/dist/node/templates/_internal/templateEditorTypes.js +5 -0
- package/dist/node/templates/_internal/templateEditorTypes.js.map +1 -0
- package/dist/node/urls/feature-service-urls.js +25 -0
- package/dist/node/urls/feature-service-urls.js.map +1 -0
- package/dist/node/users/_internal/userEditorTypes.js +5 -0
- package/dist/node/users/_internal/userEditorTypes.js.map +1 -0
- package/dist/types/access/compareAccess.d.ts +11 -0
- package/dist/types/channels/_internal/channelEditorTypes.d.ts +10 -0
- package/dist/types/content/_internal/contentEditorTypes.d.ts +2 -0
- package/dist/types/content/_internal/shouldFetchData.d.ts +7 -0
- package/dist/types/content/_internal/shouldShowDownloadsConfiguration.d.ts +3 -1
- package/dist/types/content/isSiteType.d.ts +7 -0
- package/dist/types/core/_internal/getTemplate.d.ts +9 -0
- package/dist/types/core/schemas/internal/embed/EmbedSchema.d.ts +2 -0
- package/dist/types/core/schemas/internal/embed/EmbedUiSchema.d.ts +4 -0
- package/dist/types/core/schemas/internal/getLayoutSetupUiSchemaElement.d.ts +10 -0
- package/dist/types/core/types/IServiceQueryOptions.d.ts +22 -0
- package/dist/types/core/types/ServiceAggregation.d.ts +4 -0
- package/dist/types/discussions/_internal/discussionEditorTypes.d.ts +2 -0
- package/dist/types/events/_internal/eventEditorTypes.d.ts +2 -0
- package/dist/types/groups/_internal/groupEditorTypes.d.ts +2 -0
- package/dist/types/groups/enrichGroupSearchResult.d.ts +11 -0
- package/dist/types/initiative-templates/_internal/initiativeTemplateEditorTypes.d.ts +2 -0
- package/dist/types/initiatives/_internal/initiativeEditorTypes.d.ts +2 -0
- package/dist/types/models/createModel.d.ts +10 -0
- package/dist/types/models/fetchModelFromItem.d.ts +10 -0
- package/dist/types/models/fetchModelResource.d.ts +17 -0
- package/dist/types/models/getModel.d.ts +8 -0
- package/dist/types/models/getModelBySlug.d.ts +16 -0
- package/dist/types/models/updateModel.d.ts +12 -0
- package/dist/types/models/upsertModelResource.d.ts +20 -0
- package/dist/types/pages/_internal/pageEditorTypes.d.ts +2 -0
- package/dist/types/permissions/_internal/checkPlatformVersion.d.ts +14 -0
- package/dist/types/permissions/_internal/checkReleaseGating.d.ts +13 -0
- package/dist/types/projects/_internal/projectEditorTypes.d.ts +2 -0
- package/dist/types/search/_internal/applyWellKnownItemPredicates.d.ts +19 -0
- package/dist/types/search/_internal/bboxStringToGeoJSONPolygon.d.ts +8 -0
- package/dist/types/search/_internal/constants.d.ts +2 -0
- package/dist/types/search/_internal/expandPredicates.d.ts +8 -0
- package/dist/types/search/_internal/hubDiscussionsHelpers/postToSearchResult.d.ts +8 -0
- package/dist/types/search/_internal/hubDiscussionsHelpers/processPostFilters.d.ts +8 -0
- package/dist/types/search/_internal/hubDiscussionsHelpers/processPostOptions.d.ts +8 -0
- package/dist/types/search/_internal/hubDiscussionsHelpers/processRelations.d.ts +7 -0
- package/dist/types/search/_internal/hubSearchPosts.d.ts +59 -0
- package/dist/types/search/_internal/isFamilyExpansionType.d.ts +9 -0
- package/dist/types/search/_internal/isWellKnownTypeFilter.d.ts +11 -0
- package/dist/types/search/_internal/types.d.ts +15 -0
- package/dist/types/search/getCOrgOrEOrgId.d.ts +8 -0
- package/dist/types/search/relativeDateToDateRange.d.ts +8 -0
- package/dist/types/search/types/ICatalogSearchResponse.d.ts +9 -0
- package/dist/types/search/types/IHubSearchResponseHash.d.ts +7 -0
- package/dist/types/search/types/ISearchAssociatedContentOptions.d.ts +32 -0
- package/dist/types/search/valueToMatchOptions.d.ts +8 -0
- package/dist/types/sites/_internal/removeCatalogFromUpgradedSite.d.ts +13 -0
- package/dist/types/sites/_internal/removeCatalogV1FromUpgradedSite.d.ts +13 -0
- package/dist/types/sites/_internal/siteEditorTypes.d.ts +2 -0
- package/dist/types/templates/_internal/templateEditorTypes.d.ts +2 -0
- package/dist/types/urls/feature-service-urls.d.ts +13 -0
- package/dist/types/users/_internal/userEditorTypes.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { IModel } from "../hub-types";
|
|
3
|
+
/**
|
|
4
|
+
* Gets the full item/data model for an item id
|
|
5
|
+
* @param {string} id
|
|
6
|
+
* @param {Object} requestOptions
|
|
7
|
+
*/
|
|
8
|
+
export declare function getModel(id: string, requestOptions: IRequestOptions): Promise<IModel>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { IModel } from "../hub-types";
|
|
3
|
+
/**
|
|
4
|
+
* Get a model by it's slug
|
|
5
|
+
*
|
|
6
|
+
* This uses the [Filter](https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm) option of the
|
|
7
|
+
* to search for an item that has a typekeyword of `slug|{slug-value}`
|
|
8
|
+
*
|
|
9
|
+
* This is useful for applications that want to use human-readable urls instead
|
|
10
|
+
* of using item ids.
|
|
11
|
+
*
|
|
12
|
+
* @param slug
|
|
13
|
+
* @param requestOptions
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
export declare function getModelBySlug(slug: string, requestOptions: IRequestOptions): Promise<IModel>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IUserRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { IModel } from "../hub-types";
|
|
3
|
+
/**
|
|
4
|
+
* Update an IModel. Generic function that will be used across all
|
|
5
|
+
* type-specific update functions
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @param {IModel} "model" object (i.e. `{item:{...}, data:{...}}`)
|
|
9
|
+
* @param {IRequestOptions} requestOptions
|
|
10
|
+
* @returns {Promise<IModel>}
|
|
11
|
+
*/
|
|
12
|
+
export declare function updateModel(model: IModel, requestOptions: IUserRequestOptions): Promise<IModel>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IUserRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { IModel } from "../hub-types";
|
|
3
|
+
/**
|
|
4
|
+
* Takes an IModel and an array of resources and upserts them to the
|
|
5
|
+
* backing item. Then searches for the resources that were upserted
|
|
6
|
+
* and attaches them to the model, which is returned.
|
|
7
|
+
*
|
|
8
|
+
* @export
|
|
9
|
+
* @param {IModel} model
|
|
10
|
+
* @param {Array<{
|
|
11
|
+
* resource: Record<string, any>;
|
|
12
|
+
* filename: string;
|
|
13
|
+
* }>} resources
|
|
14
|
+
* @param {IUserRequestOptions} requestOptions
|
|
15
|
+
* @return {*} {Promise<IModel>}
|
|
16
|
+
*/
|
|
17
|
+
export declare function upsertModelResources(model: IModel, resources: Array<{
|
|
18
|
+
resource: Record<string, any>;
|
|
19
|
+
filename: string;
|
|
20
|
+
}>, requestOptions: IUserRequestOptions): Promise<IModel>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../types/IArcGISContext";
|
|
2
|
+
import { IPermissionPolicy } from "../types/IPermissionPolicy";
|
|
3
|
+
import { IPolicyCheck } from "../types/IPolicyCheck";
|
|
4
|
+
/**
|
|
5
|
+
* Gate access based on the platform version (portal.currentVersion).
|
|
6
|
+
* If the currentVersion is less than the policy.platformVersion, access is denied.
|
|
7
|
+
* This is used to limit access to features that need to roll out with a
|
|
8
|
+
* specific ArcGISOnline version. This should not be used with Enterprise.
|
|
9
|
+
* @param policy
|
|
10
|
+
* @param context
|
|
11
|
+
* @param _entity
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export declare function checkPlatformVersion(policy: IPermissionPolicy, context: IArcGISContext, _entity?: Record<string, any>): IPolicyCheck[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../types/IArcGISContext";
|
|
2
|
+
import { IPermissionPolicy } from "../types/IPermissionPolicy";
|
|
3
|
+
import { IPolicyCheck } from "../types/IPolicyCheck";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
* Verify that the policy.releaseAfter and policy.retireAfter requirements are met.
|
|
7
|
+
* These checks only apply in the "production" environment.
|
|
8
|
+
* @param policy
|
|
9
|
+
* @param context
|
|
10
|
+
* @param entity
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export declare function checkReleaseGating(policy: IPermissionPolicy, context: IArcGISContext, _entity?: Record<string, any>): IPolicyCheck[];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IQuery } from "../types/IHubCatalog";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Convert a Filter Group to expand well-known type filters
|
|
5
|
+
*
|
|
6
|
+
* The purpose of this function is to allow for the use of short-hand
|
|
7
|
+
* names for commonly used, complex queries.
|
|
8
|
+
*
|
|
9
|
+
* It works by looking for filters using the .type property, the value
|
|
10
|
+
* of which is a key in the WellKnownItemFilters hash. If found in the
|
|
11
|
+
* hash, the filters array of the active filterGroup is replaced with the
|
|
12
|
+
* filters specified in the hash.
|
|
13
|
+
*
|
|
14
|
+
* NOTE: Any other properties specified in a filter will be removed
|
|
15
|
+
*
|
|
16
|
+
* Only exported to enable extensive testing
|
|
17
|
+
* @param query
|
|
18
|
+
*/
|
|
19
|
+
export declare function applyWellKnownItemPredicates(query: IQuery): IQuery;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Polygon } from "geojson";
|
|
2
|
+
/**
|
|
3
|
+
* Given a bounding box string, e.g. "126.2274169922485, -42.559149812106845, -25.647583007805757, 83.1100826092665",
|
|
4
|
+
* convert it into a geojson Polygon object
|
|
5
|
+
* @param bbox The bounding box string
|
|
6
|
+
* @returns a geojson Polygon object derived from the given bounding box string
|
|
7
|
+
*/
|
|
8
|
+
export declare function bboxStringToGeoJSONPolygon(bbox: string): Polygon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IPost } from "../../../discussions/api/types";
|
|
2
|
+
import { IHubSearchResult } from "../../types/IHubSearchResult";
|
|
3
|
+
/**
|
|
4
|
+
* Resolves an IHubSearchResult for the given IPost record
|
|
5
|
+
* @param post An IPost record
|
|
6
|
+
* @returns a IHubSearchResult for the given IPost record
|
|
7
|
+
*/
|
|
8
|
+
export declare function postToSearchResult(post: IPost): IHubSearchResult;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ISearchPosts } from "../../../discussions/api/types";
|
|
2
|
+
import { IFilter } from "../../types/IHubCatalog";
|
|
3
|
+
/**
|
|
4
|
+
* Builds a Partial<ISearchPosts> given an Array of IFilter objects
|
|
5
|
+
* @param filters An Array of IFilter
|
|
6
|
+
* @returns A Partial<ISearchPosts> for the given Array of IFilter objects
|
|
7
|
+
*/
|
|
8
|
+
export declare function processPostFilters(filters: IFilter[]): Partial<ISearchPosts>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ISearchPosts } from "../../../discussions/api/types";
|
|
2
|
+
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
3
|
+
/**
|
|
4
|
+
* Builds a Partial<ISearchPosts> for the given IHubSearchOptions
|
|
5
|
+
* @param options An IHubSearchOptions object
|
|
6
|
+
* @returns a Partial<ISearchPosts> for the given IHubSearchOptions
|
|
7
|
+
*/
|
|
8
|
+
export declare function processPostOptions(options: IHubSearchOptions): Partial<ISearchPosts>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PostRelation } from "../../../discussions/api/types";
|
|
2
|
+
/**
|
|
3
|
+
* Convert an array of `include` into an array of PostRelation enum values.
|
|
4
|
+
* @param relations array of include (e.g. ["channel", "replies"]).
|
|
5
|
+
* @returns PostRelation[] with order of first appearance preserved and duplicates removed.
|
|
6
|
+
*/
|
|
7
|
+
export declare function processRelations(relations?: string[]): PostRelation[];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { IHubSearchResult } from "../types/IHubSearchResult";
|
|
2
|
+
import { IHubSearchOptions } from "../types/IHubSearchOptions";
|
|
3
|
+
import { IHubSearchResponse } from "../types/IHubSearchResponse";
|
|
4
|
+
import { IQuery } from "../types/IHubCatalog";
|
|
5
|
+
/**
|
|
6
|
+
* @private
|
|
7
|
+
* Executes a Discussions API (v2) post search and resolves an IHubSearchResponse<IHubSearchResult>.
|
|
8
|
+
* Currently supported filters include (filter predicate key => accepted values):
|
|
9
|
+
* - access: 'public' | 'private' | 'org' | Array<'public' | 'private' | 'org'>
|
|
10
|
+
* - channel: string | string[]
|
|
11
|
+
* - owner: string
|
|
12
|
+
* - discussion: string
|
|
13
|
+
* - editor: string
|
|
14
|
+
* - status: 'pending' | 'approved' | 'rejected' | 'deleted' | 'hidden' | 'blocked' | Array<...>
|
|
15
|
+
* - term: string
|
|
16
|
+
* - title: string
|
|
17
|
+
* - body: string
|
|
18
|
+
* - bbox: string
|
|
19
|
+
* - parentId: string | string[]
|
|
20
|
+
* - groups: string | string[]
|
|
21
|
+
* - postType: 'text' | 'announcement' | 'poll' | 'question'
|
|
22
|
+
* - created: IDateRange<string | number> (mapped to createdAfter / createdBefore)
|
|
23
|
+
* - modified: IDateRange<string | number> (mapped to updatedAfter / updatedBefore)
|
|
24
|
+
*
|
|
25
|
+
* Notes / constraints:
|
|
26
|
+
* - For single-value filters where an array is provided (e.g., owner, editor, discussion, term, title, body, bbox), only the first value is used.
|
|
27
|
+
* - title & body are ignored if term is provied, as term searches against both title and body
|
|
28
|
+
* - Date range predicates use the shape: { from: string|number; to: string|number }.
|
|
29
|
+
* - Unsupported filters are ignored silently.
|
|
30
|
+
*
|
|
31
|
+
* INCLUDE SUPPORT (options.include tokens mapped to post relations - bare tokens only)
|
|
32
|
+
* channel -> PostRelation.CHANNEL
|
|
33
|
+
* parent -> PostRelation.PARENT
|
|
34
|
+
* replies -> PostRelation.REPLIES (returns replies collection or paging info)
|
|
35
|
+
* replyCount -> PostRelation.REPLY_COUNT (numeric aggregate)
|
|
36
|
+
* reactions -> PostRelation.REACTIONS
|
|
37
|
+
* channelAcl -> PostRelation.CHANNEL_ACL
|
|
38
|
+
* Unknown tokens are ignored; no namespaced forms (e.g. `post:channel`) are supported.
|
|
39
|
+
*
|
|
40
|
+
* Currently supported sort fields include (pass via `options.sortField`):
|
|
41
|
+
* - body
|
|
42
|
+
* - channelId
|
|
43
|
+
* - created (maps to createdAt)
|
|
44
|
+
* - modified (maps to updatedAt)
|
|
45
|
+
* - owner (maps to creator)
|
|
46
|
+
* - discussion
|
|
47
|
+
* - editor
|
|
48
|
+
* - id
|
|
49
|
+
* - parentId
|
|
50
|
+
* - status
|
|
51
|
+
* - title
|
|
52
|
+
* Sort order: 'ASC' | 'DESC' (via `options.sortOrder`).
|
|
53
|
+
* Pagination options: `options.num` (page size), `options.start` (1-based offset handled by API).
|
|
54
|
+
*
|
|
55
|
+
* @param query An IQuery object (must include `filters` and `targetEntity: 'post'` upstream)
|
|
56
|
+
* @param options An IHubSearchOptions object
|
|
57
|
+
* @returns a promise that resolves an IHubSearchResponse<IHubSearchResult>
|
|
58
|
+
*/
|
|
59
|
+
export declare function hubSearchPosts(query: IQuery, options: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks to see if our type is a family expansion,
|
|
3
|
+
* i.e. our type is a key in HubFamilies and it begins with a dollar sign
|
|
4
|
+
*
|
|
5
|
+
* $content, $site, etc.
|
|
6
|
+
* @param key
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function isFamilyExpansionType(key: string): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IMatchOptions } from "../types/types";
|
|
2
|
+
/**
|
|
3
|
+
* Is the argument a well-known type "key"
|
|
4
|
+
*
|
|
5
|
+
* Accepts `string`, `string[]` or `IMatchOptions`
|
|
6
|
+
* but only string values can possibly be keys
|
|
7
|
+
* on `WellKnownItemFilters`
|
|
8
|
+
* @param key
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function isWellKnownTypeFilter(key: string | string[] | IMatchOptions): boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IPredicate } from "../types/IHubCatalog";
|
|
2
|
+
export interface IWellKnownItemPredicates {
|
|
3
|
+
$application: IPredicate[];
|
|
4
|
+
$feedback: IPredicate[];
|
|
5
|
+
$dashboard: IPredicate[];
|
|
6
|
+
$dataset: IPredicate[];
|
|
7
|
+
$experience: IPredicate[];
|
|
8
|
+
$site: IPredicate[];
|
|
9
|
+
$storymap: IPredicate[];
|
|
10
|
+
$initiative: IPredicate[];
|
|
11
|
+
$document: IPredicate[];
|
|
12
|
+
$webmap: IPredicate[];
|
|
13
|
+
$template: IPredicate[];
|
|
14
|
+
$page: IPredicate[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IArcGISContext } from "../types/IArcGISContext";
|
|
2
|
+
/**
|
|
3
|
+
* Get the c-org or e-org ID. Defaults to the communityOrgId if the user is currently authed into
|
|
4
|
+
* an e-org; otherwise it looks up the trusted org relationship to get the e-org id
|
|
5
|
+
* @param context IArcGISContext
|
|
6
|
+
* @returns orgid of the c-org or e-org
|
|
7
|
+
*/
|
|
8
|
+
export declare function getCOrgOrEOrgId(context: IArcGISContext): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ISearchResponseHash } from "./IHubSearchResponseHash";
|
|
2
|
+
/**
|
|
3
|
+
* Response from a search operation on a Catalog
|
|
4
|
+
*/
|
|
5
|
+
export interface ICatalogSearchResponse {
|
|
6
|
+
catalogTitle: string;
|
|
7
|
+
collectionResults: ISearchResponseHash;
|
|
8
|
+
scopeResults?: ISearchResponseHash;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IHubSearchResponse } from "./IHubSearchResponse";
|
|
2
|
+
import { IHubSearchResult } from "./IHubSearchResult";
|
|
3
|
+
/**
|
|
4
|
+
* Response from a Catalog search operation where the responses for different collections
|
|
5
|
+
* or entities are grouped into a single object.
|
|
6
|
+
*/
|
|
7
|
+
export declare type ISearchResponseHash = Record<string, IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { HubEntity } from "../../core/types/HubEntity";
|
|
2
|
+
import { IHubRequestOptions } from "../../hub-types";
|
|
3
|
+
import { IQuery } from "./IHubCatalog";
|
|
4
|
+
/**
|
|
5
|
+
* Options for searching associated content for a given entity
|
|
6
|
+
*/
|
|
7
|
+
export interface ISearchAssociatedContentOptions {
|
|
8
|
+
/**
|
|
9
|
+
* The entity to search for associated content
|
|
10
|
+
*/
|
|
11
|
+
entity: HubEntity;
|
|
12
|
+
/**
|
|
13
|
+
* The type of association to search for (e.g., "related", "connected")
|
|
14
|
+
*/
|
|
15
|
+
association: "related" | "connected";
|
|
16
|
+
/**
|
|
17
|
+
* The request options to use for the search
|
|
18
|
+
*/
|
|
19
|
+
requestOptions: IHubRequestOptions;
|
|
20
|
+
/**
|
|
21
|
+
* The scope of the search. Must have targetEntity of "item"
|
|
22
|
+
*/
|
|
23
|
+
scope: IQuery;
|
|
24
|
+
/**
|
|
25
|
+
* Which layer within the entity should be searched. Required for "connected" associations
|
|
26
|
+
*/
|
|
27
|
+
layerId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The number of results to return
|
|
30
|
+
*/
|
|
31
|
+
num?: number;
|
|
32
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IMatchOptions } from "./types/types";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Convert a field value into a MatchOptions if it's not already one
|
|
5
|
+
* @param value
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function valueToMatchOptions(value: string | string[] | IMatchOptions): IMatchOptions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IModel } from "../../hub-types";
|
|
2
|
+
/**
|
|
3
|
+
* Removes the `catalog` property from upgraded site models. We use site.data.useCatalogV2
|
|
4
|
+
* (a temporary property) to determine if the upgrade has been completed.
|
|
5
|
+
*
|
|
6
|
+
* We need this temporary migration because earlier versions of the site schema upgrade
|
|
7
|
+
* force data.catalog to be present, even if the site is using catalogV2.
|
|
8
|
+
*
|
|
9
|
+
* TODO: Remove this function once we force all sites to use catalogV2.
|
|
10
|
+
* @param model
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export declare function removeCatalogFromUpgradedSite(model: IModel): IModel;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IModel } from "../../hub-types";
|
|
2
|
+
/**
|
|
3
|
+
* Removes the `catalog` property from upgraded site models. We use site.data.useCatalogV2
|
|
4
|
+
* (a temporary property) to determine if the upgrade has been completed.
|
|
5
|
+
*
|
|
6
|
+
* We need this temporary migration because earlier versions of the site schema upgrade
|
|
7
|
+
* force data.catalog to be present, even if the site is using catalogV2.
|
|
8
|
+
*
|
|
9
|
+
* TODO: Remove this function once we force all sites to use catalogV2.
|
|
10
|
+
* @param model
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
export declare function removeCatalogV1FromUpgradedSite(model: IModel): IModel;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param url
|
|
4
|
+
* @returns true if the url is of a map or feature service
|
|
5
|
+
*/
|
|
6
|
+
export declare const isMapOrFeatureServerUrl: (url: string) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* parses map or feature service type from URL
|
|
9
|
+
* @param url map or feature service URL
|
|
10
|
+
* @returns item type, either "Map Service" or "Feature Service"
|
|
11
|
+
* or undefined for other types of URLs
|
|
12
|
+
*/
|
|
13
|
+
export declare const getServiceTypeFromUrl: (url: string) => string;
|