Types
import type { AddItemParameters, DeleteItemsResult, FetchBasemapsOptions, FetchItemsParameters, FetchItemsResult } from "@arcgis/core/portal/types.js";

Type definitions

AddItemParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

item

Property
Type
PortalItem
Since
ArcGIS Maps SDK for JavaScript 5.0

The item to add to the user's content.

data

Property
Type
string | any | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The component used to stream the data represented by the item to the client.

folder

Property
Type
string | PortalFolder | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The portal folder in which to store the item.

DeleteItemsResult

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

The result of the PortalUser.deleteItems() method containing the item, if deletion is successful, and error, if any.

item

Property
Type
PortalItem
Since
ArcGIS Maps SDK for JavaScript 5.0

An item from the items parameter of PortalUser.deleteItems().

success

Property
Type
boolean
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates whether the item was successfully deleted.

error

Property
Type
EsriError | null | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The error if the item was not deleted.

FetchBasemapsOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Supertypes
AbortOptions

include3d

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

When true the basemaps based on Portal.basemapGalleryGroupQuery3D are also fetched, if no basemapGalleryGroupQuery is passed as an argument. When true and a custom basemapGalleryGroupQuery is passed, also 3D basemaps from the custom group are fetched. When not specified, it will default to Portal.use3dBasemaps.

FetchItemsParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

folder

Property
Type
PortalFolder | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The folder to retrieve items from. When folder is not specified, the includeSubfolderItems parameter can be used to include items from subfolders.

inRecycleBin

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Option to retrieve items from the recycle bin instead.

Default value
false

includeSubfolderItems

Property
Type
boolean | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Option to include items from subfolders along with items in the root folder. This parameter does not apply when the folder parameter is specified.

Default value
false

num

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The maximum number of results to be included in the result set response. The maximum value allowed is 100. The start property combined with the num property can be used to paginate the search results.

Default value
10

sortField

Property
Type
string | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

A comma-delimited list of fields to sort by. Allowed values are created, modified, size, and type.

Default value
created

sortOrder

Property
Type
"asc" | "desc" | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The order in which to sort the results. Allowed values are asc for ascending order and desc for descending order.

Default value
asc

start

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The index of the first entry in the result set response. The index is 1-based.

Default value
1

FetchItemsResult

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

The result of the PortalUser.fetchItems() method containing an array of the fetched portal items, the next entry index, and the total number of results.

items

Property
Type
PortalItem[]
Since
ArcGIS Maps SDK for JavaScript 5.0

An array containing user's portal items.

nextStart

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The next entry index if the current result set doesn't contain all results.

total

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The total number of results.

FetchRelatedItemsParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

relationshipType

Property
Type
string
Since
ArcGIS Maps SDK for JavaScript 5.0

The type of relationship between the two items. See Relationship types for a complete listing of types.

direction

Property
Type
"forward" | "reverse" | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The direction of the relationship. Can either be forward (from origin to destination) or reverse (from destination to origin).

FetchResource

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

A resource reference returned in the result of PortalItem.fetchResources().

resource

Property
Type
PortalItemResourceWithPath
Since
ArcGIS Maps SDK for JavaScript 5.0

Relative path of the resource.

created

Property
Type
Date
Since
ArcGIS Maps SDK for JavaScript 5.0

When the resource was created.

size

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The size of the resource in bytes.

FetchResourcesParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Parameters used when fetching portal item resources using PortalItem.fetchResources().

start

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The index of the first entry in the result set response. The index is 1-based. The startproperty, along with the num property can be used to paginate the search results.

Default value
1

num

Property
Type
number | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The maximum number of results to be included in the FetchResourcesResult.resources set response. The maximum value allowed is 100. The start property combined with the num property can be used to paginate the search results.

Default value
10

sortField

Property
Type
"created" | "size" | "resource" | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

A field to sort the results.

Default value
resource

sortOrder

Property
Type
"asc" | "desc" | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

The order in which to sort the results.

Possible ValueDescription
ascSort the results in ascending order.
descSort the results in descending order.
Default value
asc

FetchResourcesResult

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Object returned when PortalItem.fetchResources() promise resolves.

resources

Property
Type
FetchResource[]
Since
ArcGIS Maps SDK for JavaScript 5.0

The fetched resources.

nextStart

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The next entry index if the current result set doesn't contain all results.

total

Property
Type
number
Since
ArcGIS Maps SDK for JavaScript 5.0

The total number of results.

ItemUpdateParameters

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

data

Property
Type
any | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Optional. The component used to stream the data represented by the item to the client.

Members

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

Members returned in the result of PortalGroup.fetchMembers().

admins

Property
Type
string[]
Since
ArcGIS Maps SDK for JavaScript 5.0

The admins.

owner

Property
Type
string
Since
ArcGIS Maps SDK for JavaScript 5.0

The owner.

users

Property
Type
string[]
Since
ArcGIS Maps SDK for JavaScript 5.0

The users.

PortalAuthMode

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"anonymous" | "auto" | "immediate" | "no-prompt"

PortalGroupSortField

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Type
"title" | "uploaded" | "modified" | "username" | "created" | "type" | "owner" | "avg-rating" | "num-ratings" | "num-comments" | "num-views"

PortalItemResourceAddOrUpdateOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Supertypes
AbortOptions

access

Property
Type
"inherit" | "private" | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Indicates the level of access to the resource. The default is "inherit" which causes the resource to have the same access level as the owning item.

Default value
"inherit"

PortalItemResourceWithPath

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0
Supertypes
default