Skip to content

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

Package listing

@kody/hubspot

src/list-contacts.ts

23 lines · 703 B · TypeScript
import { listStandard, parseListInput, type StandardListInput } from './wrappers.ts'

/**
 * List HubSpot contacts.
 * @example
 * import listContacts from 'kody:@kody/hubspot/list-contacts'
 * const { items } = await listContacts({ limit: 10 })
 */
export async function listContacts(input: StandardListInput = {}) {
	return listStandard('contacts', input)
}

/**
 * List HubSpot contacts.
 * @example
 * import listContacts from 'kody:@kody/hubspot/list-contacts'
 * const result = await listContacts({ limit: 10 })
 */
export default async function listContactsEntrypoint(
	params: StandardListInput & Record<string, unknown> = {},
) {
	return listContacts(parseListInput(params, 'list-contacts'))
}