← Public packages
@kentcdodds/cal-com
Cal.com helpers for booking pages, event types, slots, and webhooks.
src/request.js
16 lines · 698 B · JavaScriptimport { calRequest } from './cal-com.js'
/**
* Call a Cal.com API v2 endpoint using the saved `cal-com-api-key` secret.
* Prefer named helpers; use this for paths not covered by the OpenAPI scaffold.
* @param {Object} [input]
* @param {string} input.path Relative API path such as `/v2/me` or `/me`.
* @returns {Promise<{ status: number, data: unknown }>} HTTP status and parsed JSON body.
* @example
* import request from 'kody:@kentcdodds/cal-com/request'
* const result = await request({ path: '/me' })
* // => { status: 200, data: { status: 'success', data: { username: '...' } } }
*/
export default async function requestEntrypoint(input = {}) {
return await calRequest(input)
}