UNPKG

@esri/solution-common

Version:

Provides general helper functions for @esri/solution.js.

36 lines (35 loc) 1.81 kB
/** @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. */ /** * @module removeItems */ import { IDeleteSolutionOptions, ISolutionPrecis } from "../interfaces"; import { UserSession } from "../arcgisRestJS"; /** * Removes a list of items starting from the end. * * @param itemIds List of ids of items to remove * @param hubSiteItemIds List of ids in itemIds that are for Hub Sites * @param authentication Credentials for the request * @param percentDone Percent done in range 0 to 100 * @param progressPercentStep Amount that percentDone changes for each item deleted * @param solutionDeletedSummary Solution summary containing items successfully deleted * @param solutionFailureSummary Solution summary containing items that could not be deleted * @param deleteOptions Progress reporting and deletion permanence options * @returns Promise that will resolve with a list of two solution summaries: successful deletions * and failed deletions. Ignored items (e.g., already deleted) will not be in either list. */ export declare function removeItems(solutionSummary: ISolutionPrecis, hubSiteItemIds: string[], authentication: UserSession, percentDone: number, progressPercentStep: number, deleteOptions?: IDeleteSolutionOptions): Promise<ISolutionPrecis[]>;