@esri/hub-common 13.0.0-next.2 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/ArcGISContext.js +18 -0
- package/dist/esm/ArcGISContext.js.map +1 -1
- package/dist/esm/content/_fetch.js +7 -1
- package/dist/esm/content/_fetch.js.map +1 -1
- package/dist/esm/content/fetch.js +3 -15
- package/dist/esm/content/fetch.js.map +1 -1
- package/dist/esm/core/schemas/getEntityEditorSchemas.js +9 -0
- package/dist/esm/core/schemas/getEntityEditorSchemas.js.map +1 -1
- package/dist/esm/core/schemas/shared/subschemas.js +17 -0
- package/dist/esm/core/schemas/shared/subschemas.js.map +1 -1
- package/dist/esm/initiatives/HubInitiatives.js +4 -1
- package/dist/esm/initiatives/HubInitiatives.js.map +1 -1
- package/dist/esm/initiatives/_internal/InitiativeSchema.js +19 -1
- package/dist/esm/initiatives/_internal/InitiativeSchema.js.map +1 -1
- package/dist/esm/initiatives/_internal/InitiativeUiSchemaEdit.js +78 -0
- package/dist/esm/initiatives/_internal/InitiativeUiSchemaEdit.js.map +1 -1
- package/dist/esm/initiatives/_internal/applyInitiativeMigrations.js +60 -0
- package/dist/esm/initiatives/_internal/applyInitiativeMigrations.js.map +1 -0
- package/dist/esm/initiatives/_internal/computeProps.js.map +1 -1
- package/dist/esm/initiatives/_internal/getPropertyMap.js +4 -0
- package/dist/esm/initiatives/_internal/getPropertyMap.js.map +1 -1
- package/dist/esm/initiatives/defaults.js +2 -2
- package/dist/esm/items/index.js +1 -0
- package/dist/esm/items/index.js.map +1 -1
- package/dist/esm/items/unshare-item-from-groups.js +11 -2
- package/dist/esm/items/unshare-item-from-groups.js.map +1 -1
- package/dist/esm/metrics/resolveMetric.js +13 -4
- package/dist/esm/metrics/resolveMetric.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectSchema.js +12 -15
- package/dist/esm/projects/_internal/ProjectSchema.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectUiSchemaCreate.js +30 -33
- package/dist/esm/projects/_internal/ProjectUiSchemaCreate.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectUiSchemaEdit.js +50 -5
- package/dist/esm/projects/_internal/ProjectUiSchemaEdit.js.map +1 -1
- package/dist/esm/projects/_internal/setStatusKeyword.js +16 -0
- package/dist/esm/projects/_internal/setStatusKeyword.js.map +1 -0
- package/dist/esm/projects/edit.js +21 -1
- package/dist/esm/projects/edit.js.map +1 -1
- package/dist/esm/projects/fetch.js +6 -1
- package/dist/esm/projects/fetch.js.map +1 -1
- package/dist/esm/search/Catalog.js +47 -2
- package/dist/esm/search/Catalog.js.map +1 -1
- package/dist/esm/search/_internal/commonHelpers/getApi.js +14 -8
- package/dist/esm/search/_internal/commonHelpers/getApi.js.map +1 -1
- package/dist/esm/search/_internal/commonHelpers/getOgcApiDefinition.js +15 -0
- package/dist/esm/search/_internal/commonHelpers/getOgcApiDefinition.js.map +1 -0
- package/dist/esm/search/_internal/commonHelpers/isLegacySearchCategory.js +18 -0
- package/dist/esm/search/_internal/commonHelpers/isLegacySearchCategory.js.map +1 -0
- package/dist/esm/search/_internal/commonHelpers/toCollectionKey.js +13 -0
- package/dist/esm/search/_internal/commonHelpers/toCollectionKey.js.map +1 -0
- package/dist/esm/search/_internal/expandPredicate.js +2 -1
- package/dist/esm/search/_internal/expandPredicate.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItems.js +3 -6
- package/dist/esm/search/_internal/hubSearchItems.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.js +2 -2
- package/dist/esm/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getBboxQueryParam.js +15 -0
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getBboxQueryParam.js.map +1 -0
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getFilterQueryParam.js +20 -8
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getFilterQueryParam.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getNextOgcCallback.js +2 -2
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getNextOgcCallback.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js +4 -3
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getOgcItemQueryParams.js +22 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getOgcItemQueryParams.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getQueryString.js +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getQueryString.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getSortByQueryParam.js +20 -0
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getSortByQueryParam.js.map +1 -0
- package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcApiRequest.js +32 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/ogcApiRequest.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.js +2 -2
- package/dist/esm/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/searchOgcItems.js +3 -3
- package/dist/esm/search/_internal/hubSearchItemsHelpers/searchOgcItems.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchGroups.js +1 -1
- package/dist/esm/search/_internal/portalSearchGroups.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchItems.js +1 -1
- package/dist/esm/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/esm/search/_internal/portalSearchUsers.js +1 -1
- package/dist/esm/search/_internal/portalSearchUsers.js.map +1 -1
- package/dist/esm/search/hubSearch.js +12 -4
- package/dist/esm/search/hubSearch.js.map +1 -1
- package/dist/esm/search/serializeQueryForPortal.js +2 -1
- package/dist/esm/search/serializeQueryForPortal.js.map +1 -1
- package/dist/esm/search/utils.js +173 -0
- package/dist/esm/search/utils.js.map +1 -1
- package/dist/esm/sites/HubSite.js +2 -2
- package/dist/esm/sites/HubSite.js.map +1 -1
- package/dist/esm/sites/HubSites.js +33 -19
- package/dist/esm/sites/HubSites.js.map +1 -1
- package/dist/esm/sites/_internal/SiteSchema.js +31 -0
- package/dist/esm/sites/_internal/SiteSchema.js.map +1 -0
- package/dist/esm/sites/_internal/SiteUiSchemaCreate.js +125 -0
- package/dist/esm/sites/_internal/SiteUiSchemaCreate.js.map +1 -0
- package/dist/esm/sites/_internal/SiteUiSchemaEdit.js +100 -0
- package/dist/esm/sites/_internal/SiteUiSchemaEdit.js.map +1 -0
- package/dist/esm/sites/_internal/catalogMigration.js +50 -0
- package/dist/esm/sites/_internal/catalogMigration.js.map +1 -0
- package/dist/esm/sites/_internal/computeProps.js +3 -0
- package/dist/esm/sites/_internal/computeProps.js.map +1 -1
- package/dist/esm/sites/_internal/getPropertyMap.js +11 -2
- package/dist/esm/sites/_internal/getPropertyMap.js.map +1 -1
- package/dist/esm/sites/index.js.map +1 -1
- package/dist/esm/sites/registerSiteAsApplication.js +2 -0
- package/dist/esm/sites/registerSiteAsApplication.js.map +1 -1
- package/dist/esm/versioning/createVersion.js +1 -1
- package/dist/esm/versioning/createVersion.js.map +1 -1
- package/dist/esm/versioning/updateVersion.js +1 -1
- package/dist/esm/versioning/updateVersion.js.map +1 -1
- package/dist/esm/versioning/updateVersionMetadata.js +14 -6
- package/dist/esm/versioning/updateVersionMetadata.js.map +1 -1
- package/dist/node/ArcGISContext.js +18 -0
- package/dist/node/ArcGISContext.js.map +1 -1
- package/dist/node/content/_fetch.js +7 -1
- package/dist/node/content/_fetch.js.map +1 -1
- package/dist/node/content/fetch.js +2 -14
- package/dist/node/content/fetch.js.map +1 -1
- package/dist/node/core/schemas/getEntityEditorSchemas.js +9 -0
- package/dist/node/core/schemas/getEntityEditorSchemas.js.map +1 -1
- package/dist/node/core/schemas/shared/subschemas.js +18 -1
- package/dist/node/core/schemas/shared/subschemas.js.map +1 -1
- package/dist/node/initiatives/HubInitiatives.js +4 -1
- package/dist/node/initiatives/HubInitiatives.js.map +1 -1
- package/dist/node/initiatives/_internal/InitiativeSchema.js +18 -0
- package/dist/node/initiatives/_internal/InitiativeSchema.js.map +1 -1
- package/dist/node/initiatives/_internal/InitiativeUiSchemaEdit.js +78 -0
- package/dist/node/initiatives/_internal/InitiativeUiSchemaEdit.js.map +1 -1
- package/dist/node/initiatives/_internal/applyInitiativeMigrations.js +64 -0
- package/dist/node/initiatives/_internal/applyInitiativeMigrations.js.map +1 -0
- package/dist/node/initiatives/_internal/computeProps.js.map +1 -1
- package/dist/node/initiatives/_internal/getPropertyMap.js +4 -0
- package/dist/node/initiatives/_internal/getPropertyMap.js.map +1 -1
- package/dist/node/initiatives/defaults.js +2 -2
- package/dist/node/items/index.js +1 -0
- package/dist/node/items/index.js.map +1 -1
- package/dist/node/items/unshare-item-from-groups.js +11 -2
- package/dist/node/items/unshare-item-from-groups.js.map +1 -1
- package/dist/node/metrics/resolveMetric.js +13 -4
- package/dist/node/metrics/resolveMetric.js.map +1 -1
- package/dist/node/projects/_internal/ProjectSchema.js +11 -14
- package/dist/node/projects/_internal/ProjectSchema.js.map +1 -1
- package/dist/node/projects/_internal/ProjectUiSchemaCreate.js +30 -33
- package/dist/node/projects/_internal/ProjectUiSchemaCreate.js.map +1 -1
- package/dist/node/projects/_internal/ProjectUiSchemaEdit.js +50 -5
- package/dist/node/projects/_internal/ProjectUiSchemaEdit.js.map +1 -1
- package/dist/node/projects/_internal/setStatusKeyword.js +20 -0
- package/dist/node/projects/_internal/setStatusKeyword.js.map +1 -0
- package/dist/node/projects/edit.js +23 -2
- package/dist/node/projects/edit.js.map +1 -1
- package/dist/node/projects/fetch.js +6 -1
- package/dist/node/projects/fetch.js.map +1 -1
- package/dist/node/search/Catalog.js +47 -2
- package/dist/node/search/Catalog.js.map +1 -1
- package/dist/node/search/_internal/commonHelpers/getApi.js +14 -8
- package/dist/node/search/_internal/commonHelpers/getApi.js.map +1 -1
- package/dist/node/search/_internal/commonHelpers/getOgcApiDefinition.js +19 -0
- package/dist/node/search/_internal/commonHelpers/getOgcApiDefinition.js.map +1 -0
- package/dist/node/search/_internal/commonHelpers/isLegacySearchCategory.js +22 -0
- package/dist/node/search/_internal/commonHelpers/isLegacySearchCategory.js.map +1 -0
- package/dist/node/search/_internal/commonHelpers/toCollectionKey.js +17 -0
- package/dist/node/search/_internal/commonHelpers/toCollectionKey.js.map +1 -0
- package/dist/node/search/_internal/expandPredicate.js +2 -1
- package/dist/node/search/_internal/expandPredicate.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItems.js +3 -6
- package/dist/node/search/_internal/hubSearchItems.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.js +2 -2
- package/dist/node/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getBboxQueryParam.js +19 -0
- package/dist/node/search/_internal/hubSearchItemsHelpers/getBboxQueryParam.js.map +1 -0
- package/dist/node/search/_internal/hubSearchItemsHelpers/getFilterQueryParam.js +20 -8
- package/dist/node/search/_internal/hubSearchItemsHelpers/getFilterQueryParam.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getNextOgcCallback.js +2 -2
- package/dist/node/search/_internal/hubSearchItemsHelpers/getNextOgcCallback.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js +4 -3
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcItemQueryParams.js +22 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcItemQueryParams.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getQueryString.js +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getQueryString.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getSortByQueryParam.js +24 -0
- package/dist/node/search/_internal/hubSearchItemsHelpers/getSortByQueryParam.js.map +1 -0
- package/dist/node/search/_internal/hubSearchItemsHelpers/ogcApiRequest.js +32 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/ogcApiRequest.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.js +2 -2
- package/dist/node/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/searchOgcItems.js +3 -3
- package/dist/node/search/_internal/hubSearchItemsHelpers/searchOgcItems.js.map +1 -1
- package/dist/node/search/_internal/portalSearchGroups.js +1 -1
- package/dist/node/search/_internal/portalSearchGroups.js.map +1 -1
- package/dist/node/search/_internal/portalSearchItems.js +1 -1
- package/dist/node/search/_internal/portalSearchItems.js.map +1 -1
- package/dist/node/search/_internal/portalSearchUsers.js +1 -1
- package/dist/node/search/_internal/portalSearchUsers.js.map +1 -1
- package/dist/node/search/hubSearch.js +12 -4
- package/dist/node/search/hubSearch.js.map +1 -1
- package/dist/node/search/serializeQueryForPortal.js +2 -1
- package/dist/node/search/serializeQueryForPortal.js.map +1 -1
- package/dist/node/search/utils.js +180 -1
- package/dist/node/search/utils.js.map +1 -1
- package/dist/node/sites/HubSite.js +2 -2
- package/dist/node/sites/HubSite.js.map +1 -1
- package/dist/node/sites/HubSites.js +35 -20
- package/dist/node/sites/HubSites.js.map +1 -1
- package/dist/node/sites/_internal/SiteSchema.js +34 -0
- package/dist/node/sites/_internal/SiteSchema.js.map +1 -0
- package/dist/node/sites/_internal/SiteUiSchemaCreate.js +128 -0
- package/dist/node/sites/_internal/SiteUiSchemaCreate.js.map +1 -0
- package/dist/node/sites/_internal/SiteUiSchemaEdit.js +103 -0
- package/dist/node/sites/_internal/SiteUiSchemaEdit.js.map +1 -0
- package/dist/node/sites/_internal/catalogMigration.js +54 -0
- package/dist/node/sites/_internal/catalogMigration.js.map +1 -0
- package/dist/node/sites/_internal/computeProps.js +3 -0
- package/dist/node/sites/_internal/computeProps.js.map +1 -1
- package/dist/node/sites/_internal/getPropertyMap.js +11 -2
- package/dist/node/sites/_internal/getPropertyMap.js.map +1 -1
- package/dist/node/sites/index.js.map +1 -1
- package/dist/node/sites/registerSiteAsApplication.js +2 -0
- package/dist/node/sites/registerSiteAsApplication.js.map +1 -1
- package/dist/node/versioning/createVersion.js +1 -1
- package/dist/node/versioning/createVersion.js.map +1 -1
- package/dist/node/versioning/updateVersion.js +1 -1
- package/dist/node/versioning/updateVersion.js.map +1 -1
- package/dist/node/versioning/updateVersionMetadata.js +14 -6
- package/dist/node/versioning/updateVersionMetadata.js.map +1 -1
- package/dist/types/ArcGISContext.d.ts +11 -0
- package/dist/types/core/behaviors/IWithEditorBehavior.d.ts +6 -0
- package/dist/types/core/behaviors/IWithMetricsBehavior.d.ts +2 -2
- package/dist/types/core/schemas/getEntityEditorSchemas.d.ts +1 -1
- package/dist/types/core/schemas/shared/subschemas.d.ts +17 -0
- package/dist/types/core/traits/IWithViewSettings.d.ts +4 -0
- package/dist/types/core/types/HubEntityType.d.ts +1 -1
- package/dist/types/core/types/IHubItemEntity.d.ts +3 -0
- package/dist/types/core/types/IHubLocation.d.ts +5 -0
- package/dist/types/core/types/IHubSite.d.ts +3 -2
- package/dist/types/core/types/Metrics.d.ts +7 -0
- package/dist/types/initiatives/HubInitiative.d.ts +2 -2
- package/dist/types/initiatives/_internal/applyInitiativeMigrations.d.ts +9 -0
- package/dist/types/items/index.d.ts +1 -0
- package/dist/types/metrics/resolveMetric.d.ts +2 -2
- package/dist/types/projects/HubProject.d.ts +2 -2
- package/dist/types/projects/_internal/setStatusKeyword.d.ts +8 -0
- package/dist/types/projects/edit.d.ts +13 -0
- package/dist/types/search/Catalog.d.ts +24 -2
- package/dist/types/search/_internal/commonHelpers/getApi.d.ts +2 -1
- package/dist/types/search/_internal/commonHelpers/getOgcApiDefinition.d.ts +10 -0
- package/dist/types/search/_internal/commonHelpers/isLegacySearchCategory.d.ts +9 -0
- package/dist/types/search/_internal/commonHelpers/toCollectionKey.d.ts +10 -0
- package/dist/types/search/_internal/hubSearchItems.d.ts +2 -2
- package/dist/types/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.d.ts +1 -2
- package/dist/types/search/_internal/hubSearchItemsHelpers/getBboxQueryParam.d.ts +11 -0
- package/dist/types/search/_internal/hubSearchItemsHelpers/getNextOgcCallback.d.ts +1 -2
- package/dist/types/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.d.ts +3 -3
- package/dist/types/search/_internal/hubSearchItemsHelpers/getOgcItemQueryParams.d.ts +19 -7
- package/dist/types/search/_internal/hubSearchItemsHelpers/getSortByQueryParam.d.ts +10 -0
- package/dist/types/search/_internal/hubSearchItemsHelpers/ogcApiRequest.d.ts +24 -0
- package/dist/types/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.d.ts +1 -2
- package/dist/types/search/_internal/hubSearchItemsHelpers/searchOgcItems.d.ts +1 -2
- package/dist/types/search/types/IHubSearchOptions.d.ts +12 -4
- package/dist/types/search/utils.d.ts +61 -2
- package/dist/types/sites/HubSites.d.ts +9 -0
- package/dist/types/sites/_internal/SiteSchema.d.ts +7 -0
- package/dist/types/sites/_internal/SiteUiSchemaCreate.d.ts +7 -0
- package/dist/types/sites/_internal/SiteUiSchemaEdit.d.ts +7 -0
- package/dist/types/sites/_internal/catalogMigration.d.ts +9 -0
- package/dist/types/sites/registerSiteAsApplication.d.ts +2 -0
- package/dist/types/versioning/updateVersionMetadata.d.ts +3 -2
- package/package.json +1 -1
- package/dist/esm/search/_internal/utils.js +0 -95
- package/dist/esm/search/_internal/utils.js.map +0 -1
- package/dist/node/search/_internal/utils.js +0 -101
- package/dist/node/search/_internal/utils.js.map +0 -1
- package/dist/types/search/_internal/utils.d.ts +0 -28
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateVersion.js","sourceRoot":"","sources":["../../../src/versioning/updateVersion.ts"],"names":[],"mappings":";;;AACA,kDAA8C;AAC9C,4DAAwD;AACxD,0EAAoE;AAGpE,qDAAkD;AAClD,+DAA4D;AAC5D,qDAG+B;AAC/B,uFAAoF;AACpF,iEAA8D;AAC9D,mCAA+C;AAE/C;;;;GAIG;AACH,MAAM,iBAAkB,SAAQ,KAAK;IACnC,YAAY,EAAU,EAAS,OAAe;QAC5C,KAAK,CAAC,WAAW,EAAE,oCAAoC,CAAC,CAAC;QAD5B,YAAO,GAAP,OAAO,CAAQ;QAE5C,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,aAAa,CACjC,KAAa,EACb,OAAiB,EACjB,cAAsC,EACtC,KAAe;IAEf,kFAAkF;IAClF,wFAAwF;IAExF,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,eAAe,GAAG,MAAM,4BAAoB,CAChD,KAAK,CAAC,IAAI,CAAC,EAAE,EACb,OAAO,EACP,cAAc,CACf,CAAC;QACF,IAAI,eAAe,CAAC,OAAO,EAAE;YAC3B,MAAM,IAAI,iBAAiB,CAAC,OAAO,CAAC,EAAE,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;SAClE;KACF;IAED,MAAM,WAAW,GAAG,uDAA0B,CAAC,KAAK,CAAC,CAAC;IACtD,OAAO,CAAC,IAAI,GAAG,+BAAc,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAElD,MAAM,MAAM,GAAG,qBAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACrC,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,MAAM,WAAW,GAAG,sCAAgB,CAAC,OAAO,CAAC,CAAC;IAE9C,MAAM,UAAU,GAAG,4BAAY,CAAC,OAAO,EAAE,EAAE,EAAE,uCAA2B,CAAC,CAAC;IAE1E,MAAM,uCAAkB,iCACnB,cAAc,KACjB,EAAE,EAAE,kBAAO,CAAC,KAAK,EAAE,SAAS,CAAC,EAC7B,IAAI,EAAE,iCAAqB,EAC3B,KAAK,EAAE,kBAAO,CAAC,KAAK,EAAE,YAAY,CAAC,EACnC,MAAM,EAAE,EAAE,UAAU,EAAE,EACtB,MAAM,EACN,
|
|
1
|
+
{"version":3,"file":"updateVersion.js","sourceRoot":"","sources":["../../../src/versioning/updateVersion.ts"],"names":[],"mappings":";;;AACA,kDAA8C;AAC9C,4DAAwD;AACxD,0EAAoE;AAGpE,qDAAkD;AAClD,+DAA4D;AAC5D,qDAG+B;AAC/B,uFAAoF;AACpF,iEAA8D;AAC9D,mCAA+C;AAE/C;;;;GAIG;AACH,MAAM,iBAAkB,SAAQ,KAAK;IACnC,YAAY,EAAU,EAAS,OAAe;QAC5C,KAAK,CAAC,WAAW,EAAE,oCAAoC,CAAC,CAAC;QAD5B,YAAO,GAAP,OAAO,CAAQ;QAE5C,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,aAAa,CACjC,KAAa,EACb,OAAiB,EACjB,cAAsC,EACtC,KAAe;IAEf,kFAAkF;IAClF,wFAAwF;IAExF,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,eAAe,GAAG,MAAM,4BAAoB,CAChD,KAAK,CAAC,IAAI,CAAC,EAAE,EACb,OAAO,EACP,cAAc,CACf,CAAC;QACF,IAAI,eAAe,CAAC,OAAO,EAAE;YAC3B,MAAM,IAAI,iBAAiB,CAAC,OAAO,CAAC,EAAE,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;SAClE;KACF;IAED,MAAM,WAAW,GAAG,uDAA0B,CAAC,KAAK,CAAC,CAAC;IACtD,OAAO,CAAC,IAAI,GAAG,+BAAc,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAElD,MAAM,MAAM,GAAG,qBAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACrC,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC7B,MAAM,WAAW,GAAG,sCAAgB,CAAC,OAAO,CAAC,CAAC;IAE9C,MAAM,UAAU,GAAG,4BAAY,CAAC,OAAO,EAAE,EAAE,EAAE,uCAA2B,CAAC,CAAC;IAE1E,MAAM,uCAAkB,iCACnB,cAAc,KACjB,EAAE,EAAE,kBAAO,CAAC,KAAK,EAAE,SAAS,CAAC,EAC7B,IAAI,EAAE,iCAAqB,EAC3B,KAAK,EAAE,kBAAO,CAAC,KAAK,EAAE,YAAY,CAAC,EACnC,MAAM,EAAE,EAAE,UAAU,EAAE,EACtB,MAAM,EACN,QAAQ,EAAE,WAAW,IACrB,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC;AAxCD,sCAwCC"}
|
|
@@ -2,21 +2,29 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateVersionMetadata = void 0;
|
|
4
4
|
const merge_objects_1 = require("../objects/merge-objects");
|
|
5
|
+
const object_to_json_blob_1 = require("../resources/object-to-json-blob");
|
|
5
6
|
const getPrefix_1 = require("./_internal/getPrefix");
|
|
6
7
|
const constants_1 = require("./_internal/constants");
|
|
8
|
+
const getVersion_1 = require("./getVersion");
|
|
7
9
|
const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
|
|
8
10
|
/**
|
|
9
11
|
* Updates the specified version's metadata
|
|
10
12
|
* @param id
|
|
11
|
-
* @param
|
|
13
|
+
* @param versionMetadata
|
|
14
|
+
* @param owner
|
|
12
15
|
* @param requestOptions
|
|
13
16
|
* @returns
|
|
14
17
|
*/
|
|
15
|
-
async function updateVersionMetadata(id,
|
|
16
|
-
const prefix = getPrefix_1.getPrefix(
|
|
17
|
-
const properties = merge_objects_1.mergeObjects(
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
async function updateVersionMetadata(id, versionMetadata, owner, requestOptions) {
|
|
19
|
+
const prefix = getPrefix_1.getPrefix(versionMetadata.id);
|
|
20
|
+
const properties = merge_objects_1.mergeObjects(versionMetadata, {}, constants_1.VERSION_RESOURCE_PROPERTIES);
|
|
21
|
+
// fetch the whole version so we can update it
|
|
22
|
+
const version = await getVersion_1.getVersion(id, versionMetadata.id, requestOptions);
|
|
23
|
+
// apply the metadata to the version
|
|
24
|
+
merge_objects_1.mergeObjects(versionMetadata, version, constants_1.VERSION_RESOURCE_PROPERTIES);
|
|
25
|
+
const versionBlob = object_to_json_blob_1.objectToJsonBlob(version);
|
|
26
|
+
await arcgis_rest_portal_1.updateItemResource(Object.assign(Object.assign({}, requestOptions), { id, name: constants_1.VERSION_RESOURCE_NAME, owner, params: { properties }, prefix, resource: versionBlob }));
|
|
27
|
+
return versionMetadata;
|
|
20
28
|
}
|
|
21
29
|
exports.updateVersionMetadata = updateVersionMetadata;
|
|
22
30
|
//# sourceMappingURL=updateVersionMetadata.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateVersionMetadata.js","sourceRoot":"","sources":["../../../src/versioning/updateVersionMetadata.ts"],"names":[],"mappings":";;;AACA,4DAAwD;
|
|
1
|
+
{"version":3,"file":"updateVersionMetadata.js","sourceRoot":"","sources":["../../../src/versioning/updateVersionMetadata.ts"],"names":[],"mappings":";;;AACA,4DAAwD;AACxD,0EAAoE;AAEpE,qDAAkD;AAClD,qDAG+B;AAC/B,6CAA0C;AAC1C,iEAA8D;AAE9D;;;;;;;GAOG;AACI,KAAK,UAAU,qBAAqB,CACzC,EAAU,EACV,eAAiC,EACjC,KAAa,EACb,cAAsC;IAEtC,MAAM,MAAM,GAAG,qBAAS,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;IAC7C,MAAM,UAAU,GAAG,4BAAY,CAC7B,eAAe,EACf,EAAE,EACF,uCAA2B,CAC5B,CAAC;IAEF,8CAA8C;IAC9C,MAAM,OAAO,GAAG,MAAM,uBAAU,CAAC,EAAE,EAAE,eAAe,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC;IACzE,oCAAoC;IACpC,4BAAY,CAAC,eAAe,EAAE,OAAO,EAAE,uCAA2B,CAAC,CAAC;IACpE,MAAM,WAAW,GAAG,sCAAgB,CAAC,OAAO,CAAC,CAAC;IAE9C,MAAM,uCAAkB,iCACnB,cAAc,KACjB,EAAE,EACF,IAAI,EAAE,iCAAqB,EAC3B,KAAK,EACL,MAAM,EAAE,EAAE,UAAU,EAAE,EACtB,MAAM,EACN,QAAQ,EAAE,WAAW,IACrB,CAAC;IAEH,OAAO,eAAe,CAAC;AACzB,CAAC;AA9BD,sDA8BC"}
|
|
@@ -72,6 +72,11 @@ export interface IArcGISContext {
|
|
|
72
72
|
* For ArcGIS Enterprise this will return `undefined`
|
|
73
73
|
*/
|
|
74
74
|
hubUrl: string;
|
|
75
|
+
/**
|
|
76
|
+
* Returns the current user's hub-home url. If not authenticated,
|
|
77
|
+
* returns the Hub Url. If portal, returns undefined
|
|
78
|
+
*/
|
|
79
|
+
hubHomeUrl: string;
|
|
75
80
|
/**
|
|
76
81
|
* Returns boolean indicating if the backing system
|
|
77
82
|
* is ArcGIS Enterprise (formerly ArcGIS Portal) or not
|
|
@@ -215,6 +220,7 @@ export declare class ArcGISContext implements IArcGISContext {
|
|
|
215
220
|
private _authentication;
|
|
216
221
|
private _portalUrl;
|
|
217
222
|
private _hubUrl;
|
|
223
|
+
private _hubHomeUrl;
|
|
218
224
|
private _portalSelf;
|
|
219
225
|
private _currentUser;
|
|
220
226
|
private _properties;
|
|
@@ -268,6 +274,11 @@ export declare class ArcGISContext implements IArcGISContext {
|
|
|
268
274
|
* https://{portalHostname}/{webadaptor}
|
|
269
275
|
*/
|
|
270
276
|
get portalUrl(): string;
|
|
277
|
+
/**
|
|
278
|
+
* Returns the current user's hub-home url. If not authenticated,
|
|
279
|
+
* returns the Hub Url. If portal, returns undefined
|
|
280
|
+
*/
|
|
281
|
+
get hubHomeUrl(): string;
|
|
271
282
|
/**
|
|
272
283
|
* Returns the current user's Hub License
|
|
273
284
|
*/
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { IConfigurationSchema, IUiSchema, UiSchemaElementOptions, EditorType } from "../schemas";
|
|
2
|
+
/**
|
|
3
|
+
* DEPRECATED: the following will be removed at next breaking version
|
|
4
|
+
* we will be shifting towards the EditorType defined in the schemas
|
|
5
|
+
* directory
|
|
6
|
+
*/
|
|
7
|
+
export declare type EditorConfigType = "create" | "edit";
|
|
2
8
|
export interface IEditorConfig {
|
|
3
9
|
schema: IConfigurationSchema;
|
|
4
10
|
uiSchema: IUiSchema;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IResolvedMetric } from "../types/Metrics";
|
|
2
2
|
/**
|
|
3
3
|
* Adds metrics functions to an entity
|
|
4
4
|
*/
|
|
@@ -6,5 +6,5 @@ export interface IWithMetricsBehavior {
|
|
|
6
6
|
/**
|
|
7
7
|
* Resolve a single metric
|
|
8
8
|
*/
|
|
9
|
-
resolveMetric(metricId: string): Promise<
|
|
9
|
+
resolveMetric(metricId: string): Promise<IResolvedMetric>;
|
|
10
10
|
}
|
|
@@ -5,7 +5,7 @@ import { UiSchemaElementOptions } from "./types";
|
|
|
5
5
|
* to the supported/defined uiSchema configurations
|
|
6
6
|
*/
|
|
7
7
|
export declare type EditorType = (typeof validEditorTypes)[number];
|
|
8
|
-
export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:initiative:edit"];
|
|
8
|
+
export declare const validEditorTypes: readonly ["hub:project:create", "hub:project:edit", "hub:initiative:edit", "hub:site:edit"];
|
|
9
9
|
/**
|
|
10
10
|
* get the editor schema and uiSchema defined for an entity.
|
|
11
11
|
* The schema and uiSchema that are returned can be used to
|
|
@@ -7,6 +7,23 @@ export declare const ENTITY_NAME_SCHEMA: {
|
|
|
7
7
|
minLength: number;
|
|
8
8
|
maxLength: number;
|
|
9
9
|
};
|
|
10
|
+
export declare const ENTITY_ACCESS_SCHEMA: {
|
|
11
|
+
type: string;
|
|
12
|
+
enum: string[];
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const ENTITY_TAGS_SCHEMA: {
|
|
16
|
+
type: string;
|
|
17
|
+
items: {
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare const ENTITY_CATEGORIES_SCHEMA: {
|
|
22
|
+
type: string;
|
|
23
|
+
items: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
10
27
|
export declare const ENTITY_EXTENT_SCHEMA: {
|
|
11
28
|
type: string;
|
|
12
29
|
properties: {
|
|
@@ -16,6 +16,10 @@ export interface IWithViewSettings {
|
|
|
16
16
|
* entity's featured image url
|
|
17
17
|
*/
|
|
18
18
|
featuredImageUrl?: string;
|
|
19
|
+
/**
|
|
20
|
+
* alt text of an entity's featured image
|
|
21
|
+
*/
|
|
22
|
+
featuredImageAltText?: string;
|
|
19
23
|
/**
|
|
20
24
|
* whether the entity should render it's location on a map
|
|
21
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare type HubEntityType = "site" | "project" | "initiative" | "page" | "discussion" | "content";
|
|
1
|
+
export declare type HubEntityType = "site" | "project" | "initiative" | "page" | "discussion" | "content" | "org";
|
|
@@ -9,4 +9,9 @@ export interface IHubLocation {
|
|
|
9
9
|
spatialReference?: ISpatialReference;
|
|
10
10
|
extent?: number[][];
|
|
11
11
|
geometries?: __esri.Geometry[];
|
|
12
|
+
provenance?: "none" | "custom" | "existing";
|
|
13
|
+
center?: number[];
|
|
14
|
+
orgSpatialReference?: ISpatialReference;
|
|
15
|
+
graphic?: any;
|
|
16
|
+
geoJson?: any;
|
|
12
17
|
}
|
|
@@ -62,7 +62,8 @@ export interface IHubSite extends IHubItemEntity, IWithSlug, IWithCatalog, IWith
|
|
|
62
62
|
*/
|
|
63
63
|
headerSass: string;
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* Legacy capabilities
|
|
66
|
+
* @internal
|
|
66
67
|
*/
|
|
67
|
-
|
|
68
|
+
legacyCapabilities: string[];
|
|
68
69
|
}
|
|
@@ -157,3 +157,10 @@ export interface IMetricFeature {
|
|
|
157
157
|
attributes: IMetricAttributes;
|
|
158
158
|
geometry?: __esri.Geometry;
|
|
159
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* Result of resolving a metric
|
|
162
|
+
*/
|
|
163
|
+
export interface IResolvedMetric {
|
|
164
|
+
features: IMetricFeature[];
|
|
165
|
+
generatedAt: number;
|
|
166
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHubInitiative, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, UiSchemaElementOptions, IEditorConfig,
|
|
1
|
+
import { IHubInitiative, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, UiSchemaElementOptions, IEditorConfig, IResolvedMetric } from "../core";
|
|
2
2
|
import { Catalog } from "../search";
|
|
3
3
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
@@ -76,5 +76,5 @@ export declare class HubInitiative extends HubItemEntity<IHubInitiative> impleme
|
|
|
76
76
|
* @param metricId
|
|
77
77
|
* @returns
|
|
78
78
|
*/
|
|
79
|
-
resolveMetric(metricId: string): Promise<
|
|
79
|
+
resolveMetric(metricId: string): Promise<IResolvedMetric>;
|
|
80
80
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IRequestOptions } from "@esri/arcgis-rest-request";
|
|
2
|
+
import { IModel } from "../../types";
|
|
3
|
+
export declare const INITIATIVE_SCHEMA_VERSION = 2;
|
|
4
|
+
/**
|
|
5
|
+
* Apply all Initiative model migrations
|
|
6
|
+
* @param model
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function applyInitiativeMigrations(model: IModel, requestOptions: IRequestOptions): Promise<IModel>;
|
|
@@ -16,6 +16,7 @@ export * from "./get-structured-license";
|
|
|
16
16
|
export * from "./slugs";
|
|
17
17
|
export * from "./normalize-solution-template-item";
|
|
18
18
|
export * from "./setItemThumbnail";
|
|
19
|
+
export * from "./registerBrowserApp";
|
|
19
20
|
export * from "./create-item-from-file";
|
|
20
21
|
export * from "./create-item-from-url";
|
|
21
22
|
export * from "./create-item-from-url-or-file";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IArcGISContext } from "../ArcGISContext";
|
|
2
|
-
import { IMetric,
|
|
2
|
+
import { IMetric, IResolvedMetric } from "../core/types/Metrics";
|
|
3
3
|
/**
|
|
4
4
|
* Resolve a Metric into an array of `IMetricFeature` objects.
|
|
5
5
|
* This implementation is similar to DynamicValues, but is just different
|
|
@@ -8,4 +8,4 @@ import { IMetric, IMetricFeature } from "../core/types/Metrics";
|
|
|
8
8
|
* @param context
|
|
9
9
|
* @returns
|
|
10
10
|
*/
|
|
11
|
-
export declare function resolveMetric(metric: IMetric, context: IArcGISContext): Promise<
|
|
11
|
+
export declare function resolveMetric(metric: IMetric, context: IArcGISContext): Promise<IResolvedMetric>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHubProject, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, UiSchemaElementOptions,
|
|
1
|
+
import { IHubProject, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, UiSchemaElementOptions, IResolvedMetric } from "../core";
|
|
2
2
|
import { Catalog } from "../search";
|
|
3
3
|
import { IArcGISContext } from "../ArcGISContext";
|
|
4
4
|
import { HubItemEntity } from "../core/HubItemEntity";
|
|
@@ -76,5 +76,5 @@ export declare class HubProject extends HubItemEntity<IHubProject> implements IW
|
|
|
76
76
|
* @param metricId
|
|
77
77
|
* @returns
|
|
78
78
|
*/
|
|
79
|
-
resolveMetric(metricId: string): Promise<
|
|
79
|
+
resolveMetric(metricId: string): Promise<IResolvedMetric>;
|
|
80
80
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PROJECT_STATUSES } from "../../core";
|
|
2
|
+
/**
|
|
3
|
+
* adds/updates the project status typekeyword and returns
|
|
4
|
+
* a new array of typekeywords
|
|
5
|
+
* @param typeKeywords project's current typekeywords
|
|
6
|
+
* @param status project status
|
|
7
|
+
*/
|
|
8
|
+
export declare function setStatusKeyword(typeKeywords: string[], status: PROJECT_STATUSES): string[];
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IUserRequestOptions } from "@esri/arcgis-rest-auth";
|
|
2
2
|
import { IHubProject } from "../core/types";
|
|
3
|
+
import { UiSchemaElementOptions } from "../core/schemas";
|
|
4
|
+
import { EditorConfigType, IEditorConfig } from "../core/behaviors/IWithEditorBehavior";
|
|
3
5
|
/**
|
|
4
6
|
* @private
|
|
5
7
|
* Create a new Hub Project item
|
|
@@ -24,3 +26,14 @@ export declare function updateProject(project: IHubProject, requestOptions: IUse
|
|
|
24
26
|
* @param requestOptions
|
|
25
27
|
*/
|
|
26
28
|
export declare function deleteProject(id: string, requestOptions: IUserRequestOptions): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* DEPRECATED: the following will be removed at next breaking version
|
|
31
|
+
* use the getEntityEditorSchemas function instead (which this function
|
|
32
|
+
* has already been refactored to consume)
|
|
33
|
+
*
|
|
34
|
+
* Get the editor config for for the HubProject entity.
|
|
35
|
+
* @param i18nScope translation scope to be interpolated into the uiSchema
|
|
36
|
+
* @param type editor type - corresonds to the returned uiSchema
|
|
37
|
+
* @param options optional hash of dynamic uiSchema element options
|
|
38
|
+
*/
|
|
39
|
+
export declare function getHubProjectEditorConfig(i18nScope: string, type: EditorConfigType, options?: UiSchemaElementOptions[]): Promise<IEditorConfig>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IArcGISContext } from "../ArcGISContext";
|
|
2
2
|
import { Collection } from "./Collection";
|
|
3
|
-
import { EntityType, ISearchResponseHash, IContainsOptions, IContainsResponse, IHubSearchOptions, IHubSearchResponse, IHubSearchResult, ICatalogScope, IHubCatalog, IQuery } from "./types";
|
|
3
|
+
import { EntityType, ISearchResponseHash, IContainsOptions, IContainsResponse, IHubSearchOptions, IHubSearchResponse, IHubSearchResult, ICatalogScope, IHubCatalog, IQuery, IFilter, IHubCollection } from "./types";
|
|
4
4
|
/**
|
|
5
5
|
* Catalog Class
|
|
6
6
|
*
|
|
@@ -72,7 +72,7 @@ export declare class Catalog implements IHubCatalog {
|
|
|
72
72
|
/**
|
|
73
73
|
* Get the collections array. Returns simple objects not Collection instances
|
|
74
74
|
*/
|
|
75
|
-
get collections():
|
|
75
|
+
get collections(): IHubCollection[];
|
|
76
76
|
/**
|
|
77
77
|
* Get the names of the collections
|
|
78
78
|
*/
|
|
@@ -83,6 +83,28 @@ export declare class Catalog implements IHubCatalog {
|
|
|
83
83
|
* @returns
|
|
84
84
|
*/
|
|
85
85
|
getCollection(name: string): Collection;
|
|
86
|
+
/**
|
|
87
|
+
* Get the Collection json by name
|
|
88
|
+
* @param name
|
|
89
|
+
* @returns
|
|
90
|
+
*/
|
|
91
|
+
getCollectionJson(name: string): IHubCollection;
|
|
92
|
+
/**
|
|
93
|
+
* Get a Collection instance, based on a specific entity type and filters
|
|
94
|
+
* This extends from the base scope for the entity type
|
|
95
|
+
* @param type
|
|
96
|
+
* @param filters
|
|
97
|
+
* @returns
|
|
98
|
+
*/
|
|
99
|
+
getCustomCollection(type: EntityType, filters: IFilter[]): Collection;
|
|
100
|
+
/**
|
|
101
|
+
* Create a custom collection based on a specific entity type and filters
|
|
102
|
+
* Returned collection extends from the base scope for the entity type
|
|
103
|
+
* @param type
|
|
104
|
+
* @param filters
|
|
105
|
+
* @returns
|
|
106
|
+
*/
|
|
107
|
+
getCustomCollectionJson(type: EntityType, filters: IFilter[]): IHubCollection;
|
|
86
108
|
/**
|
|
87
109
|
* Search for Items
|
|
88
110
|
* Will throw if the Catalog does not have a scope defined for items
|
|
@@ -5,7 +5,8 @@ import { IApiDefinition } from "../../types/types";
|
|
|
5
5
|
* @private
|
|
6
6
|
* Determines Which API should be hit for the given search parameters.
|
|
7
7
|
* Hierarchy:
|
|
8
|
-
* - Target
|
|
8
|
+
* - Target options.api if available
|
|
9
|
+
* - Target the environment-level OGC API if current parameters allow
|
|
9
10
|
* - Target the Portal API based off options.requestOptions.portal
|
|
10
11
|
* @param targetEntity target entity of the query
|
|
11
12
|
* @param options search options
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
2
|
+
import { IApiDefinition } from "../../types/types";
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
* Returns information about the current environment's OGC API
|
|
6
|
+
*
|
|
7
|
+
* @param options IHubRequestOptions to derive OGC API info from
|
|
8
|
+
* @returns an IApiDefinition with needed info to target the OGC API
|
|
9
|
+
*/
|
|
10
|
+
export declare function getOgcApiDefinition(options: IHubSearchOptions): IApiDefinition;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare type LegacySearchCategory = "Site" | "Event" | "Dataset" | "Document" | "App,Map";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Determines whether a string corresponds to a search category (as opposed to a collection)
|
|
5
|
+
*
|
|
6
|
+
* @param value value to verify
|
|
7
|
+
* @returns whether the value represents one of the old search categories
|
|
8
|
+
*/
|
|
9
|
+
export declare function isLegacySearchCategory(value: string): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WellKnownCollection } from "../../wellKnownCatalog";
|
|
2
|
+
import { LegacySearchCategory } from "./isLegacySearchCategory";
|
|
3
|
+
/**
|
|
4
|
+
* @private
|
|
5
|
+
* Converts a search category key to its corresponding wellknown collection key
|
|
6
|
+
*
|
|
7
|
+
* @param legacySearchCategory search category key to transform
|
|
8
|
+
* @returns the wellknown collection key
|
|
9
|
+
*/
|
|
10
|
+
export declare function toCollectionKey(legacySearchCategory: LegacySearchCategory): WellKnownCollection;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IHubSearchOptions, IHubSearchResponse, IHubSearchResult, IQuery } from "../types";
|
|
2
2
|
/**
|
|
3
3
|
* @private
|
|
4
4
|
* Execute item search against the Hub API
|
|
@@ -6,4 +6,4 @@ import { IApiDefinition, IHubSearchOptions, IHubSearchResponse, IHubSearchResult
|
|
|
6
6
|
* @param options
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
|
-
export declare function hubSearchItems(query: IQuery, options: IHubSearchOptions
|
|
9
|
+
export declare function hubSearchItems(query: IQuery, options: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { IApiDefinition } from "../../types";
|
|
2
1
|
import { IQuery } from "../../types/IHubCatalog";
|
|
3
2
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
4
3
|
import { IHubSearchResponse } from "../../types/IHubSearchResponse";
|
|
5
4
|
import { IHubSearchResult } from "../../types/IHubSearchResult";
|
|
6
5
|
import { IOgcItemsResponse } from "./interfaces";
|
|
7
|
-
export declare function formatOgcItemsResponse(response: IOgcItemsResponse, originalQuery: IQuery, originalOptions: IHubSearchOptions
|
|
6
|
+
export declare function formatOgcItemsResponse(response: IOgcItemsResponse, originalQuery: IQuery, originalOptions: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IQuery } from "../../types/IHubCatalog";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Extracts the bbox value that the search should be filtered by.
|
|
5
|
+
* Also validates that the bbox predicate is not combined in some
|
|
6
|
+
* invalid way with other predicates.
|
|
7
|
+
*
|
|
8
|
+
* @param query query to extract the bbox predicate from
|
|
9
|
+
* @returns the bbox value to filter by
|
|
10
|
+
*/
|
|
11
|
+
export declare function getBboxQueryParam(query: IQuery): string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { IApiDefinition } from "../../types";
|
|
2
1
|
import { IQuery } from "../../types/IHubCatalog";
|
|
3
2
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
4
3
|
import { IHubSearchResponse } from "../../types/IHubSearchResponse";
|
|
5
4
|
import { IHubSearchResult } from "../../types/IHubSearchResult";
|
|
6
5
|
import { IOgcItemsResponse } from "./interfaces";
|
|
7
|
-
export declare function getNextOgcCallback(response: IOgcItemsResponse, originalQuery: IQuery, originalOptions: IHubSearchOptions
|
|
6
|
+
export declare function getNextOgcCallback(response: IOgcItemsResponse, originalQuery: IQuery, originalOptions: IHubSearchOptions): (params?: any) => Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IQuery } from "../../types/IHubCatalog";
|
|
2
|
-
import {
|
|
2
|
+
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
3
3
|
/**
|
|
4
4
|
* @private
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@ import { IApiDefinition } from "../../types/types";
|
|
|
8
8
|
* the all collection is targeted.
|
|
9
9
|
*
|
|
10
10
|
* @param query the query the request is based on
|
|
11
|
-
* @param
|
|
11
|
+
* @param options request options, including the base OGC api url
|
|
12
12
|
* @returns the collection url
|
|
13
13
|
*/
|
|
14
|
-
export declare function getOgcCollectionUrl(query: IQuery,
|
|
14
|
+
export declare function getOgcCollectionUrl(query: IQuery, options: IHubSearchOptions): string;
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { IQuery } from "../../types/IHubCatalog";
|
|
2
2
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
3
|
-
export
|
|
4
|
-
filter
|
|
5
|
-
token
|
|
6
|
-
limit
|
|
7
|
-
startindex
|
|
8
|
-
q
|
|
9
|
-
|
|
3
|
+
export interface IOgcItemQueryParams {
|
|
4
|
+
filter?: string;
|
|
5
|
+
token?: string;
|
|
6
|
+
limit?: number;
|
|
7
|
+
startindex?: number;
|
|
8
|
+
q?: string;
|
|
9
|
+
sortBy?: string;
|
|
10
|
+
bbox?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @private
|
|
14
|
+
* Derives a hash of query params that should be included with a request
|
|
15
|
+
* to the /items endpoint of an OGC API collection
|
|
16
|
+
*
|
|
17
|
+
* @param query an IQuery to derive query params from
|
|
18
|
+
* @param options an IHubSearchOptions object to derive query params from
|
|
19
|
+
* @returns a hash of query params to be included in the request
|
|
20
|
+
*/
|
|
21
|
+
export declare function getOgcItemQueryParams(query: IQuery, options: IHubSearchOptions): IOgcItemQueryParams;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
* Serializes the sort options provided from the request options
|
|
5
|
+
* object into a string that the OGC API can understand
|
|
6
|
+
*
|
|
7
|
+
* @param options IHubSearchOptions that contain sorting information
|
|
8
|
+
* @returns a serialized sort string
|
|
9
|
+
*/
|
|
10
|
+
export declare function getSortByQueryParam(options: IHubSearchOptions): string;
|
|
@@ -1,2 +1,26 @@
|
|
|
1
1
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
2
|
+
/**
|
|
3
|
+
* Wrapper over fetch for performing common operations when executing a request to an OGC API, such as:
|
|
4
|
+
* - Creating the query string
|
|
5
|
+
* - URL encoding query string values
|
|
6
|
+
* - Appending the ?target query param if needed
|
|
7
|
+
* - Checking whether the response is ok
|
|
8
|
+
* - Returning the .json() of the response body
|
|
9
|
+
*
|
|
10
|
+
* Note: the ?target query param is only appended if the target site (options.site) is _different_ from the
|
|
11
|
+
* the site that will have its OGC API hit (url). This allows us to use the environment-level OGC API's url while
|
|
12
|
+
* actually targeting a specific Hub Site's catalog. It's a powerful capability that significantly eases local development.
|
|
13
|
+
*
|
|
14
|
+
* Example: https://hubqa.arcgis.com/api/search/v1?target="my-actual-hub.hub.arcgis.com"
|
|
15
|
+
*
|
|
16
|
+
* We omit the ?target query when the site and url are the same because it would be redundant.
|
|
17
|
+
*
|
|
18
|
+
* Bad example: https://hubqa.arcgis.com/api/search/v1?target="hubqa.arcgis.com"
|
|
19
|
+
* Good example: https://hubqa.arcgis.com/api/search/v1
|
|
20
|
+
*
|
|
21
|
+
* @param url the OGC API endpoint that should actually be hit
|
|
22
|
+
* @param queryParams query params that should be serialized with the request (excluding `target`)
|
|
23
|
+
* @param options options to customize the search, such as the site whose catalogs we're targeting
|
|
24
|
+
* @returns the JSON response from the endpoint
|
|
25
|
+
*/
|
|
2
26
|
export declare function ogcApiRequest(url: string, queryParams: Record<string, any>, options: IHubSearchOptions): Promise<any>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IApiDefinition } from "../../types";
|
|
2
1
|
import { IQuery } from "../../types/IHubCatalog";
|
|
3
2
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
4
3
|
import { IHubSearchResponse } from "../../types/IHubSearchResponse";
|
|
5
4
|
import { IHubSearchResult } from "../../types/IHubSearchResult";
|
|
6
|
-
export declare function searchOgcAggregations(query: IQuery, options: IHubSearchOptions
|
|
5
|
+
export declare function searchOgcAggregations(query: IQuery, options: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { IApiDefinition } from "../../types";
|
|
2
1
|
import { IQuery } from "../../types/IHubCatalog";
|
|
3
2
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
4
3
|
import { IHubSearchResponse } from "../../types/IHubSearchResponse";
|
|
5
4
|
import { IHubSearchResult } from "../../types/IHubSearchResult";
|
|
6
|
-
export declare function searchOgcItems(query: IQuery, options: IHubSearchOptions
|
|
5
|
+
export declare function searchOgcItems(query: IQuery, options: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { UserSession } from "@esri/arcgis-rest-auth";
|
|
1
2
|
import { IHubRequestOptions } from "../../types";
|
|
2
3
|
import { EntityType } from "./IHubCatalog";
|
|
4
|
+
import { NamedApis, IApiDefinition } from "./types";
|
|
5
|
+
export declare type Enrichments = "data" | "metadata" | "org" | "service" | "layers";
|
|
3
6
|
/**
|
|
4
7
|
* Search Options
|
|
5
8
|
*/
|
|
@@ -13,11 +16,20 @@ export interface IHubSearchOptions {
|
|
|
13
16
|
* Portal API only supports a single value
|
|
14
17
|
*/
|
|
15
18
|
aggLimit?: number;
|
|
19
|
+
/**
|
|
20
|
+
* TODO: Deprecate in favor of `requestOptions` and `siteUrl`
|
|
21
|
+
* Specify API to call. Defaults to ArcGIS Online Portal API
|
|
22
|
+
*/
|
|
23
|
+
api?: NamedApis | IApiDefinition;
|
|
16
24
|
/**
|
|
17
25
|
* Site whose API should be targeted. Ignored in an enterprise context.
|
|
18
26
|
* e.g., https://my-site.hub.arcgis.com
|
|
19
27
|
*/
|
|
20
28
|
site?: string;
|
|
29
|
+
/**
|
|
30
|
+
* DEPRECATE in favor of requestOptions
|
|
31
|
+
*/
|
|
32
|
+
authentication?: UserSession;
|
|
21
33
|
/**
|
|
22
34
|
* While hubSearch requires requestOptions, it is not marked
|
|
23
35
|
* required because that is a breaking change to this
|
|
@@ -57,8 +69,4 @@ export interface IHubSearchOptions {
|
|
|
57
69
|
* The result number of the first entry in the result set response. The start parameter, along with the num parameter, can be used to paginate the search results.
|
|
58
70
|
*/
|
|
59
71
|
start?: number;
|
|
60
|
-
/**
|
|
61
|
-
* Enables experimental functionality.
|
|
62
|
-
*/
|
|
63
|
-
useBeta?: boolean;
|
|
64
72
|
}
|