Version 9.45.2

@esri/hub-common

Common TypeScript types and utility functions for @esri/hub.js.

npm install:

npm install @esri/hub-common @esri/arcgis-rest-auth@^2.14.0 || 3  @esri/arcgis-rest-feature-layer@^3.2.0  @esri/arcgis-rest-portal@^2.18.0 || 3  @esri/arcgis-rest-request@^2.14.0 || 3  @esri/arcgis-rest-types@^2.15.0 || 3 

Module Import:

import {
  _prepareUploadRequests,
  _searchContent,
  _searchGroups,
  _searchUsers,
  _waitForItemReady,
  addContextToSlug,
  addDays,
  addDomain,
  addSiteDomains,
  addSolutionResourceUrlToAssets,
  addUsersToGroup,
  applyCollectionState,
  applyFacetState,
  applyMultiSelectFacetState,
  applyPropertiesToItems,
  applySingleSelectFacetState,
  applySortState,
  arrayToObject,
  autoAddUsers,
  batch,
  bBoxToExtent,
  bBoxToPolygon,
  buildDraft,
  buildExistingExportsPortalQuery,
  camelize,
  canEditEvent,
  canEditItem,
  canEditSite,
  canEditSiteContent,
  capitalize,
  chunkArray,
  clearSession,
  cloneObject,
  completeOAuth2,
  compose,
  composeContent,
  constructSlug,
  convertCatalog,
  convertHubResponseToFacets,
  convertItemToProject,
  convertItemToSite,
  convertSolutionTemplateResourcesToAssets,
  convertToWellKnownLocale,
  convertUrlsToAnchorTags,
  createContentEntitySearchFn,
  createExtent,
  createId,
  createItemFromFile,
  createItemFromUrl,
  createItemFromUrlOrFile,
  createModel,
  createOperationPipeline,
  createProject,
  createSite,
  dasherize,
  datasetToContent,
  datasetToItem,
  deepFind,
  deepFindById,
  deepSet,
  deepStringReplace,
  deleteProp,
  destroyProject,
  destroySite,
  detectDataTypeFromExtension,
  detectDataTypeFromHeader,
  doesItemExistWithTitle,
  domainExists,
  domainExistsPortal,
  emailOrgUsers,
  enrichContentSearchResult,
  enrichGroupSearchResult,
  enrichPageSearchResult,
  enrichProjectSearchResult,
  enrichSiteSearchResult,
  enrichUserSearchResult,
  ensureProp,
  ensureUniqueDomainName,
  ensureUniqueString,
  expandContentFilter,
  expandGroupFilter,
  expandPredicate,
  expandUserFilter,
  extend,
  extentToBBox,
  extentToPolygon,
  failSafe,
  failSafeUpdate,
  fetchAllPages,
  fetchAndUploadResource,
  fetchAndUploadThumbnail,
  fetchContent,
  fetchGroupEnrichments,
  fetchHubTranslation,
  fetchImageAsBlob,
  fetchModelFromItem,
  fetchOrg,
  fetchProject,
  fetchSiteModel,
  fetchUserEnrichments,
  filterBy,
  findBy,
  findItemsBySlug,
  flattenArray,
  generateRandomString,
  getCategory,
  getCollection,
  getContentIdentifier,
  getContentSiteUrls,
  getContentTypeIcon,
  getContentTypeLabel,
  getCulture,
  getDomainsForSite,
  getExtentCenter,
  getFamily,
  getFeatureLayerItem,
  getFeatureServiceItem,
  getFeatureServiceTitle,
  getFileName,
  getGeographicOrgExtent,
  getGroupHomeUrl,
  getGroupThumbnailUrl,
  getHubApiFromPortalUrl,
  getHubApiUrl,
  getHubApiUrlFromPortal,
  getHubLocaleAssetUrl,
  getHubProduct,
  getHubUrlFromPortal,
  getInputFeatureServiceModel,
  getItemApiUrl,
  getItemAssets,
  getItemBySlug,
  getItemDataUrl,
  getItemHomeUrl,
  getItemHubId,
  getItemHubType,
  getItemLayerId,
  getItemOrgId,
  getItemThumbnailUrl,
  getLayerIdFromUrl,
  getModel,
  getModelBySlug,
  getModelFromOptions,
  getNextFunction,
  getOrgDefaultTheme,
  getOrgExtentAsBBox,
  getPortalApiUrl,
  getPortalBaseFromOrgUrl,
  getPortalUrl,
  getPortalUrls,
  getProp,
  getProps,
  getProxyUrl,
  getPublisherInfo,
  getServiceTypeFromUrl,
  getSession,
  getSiteById,
  getSourceFeatureServiceModelFromFieldworker,
  getStakeholderModel,
  getStructuredLicense,
  getSubscriptionType,
  getSurveyModels,
  getTypeCategories,
  getTypes,
  getUniqueDomainName,
  getUniqueDomainNamePortal,
  getUniqueItemTitle,
  getUniqueSlug,
  getUserHomeUrl,
  getUserThumbnailUrl,
  getWithDefault,
  hasBasePriv,
  hubApiRequest,
  hubApiSearch,
  hubContentToSearchResult,
  hubSearch,
  hubSearchItems,
  includes,
  incrementString,
  interpolate,
  interpolateItemId,
  inviteUsers,
  isBBox,
  isDomainForLegacySite,
  isDomainUsedElsewhere,
  isDownloadable,
  isEmptyFilter,
  isEmptyFilterGroup,
  isExtentCoordinateArray,
  isFeatureLayer,
  isFeatureService,
  isFeatureService,
  isFieldworkerView,
  isGuid,
  isMapOrFeatureServerUrl,
  isNil,
  isService,
  isSlug,
  isUpdateGroup,
  isUrl,
  isValidDomain,
  isValidExtent,
  isWellKnownTypeFilter,
  itemToContent,
  jsonApiToHubContent,
  last,
  lookupDomain,
  mapBy,
  mapModelToObject,
  mapObjectToModel,
  maybeAdd,
  maybePush,
  mergeContentFilter,
  mergeGroupFilters,
  mergeObjects,
  mergeUserFilters,
  normalizeItemType,
  normalizeSolutionTemplateItem,
  objectToArray,
  objectToJsonBlob,
  parseDatasetId,
  parseInclude,
  pingFeatureService,
  pingUrl,
  processRevertableTasks,
  propifyString,
  registerBrowserApp,
  registerSiteAsApplication,
  removeContextFromSlug,
  removeDomain,
  removeDomainByHostname,
  removeDomainsBySiteId,
  removeEmptyProps,
  replaceItemId,
  runRevertableTask,
  saveSession,
  searchContentEntities,
  searchProjects,
  searchSites,
  serializeCollectionState,
  serializeFacetState,
  serializeModel,
  serializeMultiSelectFacetState,
  serializeQueryForPortal,
  serializeSingleSelectFacetState,
  serializeSortState,
  serializeSpatialReference,
  setContentHubId,
  setContentSiteUrls,
  setContentType,
  setItemThumbnail,
  setProp,
  setSlugKeyword,
  shareItemToGroups,
  shouldHaveDataUrl,
  slugify,
  stringToBlob,
  stripProtocol,
  unique,
  uniqueBy,
  unprotectModel,
  unshareItemFromGroups,
  updateDomain,
  updateModel,
  updateProject,
  updateSite,
  upgradeProtocol,
  upgradeSiteSchema,
  uploadResourcesFromUrl,
  validateUrl,
  without,
  withoutByProp,
  ArcGISContext,
  ArcGISContextManager,
  Collection,
  Hub,
  HubError,
  HubProjectManager,
  HubSiteManager,
  Logger,
  OperationError,
  OperationStack,
  PropertyMapper,
  RemoteServerError,
} from "@esri/hub-common";

CDN:

<script src="https://unpkg.com/@esri/hub-common@9.45.2/dist/umd/common.umd.min.js"></script>

CDN with SRI: