/*!
 * Copyright (C) Microsoft Corporation. All rights reserved.
 */
import { getPowerSdkInstance } from '../runtime/getRuntimeContext';
/**
 * Downloads binary data from an image column of an existing record.
 * Returns the image contents as binary.
 * This API is intended for use with image columns in Dataverse, and will not work with other column types.
 * For image columns in Dataverse, the imageRelativeUrl is the relative URL of the image, and the tableName is the logical name of the Dataverse table.
 * See documentation for more details:
 * https://learn.microsoft.com/en-us/power-apps/developer/data-platform/file-column-data?tabs=webapi#download-a-file-in-a-single-request-using-web-api
 * @param dataSourcesInfo - The data sources information.
 * @param tableName - The logical name of the Dataverse table.
 * @param recordId - The identifier of the record containing the image.
 * @param columnName - The name of the image column.
 * @param fullSize - When true, requests the full-size image (`?size=full`). Defaults to false (thumbnail/smaller size image).
 * @returns - A promise that resolves to an operation result with the image contents as binary.
 * @private
 */
export async function downloadImageFromRecord(dataSourcesInfo, tableName, recordId, columnName, fullSize) {
    return await (await getPowerSdkInstance(dataSourcesInfo)).Data.downloadImageFromRecord(tableName, recordId, columnName, fullSize);
}
//# sourceMappingURL=downloadImageFromRecord.js.map