Whether a successful handshake has completed and not been destroyed.
Calls the Kadanza Platform API with the current connection credentials.
Requests go to getApiUrl + endpoint. Authorization and tenant
headers are managed by the SDK and cannot be overridden.
Expected JSON response body.
Root-relative API path.
Standard fetch options.
Establishes the parent connection and waits for HANDSHAKE_ACK.
Safe to call repeatedly (e.g. from a React useEffect with deps):
authTokenAutoRefresh / authTokenBufferMs without another init.
timeoutMs is ignored after connect.Opt-in proactive refresh can be enabled with
authTokenAutoRefresh: true (optional authTokenBufferMs).
Pass routingType: "client-hash" for HashRouter SPAs so the parent can
soft-navigate without reloading the iframe. Default is "server".
Handshake completes when the parent sends HANDSHAKE_ACK. Context fields
(authToken, extensionDetails, designTokens, pageSettings) are
optional — omitted values are null. Use them only when the current host
surface provides them (e.g. spaceId / pageId on Experience Pages,
designTokens when a tenant is in context).
Handshake timeout, routing type, and optional auth-token auto-refresh.
Tears down listeners, proactive refresh timers, and cached state. Rejects any in-flight requests. The instance cannot be reused after destroy. When created via createExtensionSDK, clears the singleton so a later create call can return a fresh instance.
Notifies the parent that the extension's route changed.
Wire: NAVIGATION_CHANGE (fire-and-forget). Also used as the ACK after
handling onNavigate.
Navigation change payload (path within the extension).
Asks the parent for a new auth token and waits for TOKEN_REFRESH.
Optional request timeout (default 10s).
Pushes page settings to the parent and waits for PAGE_SETTINGS_UPDATED.
Update payload containing the settings object.
Optional request timeout (default 10s).
Validated parent postMessage origin from tenantUrl;
null until connect resolves it.
Platform API base URL the parent uses for its own API calls.
Returns handshake extensionDetails.apiUrl as sent. When the host omits
it, falls back to deriving api.{hostname} from extensionDetails.baseUrl.
null until connected, or when neither field is usable.
Last auth token from handshake or refresh.
null until connected, or when the host omitted it.
Tenant branding from handshake.
null until connected, or when the host omitted it.
Extension context from handshake.
null until connected, or when the host omitted it.
Latest page settings from handshake or LOAD_PAGE_SETTINGS;
null until set.
Raw tenantUrl search-param value used for the allowed origin;
null until connect reads it.
Registers a handler for auth-token updates (requested or parent-pushed).
Unsubscribe function.
Registers a handler for parent-initiated LOAD_PAGE_SETTINGS.
Unsubscribe function.
Registers a handler for parent-initiated REQUEST_NAVIGATION_CHANGE.
Navigate the SPA to payload.path and acknowledge with
emitNavigationChange.
Unsubscribe function.
Default IExtensionSDK implementation. Prefer createExtensionSDK.