"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deleteVersion = deleteVersion;
const getResourceNameFromVersionId_1 = require("./_internal/getResourceNameFromVersionId");
const arcgis_rest_portal_1 = require("@esri/arcgis-rest-portal");
/**
 * Deletes the version specified by the entity id and versionId
 * @param id
 * @param versionId
 * @param owner
 * @param requestOptions
 * @returns
 */
async function deleteVersion(id, versionId, owner, requestOptions) {
    return (0, arcgis_rest_portal_1.removeItemResource)(Object.assign(Object.assign({}, requestOptions), { id,
        owner, resource: (0, getResourceNameFromVersionId_1.getResourceNameFromVersionId)(versionId) }));
}
//# sourceMappingURL=deleteVersion.js.map