@esri/hub-common 20.5.0 → 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/fetchHubContent.js +3 -1
- package/dist/esm/content/fetchHubContent.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/HubGroups.js +18 -8
- package/dist/esm/groups/HubGroups.js.map +1 -1
- 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/fetchHubContent.js +3 -1
- package/dist/node/content/fetchHubContent.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/HubGroups.js +17 -7
- package/dist/node/groups/HubGroups.js.map +1 -1
- 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 @@
|
|
|
1
|
+
{"version":3,"file":"IHubSearchResponseHash.js","sourceRoot":"","sources":["../../../../src/search/types/IHubSearchResponseHash.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ISearchAssociatedContentOptions.js","sourceRoot":"","sources":["../../../../src/search/types/ISearchAssociatedContentOptions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.valueToMatchOptions = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @private
|
|
6
|
+
* Convert a field value into a MatchOptions if it's not already one
|
|
7
|
+
* @param value
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
function valueToMatchOptions(value) {
|
|
11
|
+
let result = {};
|
|
12
|
+
if (Array.isArray(value)) {
|
|
13
|
+
result = {
|
|
14
|
+
any: value,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
if (typeof value === "string") {
|
|
19
|
+
result = {
|
|
20
|
+
any: [value],
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
if (typeof value === "object") {
|
|
24
|
+
result = value;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return result;
|
|
28
|
+
}
|
|
29
|
+
exports.valueToMatchOptions = valueToMatchOptions;
|
|
30
|
+
//# sourceMappingURL=valueToMatchOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valueToMatchOptions.js","sourceRoot":"","sources":["../../../src/search/valueToMatchOptions.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,KAAwC;IAExC,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACxB,MAAM,GAAG;YACP,GAAG,EAAE,KAAK;SACX,CAAC;KACH;SAAM;QACL,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,MAAM,GAAG;gBACP,GAAG,EAAE,CAAC,KAAK,CAAC;aACb,CAAC;SACH;QACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YAC7B,MAAM,GAAG,KAAK,CAAC;SAChB;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AApBD,kDAoBC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeCatalogFromUpgradedSite = void 0;
|
|
4
|
+
const util_1 = require("../../util");
|
|
5
|
+
/**
|
|
6
|
+
* Removes the `catalog` property from upgraded site models. We use site.data.useCatalogV2
|
|
7
|
+
* (a temporary property) to determine if the upgrade has been completed.
|
|
8
|
+
*
|
|
9
|
+
* We need this temporary migration because earlier versions of the site schema upgrade
|
|
10
|
+
* force data.catalog to be present, even if the site is using catalogV2.
|
|
11
|
+
*
|
|
12
|
+
* TODO: Remove this function once we force all sites to use catalogV2.
|
|
13
|
+
* @param model
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
function removeCatalogFromUpgradedSite(model) {
|
|
17
|
+
const clone = util_1.cloneObject(model);
|
|
18
|
+
if (clone.data.useCatalogV2) {
|
|
19
|
+
delete clone.data.catalog;
|
|
20
|
+
}
|
|
21
|
+
return clone;
|
|
22
|
+
}
|
|
23
|
+
exports.removeCatalogFromUpgradedSite = removeCatalogFromUpgradedSite;
|
|
24
|
+
//# sourceMappingURL=removeCatalogFromUpgradedSite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeCatalogFromUpgradedSite.js","sourceRoot":"","sources":["../../../../src/sites/_internal/removeCatalogFromUpgradedSite.ts"],"names":[],"mappings":";;;AACA,qCAAyC;AAGzC;;;;;;;;;;GAUG;AACH,SAAgB,6BAA6B,CAAC,KAAa;IACzD,MAAM,KAAK,GAAG,kBAAW,CAAC,KAAK,CAAC,CAAC;IAEjC,IAAI,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE;QAC3B,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;KAC3B;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AARD,sEAQC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeCatalogV1FromUpgradedSite = void 0;
|
|
4
|
+
const util_1 = require("../../util");
|
|
5
|
+
/**
|
|
6
|
+
* Removes the `catalog` property from upgraded site models. We use site.data.useCatalogV2
|
|
7
|
+
* (a temporary property) to determine if the upgrade has been completed.
|
|
8
|
+
*
|
|
9
|
+
* We need this temporary migration because earlier versions of the site schema upgrade
|
|
10
|
+
* force data.catalog to be present, even if the site is using catalogV2.
|
|
11
|
+
*
|
|
12
|
+
* TODO: Remove this function once we force all sites to use catalogV2.
|
|
13
|
+
* @param model
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
function removeCatalogV1FromUpgradedSite(model) {
|
|
17
|
+
const clone = util_1.cloneObject(model);
|
|
18
|
+
if (clone.data.useCatalogV2) {
|
|
19
|
+
delete clone.data.catalog;
|
|
20
|
+
}
|
|
21
|
+
return clone;
|
|
22
|
+
}
|
|
23
|
+
exports.removeCatalogV1FromUpgradedSite = removeCatalogV1FromUpgradedSite;
|
|
24
|
+
//# sourceMappingURL=removeCatalogV1FromUpgradedSite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"removeCatalogV1FromUpgradedSite.js","sourceRoot":"","sources":["../../../../src/sites/_internal/removeCatalogV1FromUpgradedSite.ts"],"names":[],"mappings":";;;AACA,qCAAyC;AAEzC;;;;;;;;;;GAUG;AACH,SAAgB,+BAA+B,CAAC,KAAa;IAC3D,MAAM,KAAK,GAAG,kBAAW,CAAC,KAAK,CAAC,CAAC;IAEjC,IAAI,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE;QAC3B,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;KAC3B;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AARD,0EAQC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SiteEditorTypes = void 0;
|
|
4
|
+
exports.SiteEditorTypes = [
|
|
5
|
+
"hub:site:edit",
|
|
6
|
+
"hub:site:create",
|
|
7
|
+
"hub:site:followers",
|
|
8
|
+
"hub:site:settings",
|
|
9
|
+
"hub:site:assistant",
|
|
10
|
+
"hub:site:settings:discussions",
|
|
11
|
+
];
|
|
12
|
+
//# sourceMappingURL=siteEditorTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"siteEditorTypes.js","sourceRoot":"","sources":["../../../../src/sites/_internal/siteEditorTypes.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAG;IAC7B,eAAe;IACf,iBAAiB;IACjB,oBAAoB;IACpB,mBAAmB;IACnB,oBAAoB;IACpB,+BAA+B;CACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateEditorTypes.js","sourceRoot":"","sources":["../../../../src/templates/_internal/templateEditorTypes.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAG,CAAC,mBAAmB,CAAU,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getServiceTypeFromUrl = exports.isMapOrFeatureServerUrl = void 0;
|
|
4
|
+
const util_1 = require("../util");
|
|
5
|
+
const MAP_OR_FEATURE_SERVER_URL_REGEX = /\/(map|feature)server/i;
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* @param url
|
|
9
|
+
* @returns true if the url is of a map or feature service
|
|
10
|
+
*/
|
|
11
|
+
exports.isMapOrFeatureServerUrl = (url) => {
|
|
12
|
+
return MAP_OR_FEATURE_SERVER_URL_REGEX.test(url);
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* parses map or feature service type from URL
|
|
16
|
+
* @param url map or feature service URL
|
|
17
|
+
* @returns item type, either "Map Service" or "Feature Service"
|
|
18
|
+
* or undefined for other types of URLs
|
|
19
|
+
*/
|
|
20
|
+
exports.getServiceTypeFromUrl = (url) => {
|
|
21
|
+
const match = MAP_OR_FEATURE_SERVER_URL_REGEX.exec(url);
|
|
22
|
+
const mapOrFeature = match && match[1];
|
|
23
|
+
return mapOrFeature && `${util_1.capitalize(mapOrFeature)} Service`;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=feature-service-urls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-service-urls.js","sourceRoot":"","sources":["../../../src/urls/feature-service-urls.ts"],"names":[],"mappings":";;;AAAA,kCAAqC;AAErC,MAAM,+BAA+B,GAAG,wBAAwB,CAAC;AAEjE;;;;GAIG;AACU,QAAA,uBAAuB,GAAG,CAAC,GAAW,EAAE,EAAE;IACrD,OAAO,+BAA+B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnD,CAAC,CAAC;AAEF;;;;;GAKG;AACU,QAAA,qBAAqB,GAAG,CAAC,GAAW,EAAE,EAAE;IACnD,MAAM,KAAK,GAAG,+BAA+B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxD,MAAM,YAAY,GAAG,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC;IACvC,OAAO,YAAY,IAAI,GAAG,iBAAU,CAAC,YAAY,CAAC,UAAU,CAAC;AAC/D,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userEditorTypes.js","sourceRoot":"","sources":["../../../../src/users/_internal/userEditorTypes.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAG,CAAC,mBAAmB,CAAU,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AccessLevel } from "../core/types/types";
|
|
2
|
+
/**
|
|
3
|
+
* Simple access comparison.
|
|
4
|
+
* If access1 is more permissive than access2, returns "private" (downgraded); otherwise returns access1 unchanged.
|
|
5
|
+
* Order: private < shared < org < public
|
|
6
|
+
* Currently used to ensure that a Hub Assistant's access level is not more permissive than the site entity.
|
|
7
|
+
* @param access1 Candidate access level to validate.
|
|
8
|
+
* @param access2 Reference access level to compare against.
|
|
9
|
+
* @returns The resulting (possibly downgraded) access level.
|
|
10
|
+
*/
|
|
11
|
+
export declare function compareAccess(access1: AccessLevel, access2: AccessLevel): AccessLevel;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @private
|
|
3
|
+
* The supported channel editor types
|
|
4
|
+
*/
|
|
5
|
+
export declare const ChannelEditorTypes: readonly ["hub:channel:create", "hub:channel:edit"];
|
|
6
|
+
/**
|
|
7
|
+
* @private
|
|
8
|
+
* The union of all supported channel editor types
|
|
9
|
+
*/
|
|
10
|
+
export declare type ChannelEditorType = (typeof ChannelEditorTypes)[number];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IHubEditableContent } from "../../core/types/IHubEditableContent";
|
|
2
|
+
import { IHubRequestOptions } from "../../hub-types";
|
|
2
3
|
/**
|
|
3
4
|
* @private
|
|
4
5
|
* Determines if the downloads configuration should be shown for an entity.
|
|
@@ -8,6 +9,7 @@ import { IHubEditableContent } from "../../core/types/IHubEditableContent";
|
|
|
8
9
|
* could be downloaded with a change in item / service settings.
|
|
9
10
|
*
|
|
10
11
|
* @param entity entity to check
|
|
12
|
+
* @param hubRequestOptions hub request options (temporarily to ensure not portal)
|
|
11
13
|
* @returns whether downloads configuration should be shown
|
|
12
14
|
*/
|
|
13
|
-
export declare function shouldShowDownloadsConfiguration(entity: IHubEditableContent): boolean;
|
|
15
|
+
export declare function shouldShowDownloadsConfiguration(entity: IHubEditableContent, hubRequestOptions: IHubRequestOptions): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines whether, given a type and typekeywords, the input is
|
|
3
|
+
* a site item type or not
|
|
4
|
+
* @param type - the type value on the item
|
|
5
|
+
* @param typeKeywords - the typeKeywords on the item
|
|
6
|
+
*/
|
|
7
|
+
export declare function isSiteType(type: string, typeKeywords?: string[]): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IArcGISContext } from "../../types/IArcGISContext";
|
|
2
|
+
import { IHubLayout } from "../types/IHubLayout";
|
|
3
|
+
/**
|
|
4
|
+
* Returns a template layout by name.
|
|
5
|
+
* Currently supports "simple" and "blank".
|
|
6
|
+
* Future templates can be added or loaded via dynamic import.
|
|
7
|
+
* @param name - The template name (e.g., "simple", "blank")
|
|
8
|
+
*/
|
|
9
|
+
export declare function getTemplate(name: string, context: IArcGISContext): Promise<IHubLayout>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IArcGISContext } from "../../../../types/IArcGISContext";
|
|
2
|
+
import { EmbedCardEditorOptions } from "../EditorOptions";
|
|
3
|
+
import { IUiSchema } from "../../types";
|
|
4
|
+
export declare const buildUiSchema: (_i18nScope: string, _config: EmbedCardEditorOptions, _context: IArcGISContext) => IUiSchema;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IUiSchemaElement } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* When creating an entity, an editor can elect to choose
|
|
4
|
+
* a layout for the new entity. The following util builds
|
|
5
|
+
* the UiSchema elements to render this configuration in
|
|
6
|
+
* various creation flows.
|
|
7
|
+
*
|
|
8
|
+
* @param i18nScope intl - scope for translations
|
|
9
|
+
*/
|
|
10
|
+
export declare function getLayoutSetupUiSchemaElement(i18nScope: string): IUiSchemaElement[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ServiceAggregation } from "./ServiceAggregation";
|
|
2
|
+
/**
|
|
3
|
+
* Options used to defined a feature service query
|
|
4
|
+
*/
|
|
5
|
+
export interface IServiceQueryOptions {
|
|
6
|
+
/**
|
|
7
|
+
* The url of the feature service, including the layer
|
|
8
|
+
*/
|
|
9
|
+
url: string;
|
|
10
|
+
/**
|
|
11
|
+
* Field on which to run an aggregation
|
|
12
|
+
*/
|
|
13
|
+
field: string;
|
|
14
|
+
/**
|
|
15
|
+
* The type of server-side aggregation to run
|
|
16
|
+
*/
|
|
17
|
+
statisticType: ServiceAggregation;
|
|
18
|
+
/**
|
|
19
|
+
* Where clause to apply to the query. Defaults to "1=1" if not provided
|
|
20
|
+
*/
|
|
21
|
+
where?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare type GroupEditorType = (typeof GroupEditorTypes)[number];
|
|
2
|
+
export declare const GroupEditorTypes: readonly ["hub:group:edit", "hub:group:settings", "hub:group:settings:discussions", "hub:group:create:followers", "hub:group:create:association", "hub:group:create:view", "hub:group:create:edit", "hub:group:create"];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IGroup } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IHubRequestOptions } from "../hub-types";
|
|
3
|
+
import { IHubSearchResult } from "../search/types/IHubSearchResult";
|
|
4
|
+
/**
|
|
5
|
+
* Enrich a generic search result
|
|
6
|
+
* @param group
|
|
7
|
+
* @param includes
|
|
8
|
+
* @param requestOptions
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function enrichGroupSearchResult(group: IGroup, include: string[], requestOptions: IHubRequestOptions): Promise<IHubSearchResult>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare type InitiativeEditorType = (typeof InitiativeEditorTypes)[number];
|
|
2
|
+
export declare const InitiativeEditorTypes: readonly ["hub:initiative:edit", "hub:initiative:create", "hub:initiative:create2", "hub:initiative:metrics", "hub:initiative:associations", "hub:initiative:settings"];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IUserRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { IModel } from "../hub-types";
|
|
3
|
+
/**
|
|
4
|
+
* Create an item to back and IModel.
|
|
5
|
+
*
|
|
6
|
+
* @param {IModel}
|
|
7
|
+
* @param {IRequestOptions} requestOptions
|
|
8
|
+
* @returns {Promise<IModel>}
|
|
9
|
+
*/
|
|
10
|
+
export declare function createModel(model: IModel, requestOptions: IUserRequestOptions): Promise<IModel>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IItem } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
3
|
+
import { IModel } from "../hub-types";
|
|
4
|
+
/**
|
|
5
|
+
* Given an Item, fetch the data json and return an IModel
|
|
6
|
+
* @param item
|
|
7
|
+
* @param requestOptions
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
export declare function fetchModelFromItem(item: IItem, requestOptions: IRequestOptions): Promise<IModel>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IItem } from "@esri/arcgis-rest-portal";
|
|
2
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
3
|
+
/**
|
|
4
|
+
* Given an item, and a list of resource name/prop pairs,
|
|
5
|
+
* fetch the resources and return as an object for the IModel
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @param {IItem} item
|
|
9
|
+
* @param {{
|
|
10
|
+
* [key: string]: string
|
|
11
|
+
* }} resourceNamePairs
|
|
12
|
+
* @param {IRequestOptions} requestOptions
|
|
13
|
+
* @return {*} {Promise<Record<string, any>>}
|
|
14
|
+
*/
|
|
15
|
+
export declare function fetchModelResources(item: IItem, resourceNamePairs: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
}, requestOptions: IRequestOptions): Promise<Record<string, any>>;
|
|
@@ -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>>;
|