//native
type Kustomer = {
apiKey: string;
};
/**
* Delete Theme Draft Revision
* Deletes a Knowledge Base theme revision draft.
*/
export async function main(auth: Kustomer, themeId: string) {
const url = new URL(
`https://api.kustomerapp.com/v3/kb/themes/${themeId}/revisions/draft`,
);
const response = await fetch(url, {
method: "DELETE",
headers: {
Authorization: "Bearer " + auth.apiKey,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.text();
}
Submitted by hugo697 235 days ago