import { getItemResource } from "@esri/arcgis-rest-portal";
import { getResourceNameFromVersionId } from "./_internal/getResourceNameFromVersionId";
/**
 * Returns an IVersion object for the specified entity id and versionId
 * @param id
 * @param versionId
 * @param requestOptions
 * @returns
 */
export async function getVersion(id, versionId, requestOptions) {
    return getItemResource(id, Object.assign(Object.assign({}, requestOptions), { fileName: getResourceNameFromVersionId(versionId), readAs: "json" }));
}
//# sourceMappingURL=getVersion.js.map