import { createStandard, parseCreateInput, type StandardCreateInput } from './wrappers.ts' /** * Create a HubSpot contact. Requires `confirm: true`, or use `dryRun: true`. * @example * import createContact from 'kody:@kody/hubspot/create-contact' * const preview = await createContact({ * properties: { email: 'pat@example.com', firstname: 'Pat' }, * dryRun: true, * }) */ export async function createContact(input: StandardCreateInput) { return createStandard('contacts', input) } /** * Create a HubSpot contact. Requires `confirm: true`, or use `dryRun: true`. * @example * import createContact from 'kody:@kody/hubspot/create-contact' * const preview = await createContact({ * properties: { email: 'pat@example.com' }, * dryRun: true, * }) */ export default async function createContactEntrypoint( params: Partial & Record = {}, ) { return createContact(parseCreateInput(params, 'create-contact')) }