addSubsection

View as MarkdownOpen in Claude

Add a subsection to an existing section. If the parent section does not exist, it is created automatically.

Parameters

parentTitle
stringRequired

Title of the parent section.

title
stringRequired

Subsection title.

opts
object

Optional subsection content.

opts.body
string

Subsection body text.

opts.bullets
string[]

Bullet points for the subsection.

Returns

PomBuilder — Self for method chaining.

Example

1import { PomBuilder } from '@signalwire/sdk';
2
3const pom = new PomBuilder();
4pom.addSection('Role', { body: 'You are a helpful assistant.' });
5pom.addSubsection('Role', 'Tone', { body: 'Use a friendly, professional tone.' });