//native
/**
* Delete Timesheet Clock Entries
* Delete timesheet clock entries.
*/
export async function main(auth: RT.BambooHr, body: Body) {
const url = new URL(
`https://${auth.companyDomain}.bamboohr.com/api/v1/time_tracking/clock_entries/delete`
)
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Basic ' + btoa(`${auth.apiKey}:x`)
},
body: JSON.stringify(body)
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.json()
}
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* Request body schema for operations involving multiple clock entry IDs
*/
export interface Body {
/**
* Array of clock entry IDs to process
*
* @minItems 1
*/
clockEntryIds: number[]
[k: string]: unknown
}
Submitted by hugo697 235 days ago