@archon-inc/sdk
Version:
Integrate easily to our government platform using this SDK. More info on https://archon.inc/sdk
16 lines (15 loc) • 585 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = deleteResourceById;
const Archon_js_1 = require("../Archon.js");
/**
* Delete a resource by its ARID.
* @param arid - The ARID of the resource to delete.
* @returns A promise resolving when the resource is deleted.
*/
async function deleteResourceById(arid) {
const response = await Archon_js_1.Archon.request(`/policy/resource/${arid}`, "DELETE");
if (response.status !== 200) {
throw new Error(`Failed to delete resource with ARID ${arid}: ${response.data}`);
}
}