Packages

Version 9.32.0

@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,
  bBoxToPolygon,
  buildDraft,
  buildExistingExportsPortalQuery,
  camelize,
  canEditEvent,
  canEditItem,
  canEditSite,
  canEditSiteContent,
  capitalize,
  chunkArray,
  clearSession,
  cloneObject,
  completeOAuth2,
  compose,
  composeContent,
  constructSlug,
  convertCatalog,
  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,
  ensureProp,
  ensureUniqueDomainName,
  ensureUniqueString,
  expandContentFilter,
  expandGroupFilter,
  expandUserFilter,
  extend,
  extentToBBox,
  failSafe,
  failSafeUpdate,
  fetchAllPages,
  fetchAndUploadResource,
  fetchAndUploadThumbnail,
  fetchContent,
  fetchHubTranslation,
  fetchImageAsBlob,
  fetchModelFromItem,
  fetchProject,
  fetchSiteModel,
  filterBy,
  findBy,
  findItemsBySlug,
  flattenArray,
  generateRandomString,
  getCategory,
  getCollection,
  getContentIdentifier,
  getContentSiteUrls,
  getContentTypeIcon,
  getContentTypeLabel,
  getCulture,
  getDomainsForSite,
  getFamily,
  getFeatureLayerItem,
  getFeatureServiceItem,
  getFeatureServiceTitle,
  getFileName,
  getGeographicOrgExtent,
  getGroupThumbnailUrl,
  getHubApiFromPortalUrl,
  getHubApiUrl,
  getHubApiUrlFromPortal,
  getHubLocaleAssetUrl,
  getHubProduct,
  getHubUrlFromPortal,
  getInputFeatureServiceModel,
  getItemApiUrl,
  getItemAssets,
  getItemBySlug,
  getItemDataUrl,
  getItemHomeUrl,
  getItemHubId,
  getItemHubType,
  getItemLayerId,
  getItemThumbnailUrl,
  getLayerIdFromUrl,
  getModel,
  getModelBySlug,
  getModelFromOptions,
  getNextFunction,
  getOrgDefaultTheme,
  getOrgExtentAsBBox,
  getPortalApiUrl,
  getPortalBaseFromOrgUrl,
  getPortalUrl,
  getPortalUrls,
  getProp,
  getProps,
  getProxyUrl,
  getServiceTypeFromUrl,
  getSession,
  getSiteById,
  getSourceFeatureServiceModelFromFieldworker,
  getStakeholderModel,
  getStructuredLicense,
  getSubscriptionType,
  getSurveyModels,
  getTypeCategories,
  getTypes,
  getUniqueDomainName,
  getUniqueDomainNamePortal,
  getUniqueItemTitle,
  getUniqueSlug,
  getUserThumbnailUrl,
  getWithDefault,
  hasBasePriv,
  hubApiRequest,
  hubApiSearch,
  includes,
  incrementString,
  interpolate,
  interpolateItemId,
  inviteUsers,
  isBBox,
  isDomainForLegacySite,
  isDomainUsedElsewhere,
  isDownloadable,
  isExtentCoordinateArray,
  isFeatureLayer,
  isFeatureService,
  isFeatureService,
  isFieldworkerView,
  isGuid,
  isMapOrFeatureServerUrl,
  isNil,
  isService,
  isSlug,
  isUpdateGroup,
  isUrl,
  isValidDomain,
  isValidExtent,
  itemToContent,
  last,
  lookupDomain,
  mapBy,
  mapModelToObject,
  mapObjectToModel,
  maybeAdd,
  maybePush,
  mergeContentFilter,
  mergeGroupFilters,
  mergeObjects,
  mergeUserFilters,
  normalizeItemType,
  normalizeSolutionTemplateItem,
  objectToArray,
  objectToJsonBlob,
  parseDatasetId,
  pingFeatureService,
  pingUrl,
  processRevertableTasks,
  propifyString,
  registerBrowserApp,
  registerSiteAsApplication,
  removeContextFromSlug,
  removeDomain,
  removeDomainByHostname,
  removeDomainsBySiteId,
  removeEmptyProps,
  replaceItemId,
  runRevertableTask,
  saveSession,
  searchContentEntities,
  searchProjects,
  searchSites,
  serializeCollectionState,
  serializeFacetState,
  serializeModel,
  serializeMultiSelectFacetState,
  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,
  Hub,
  HubError,
  HubProjectManager,
  HubSiteManager,
  Logger,
  OperationError,
  OperationStack,
  PropertyMapper,
  RemoteServerError,
} from "@esri/hub-common";

