import { createStandard, parseCreateInput, type StandardCreateInput } from './wrappers.ts'
/**
* Create a HubSpot company. Requires `confirm: true`, or use `dryRun: true`.
* @example
* import createCompany from 'kody:@kody/hubspot/create-company'
* const preview = await createCompany({
* properties: { name: 'Acme Inc', domain: 'acme.example' },
* dryRun: true,
* })
*/
export async function createCompany(input: StandardCreateInput) {
return createStandard('companies', input)
}
/**
* Create a HubSpot company. Requires `confirm: true`, or use `dryRun: true`.
* @example
* import createCompany from 'kody:@kody/hubspot/create-company'
* const preview = await createCompany({
* properties: { name: 'Acme Inc' },
* dryRun: true,
* })
*/
export default async function createCompanyEntrypoint(
params: Partial<StandardCreateInput> & Record<string, unknown> = {},
) {
return createCompany(parseCreateInput(params, 'create-company'))
}