export type CrmTimelineTimelineEventIFrame = {headerLabel: string, height: number, linkLabel: string, url: string, width: number}; export type CrmTimelineAppEventOccurrence = {domain?: string | undefined, email?: string | undefined, eventTypeName: string, extraData?: Record | undefined, id: string, objectId?: string | undefined, objectTypeFullyQualifiedName?: string | undefined, properties: {[key: string]: string}, timelineIFrame?: CrmTimelineTimelineEventIFrame | undefined, timestamp?: string | undefined, utk?: string | undefined}; export type CreateApiIntegratorsTimeline202603EventsArgs = {body: CrmTimelineAppEventOccurrence}; export type CreateApiIntegratorsTimeline202603EventsOptions = {baseUrl?: string | undefined, privateApps?: string | undefined, fetch?: typeof fetch | undefined}; /** * Send event data (single) * * POST /integrators/timeline/2026-03/events * * Also accepts auth: developer_hapikey */ export const createApiIntegratorsTimeline202603Events = async (args: CreateApiIntegratorsTimeline202603EventsArgs, options?: CreateApiIntegratorsTimeline202603EventsOptions) => { const {baseUrl = "https://api.hubapi.com", fetch: fetchFn = fetch, privateApps} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (privateApps !== undefined) headers.set('authorization', `Bearer ${privateApps}`) const url = `${baseUrl.replace(/\/+$/, '')}/integrators/timeline/2026-03/events${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };