Skip to content

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

Package listing

@kody/hubspot

src/list-tickets.ts

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

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

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