← Public packages
@kody/hubspot
Read HubSpot contacts, companies, deals, and tickets, with dry-run writes and generic CRM object reads.
src/update-company.ts
27 lines · 915 B · TypeScriptimport { updateStandard, parseUpdateInput, type StandardUpdateInput } from './wrappers.ts'
/**
* Update a HubSpot company. Requires `confirm: true`, or use `dryRun: true`.
* @example
* import updateCompany from 'kody:@kody/hubspot/update-company'
* const preview = await updateCompany({
* id: '123',
* properties: { },
* dryRun: true,
* })
*/
export async function updateCompany(input: StandardUpdateInput) {
return updateStandard('companies', input)
}
/**
* Update a HubSpot company. Requires `confirm: true`, or use `dryRun: true`.
* @example
* import updateCompany from 'kody:@kody/hubspot/update-company'
* const preview = await updateCompany({ id: '123', properties: {}, dryRun: true })
*/
export default async function updateCompanyEntrypoint(
params: Partial<StandardUpdateInput> & Record<string, unknown> = {},
) {
return updateCompany(parseUpdateInput(params, 'update-company'))
}