Skip to content

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

Package listing

@kody/hubspot

src/get-ticket.ts

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

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

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