@esri/hub-common 12.40.0 → 13.0.0-next.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/content/_fetch.js +1 -7
- package/dist/esm/content/_fetch.js.map +1 -1
- package/dist/esm/content/fetch.js +15 -3
- package/dist/esm/content/fetch.js.map +1 -1
- package/dist/esm/core/schemas/shared/subschemas.js +0 -17
- package/dist/esm/core/schemas/shared/subschemas.js.map +1 -1
- package/dist/esm/items/index.js +4 -1
- package/dist/esm/items/index.js.map +1 -1
- package/dist/esm/items/registerBrowserApp.js +2 -0
- package/dist/esm/items/registerBrowserApp.js.map +1 -1
- package/dist/esm/items/unshare-item-from-groups.js +2 -11
- package/dist/esm/items/unshare-item-from-groups.js.map +1 -1
- package/dist/esm/metrics/resolveMetric.js +4 -13
- package/dist/esm/metrics/resolveMetric.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectSchema.js +16 -10
- package/dist/esm/projects/_internal/ProjectSchema.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectUiSchemaCreate.js +33 -30
- package/dist/esm/projects/_internal/ProjectUiSchemaCreate.js.map +1 -1
- package/dist/esm/projects/_internal/ProjectUiSchemaEdit.js +5 -40
- package/dist/esm/projects/_internal/ProjectUiSchemaEdit.js.map +1 -1
- package/dist/esm/projects/edit.js +1 -21
- package/dist/esm/projects/edit.js.map +1 -1
- package/dist/esm/search/Catalog.js +0 -1
- package/dist/esm/search/Catalog.js.map +1 -1
- package/dist/esm/search/_internal/commonHelpers/getApi.js +8 -14
- package/dist/esm/search/_internal/commonHelpers/getApi.js.map +1 -1
- package/dist/esm/search/_internal/expandPredicate.js +1 -2
- package/dist/esm/search/_internal/expandPredicate.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItems.js +6 -3
- 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/getFilterQueryParam.js +8 -20
- 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 +3 -4
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js.map +1 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getOgcItemQueryParams.js +1 -22
- 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/ogcApiRequest.js +1 -32
- 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/_internal/utils.js +95 -0
- package/dist/esm/search/_internal/utils.js.map +1 -0
- package/dist/esm/search/hubSearch.js +4 -12
- package/dist/esm/search/hubSearch.js.map +1 -1
- package/dist/esm/search/serializeQueryForPortal.js +1 -2
- package/dist/esm/search/serializeQueryForPortal.js.map +1 -1
- package/dist/esm/search/utils.js +0 -173
- 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 +5 -21
- package/dist/esm/sites/HubSites.js.map +1 -1
- package/dist/esm/sites/index.js +3 -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 +6 -14
- package/dist/esm/versioning/updateVersionMetadata.js.map +1 -1
- package/dist/node/content/_fetch.js +1 -7
- package/dist/node/content/_fetch.js.map +1 -1
- package/dist/node/content/fetch.js +14 -2
- package/dist/node/content/fetch.js.map +1 -1
- package/dist/node/core/schemas/shared/subschemas.js +1 -18
- package/dist/node/core/schemas/shared/subschemas.js.map +1 -1
- package/dist/node/items/index.js +4 -1
- package/dist/node/items/index.js.map +1 -1
- package/dist/node/items/registerBrowserApp.js +2 -0
- package/dist/node/items/registerBrowserApp.js.map +1 -1
- package/dist/node/items/unshare-item-from-groups.js +2 -11
- package/dist/node/items/unshare-item-from-groups.js.map +1 -1
- package/dist/node/metrics/resolveMetric.js +4 -13
- package/dist/node/metrics/resolveMetric.js.map +1 -1
- package/dist/node/projects/_internal/ProjectSchema.js +15 -9
- package/dist/node/projects/_internal/ProjectSchema.js.map +1 -1
- package/dist/node/projects/_internal/ProjectUiSchemaCreate.js +33 -30
- package/dist/node/projects/_internal/ProjectUiSchemaCreate.js.map +1 -1
- package/dist/node/projects/_internal/ProjectUiSchemaEdit.js +5 -40
- package/dist/node/projects/_internal/ProjectUiSchemaEdit.js.map +1 -1
- package/dist/node/projects/edit.js +2 -23
- package/dist/node/projects/edit.js.map +1 -1
- package/dist/node/search/Catalog.js +0 -1
- package/dist/node/search/Catalog.js.map +1 -1
- package/dist/node/search/_internal/commonHelpers/getApi.js +8 -14
- package/dist/node/search/_internal/commonHelpers/getApi.js.map +1 -1
- package/dist/node/search/_internal/expandPredicate.js +1 -2
- package/dist/node/search/_internal/expandPredicate.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItems.js +6 -3
- 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/getFilterQueryParam.js +8 -20
- 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 +3 -4
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.js.map +1 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getOgcItemQueryParams.js +1 -22
- 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/ogcApiRequest.js +1 -32
- 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/_internal/utils.js +101 -0
- package/dist/node/search/_internal/utils.js.map +1 -0
- package/dist/node/search/hubSearch.js +4 -12
- package/dist/node/search/hubSearch.js.map +1 -1
- package/dist/node/search/serializeQueryForPortal.js +1 -2
- package/dist/node/search/serializeQueryForPortal.js.map +1 -1
- package/dist/node/search/utils.js +1 -180
- 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 +6 -23
- package/dist/node/sites/HubSites.js.map +1 -1
- package/dist/node/sites/index.js +3 -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 +6 -14
- package/dist/node/versioning/updateVersionMetadata.js.map +1 -1
- package/dist/types/core/behaviors/IWithEditorBehavior.d.ts +0 -6
- package/dist/types/core/behaviors/IWithMetricsBehavior.d.ts +2 -2
- package/dist/types/core/schemas/shared/subschemas.d.ts +0 -17
- package/dist/types/core/types/IHubLocation.d.ts +0 -5
- package/dist/types/core/types/Metrics.d.ts +0 -7
- package/dist/types/initiatives/HubInitiative.d.ts +2 -2
- package/dist/types/items/index.d.ts +0 -1
- package/dist/types/items/registerBrowserApp.d.ts +2 -0
- package/dist/types/metrics/resolveMetric.d.ts +2 -2
- package/dist/types/projects/HubProject.d.ts +2 -2
- package/dist/types/projects/edit.d.ts +0 -13
- package/dist/types/search/_internal/commonHelpers/getApi.d.ts +1 -2
- package/dist/types/search/_internal/hubSearchItems.d.ts +2 -2
- package/dist/types/search/_internal/hubSearchItemsHelpers/formatOgcItemsResponse.d.ts +2 -1
- package/dist/types/search/_internal/hubSearchItemsHelpers/getNextOgcCallback.d.ts +2 -1
- package/dist/types/search/_internal/hubSearchItemsHelpers/getOgcCollectionUrl.d.ts +3 -3
- package/dist/types/search/_internal/hubSearchItemsHelpers/getOgcItemQueryParams.d.ts +7 -19
- package/dist/types/search/_internal/hubSearchItemsHelpers/ogcApiRequest.d.ts +0 -24
- package/dist/types/search/_internal/hubSearchItemsHelpers/searchOgcAggregations.d.ts +2 -1
- package/dist/types/search/_internal/hubSearchItemsHelpers/searchOgcItems.d.ts +2 -1
- package/dist/types/search/_internal/utils.d.ts +28 -0
- package/dist/types/search/types/IHubSearchOptions.d.ts +4 -12
- package/dist/types/search/utils.d.ts +2 -61
- package/dist/types/sites/HubSites.d.ts +0 -12
- package/dist/types/sites/index.d.ts +0 -1
- package/dist/types/sites/registerSiteAsApplication.d.ts +2 -0
- package/dist/types/types.d.ts +1 -1
- package/dist/types/versioning/updateVersionMetadata.d.ts +2 -3
- package/package.json +1 -1
- package/dist/esm/projects/_internal/setStatusKeyword.js +0 -16
- package/dist/esm/projects/_internal/setStatusKeyword.js.map +0 -1
- package/dist/esm/search/_internal/commonHelpers/getOgcApiDefinition.js +0 -15
- package/dist/esm/search/_internal/commonHelpers/getOgcApiDefinition.js.map +0 -1
- package/dist/esm/search/_internal/commonHelpers/isLegacySearchCategory.js +0 -18
- package/dist/esm/search/_internal/commonHelpers/isLegacySearchCategory.js.map +0 -1
- package/dist/esm/search/_internal/commonHelpers/toCollectionKey.js +0 -13
- package/dist/esm/search/_internal/commonHelpers/toCollectionKey.js.map +0 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getBboxQueryParam.js +0 -15
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getBboxQueryParam.js.map +0 -1
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getSortByQueryParam.js +0 -20
- package/dist/esm/search/_internal/hubSearchItemsHelpers/getSortByQueryParam.js.map +0 -1
- package/dist/node/projects/_internal/setStatusKeyword.js +0 -20
- package/dist/node/projects/_internal/setStatusKeyword.js.map +0 -1
- package/dist/node/search/_internal/commonHelpers/getOgcApiDefinition.js +0 -19
- package/dist/node/search/_internal/commonHelpers/getOgcApiDefinition.js.map +0 -1
- package/dist/node/search/_internal/commonHelpers/isLegacySearchCategory.js +0 -22
- package/dist/node/search/_internal/commonHelpers/isLegacySearchCategory.js.map +0 -1
- package/dist/node/search/_internal/commonHelpers/toCollectionKey.js +0 -17
- package/dist/node/search/_internal/commonHelpers/toCollectionKey.js.map +0 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getBboxQueryParam.js +0 -19
- package/dist/node/search/_internal/hubSearchItemsHelpers/getBboxQueryParam.js.map +0 -1
- package/dist/node/search/_internal/hubSearchItemsHelpers/getSortByQueryParam.js +0 -24
- package/dist/node/search/_internal/hubSearchItemsHelpers/getSortByQueryParam.js.map +0 -1
- package/dist/types/projects/_internal/setStatusKeyword.d.ts +0 -8
- package/dist/types/search/_internal/commonHelpers/getOgcApiDefinition.d.ts +0 -10
- package/dist/types/search/_internal/commonHelpers/isLegacySearchCategory.d.ts +0 -9
- package/dist/types/search/_internal/commonHelpers/toCollectionKey.d.ts +0 -10
- package/dist/types/search/_internal/hubSearchItemsHelpers/getBboxQueryParam.d.ts +0 -11
- package/dist/types/search/_internal/hubSearchItemsHelpers/getSortByQueryParam.d.ts +0 -10
|
@@ -46,7 +46,7 @@ async function updateVersion(model, version, requestOptions, force) {
|
|
|
46
46
|
version.updated = Date.now();
|
|
47
47
|
const versionBlob = object_to_json_blob_1.objectToJsonBlob(version);
|
|
48
48
|
const properties = merge_objects_1.mergeObjects(version, {}, constants_1.VERSION_RESOURCE_PROPERTIES);
|
|
49
|
-
await arcgis_rest_portal_1.updateItemResource(Object.assign(Object.assign({}, requestOptions), { id: get_prop_1.getProp(model, "item.id"), name: constants_1.VERSION_RESOURCE_NAME, owner: get_prop_1.getProp(model, "item.owner"), params: { properties }, prefix, resource: versionBlob }));
|
|
49
|
+
await arcgis_rest_portal_1.updateItemResource(Object.assign(Object.assign({}, requestOptions), { id: get_prop_1.getProp(model, "item.id"), name: constants_1.VERSION_RESOURCE_NAME, owner: get_prop_1.getProp(model, "item.owner"), params: { properties }, prefix, private: true, resource: versionBlob }));
|
|
50
50
|
return version;
|
|
51
51
|
}
|
|
52
52
|
exports.updateVersion = updateVersion;
|
|
@@ -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,QAAQ,EAAE,WAAW,IACrB,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC;
|
|
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,OAAO,EAAE,IAAI,EACb,QAAQ,EAAE,WAAW,IACrB,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC;AAzCD,sCAyCC"}
|
|
@@ -2,29 +2,21 @@
|
|
|
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");
|
|
6
5
|
const getPrefix_1 = require("./_internal/getPrefix");
|
|
7
6
|
const constants_1 = require("./_internal/constants");
|
|
8
|
-
const getVersion_1 = require("./getVersion");
|
|
9
7
|
const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
|
|
10
8
|
/**
|
|
11
9
|
* Updates the specified version's metadata
|
|
12
10
|
* @param id
|
|
13
|
-
* @param
|
|
14
|
-
* @param owner
|
|
11
|
+
* @param version
|
|
15
12
|
* @param requestOptions
|
|
16
13
|
* @returns
|
|
17
14
|
*/
|
|
18
|
-
async function updateVersionMetadata(id,
|
|
19
|
-
const prefix = getPrefix_1.getPrefix(
|
|
20
|
-
const properties = merge_objects_1.mergeObjects(
|
|
21
|
-
|
|
22
|
-
|
|
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;
|
|
15
|
+
async function updateVersionMetadata(id, version, requestOptions) {
|
|
16
|
+
const prefix = getPrefix_1.getPrefix(version.id);
|
|
17
|
+
const properties = merge_objects_1.mergeObjects(version, {}, constants_1.VERSION_RESOURCE_PROPERTIES);
|
|
18
|
+
await arcgis_rest_portal_1.updateItemResource(Object.assign(Object.assign({}, requestOptions), { id, name: constants_1.VERSION_RESOURCE_NAME, owner: properties.creator, params: { properties }, prefix }));
|
|
19
|
+
return version;
|
|
28
20
|
}
|
|
29
21
|
exports.updateVersionMetadata = updateVersionMetadata;
|
|
30
22
|
//# 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;AAExD,qDAAkD;AAClD,qDAG+B;AAC/B,iEAA8D;AAE9D;;;;;;GAMG;AACI,KAAK,UAAU,qBAAqB,CACzC,EAAU,EACV,OAAyB,EACzB,cAAsC;IAEtC,MAAM,MAAM,GAAG,qBAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACrC,MAAM,UAAU,GAAG,4BAAY,CAAC,OAAO,EAAE,EAAE,EAAE,uCAA2B,CAAC,CAAC;IAE1E,MAAM,uCAAkB,iCACnB,cAAc,KACjB,EAAE,EACF,IAAI,EAAE,iCAAqB,EAC3B,KAAK,EAAE,UAAU,CAAC,OAAO,EACzB,MAAM,EAAE,EAAE,UAAU,EAAE,EACtB,MAAM,IACN,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC;AAlBD,sDAkBC"}
|
|
@@ -1,10 +1,4 @@
|
|
|
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";
|
|
8
2
|
export interface IEditorConfig {
|
|
9
3
|
schema: IConfigurationSchema;
|
|
10
4
|
uiSchema: IUiSchema;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IMetricFeature } 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<IMetricFeature[]>;
|
|
10
10
|
}
|
|
@@ -7,23 +7,6 @@ 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
|
-
};
|
|
27
10
|
export declare const ENTITY_EXTENT_SCHEMA: {
|
|
28
11
|
type: string;
|
|
29
12
|
properties: {
|
|
@@ -9,9 +9,4 @@ 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;
|
|
17
12
|
}
|
|
@@ -157,10 +157,3 @@ 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, IMetricFeature } 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<IMetricFeature[]>;
|
|
80
80
|
}
|
|
@@ -16,7 +16,6 @@ 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";
|
|
20
19
|
export * from "./create-item-from-file";
|
|
21
20
|
export * from "./create-item-from-url";
|
|
22
21
|
export * from "./create-item-from-url-or-file";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IArcGISContext } from "../ArcGISContext";
|
|
2
|
-
import { IMetric,
|
|
2
|
+
import { IMetric, IMetricFeature } 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, IResolvedMetric } 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<IMetricFeature[]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHubProject, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, UiSchemaElementOptions,
|
|
1
|
+
import { IHubProject, IWithCatalogBehavior, IWithStoreBehavior, IWithSharingBehavior, UiSchemaElementOptions, IMetricFeature } 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<IMetricFeature[]>;
|
|
80
80
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
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";
|
|
5
3
|
/**
|
|
6
4
|
* @private
|
|
7
5
|
* Create a new Hub Project item
|
|
@@ -26,14 +24,3 @@ export declare function updateProject(project: IHubProject, requestOptions: IUse
|
|
|
26
24
|
* @param requestOptions
|
|
27
25
|
*/
|
|
28
26
|
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>;
|
|
@@ -5,8 +5,7 @@ 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
|
|
9
|
-
* - Target the environment-level OGC API if current parameters allow
|
|
8
|
+
* - Target the OGC API if current parameters allow
|
|
10
9
|
* - Target the Portal API based off options.requestOptions.portal
|
|
11
10
|
* @param targetEntity target entity of the query
|
|
12
11
|
* @param options search options
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHubSearchOptions, IHubSearchResponse, IHubSearchResult, IQuery } from "../types";
|
|
1
|
+
import { IApiDefinition, 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 { IHubSearchOptions, IHubSearchResponse, IHubSearchResult, IQuery } from
|
|
|
6
6
|
* @param options
|
|
7
7
|
* @returns
|
|
8
8
|
*/
|
|
9
|
-
export declare function hubSearchItems(query: IQuery, options: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
9
|
+
export declare function hubSearchItems(query: IQuery, options: IHubSearchOptions, api: IApiDefinition): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { IApiDefinition } from "../../types";
|
|
1
2
|
import { IQuery } from "../../types/IHubCatalog";
|
|
2
3
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
3
4
|
import { IHubSearchResponse } from "../../types/IHubSearchResponse";
|
|
4
5
|
import { IHubSearchResult } from "../../types/IHubSearchResult";
|
|
5
6
|
import { IOgcItemsResponse } from "./interfaces";
|
|
6
|
-
export declare function formatOgcItemsResponse(response: IOgcItemsResponse, originalQuery: IQuery, originalOptions: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
7
|
+
export declare function formatOgcItemsResponse(response: IOgcItemsResponse, originalQuery: IQuery, originalOptions: IHubSearchOptions, api: IApiDefinition): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { IApiDefinition } from "../../types";
|
|
1
2
|
import { IQuery } from "../../types/IHubCatalog";
|
|
2
3
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
3
4
|
import { IHubSearchResponse } from "../../types/IHubSearchResponse";
|
|
4
5
|
import { IHubSearchResult } from "../../types/IHubSearchResult";
|
|
5
6
|
import { IOgcItemsResponse } from "./interfaces";
|
|
6
|
-
export declare function getNextOgcCallback(response: IOgcItemsResponse, originalQuery: IQuery, originalOptions: IHubSearchOptions): (params?: any) => Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
7
|
+
export declare function getNextOgcCallback(response: IOgcItemsResponse, originalQuery: IQuery, originalOptions: IHubSearchOptions, api: IApiDefinition): (params?: any) => Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IQuery } from "../../types/IHubCatalog";
|
|
2
|
-
import {
|
|
2
|
+
import { IApiDefinition } from "../../types/types";
|
|
3
3
|
/**
|
|
4
4
|
* @private
|
|
5
5
|
*
|
|
@@ -8,7 +8,7 @@ import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
|
8
8
|
* the all collection is targeted.
|
|
9
9
|
*
|
|
10
10
|
* @param query the query the request is based on
|
|
11
|
-
* @param
|
|
11
|
+
* @param api definition object for the OGC API to be targeted
|
|
12
12
|
* @returns the collection url
|
|
13
13
|
*/
|
|
14
|
-
export declare function getOgcCollectionUrl(query: IQuery,
|
|
14
|
+
export declare function getOgcCollectionUrl(query: IQuery, api: IApiDefinition): string;
|
|
@@ -1,21 +1,9 @@
|
|
|
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
|
-
|
|
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;
|
|
3
|
+
export declare function getOgcItemQueryParams(query: IQuery, options: IHubSearchOptions): {
|
|
4
|
+
filter: string;
|
|
5
|
+
token: any;
|
|
6
|
+
limit: number;
|
|
7
|
+
startindex: number;
|
|
8
|
+
q: any;
|
|
9
|
+
};
|
|
@@ -1,26 +1,2 @@
|
|
|
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
|
-
*/
|
|
26
2
|
export declare function ogcApiRequest(url: string, queryParams: Record<string, any>, options: IHubSearchOptions): Promise<any>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { IApiDefinition } from "../../types";
|
|
1
2
|
import { IQuery } from "../../types/IHubCatalog";
|
|
2
3
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
3
4
|
import { IHubSearchResponse } from "../../types/IHubSearchResponse";
|
|
4
5
|
import { IHubSearchResult } from "../../types/IHubSearchResult";
|
|
5
|
-
export declare function searchOgcAggregations(query: IQuery, options: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
6
|
+
export declare function searchOgcAggregations(query: IQuery, options: IHubSearchOptions, api: IApiDefinition): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { IApiDefinition } from "../../types";
|
|
1
2
|
import { IQuery } from "../../types/IHubCatalog";
|
|
2
3
|
import { IHubSearchOptions } from "../../types/IHubSearchOptions";
|
|
3
4
|
import { IHubSearchResponse } from "../../types/IHubSearchResponse";
|
|
4
5
|
import { IHubSearchResult } from "../../types/IHubSearchResult";
|
|
5
|
-
export declare function searchOgcItems(query: IQuery, options: IHubSearchOptions): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
6
|
+
export declare function searchOgcItems(query: IQuery, options: IHubSearchOptions, api: IApiDefinition): Promise<IHubSearchResponse<IHubSearchResult>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UserSession } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import { ISearchOptions } from "@esri/arcgis-rest-portal";
|
|
3
|
+
import { ISearchResponse } from "../../types";
|
|
4
|
+
import { IMatchOptions, IDateRange, IRelativeDate } from "../types/types";
|
|
5
|
+
/**
|
|
6
|
+
* @private
|
|
7
|
+
* Convert a field value into a MatchOptions if it's not already one
|
|
8
|
+
* @param value
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function valueToMatchOptions(value: string | string[] | IMatchOptions): IMatchOptions;
|
|
12
|
+
/**
|
|
13
|
+
* @private
|
|
14
|
+
* Convert a RelativeDate to a DateRange<number>
|
|
15
|
+
* @param relative
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
export declare function relativeDateToDateRange(relative: IRelativeDate): IDateRange<number>;
|
|
19
|
+
/**
|
|
20
|
+
* @private
|
|
21
|
+
* Create a `.next()` function for a type
|
|
22
|
+
* @param request
|
|
23
|
+
* @param nextStart
|
|
24
|
+
* @param total
|
|
25
|
+
* @param fn
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
export declare function getNextFunction<T>(request: ISearchOptions, nextStart: number, total: number, fn: (r: any) => Promise<ISearchResponse<T>>): (authentication?: UserSession) => Promise<ISearchResponse<T>>;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { UserSession } from "@esri/arcgis-rest-auth";
|
|
2
1
|
import { IHubRequestOptions } from "../../types";
|
|
3
2
|
import { EntityType } from "./IHubCatalog";
|
|
4
|
-
import { NamedApis, IApiDefinition } from "./types";
|
|
5
|
-
export declare type Enrichments = "data" | "metadata" | "org" | "service" | "layers";
|
|
6
3
|
/**
|
|
7
4
|
* Search Options
|
|
8
5
|
*/
|
|
@@ -16,20 +13,11 @@ export interface IHubSearchOptions {
|
|
|
16
13
|
* Portal API only supports a single value
|
|
17
14
|
*/
|
|
18
15
|
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;
|
|
24
16
|
/**
|
|
25
17
|
* Site whose API should be targeted. Ignored in an enterprise context.
|
|
26
18
|
* e.g., https://my-site.hub.arcgis.com
|
|
27
19
|
*/
|
|
28
20
|
site?: string;
|
|
29
|
-
/**
|
|
30
|
-
* DEPRECATE in favor of requestOptions
|
|
31
|
-
*/
|
|
32
|
-
authentication?: UserSession;
|
|
33
21
|
/**
|
|
34
22
|
* While hubSearch requires requestOptions, it is not marked
|
|
35
23
|
* required because that is a breaking change to this
|
|
@@ -69,4 +57,8 @@ export interface IHubSearchOptions {
|
|
|
69
57
|
* 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.
|
|
70
58
|
*/
|
|
71
59
|
start?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Enables experimental functionality.
|
|
62
|
+
*/
|
|
63
|
+
useBeta?: boolean;
|
|
72
64
|
}
|
|
@@ -1,53 +1,5 @@
|
|
|
1
|
-
import { IUser
|
|
2
|
-
import { IGroup
|
|
3
|
-
import { ISearchResponse } from "../types";
|
|
4
|
-
import { IMatchOptions, IDateRange, IRelativeDate, IWellKnownApis, IApiDefinition, NamedApis } from "./types/types";
|
|
5
|
-
import { WellKnownCollection } from "./wellKnownCatalog";
|
|
6
|
-
import { LegacySearchCategory } from "./_internal/commonHelpers/isLegacySearchCategory";
|
|
7
|
-
/**
|
|
8
|
-
* Well known APIs
|
|
9
|
-
* Short-forms for specifying common APIs
|
|
10
|
-
* We will likely deprecate this
|
|
11
|
-
*/
|
|
12
|
-
export declare const SEARCH_APIS: IWellKnownApis;
|
|
13
|
-
/**
|
|
14
|
-
* @private
|
|
15
|
-
* Convert array of api "names" into full ApiDefinitions
|
|
16
|
-
* @param apis
|
|
17
|
-
* @returns
|
|
18
|
-
*/
|
|
19
|
-
export declare function expandApis(apis: Array<NamedApis | IApiDefinition>): IApiDefinition[];
|
|
20
|
-
/**
|
|
21
|
-
* @private
|
|
22
|
-
* Convert an api "name" into a full ApiDefinition
|
|
23
|
-
* @param api
|
|
24
|
-
* @returns
|
|
25
|
-
*/
|
|
26
|
-
export declare function expandApi(api: NamedApis | IApiDefinition): IApiDefinition;
|
|
27
|
-
/**
|
|
28
|
-
* @private
|
|
29
|
-
* Convert a field value into a MatchOptions if it's not already one
|
|
30
|
-
* @param value
|
|
31
|
-
* @returns
|
|
32
|
-
*/
|
|
33
|
-
export declare function valueToMatchOptions(value: string | string[] | IMatchOptions): IMatchOptions;
|
|
34
|
-
/**
|
|
35
|
-
* @private
|
|
36
|
-
* Convert a RelativeDate to a DateRange<number>
|
|
37
|
-
* @param relative
|
|
38
|
-
* @returns
|
|
39
|
-
*/
|
|
40
|
-
export declare function relativeDateToDateRange(relative: IRelativeDate): IDateRange<number>;
|
|
41
|
-
/**
|
|
42
|
-
* @private
|
|
43
|
-
* Create a `.next()` function for a type
|
|
44
|
-
* @param request
|
|
45
|
-
* @param nextStart
|
|
46
|
-
* @param total
|
|
47
|
-
* @param fn
|
|
48
|
-
* @returns
|
|
49
|
-
*/
|
|
50
|
-
export declare function getNextFunction<T>(request: ISearchOptions, nextStart: number, total: number, fn: (r: any) => Promise<ISearchResponse<T>>): (authentication?: UserSession) => Promise<ISearchResponse<T>>;
|
|
1
|
+
import { IUser } from "@esri/arcgis-rest-auth";
|
|
2
|
+
import { IGroup } from "@esri/arcgis-rest-portal";
|
|
51
3
|
/**
|
|
52
4
|
* Construct a the full url to a group thumbnail
|
|
53
5
|
*
|
|
@@ -70,14 +22,3 @@ export declare function getGroupThumbnailUrl(portalUrl: string, group: IGroup, t
|
|
|
70
22
|
* @returns
|
|
71
23
|
*/
|
|
72
24
|
export declare function getUserThumbnailUrl(portalUrl: string, user: IUser, token?: string): string;
|
|
73
|
-
/**
|
|
74
|
-
* Function that can migrate a legacy search category to a wellknown
|
|
75
|
-
* collection key. Useful when the caller has an unknown value that
|
|
76
|
-
* could either be a search category or wellknown collection.
|
|
77
|
-
*
|
|
78
|
-
* If the value passed is not a search category, it is returned as-is.
|
|
79
|
-
*
|
|
80
|
-
* @param collectionOrSearchCategory key to be migrated
|
|
81
|
-
* @returns the migrated wellknown collection key
|
|
82
|
-
*/
|
|
83
|
-
export declare function migrateToCollectionKey(collectionOrSearchCategory: LegacySearchCategory | WellKnownCollection): WellKnownCollection;
|
|
@@ -22,18 +22,6 @@ export declare function createSite(partialSite: Partial<IHubSite>, requestOption
|
|
|
22
22
|
* @returns
|
|
23
23
|
*/
|
|
24
24
|
export declare function updateSite(site: IHubSite, requestOptions: IHubRequestOptions): Promise<IHubSite>;
|
|
25
|
-
/**
|
|
26
|
-
* @private
|
|
27
|
-
* Remove a Hub Site
|
|
28
|
-
*
|
|
29
|
-
* This simply removes the Site item, and it's associated domain records.
|
|
30
|
-
* This does not remove any Teams/Groups or content associated with the
|
|
31
|
-
* Site
|
|
32
|
-
* @param id
|
|
33
|
-
* @param requestOptions
|
|
34
|
-
* @returns
|
|
35
|
-
*/
|
|
36
|
-
export declare function destroySite(id: string, requestOptions: IHubRequestOptions): Promise<void>;
|
|
37
25
|
/**
|
|
38
26
|
* Remove a Hub Site
|
|
39
27
|
*
|
|
@@ -7,7 +7,6 @@ export * from "./fetchSiteModel";
|
|
|
7
7
|
export * from "./get-site-by-id";
|
|
8
8
|
export * from "./HubSite";
|
|
9
9
|
export * from "./HubSites";
|
|
10
|
-
export * from "./registerSiteAsApplication";
|
|
11
10
|
export * from "./site-schema-version";
|
|
12
11
|
export * from "./themes";
|
|
13
12
|
export * from "./upgrade-site-schema";
|
package/dist/types/types.d.ts
CHANGED
|
@@ -3,9 +3,8 @@ import { IVersionMetadata } from "./types";
|
|
|
3
3
|
/**
|
|
4
4
|
* Updates the specified version's metadata
|
|
5
5
|
* @param id
|
|
6
|
-
* @param
|
|
7
|
-
* @param owner
|
|
6
|
+
* @param version
|
|
8
7
|
* @param requestOptions
|
|
9
8
|
* @returns
|
|
10
9
|
*/
|
|
11
|
-
export declare function updateVersionMetadata(id: string,
|
|
10
|
+
export declare function updateVersionMetadata(id: string, version: IVersionMetadata, requestOptions: IHubUserRequestOptions): Promise<IVersionMetadata>;
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* adds/updates the project status typekeyword and returns
|
|
3
|
-
* a new array of typekeywords
|
|
4
|
-
* @param typeKeywords project's current typekeywords
|
|
5
|
-
* @param status project status
|
|
6
|
-
*/
|
|
7
|
-
export function setStatusKeyword(typeKeywords, status) {
|
|
8
|
-
// filter out the existing status typekeyword
|
|
9
|
-
const filteredTypekeywords = typeKeywords.filter((typekeyword) => {
|
|
10
|
-
return !typekeyword.startsWith("status|");
|
|
11
|
-
});
|
|
12
|
-
// add the new/updated status typekeyword
|
|
13
|
-
filteredTypekeywords.push(`status|${status}`);
|
|
14
|
-
return filteredTypekeywords;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=setStatusKeyword.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setStatusKeyword.js","sourceRoot":"","sources":["../../../../src/projects/_internal/setStatusKeyword.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,YAAsB,EACtB,MAAwB;IAExB,6CAA6C;IAC7C,MAAM,oBAAoB,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,WAAmB,EAAE,EAAE;QACvE,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,yCAAyC;IACzC,oBAAoB,CAAC,IAAI,CAAC,UAAU,MAAM,EAAE,CAAC,CAAC;IAC9C,OAAO,oBAAoB,CAAC;AAC9B,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @private
|
|
3
|
-
* Returns information about the current environment's OGC API
|
|
4
|
-
*
|
|
5
|
-
* @param options IHubRequestOptions to derive OGC API info from
|
|
6
|
-
* @returns an IApiDefinition with needed info to target the OGC API
|
|
7
|
-
*/
|
|
8
|
-
export function getOgcApiDefinition(options) {
|
|
9
|
-
const umbrellaDomain = new URL(options.requestOptions.hubApiUrl).hostname;
|
|
10
|
-
return {
|
|
11
|
-
type: "arcgis-hub",
|
|
12
|
-
url: `https://${umbrellaDomain}/api/search/v1`,
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=getOgcApiDefinition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getOgcApiDefinition.js","sourceRoot":"","sources":["../../../../../src/search/_internal/commonHelpers/getOgcApiDefinition.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAA0B;IAE1B,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC;IAC1E,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,GAAG,EAAE,WAAW,cAAc,gBAAgB;KAC/C,CAAC;AACJ,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @private
|
|
3
|
-
* Determines whether a string corresponds to a search category (as opposed to a collection)
|
|
4
|
-
*
|
|
5
|
-
* @param value value to verify
|
|
6
|
-
* @returns whether the value represents one of the old search categories
|
|
7
|
-
*/
|
|
8
|
-
export function isLegacySearchCategory(value) {
|
|
9
|
-
const categories = [
|
|
10
|
-
"Site",
|
|
11
|
-
"Event",
|
|
12
|
-
"Dataset",
|
|
13
|
-
"Document",
|
|
14
|
-
"App,Map",
|
|
15
|
-
];
|
|
16
|
-
return categories.includes(value);
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=isLegacySearchCategory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isLegacySearchCategory.js","sourceRoot":"","sources":["../../../../../src/search/_internal/commonHelpers/isLegacySearchCategory.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAa;IAClD,MAAM,UAAU,GAA2B;QACzC,MAAM;QACN,OAAO;QACP,SAAS;QACT,UAAU;QACV,SAAS;KACV,CAAC;IACF,OAAO,UAAU,CAAC,QAAQ,CAAC,KAA6B,CAAC,CAAC;AAC5D,CAAC"}
|