CDN:

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

CDN with SRI:



Version 11.19.0

@esri/hub-discussions

Module to interact with ArcGIS Hub Discussions API in Node.js and modern browsers.

npm install:

npm install @esri/hub-discussions @esri/arcgis-rest-auth@^2.14.0 || 3  @esri/arcgis-rest-request@^2.14.0 || 3  @esri/hub-common@9.32.0 

Module Import:

import {
  apiRequest,
  authenticateRequest,
  canCreateChannel,
  canCreateReaction,
  canDeletePost,
  canModifyChannel,
  canModifyPost,
  canPostToChannel,
  canReadFromChannel,
  createChannel,
  createPost,
  createReaction,
  createReply,
  fetchChannel,
  fetchPost,
  isChannelInclusive,
  isDiscussable,
  isOrgAdmin,
  parseDiscussionURI,
  reduceByGroupMembership,
  removeChannel,
  removePost,
  removeReaction,
  request,
  searchChannels,
  searchPosts,
  updateChannel,
  updatePost,
  updatePostSharing,
  updatePostStatus,
  RemoteServerError,
} from "@esri/hub-discussions";

CDN:

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

CDN with SRI:



Version 9.32.0

@esri/hub-downloads

Service for Hub downloads

npm install:

npm install @esri/hub-downloads @esri/hub-common@9.32.0 

Module Import:

import {
  pollDownloadMetadata,
  requestDatasetExport,
  requestDownloadMetadata,
} from "@esri/hub-downloads";

CDN:

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

CDN with SRI:



Version 9.32.0

@esri/hub-events

Module to interact with ArcGIS Hub Events in Node.js and modern browsers.

npm install:

npm install @esri/hub-events @esri/arcgis-rest-auth@^2.13.0 || 3  @esri/arcgis-rest-feature-layer@^2.13.0 || 3  @esri/arcgis-rest-portal@^2.15.0 || 3  @esri/arcgis-rest-request@^2.13.0 || 3  @esri/arcgis-rest-types@^2.13.0 || 3  @esri/hub-common@9.32.0 

Module Import:

import {
  addUsersToEvent,
  getEventFeatureServiceUrl,
  getEventQueryFromType,
  getEventServiceItem,
  getEventServiceUrl,
  registerForEvent,
  searchEvents,
  unregisterForEvent,
} from "@esri/hub-events";

CDN:

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

CDN with SRI:



Version 9.32.0

@esri/hub-search

Module to search for ArcGIS items and format them for display in ArcGIS Hub.

npm install:

npm install @esri/hub-search @esri/arcgis-rest-auth@^2.13.0 || 3  @esri/arcgis-rest-feature-layer@^2.13.0 || 3  @esri/arcgis-rest-portal@^2.6.1 || 3  @esri/arcgis-rest-request@^2.13.0 || 3  @esri/arcgis-rest-types@^2.13.0 || 3  @esri/hub-common@9.32.0 

Module Import:

import {
  agoSearch,
  convertHubResponse,
  convertPortalResponse,
  convertToHubParams,
  convertToPortalParams,
  flattenCategories,
  isFilterAnArrayWithData,
  isFilterANonEmptyString,
  isFilterFieldADateRange,
  kMerge,
  mergeAggregations,
  mergePages,
  processPage,
  searchContent,
  searchDatasets,
  serialize,
  BinaryHeap,
  ContentSearchService,
  InvalidPaginationInputError,
} from "@esri/hub-search";

CDN:

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

CDN with SRI:



Version 9.32.1

@esri/hub-sites

Module to interact with ArcGIS Hub Sites in Node.js and modern browsers.

npm install:

npm install @esri/hub-sites @esri/arcgis-rest-auth@^2.13.0 || 3  @esri/arcgis-rest-portal@^2.19.0 || 3  @esri/arcgis-rest-request@^2.13.0 || 3  @esri/hub-common@9.32.0  @esri/hub-initiatives@9.32.1  @esri/hub-teams@9.32.0 

Module Import:

