Skip to main content
A portal function is a declared host capability callable by a widget worker. Import functions from @fluid-app/portal-sdk/widgets/worker and declare every function the widget uses. The callable exports are under Variables in the Widget Worker SDK Reference.

Declare each function in uses

Call the same typed function values from the component. Do not maintain a parallel string list of capability names. The worker and host enforce the uses declaration.

Choose a capability family

The public worker facade provides functions for:
  • portal navigation, links, fullscreen, account, store, and profile state;
  • content, catalog, media, metric, and calendar reads;
  • content, playlist, share, and DAM mutations;
  • member access, points, todos, account updates, and MySite data.
Use each linked generated declaration for the function’s exact input, result, error behavior, and required uses declaration. For example, see getPortalProfile and navigateTo.

Handle errors and partial data

Treat results as documented SDK values and do not assume undocumented fields are present. Handle unavailable, missing, partial, and malformed values without throwing during render. See PortalFunctionError for the supported error codes.