addSection

View as MarkdownOpen in Claude

Add a new top-level section to the POM.

Parameters

title
stringRequired

Section title.

opts
object

Optional section content.

opts.body
string

Section body text.

opts.bullets
string[]

List of bullet points for this section.

opts.numbered
boolean

Whether to number this section in the rendered output.

opts.numberedBullets
boolean

Whether to number bullet points instead of using bullet markers.

opts.subsections
{ title: string; body?: string; bullets?: string[] }[]

List of subsection objects, each with "title", optional "body", and optional "bullets" keys.

Returns

PomBuilder — Self for method chaining.

Example

1import { PomBuilder } from '@signalwire/sdk';
2
3const pom = new PomBuilder();
4pom.addSection('Role', {
5 body: 'You are a helpful assistant.',
6 bullets: ['Be concise', 'Be accurate'],
7 subsections: [
8 { title: 'Tone', body: 'Use a friendly, professional tone.' },
9 ],
10});