import {
  _getSharingEligibleModels,
  applyDraft,
  convertCard,
  convertLayoutToTemplate,
  convertPageToTemplate,
  convertRow,
  convertSection,
  convertSiteToTemplate,
  createPage,
  createPageModelFromTemplate,
  createSite,
  createSiteModelFromTemplate,
  deleteDraft,
  ensureOptionalGroupsTemplating,
  ensurePageHasSiteEntry,
  ensureRequiredPageProperties,
  ensureRequiredSiteProperties,
  extractAssets,
  fetchAndApplyDraft,
  fetchDraft,
  getCardDependencies,
  getDataForSiteItem,
  getDomain,
  getDomains,
  getDraftDate,
  getLayoutDependencies,
  getMembers,
  getPageDependencies,
  getPageEditUrl,
  getPageItemType,
  getPortalSiteHostname,
  getPortalSiteUrl,
  getRowDependencies,
  getSectionDependencies,
  getSiteDependencies,
  getSiteEditUrl,
  getSiteItemType,
  getTheme,
  hasUnpublishedChanges,
  interpolateSite,
  isPage,
  isSite,
  linkSiteAndPage,
  markPublished,
  markUnpublished,
  registerBrowserApp,
  registerSiteAsApplication,
  removePage,
  removeSite,
  removeSiteFromPage,
  removeUnusedResources,
  saveDraft,
  savePublishedStatus,
  shareItemsToSiteGroups,
  siteSecondPass,
  unlinkPagesFromSite,
  unlinkSiteAndPage,
  updateAppRedirectUris,
  updatePage,
  updateSite,
  updateSiteApplicationUris,
  upgradeDraftSchema,
} from "@esri/hub-sites";

CDN:

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

CDN with SRI:



Version 9.32.0

@esri/hub-surveys

Module to interact with ArcGIS Hub Surveys in Node.js and modern browsers.

npm install:

npm install @esri/hub-surveys @esri/arcgis-rest-auth@^2.13.0 || 3  @esri/arcgis-rest-feature-layer@^2.13.0 || 3  @esri/arcgis-rest-portal@^2.13.0 || 3  @esri/arcgis-rest-request@^2.13.0 || 3  @esri/arcgis-rest-types@^2.13.0 || 3  @esri/hub-common@9.32.0 

Module Import:

import {
  getDetailedSurveyStatus,
  getGroupSharingDetails,
  getSurveyStatus,
  getSurveyStatusFromSchedule,
  isDraft,
  isPublished,
  migrateFormPropertiesSettings,
  setAccess,
  setAccessRevertable,
  shareWithGroup,
  shareWithGroupRevertable,
  shouldDisplayResults,
  unshareWithGroup,
  unshareWithGroupRevertable,
} from "@esri/hub-surveys";

CDN:

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

CDN with SRI:



Version 9.32.0

@esri/hub-teams

Module to interact with ArcGIS Hub Teams in Node.js and modern browsers.

npm install:

npm install @esri/hub-teams @esri/arcgis-rest-auth@^2.13.0 || 3  @esri/arcgis-rest-portal@^2.15.0 || 3  @esri/arcgis-rest-request@^2.13.0 || 3  @esri/arcgis-rest-types@^2.13.0 || 3  @esri/hub-common@9.32.0 

Module Import:

import {
  addOrInviteUsersToTeam,
  addOrInviteUsersToTeams,
  addUsersToTeam,
  applyPrivPropValuesToTemplate,
  canEditTeam,
  canUserCreateTeam,
  canUserCreateTeamInProduct,
  createHubTeam,
  createHubTeams,
  doesGroupExist,
  getAllowedGroupAccess,
  getTeamById,
  getTeamMembers,
  getTeamPropertiesMapForProduct,
  getTeamsAvailableInProduct,
  getTeamsForProduct,
  getTeamStatus,
  getTeamTemplate,
  getTeamTypesAvailableInProduct,
  getUniqueGroupTitle,
  getUserCreatableTeams,
  hasAllPrivileges,
  removeInvalidPrivs,
  removeTeam,
  removeTeamFromItems,
  removeUsersFromTeam,
  removeUsersFromTeams,
  searchTeamContent,
  searchTeamMembers,
  teamsToAddUsersTo,
  updateTeam,
  updateUserMembership,
} from "@esri/hub-teams";

CDN:

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

CDN with SRI: