input function validates and returns an InputFieldDefinition object. Inputs define the configuration fields presented to integration builders in the Prismatic UI. The resolved input values are passed to the perform function via the params argument.
Function signature
Common fields
All input types share the following base fields:The field label shown in the UI. Accepts a plain string or a
{ key, value } object for localization.The input type. See type-specific documentation below.
When
true, the integration builder must provide a value for this input.Placeholder text shown in the input field before a value is entered.
Help text displayed below the input field to guide the integration builder.
An example of a valid value for this input.
Default value pre-populated in the input field.
When set, this input accepts multiple values instead of a single value.
"valuelist"— a list of values of the input’s base type"keyvaluelist"— a list of key/value pairs where each value is the input’s base type
A list of predefined choices rendered as a dropdown. Available for
string, data, text, password, boolean, date, and timestamp types.A function that transforms the raw input value before it is passed to
perform. Useful for parsing, coercing types, or stripping whitespace. The return type of clean determines the TypeScript type seen in params.Key of a data source defined in the same component that can be used to dynamically populate the allowed values for this input.
Input types
- string
- text
- data
- password
- boolean
- code
- connection
- conditional
- date
- timestamp
- objectSelection
- objectFieldMap
- dynamicObjectSelection
- dynamicFieldSelection
- jsonForm
A single-line text input.
Collections
Whencollection is set, the input accepts multiple values. The default type and resolved params type change accordingly:
| Collection | default type | Resolved params type |
|---|---|---|
| (none) | T | T |
"valuelist" | T[] | T[] |
"keyvaluelist" | KeyValuePair<T>[] | KeyValuePair<T>[] |
clean function
The clean function coerces or validates the raw input value before it reaches the perform function:
Connection object
When a connection input is resolved, params.myConnection contains:
Programmatic key of the connection type.
Name of the config variable hosting this connection.
Input field values supplied to this connection (e.g.,
fields.apiKey).OAuth 2.0 token data (e.g.,
access_token, refresh_token, expires_in). Present only for OAuth 2.0 connections.OAuth 2.0 token metadata (e.g., expiration time). Present only for OAuth 2.0 connections.
Related
action— Use inputs in an actiontrigger— Use inputs in a triggerdataSource— Use inputs in a data sourceconnection— Define connection inputs
