import { updateStandard, parseUpdateInput, type StandardUpdateInput } from './wrappers.ts'
/**
* Update a HubSpot deal. Requires `confirm: true`, or use `dryRun: true`.
* @example
* import updateDeal from 'kody:@kody/hubspot/update-deal'
* const preview = await updateDeal({
* id: '123',
* properties: { },
* dryRun: true,
* })
*/
export async function updateDeal(input: StandardUpdateInput) {
return updateStandard('deals', input)
}
/**
* Update a HubSpot deal. Requires `confirm: true`, or use `dryRun: true`.
* @example
* import updateDeal from 'kody:@kody/hubspot/update-deal'
* const preview = await updateDeal({ id: '123', properties: {}, dryRun: true })
*/
export default async function updateDealEntrypoint(
params: Partial<StandardUpdateInput> & Record<string, unknown> = {},
) {
return updateDeal(parseUpdateInput(params, 'update-deal'))
}