Skip to content

@namakina/landing-page

Interfaces

InterfaceDescription
AskPresentationHow an ask_field is drawn when the page renders a question unit rather than bare chips.
ExperienceCardOne option card. imageId names a registered material and offerId a catalog offer; ai-core resolves both to imageUrl, url and sponsored before the frame leaves, so the SDK never sees an id and never trusts an agent-written url.
ExperienceChoiceOne pick on a stage block: a card, or a secondary action such as "Too much for today".
FormFieldSnapshotOne real form control as the SDK saw it when the message was sent.
FormSnapshotThe landing page's form as the SDK saw it when this inbound message was sent.
FormSnapshotExperienceWhat the page has on screen beyond its fields. ai-core replicas share no memory of a conversation, so the browser carries this on every message.
LandingPageOptionsOptions accepted by init(); the IIFE build reads the same values off its <script>.
LandingPagePostBody of POST /webhooks/webchat as the SDK sends it.
ReceiptRow-
SheetActionA secondary button under a stage block; pressing it posts a turn carrying its id.
StageActionA secondary button under a stage block; pressing it posts a turn carrying its id.
WebchatOfferCardAn offer as a channel draws it, structurally identical to the platform's OfferCard so that type is assignable here. url is the tracked link the text already carries.

Type Aliases

Type AliasDescription
ControllerState-
FormActionWhat the SDK should do to the real form after rendering the agent's text.
LpEventKey-
SdkCapability-
ShowCardsAction-
ShowSheetAction-
WebchatStreamFrameThe SSE frames the SDK reads from GET /messages/stream; the channel may emit a superset.

Variables

VariableDescription
version-

Functions

FunctionDescription
destroyRestores every form the SDK touched and forgets them.
initResolves options, then scans the document; returns how many forms were taken on.
scanStarts a controller for every tagged form not already claimed, dropping any that left.

Proprietary. All rights reserved.