Skip to content

public.session.detail-list.row

Rows of your own in the list of facts on the buyer-facing detail sheet for one session — on the business’s public page and in its embedded schedule on its own website.

SurfacepublicSlotRowsWritesRead-only
Subject
The Session the sheet is showing.
Viewer
Anyone: a signed-in customer or an anonymous visitor (viewer is null in the extension API).
API type
PublicSessionDetailListRowApi<Query>

Where it renders

In the session sheet’s “See more” sheet, as a group of rows after the session’s detail list (price, time, location, …), drawn exactly like the rows around it — no card, no heading. The sheet’s face offers a “See more” row after the location that names your app, so a buyer knows what is there.

In the same place on the <sessions-schedule> and <sessions-sheet> embeds on a business’s own website.

Render <sessions-detail-row> elements. While your extension starts, the host holds one placeholder row in your place, so the sheet doesn’t grow when your row arrives; render <sessions-detail-row-skeleton> yourself only for a wait of your own after that. Render nothing when you have nothing to say: the placeholder folds smoothly away.

The api object

What this target’s module receives as its second argument. The target members come first; every target also has the standard members below them.

This target
api.session{readonly id: string}
The session this block renders beside. id is a Session global id — the same session the session root of the extension API resolves to.
Every target
api.targetUIExtensionTarget
The target this module is rendering into — the literal name, so it narrows the rest of the API.
api.version'2026-09'
The extension API version the host speaks.
api.app{id: string; handle: string; name: string}
The app this extension belongs to.
api.extension{id: string; handle: string; name: string}
This extension.
api.localization.localeReadonlySignal<string>
The viewer’s BCP 47 locale (en, fr-CA). A signal: it changes when the viewer switches language without a reload, so read .value or .subscribe to it.
api.localization.translate(key, replacements?)(key: string, replacements?: Record<string, string | number>) => string
One of your own strings, from the translations/<locale>.json files pushed with the extension, in the viewer’s locale. key is a dot path; {{name}} placeholders are filled from replacements; a plural object is chosen by replacements.count. Falls back to the language, then en, then the key itself.
api.localization.formatNumber / formatDate / formatCurrency(value, options?) => string
Intl formatting in the viewer’s locale: formatNumber(value, options?), formatDate(value, options?) (a Date, an ISO string or epoch milliseconds; pass timeZone for the business’s wall-clock time), and formatCurrency(amount, currency) with amount in major units.
api.queryReadonlySignal<Query>
The result of the target’s live query — the GraphQL query you ship with the target, which Sessions stores, runs for you, and runs again as the data changes (after every api.mutate, and whenever the host page refreshes its own data). A signal: read .value while rendering to re-render with it. {} when the target declares no query.
api.ui.toast(message, options?)(message: string, options?: {tone?: 'critical'}) => void
Shows a toast on the host page, in the host’s own style.

Extension GraphQL API

What this target’s live query and mutations can use.

Query roots
Mutations
—
None — this target is read-only.

Guidance

Read-only: the API has no mutate, and the extension API refuses mutations for this target.

Buyers see this on a phone first — one row per fact, with a short title and at most a one-line subtitle.

This module ships to every buyer who opens the sheet, so keep it separate from your staff-facing module and keep it small.

This module is downloaded by every buyer who opens the sheet. Keep staff-only logic in your business target’s module, never behind a check in this one.
session-note
import {
  extension,
  useQuery,
  useTranslate,
  DetailRow,
} from '@sessions/apps/preact';

import type {SessionNoteQueryData} from './SessionNoteQuery.graphql';

export default extension('public.session.detail-list.row', () => <Note />);

function Note() {
  const {session} = useQuery<SessionNoteQueryData>();
  const translate = useTranslate();
  const note = session?.note?.value;
  // Nothing to say: render nothing, and the host's placeholder row folds away.
  if (!note) return null;
  return <DetailRow subtitle={translate('fromTheDesk')}>{note}</DetailRow>;
}