Creates a config wizard page object for use in code-native integrations.
The configPage() function defines a single page in an integration’s config wizard. Config pages are displayed when a customer deploys an instance of the integration, allowing them to supply values for config variables and connections. Pages are passed as values in the configPages or userLevelConfigPages record of integration().
A record of config variables and/or connections to display on this page. Keys become the variable names accessible in context.configVars during flow execution.Each value can be:
A string — a section heading or static text label on the page.
A ConfigVar — a standard, data source, or connection config variable (see related functions below).
The same config page definition object passed in, unchanged. The function is used for type inference so that context.configVars is typed correctly in flow execution functions.
Config page names (the keys in configPages) and element names (the keys in elements) are used to look up values at runtime via context.configVars. Use descriptive, stable names.
User-level config pages work the same way but are passed under userLevelConfigPages in integration(). They are shown in a separate user-level config wizard rather than the instance-level wizard.
import { integration, configPage, configVar } from "@prismatic-io/spectral";export default integration({ name: "My Integration", flows: [], userLevelConfigPages: { "User Preferences": configPage({ tagline: "Set your personal preferences", elements: { "Notification Email": configVar({ stableKey: "notification-email", dataType: "string", description: "Email address for notifications.", }), }, }), },});