Skip to content

src/update-contact.ts

11 lines · 453 B · TypeScript
Raw
import { parseUpdateContact, updateContact } from './contacts.ts'

/**
 * Update an Intercom contact. Requires `confirm: true`, or use `dryRun: true`.
 * @example
 * import updateContact from 'kody:@kody/intercom/update-contact'
 * const preview = await updateContact({ id, name: 'Pat', dryRun: true })
 */
export default async function updateContactEntrypoint(params: Record<string, unknown> = {}) {
	return updateContact(parseUpdateContact(params))
}