/*! * @license * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved. * * 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 { DownloadBodyCreate, DownloadEntry } from '../model'; import { BaseApi } from './base.api'; /** * Downloads service. */ export declare class DownloadsApi extends BaseApi { /** * Cancel a download * * **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. * * Cancels the creation of a download request. * * **Note:** The download node can be deleted using the **DELETE /nodes/{downloadId}** endpoint * * By default, if the download node is not deleted it will be picked up by a cleaner job which removes download nodes older than a configurable amount of time (default is 1 hour) * Information about the existing progress at the time of cancelling can be retrieved by calling the **GET /downloads/{downloadId}** endpoint * The cancel operation is done asynchronously. * @param downloadId The identifier of a download node. * @returns Promise<{}> */ cancelDownload(downloadId: string): Promise; /** * Create a new download * * **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. * **Note:** The content of the download node can be obtained using the **GET /nodes/{downloadId}/content** endpoint * @param downloadBodyCreate The nodeIds the content of which will be zipped, which zip will be set as the content of our download node. * @param opts Optional parameters * @param opts.fields A list of field names. You can use this parameter to restrict the fields * returned within a response if, for example, you want to save on overall bandwidth. * The list applies to a returned individual entity or entries within a collection. * If the API method also supports the **include** parameter, then the fields specified in the **include** * parameter are returned in addition to those specified in the **fields** parameter. * @returns Promise */ createDownload(downloadBodyCreate: DownloadBodyCreate, opts?: { fields?: string[]; }): Promise; /** * Get a download * * **Note:** this endpoint is available in Alfresco 5.2.1 and newer versions. * @param downloadId The identifier of a download node. * @param opts Optional parameters * @param opts.fields A list of field names. You can use this parameter to restrict the fields * returned within a response if, for example, you want to save on overall bandwidth. * The list applies to a returned individual entity or entries within a collection. * If the API method also supports the **include** parameter, then the fields specified in the **include** * parameter are returned in addition to those specified in the **fields** parameter. * @returns Promise */ getDownload(downloadId: string, opts?: { fields?: string[]; }): Promise; }