SDK API Reference / composableSegmentToSegmentResponse
Function: composableSegmentToSegmentResponse()
composableSegmentToSegmentResponse(
segment,audienceId):SegmentResponse
Normalise a composable segment to the complete-side SegmentResponse shape, so everything downstream of a fetch — rule → YAML conversion, journey-local naming, consolidation, diffing — is identical for both audience kinds and none of it has to know which kind it is looking at.
kind is deliberately left unset: batch/realtime/funnel_stage is a complete-side concept, and setting it would emit a kind: field the composable API cannot accept back on push. Whether a composable segment is journey-local comes from isJourneyLocalComposableSegment instead.
Parameters
segment
ComposableSegment
audienceId
string