// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../core/resource'; import { APIPromise } from '../../core/api-promise'; import { buildHeaders } from '../../internal/headers'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; export class Highlights extends APIResource { /** * Create a highlight for an account */ create(accountID: string, body: HighlightCreateParams, options?: RequestOptions): APIPromise { return this._client.post(path`/accounts/${accountID}/highlights`, { body, ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), }); } /** * Update a highlight */ update(id: string, params: HighlightUpdateParams, options?: RequestOptions): APIPromise { const { account_id, ...body } = params; return this._client.patch(path`/accounts/${account_id}/highlights/${id}`, { body, ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), }); } /** * Delete a highlight */ delete(id: string, params: HighlightDeleteParams, options?: RequestOptions): APIPromise { const { account_id } = params; return this._client.delete(path`/accounts/${account_id}/highlights/${id}`, { ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), }); } } export interface HighlightCreateParams { /** * The HTML content for this highlight */ content_html: string; /** * Optional RFC3339 timestamp of when this highlight will expire */ expires_at?: string; } export interface HighlightUpdateParams { /** * Path param: The ID of the account that the highlight belongs to */ account_id: string; /** * Body param: The updated HTML content for this highlight */ content_html?: string; /** * Body param: The updated expires at timestamp (RFC3339) */ expires_at?: string; } export interface HighlightDeleteParams { /** * The ID of the account that the highlight belongs to */ account_id: string; } export declare namespace Highlights { export { type HighlightCreateParams as HighlightCreateParams, type HighlightUpdateParams as HighlightUpdateParams, type HighlightDeleteParams as HighlightDeleteParams, }; }