UNPKG

@archon-inc/sdk

Version:

Integrate easily to our government platform using this SDK. More info on https://archon.inc/sdk

17 lines (13 loc) 534 B
import { Archon } from "../Archon.js"; import { ARID } from "../types/policy.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. */ export default async function deleteResourceById(arid: ARID): Promise<void> { const response = await Archon.request(`/policy/resource/${arid}`, "DELETE"); if (response.status !== 200) { throw new Error(`Failed to delete resource with ARID ${arid}: ${response.data}`); } }