Version 8.22.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,
  getItemApiUrl,
  getItemAssets,
  getItemDataUrl,
  getItemHomeUrl,
  getItemHubId,
  getItemHubType,
  getItemLayerId,
  getItemThumbnailUrl,
  getLayerIdFromUrl,
  getModel,
  getModelFromOptions,
  getOrgExtentAsBBox,
  getPortalApiUrl,
  getPortalUrl,
  getProp,
  getProps,
  getServiceTypeFromUrl,
  getSiteById,
  getStructuredLicense,
  getSubscriptionType,
  getTypeCategories,
  getTypes,
  getUniqueDomainName,
  getUniqueDomainNamePortal,
  getUniqueItemTitle,
  getWithDefault,
  hasBasePriv,
  hubApiRequest,
  includes,
  incrementString,
  interpolate,
  interpolateItemId,
  inviteUsers,
  isDomainForLegacySite,
  isDomainUsedElsewhere,
  isDownloadable,
  isExtentCoordinateArray,
  isFeatureService,
  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,
  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@8.22.0/dist/umd/common.umd.min.js"></script>

CDN with SRI: