Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kody/hubspot

src/get-company.ts

23 lines · 682 B · TypeScript
import { getStandard, parseGetInput, type StandardGetInput } from './wrappers.ts'

/**
 * Get one HubSpot company.
 * @example
 * import getCompany from 'kody:@kody/hubspot/get-company'
 * const record = await getCompany({ id: '123' })
 */
export async function getCompany(input: StandardGetInput) {
	return getStandard('companies', input)
}

/**
 * Get one HubSpot company.
 * @example
 * import getCompany from 'kody:@kody/hubspot/get-company'
 * const record = await getCompany({ id: '123' })
 */
export default async function getCompanyEntrypoint(
	params: Partial<StandardGetInput> & Record<string, unknown> = {},
) {
	return getCompany(parseGetInput(params, 'get-company'))
}