Packages

Version 9.2.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-portal@^2.15.0 || 3  @esri/arcgis-rest-request@^2.14.0 || 3  @esri/arcgis-rest-types@^2.15.0 || 3 

Module Import:

import {
  addContextToSlug,
  addDays,
  addDomain,
  addSolutionResourceUrlToAssets,
  addUsersToGroup,
  applyPropertiesToItems,
  arrayToObject,
  autoAddUsers,
  batch,
  buildDraft,
  buildExistingExportsPortalQuery,
  camelize,
  canEditEvent,
  canEditItem,
  canEditSite,
  canEditSiteContent,
  capitalize,
  chunkArray,
  cloneObject,
  completeOAuth2,
  compose,
  convertSolutionTemplateResourcesToAssets,
  convertToWellKnownLocale,
  createExtent,
  createId,
  createOperationPipeline,
  datasetToContent,
  datasetToItem,
  deepSet,
  deepStringReplace,
  deleteProp,
  doesItemExistWithTitle,
  domainExists,
  domainExistsPortal,
  emailOrgUsers,
  ensureProp,
  ensureUniqueDomainName,
  ensureUniqueString,
  extend,
  extentToBBox,
  failSafe,
  failSafeUpdate,
  fetchAllPages,
  fetchAndUploadResource,
  fetchAndUploadThumbnail,
  fetchHubTranslation,
  fetchImageAsBlob,
  fetchSite,
  filterBy,
  findBy,
  flattenArray,
  generateRandomString,
  getCategory,
  getCollection,
  getContentIdentifier,
  getCulture,
  getDomainsForSite,
  getFamily,
  getGeographicOrgExtent,
  getHubApiUrl,
  getHubApiUrlFromPortal,
  getHubLocaleAssetUrl,
  getHubProduct,
  getHubUrlFromPortal,
  getInputFeatureServiceModel,
  getItemApiUrl,
  getItemAssets,
  getItemDataUrl,
  getItemHomeUrl,
  getItemHubId,
  getItemHubType,
  getItemLayerId,
  getItemThumbnailUrl,
  getLayerIdFromUrl,
  getModel,
  getModelFromOptions,
  getOrgExtentAsBBox,
  getPortalApiUrl,
  getPortalUrl,
  getProp,
  getProps,
  getServiceTypeFromUrl,
  getSiteById,
  getSourceFeatureServiceModelFromFieldworker,
  getStakeholderModel,
  getStructuredLicense,
  getSubscriptionType,
  getSurveyModels,
  getTypeCategories,
  getTypes,
  getUniqueDomainName,
  getUniqueDomainNamePortal,
  getUniqueItemTitle,
  getWithDefault,
  hasBasePriv,
  hubApiRequest,
  hubApiSearch,
  includes,
  incrementString,
  interpolate,
  interpolateItemId,
  inviteUsers,
  isDomainForLegacySite,
  isDomainUsedElsewhere,
  isDownloadable,
  isExtentCoordinateArray,
  isFeatureService,
  isFieldworkerView,
  isGuid,
  isMapOrFeatureServerUrl,
  isNil,
  isSlug,
  isUpdateGroup,
  isValidDomain,
  isValidExtent,
  itemToContent,
  last,
  lookupDomain,
  mapBy,
  maybeAdd,
  maybePush,
  mergeObjects,
  normalizeItemType,
  normalizeSolutionTemplateItem,
  objectToArray,
  objectToJsonBlob,
  parseDatasetId,
  processRevertableTasks,
  propifyString,
  removeContextFromSlug,
  removeDomain,
  removeEmptyProps,
  replaceItemId,
  runRevertableTask,
  serializeModel,
  serializeSpatialReference,
  setContentHubId,
  setContentSiteUrls,
  setContentType,
  setProp,
  shareItemToGroups,
  slugify,
  stringToBlob,
  stripProtocol,
  unique,
  uniqueBy,
  unprotectModel,
  unshareItemFromGroups,
  updateDomain,
  upgradeSiteSchema,
  uploadResourcesFromUrl,
  without,
  withoutByProp,
  Logger,
  OperationError,
  OperationStack,
  RemoteServerError,
} from "@esri/hub-common";

CDN:

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

CDN with SRI:



Version 9.2.0

@esri/hub-content

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

npm install:

npm install @esri/hub-content @esri/arcgis-rest-auth@^2.13.0 || 3  @esri/arcgis-rest-feature-layer@^3.2.0  @esri/arcgis-rest-portal@^2.18.0 || 3  @esri/arcgis-rest-request@^2.13.0 || 3  @esri/hub-common@^8.23.0 || 9 

Module Import:

import {
  enrichContent,
  fetchEnrichments,
  getContent,
  getContentFromHub,
  getContentFromPortal,
  getContentMetadata,
  getLayerContent,
  getPortalUrls,
  parseISODateString,
  withPortalUrls,
} from "@esri/hub-content";

CDN:

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

CDN with SRI:



Version 9.2.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@^8.8.2 || 9 

Module Import:

import {
  apiRequest,
  authenticateRequest,
  canCreateChannel,
  canCreateReaction,
  canModifyChannel,
  canPostToChannel,
  canReadFromChannel,
  createChannel,
  createPost,
  createReaction,
  createReply,
  fetchChannel,
  fetchPost,
  isChannelInclusive,
  isGroupDiscussable,
  isItemDiscussable,
  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@9.2.0/dist/umd/discussions.umd.min.js"></script>

CDN with SRI:



Version 9.2.0

@esri/hub-downloads

Service for Hub downloads

npm install:

npm install @esri/hub-downloads @esri/hub-common@^8.0.0 || 9 

Module Import:

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

CDN:

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

CDN with SRI:



Version 9.2.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@^8.0.0 || 9 

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.2.0/dist/umd/events.umd.min.js"></script>

CDN with SRI:



Version 9.2.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@^8.0.0 || 9 

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.2.0/dist/umd/search.umd.min.js"></script>

CDN with SRI:



Version 9.2.0

@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@^8.2.0 || 9  @esri/hub-initiatives@^8.0.0 || 9  @esri/hub-teams@^8.0.0 || 9 

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.2.0/dist/umd/sites.umd.min.js"></script>

CDN with SRI:



Version 9.2.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@^8.0.0 || 9 

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.2.0/dist/umd/surveys.umd.min.js"></script>

CDN with SRI:



Version 9.2.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@^8.21.0 || 9 

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.2.0/dist/umd/teams.umd.min.js"></script>

CDN with SRI: