@esri/solution-common
Version:
Provides general helper functions for @esri/solution.js.
635 lines (634 loc) • 32 kB
TypeScript
/** @license
* Copyright 2018 Esri
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { IAddGroupResponse, IAdditionalGroupSearchOptions, IDependency, IFeatureServiceProperties, IFolderStatusResponse, IItemTemplate, IItemUpdate, IPostProcessArgs, IRelatedItems, IStatusResponse, IUpdate } from "./interfaces";
import { IAddFolderResponse, ICreateItemResponse, ICreateServiceResult, IExtent, IGroup, IGroupAdd, IItem, IParams, ISpatialReference, ItemRelationshipType, IUpdateItemResponse, IArcGISIdentityManagerOptions, IMoveItemResponse, IPagingParams, ISearchOptions, ISearchResult, SearchQueryBuilder, UserSession } from "./arcgisRestJS";
export declare function addItemData(id: string, data: any, authentication: UserSession): Promise<IUpdateItemResponse>;
/**
* Creates a ArcGISIdentityManager via a function so that the global arcgisSolution variable can access authentication.
*
* @param options See https://developers.arcgis.com/arcgis-rest-js/api-reference/arcgis-rest-request/IArcGISIdentityManagerOptions/
* @returns UserSession (ArcGISIdentityManager)
*/
export declare function getUserSession(options?: IArcGISIdentityManagerOptions): UserSession;
/**
* Adds a forward relationship between two items.
*
* @param originItemId Origin of relationship
* @param destinationItemId Destination of relationship
* @param relationshipType Type of relationship
* @param authentication Credentials for the request
* @returns A Promise to add item resources.
*/
export declare function addForwardItemRelationship(originItemId: string, destinationItemId: string, relationshipType: ItemRelationshipType, authentication: UserSession): Promise<IStatusResponse>;
/**
* Adds forward relationships for an item.
*
* @param originItemId Origin of relationship
* @param destinationRelationships Destinations
* @param authentication Credentials for the request
* @returns A Promise to add item resources.
*/
export declare function addForwardItemRelationships(originItemId: string, destinationRelationships: IRelatedItems[], authentication: UserSession): Promise<IStatusResponse[]>;
/**
* Adds a token to the query parameters of a URL.
*
* @param url URL to use as base
* @param authentication Credentials to be used to generate token for URL
* @returns A promise that will resolve with the supplied URL with `token=<token>` added to its query params
* unless either the URL doesn't exist or the token can't be generated
*/
export declare function addTokenToUrl(url: string, authentication: UserSession): Promise<string>;
/**
* Calls addToDefinition for the service.
*
* Added retry due to some solutions failing to deploy in specific orgs/hives due to timeouts.
* On the first pass we will use the quicker sync request to add.
* If it fails we will use an async request that will avoid the timeout errors.
*
* @param url URL to use as base
* @param options the info to add to the services definition
* @param skipRetry a boolean to control if retry logic will be used. Defaults to false.
* @param useAsync a boolean to control if we will use an async request
* @returns A promise that will resolve when the request has completed
*/
export declare function addToServiceDefinition(url: string, options: any, skipRetry?: boolean, useAsync?: boolean): Promise<void>;
/**
* When using an async request we need to poll the status url to know when the request has completed or failed.
*
* @param result the result returned from the addToDefinition request.
* This will contain a status url or the standard sync result.
* @param authentication Credentials to be used to generate token for URL
* @returns A promise that will resolve when the request has completed
*/
export declare function checkRequestStatus(result: any, authentication: any): Promise<void>;
/**
* Converts a general search into an ISearchOptions structure.
*
* @param search Search specified in one of three ways
* @returns Recast search
*/
export declare function convertToISearchOptions(search: string | ISearchOptions | SearchQueryBuilder): ISearchOptions;
/**
* Simple validate function to ensure all coordinates are numbers
* In some cases orgs can have null or undefined coordinate values associated with the org extent
*
* @param extent the extent to validate
* @returns the provided extent or a default global extent if some coordinates are not numbers
* @private
*/
export declare function _validateExtent(extent: IExtent): IExtent;
/**
* If the request to convert the extent fails it has commonly been due to an invalid extent.
* This function will first attempt to use the provided extent. If it fails it will default to
* the source items extent and if that fails it will then use a default global extent.
*
* @param extent the extent to convert
* @param fallbackExtent the extent to convert if the main extent does not project to the outSR
* @param outSR the spatial reference to project to
* @param geometryServiceUrl the service url for the geometry service to use
* @param authentication the credentials for the requests
* @returns the extent projected to the provided spatial reference
* or the world extent projected to the provided spatial reference
* @private
*/
export declare function convertExtentWithFallback(extent: IExtent, fallbackExtent: any, outSR: ISpatialReference, geometryServiceUrl: string, authentication: UserSession): Promise<any>;
/**
* Converts an extent to a specified spatial reference.
*
* @param extent Extent object to check and (possibly) to project
* @param outSR Desired spatial reference
* @param geometryServiceUrl Path to geometry service providing `findTransformations` and `project` services
* @param authentication Credentials for the request
* @returns Original extent if it's already using outSR or the extents projected into the outSR
*/
export declare function convertExtent(extent: IExtent, outSR: ISpatialReference, geometryServiceUrl: string, authentication: UserSession): Promise<any>;
/**
* Publishes a feature service as an AGOL item; it does not include its layers and tables
*
* @param newItemTemplate Template of item to be created
* @param authentication Credentials for the request
* @param templateDictionary Hash of facts: org URL, adlib replacements, user; .user.folders property contains a list
* @returns A promise that will resolve with an object reporting success and the Solution id
*/
export declare function createFeatureService(newItemTemplate: IItemTemplate, authentication: UserSession, templateDictionary: any): Promise<ICreateServiceResult>;
/**
* Publishes an item and its data, metadata, and resources as an AGOL item.
*
* @param itemInfo Item's `item` section
* @param folderId Id of folder to receive item; null indicates that the item goes into the root
* folder; ignored for Group item type
* @param destinationAuthentication Credentials for for requests to where the item is to be created
* @param itemThumbnailUrl URL to image to use for item thumbnail
* @param itemThumbnailAuthentication Credentials for requests to the thumbnail source
* @param dataFile Item's `data` section
* @param metadataFile Item's metadata file
* @param resourcesFiles Item's resources
* @param access Access to set for item: "public", "org", "private"
* @returns A promise that will resolve with an object reporting success or failure and the Solution id
*/
export declare function createFullItem(itemInfo: any, folderId: string | undefined, destinationAuthentication: UserSession, itemThumbnailUrl?: string, itemThumbnailAuthentication?: UserSession, dataFile?: File, metadataFile?: File, resourcesFiles?: File[], access?: string): Promise<ICreateItemResponse>;
/**
* Publishes an item and its data as an AGOL item.
*
* @param itemInfo Item's `item` section
* @param dataInfo Item's `data` section
* @param authentication Credentials for the request
* @param folderId Id of folder to receive item; null indicates that the item goes into the root
* folder; ignored for Group item type
* @param access Access to set for item: "public", "org", "private"
* @returns A promise that will resolve with an object reporting success and the Solution id
*/
export declare function createItemWithData(itemInfo: any, dataInfo: any, authentication: UserSession, folderId: string | undefined, access?: string): Promise<ICreateItemResponse>;
/**
* Creates a folder using a numeric suffix to ensure uniqueness if necessary.
*
* @param title Folder title, used as-is if possible and with suffix otherwise
* @param templateDictionary Hash of facts: org URL, adlib replacements, user; .user.folders property contains a list
* of known folder names; function updates list with existing names not yet known, and creates .user.folders if it
* doesn't exist in the dictionary
* @param authentication Credentials for creating folder
* @returns Id of created folder
*/
export declare function createUniqueFolder(title: string, templateDictionary: any, authentication: UserSession): Promise<IAddFolderResponse>;
/**
* Creates a group using numeric suffix to ensure uniqueness.
*
* @param title Group title, used as-is if possible and with suffix otherwise
* @param templateDictionary Hash of facts: org URL, adlib replacements, user
* @param authentication Credentials for creating group
* @param owner Optional arg for the Tracking owner
* If the tracking owner is not the one deploying the solution
* tracker groups will be created under the deployment user but
* will be reassigned to the tracking owner.
* @returns Information about created group
*/
export declare function createUniqueGroup(title: string, groupItem: IGroupAdd, templateDictionary: any, authentication: UserSession, owner?: string): Promise<IAddGroupResponse>;
/**
* Gets the ids of the dependencies of an AGOL feature service item.
* Dependencies will only exist when the service is a view.
*
* @param itemTemplate Template of item to be created
* @param authentication Credentials for the request
* @returns A promise that will resolve a list of dependencies
*/
export declare function extractDependencies(itemTemplate: IItemTemplate, authentication?: UserSession): Promise<IDependency[]>;
/**
* Get json info for the services layers
*
* @param serviceUrl the url for the service
* @param layerList list of base layer info
* @param authentication Credentials for the request
* @returns A promise that will resolve a list of dependencies
*/
export declare function getLayers(serviceUrl: string, layerList: any[], authentication: UserSession): Promise<any[]>;
/**
* Add additional options to a layers definition.
*
* @param args The IPostProcessArgs for the request(s)
* @param isPortal boolean to indicate if we are deploying to portal
*
* @returns An array of update instructions
* @private
*/
export declare function getLayerUpdates(args: IPostProcessArgs, isPortal: boolean): IUpdate[];
/**
* Moves an AGO item to a specified folder.
*
* @param itemId Id of item to move
* @param folderId Id of folder to receive item
* @param authentication Credentials for the request
* @returns A Promise resolving to the results of the move
*/
export declare function moveItemToFolder(itemId: string, folderId: string, authentication: UserSession): Promise<IMoveItemResponse>;
/**
* Moves a list of AGO items to a specified folder.
*
* @param itemIds Ids of items to move
* @param folderId Id of folder to receive item
* @param authentication Credentials for the request
* @returns A Promise resolving to the results of the moves
*/
export declare function moveItemsToFolder(itemIds: string[], folderId: any, authentication: UserSession): Promise<IMoveItemResponse[]>;
/**
* Sorts relationships based on order of supporting layers and tables in the service definition
*
* @param layers the layers from the service
* @param tables the tables from the service
* @param relUpdates the relationships to add for the service
*
* @returns An array with relationships that have been sorted
* @private
*/
export declare function _sortRelationships(layers: any[], tables: any[], relUpdates: any): any[];
/**
* Add additional options to a layers definition
*
* Added retry due to some solutions failing to deploy in specific orgs/hives
*
*
* @param Update will contain either add, update, or delete from service definition call
* @param skipRetry defaults to false. when true the retry logic will be ignored
* @returns A promise that will resolve when service definition call has completed
* @private
*/
export declare function getRequest(update: IUpdate, skipRetry?: boolean, useAsync?: boolean, isPortal?: boolean): Promise<void>;
/**
* Fills in missing data, including full layer and table definitions, in a feature services' definition.
*
* @param itemTemplate Feature service item, data, dependencies definition to be modified
* @param authentication Credentials for the request to AGOL
* @returns A promise that will resolve when fullItem has been updated
* @private
*/
export declare function getServiceLayersAndTables(itemTemplate: IItemTemplate, authentication: UserSession): Promise<IItemTemplate>;
/**
* Get service properties for the given url and update key props
*
* @param serviceUrl the feature service url
* @param authentication Credentials for the request to AGOL
* @param workforceService boolean to indicate if extra workforce service steps should be handled
* @returns A promise that will resolve with the service properties
* @private
*/
export declare function getFeatureServiceProperties(serviceUrl: string, authentication: UserSession, workforceService?: boolean): Promise<IFeatureServiceProperties>;
/**
* Fetches the configuration of a workflow.
*
* @param itemId Id of the workflow item
* @param workflowBaseUrl URL of the workflow manager, e.g., "https://workflow.arcgis.com/orgId"
* @param authentication Credentials for the request to AGOL
* @returns Promise resolving with the workflow configuration in a zip file
* @throws {WorkflowJsonExceptionDTO} if request to workflow manager fails
*/
export declare function getWorkflowConfigurationZip(itemId: string, workflowBaseUrl: string, authentication: UserSession): Promise<File>;
/**
* Sets the configuration of a workflow.
*
* @param itemId Id of the workflow item
* @param configurationZipFile Configuration files in a zip file
* @param workflowBaseUrl URL of the workflow manager, e.g., "https://workflow.arcgis.com/orgId"
* @param authentication Credentials for the request to AGOL
* @returns Promise resolving with the workflow configuration in a zip file
* @throws {WorkflowJsonExceptionDTO} if request to workflow manager fails
*/
export declare function setWorkflowConfigurationZip(itemId: string, configurationZipFile: File, workflowBaseUrl: string, authentication: UserSession): Promise<IStatusResponse>;
/**
* Parses the layers array and will filter subsets of Layers and Tables
* Layers and Tables are both returned in the layers array when we access a feature service from the admin api.
*
* @param adminData The data of the feature service
* @returns A mutated version of the provided adminData
* @private
*/
export declare function _parseAdminServiceData(adminData: any): any;
/**
* livingatlas designation test.
* These layers should not be templatized or depolyed
*
* @param groupDesignations the items group designations to evaluate
* @returns A boolean indicating if the invalid designation is found in the item info
*/
export declare function hasInvalidGroupDesignations(groupDesignations: string): boolean;
/**
* Removes a folder from AGO.
*
* @param folderId Id of a folder to delete
* @param authentication Credentials for the request to AGO
* @returns A promise that will resolve with the result of the request
*/
export declare function removeFolder(folderId: string, authentication: UserSession): Promise<IFolderStatusResponse>;
/**
* Removes a group from AGO.
*
* @param groupId Id of a group to delete
* @param authentication Credentials for the request to AGO
* @returns A promise that will resolve with the result of the request
*/
export declare function removeGroup(groupId: string, authentication: UserSession): Promise<IStatusResponse>;
/**
* Removes an item from AGO.
*
* @param itemId Id of an item to delete
* @param authentication Credentials for the request to AGO
* @param permanentDelete If true (the default), the item is permanently deleted; if false and the item type
* supports the recycle bin, the item will be put into the recycle bin
* @returns A promise that will resolve with the result of the request
*/
export declare function removeItem(itemId: string, authentication: UserSession, permanentDelete?: boolean): Promise<IStatusResponse>;
/**
* Removes an item or group from AGO.
*
* @param itemId Id of an item or group to delete
* @param authentication Credentials for the request to AGO
* @param permanentDelete If true (the default), the item is permanently deleted; if false and the item type
* supports the recycle bin, the item will be put into the recycle bin; note that this does not apply to groups
* @returns A promise that will resolve with the result of the request
*/
export declare function removeItemOrGroup(itemId: string, authentication: UserSession, permanentDelete?: boolean): Promise<IStatusResponse>;
/**
* Searches for items matching a query and that the caller has access to.
*
* @param search Search string (e.g., "q=redlands+map") or a more detailed structure that can include authentication
* @returns Promise resolving with search results
* @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
*/
export declare function searchItems(search: string | ISearchOptions | SearchQueryBuilder): Promise<ISearchResult<IItem>>;
/**
* Searches for items matching a query and that the caller has access to, continuing recursively until done.
*
* @param search Search string (e.g., "q=redlands+map") or a more detailed structure that can include authentication
* @param accumulatedResponse Response built from previous requests
* @returns Promise resolving with search results
* @see https://developers.arcgis.com/rest/users-groups-and-items/search.htm
*/
export declare function searchAllItems(search: string | ISearchOptions | SearchQueryBuilder, accumulatedResponse?: ISearchResult<IItem>): Promise<ISearchResult<IItem>>;
/**
* Searches for groups matching criteria.
*
* @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
* @param authentication Credentials for the request to AGO
* @param additionalSearchOptions Adjustments to search, such as tranche size
* @returns A promise that will resolve with a structure with a tranche of results and
* describing how many items are available
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-search.htm
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
*/
export declare function searchGroups(searchString: string, authentication: UserSession, additionalSearchOptions?: IAdditionalGroupSearchOptions): Promise<ISearchResult<IGroup>>;
/**
* Searches for groups matching criteria recurusively.
*
* @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
* @param authentication Credentials for the request to AGO
* @param groups List of groups that have been found from previous requests
* @param inPagingParams The paging params for the recurisve searching
*
* @returns A promise that will resolve with all groups that meet the search criteria
*/
export declare function searchAllGroups(searchString: string, authentication: UserSession, groups?: IGroup[], inPagingParams?: IPagingParams): Promise<IGroup[]>;
/**
* Searches for group contents matching criteria recursively.
*
* @param groupId Group whose contents are to be searched
* @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
* @param authentication Credentials for the request to AGO
* @param additionalSearchOptions Adjustments to search, such as tranche size and categories of interest; categories
* are supplied as an array: each array element consists of one or more categories to be ORed; array elements are ANDed
* @param portalUrl Rest Url of the portal to perform the search
* @param accumulatedResponse Response built from previous requests
* @returns A promise that will resolve with a structure with a tranche of results and
* describing how many items are available
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-content-search.htm
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
*/
export declare function searchGroupAllContents(groupId: string, searchString: string, authentication: UserSession, additionalSearchOptions?: IAdditionalGroupSearchOptions, portalUrl?: string, accumulatedResponse?: ISearchResult<IItem>): Promise<ISearchResult<IItem>>;
/**
* Searches for group contents matching criteria.
*
* @param groupId Group whose contents are to be searched
* @param searchString Text for which to search, e.g., 'redlands+map', 'type:"Web Map" -type:"Web Mapping Application"'
* @param authentication Credentials for the request to AGO
* @param additionalSearchOptions Adjustments to search, such as tranche size and categories of interest; categories
* are supplied as an array: each array element consists of one or more categories to be ORed; array elements are ANDed
* @param portalUrl Rest Url of the portal to perform the search
* @returns A promise that will resolve with a structure with a tranche of results and
* describing how many items are available
* @see https://developers.arcgis.com/rest/users-groups-and-items/group-content-search.htm
* @see https://developers.arcgis.com/rest/users-groups-and-items/search-reference.htm
*/
export declare function searchGroupContents(groupId: string, searchString: string, authentication: UserSession, additionalSearchOptions?: IAdditionalGroupSearchOptions, portalUrl?: string): Promise<ISearchResult<IItem>>;
/**
* Reassign ownership of a group
*
* @param groupId Group to remove users from
* @param userName The new owner for the group
* @param authentication Credentials for the request to
*
* @returns A promise that will resolve after the group ownership has been assigned
*
*/
export declare function reassignGroup(groupId: string, userName: string, authentication: UserSession): Promise<any>;
/**
* Remove users from a group
*
* @param groupId Group to remove users from
* @param users List of users to remove from the group
* @param authentication Credentials for the request to
*
* @returns A promise that will resolve after the users have been removed
*
*/
export declare function removeUsers(groupId: string, users: string[], authentication: UserSession): Promise<any>;
/**
* Shares an item to the defined group
*
* @param groupId Group to share with
* @param id the item id to share with the group
* @param destinationAuthentication Credentials for the request to AGO
* @param owner owner of the group when sharing tracking items (can be different from the deploying user)
*
* @returns A promise that will resolve after the item has been shared
*
*/
export declare function shareItem(groupId: string, id: string, destinationAuthentication: UserSession, owner?: string): Promise<void>;
/**
* Updates an item.
*
* @param itemInfo The base info of an item; note that this content will be serialized, which doesn't work
* for binary content
* @param authentication Credentials for request
* @param folderId Item's folder
* @param additionalParams Updates that are put under the `params` property, which is not serialized
* @return
*/
export declare function updateItem(itemInfo: IItemUpdate, authentication: UserSession, folderId?: string, additionalParams?: any): Promise<IUpdateItemResponse>;
/**
* Updates a group.
*
* @param groupInfo The base info of a group; note that this content will be serialized, which doesn't work
* for binary content
* @param authentication Credentials for request
* @param additionalParams Updates that are put under the `params` property, which is not serialized
* @returns A Promise that will resolve with the success/failure status of the request
*/
export declare function updateGroup(groupInfo: IGroup, authentication: UserSession, additionalParams?: any): Promise<{
success: boolean;
groupId: string;
}>;
/**
* Updates an item.
*
* @param itemInfo The base info of an item
* @param data The items data section
* @param authentication Credentials for requests
* @param thumbnail optional thumbnail to update
* @param access "public" or "org"
* @return
*/
export declare function updateItemExtended(itemInfo: IItemUpdate, data: any, authentication: UserSession, thumbnail?: File, access?: string | undefined, templateDictionary?: any): Promise<IUpdateItemResponse>;
/**
* Update an item's base and data using a dictionary.
*
* @param {string} itemId The item ID
* @param {any} templateDictionary The template dictionary
* @param {UserSession} authentication The destination session info
* @returns Promise resolving to successfulness of update
*/
export declare function updateItemTemplateFromDictionary(itemId: string, templateDictionary: any, authentication: UserSession): Promise<IUpdateItemResponse>;
/**
* Updates the URL of an item.
*
* @param id AGOL id of item to update
* @param url URL to assign to item's base section
* @param authentication Credentials for the request
* @returns A promise that will resolve with the item id when the item has been updated or an AGO-style JSON failure
* response
*/
export declare function updateItemURL(id: string, url: string, authentication: UserSession): Promise<string>;
/**
* Adds a data section to an item.
*
* @param itemId Id of item to receive data file
* @param dataFile Data to be added
* @param authentication Credentials for the request
* @returns Promise reporting success or failure
* @private
*/
export declare function _addItemDataFile(itemId: string, dataFile: File, authentication: UserSession): Promise<IUpdateItemResponse>;
/**
* Adds a metadata file to an item.
*
* @param itemId Id of item to receive data file
* @param metadataFile Metadata to be added
* @param authentication Credentials for the request
* @returns Promise reporting success or failure
* @private
*/
export declare function _addItemMetadataFile(itemId: string, metadataFile: File, authentication: UserSession): Promise<IUpdateItemResponse>;
/**
* Accumulates the number of relationships in a collection of layers.
*
* @param List of layers to examine
* @returns The number of relationships
* @private
*/
export declare function _countRelationships(layers: any[]): number;
/**
* Gets the full definitions of the layers affiliated with a hosted service.
*
* @param serviceUrl URL to hosted service
* @param layerList List of layers at that service...must contain id
* @param authentication Credentials for the request
* @returns A promise that will resolve with a list of the layers from the admin api
* @private
*/
export declare function _getCreateServiceOptions(newItemTemplate: IItemTemplate, authentication: UserSession, templateDictionary: any): Promise<any>;
/**
* When the services spatial reference does not match that of it's default extent
* use the out SRs default extent if it exists in the templateDictionary
* this should be set when adding a custom out wkid to the params before calling deploy
* this will help avoid situations where the orgs default extent and default world extent
* will not project successfully to the out SR
*
* @param serviceInfo the object that contains the spatial reference to evaluate
* @param templateDictionary the template dictionary
* @returns the extent to use as the fallback
* @private
*/
export declare function _getFallbackExtent(serviceInfo: any, templateDictionary: any): any;
/**
* Add relationships to all layers in one call to retain fully functioning composite relationships
*
* @param args The IPostProcessArgs for the request(s)
* @returns Any relationships that should be updated for the service
* @private
*/
export declare function _getRelationshipUpdates(args: IPostProcessArgs): any;
/**
* Get the stored contingent values and structure them to be added to the services layers.
*
* @param args The IPostProcessArgs for the request(s)
* @returns Any contingent values that should be added to the service.
* @private
*/
export declare function _getContingentValuesUpdates(args: IPostProcessArgs): any;
/**
* Get the stored subtype values and structure them to be added to the services layers.
*
* @param args The IPostProcessArgs for the request(s)
* @returns Any subtype values that should be added to the service.
* @private
*/
export declare function _getSubtypeUpdates(args: IPostProcessArgs): any;
/**
* Get refresh, add, update, or delete definition info
*
* @param url the base admin url for the service
* @param id the id of the layer
* @param obj parameters for the request
* @param args various arguments to help support the request
* @param type type of update the request will handle
* @returns IUpdate that has the request url and arguments
* @private
*/
export declare function _getUpdate(url: string, id: any, obj: any, args: any, type: "delete" | "update" | "add" | "refresh"): IUpdate;
/**
* Changes just the domain part of a URL to lowercase.
*
* @param url URL to modify
* @return Adjusted URL
* @see From `getServerRootUrl` in arcgis-rest-js' ArcGISIdentityManager.ts
* @private
*/
export declare function _lowercaseDomain(url: string): string;
/**
* Checks the two main parts of an item for unresolved variables and reports any found.
*
* @param base Item's base section
* @param data Item's data section
* @private
*/
export declare function _reportVariablesInItem(itemId: string, itemType: string, base: any, data: any): void;
/**
* Updates a feature service item.
*
* @param item Item to update
* @param itemTemplate item template for the new item
* @param serviceInfo Service information
* @param params arcgis-rest-js params to update
* @param isPortal Is the service hosted in a portal?
* @returns Updated item
* @private
*/
export declare function _setItemProperties(item: any, itemTemplate: IItemTemplate, serviceInfo: any, params: IParams, isPortal: boolean): any;
/**
* Set isUnique as true for indexes that reference origin relationship keyFields.
*
* @param serviceInfo Service information
* @private
*/
export declare function _updateIndexesForRelationshipKeyFields(serviceInfo: any): void;
/**
* Updates the URL of an item.
*
* @param id AGOL id of item to update
* @param url URL to assign to item's base section
* @param authentication Credentials for the request
* @param numAttempts Number of times to try to set the URL if AGO says that it updated the URL, but really didn't
* @returns A promise that will resolve with the item id when the item has been updated or an AGO-style JSON failure
* response
* @private
*/
export declare function _updateItemURL(id: string, url: string, authentication: UserSession, numAttempts?: number): Promise<string>;