import { searchItems , ISearchOptions , ISearchResult , IItem } from "@esri/arcgis-rest-portal" ; export param { ISearchOptions } searchRequestOptions returns { Promise < ISearchResult > } export function searchInitiatives ( searchRequestOptions ) { const opts = { ... searchRequestOptions } ; if ( opts . q ) { opts . q = `${ opts . q } AND type: Hub Initiative` ; } else { opts . q = `type: Hub Initiative` ; } return searchItems ( opts ) ; } export param { ISearchOptions } searchRequestOptions returns { Promise < ISearchResult > } export function searchInitiativeTemplates ( searchRequestOptions ) { const opts = { ... searchRequestOptions } ; if ( opts . q ) { opts . q = `${ opts . q } AND type: Hub Initiative AND typekeywords:hubInitiativeTemplate` ; } else { opts . q = `type: Hub Initiative AND typekeywords:hubInitiativeTemplate` ; } return searchItems ( opts ) ; }