The options to configure the Refold SDK.
OptionalbaseUrl?: stringThe base URL of the Refold API. You don't need to set this.
Optionaltoken?: stringThe session token.
Returns the specified config, or creates one if it doesn't exist.
The payload object for config.
The specified config.
Connects the specified application using the provided authentication type and optional auth data.
The parameters for connecting the application.
Which credentials a connect uses, and what to store against the connection.
OptionalauthProfileId?: stringThe credential set to connect with, from an application's auth profiles. Omitted, the application's default profile is used.
OptionalautoClose?: booleanWhether to close the authentication window automatically once the connection succeeds or the wait times out.
OptionalconnectionId?: stringAn existing connection to re-authenticate instead of opening a new one.
OptionalgrantType?: GrantTypeThe application's OAuth grant (from the app object). It no longer selects the
transport — every connect is a POST and the server decides — but it still
routes: Refold.connect sends a payload-bearing connect down the OAuth
path rather than the key-based one when this names
GrantType.ClientCredentials and no type was given. Pass type
explicitly and it is not needed.
Optionalpayload?: Record<string, string>The key value pairs of auth data.
OptionalpreRequisiteFields?: Record<string, unknown>Values the application requires before it can be connected. Read by applications
on auth profiles and by connectors; other native applications take theirs as flat
keys in payload.
Optionalsignal?: AbortSignalSignal used to give up on an in-progress authentication — abort it and the
returned promise resolves false. Providers that sever the authentication
window's handle make an abandoned flow undetectable, so this is the only way
to end such a wait before the timeout.
The application slug.
Optionaltimeout?: numberMaximum time in milliseconds to wait for authentication before giving up. Set to 0 to wait indefinitely. Defaults to 3 minutes.
Optionaltype?: AuthType | ConnectorAuthTypeThe authentication type to use — an AuthType for native applications, or
one of a universal connector's own types (a key of
Application.auth_type_options). If not provided, it defaults to keybased
when a payload is given, otherwise oauth2.
OptionaluserDefinedFields?: Record<string, unknown>Caller metadata to store against the connection.
A promise that resolves to true if the connection was successful, otherwise false.
Create a public workflow for the linked account.
The payload for creating a public workflow for the linked account.
Optionaldescription?: stringThe workflow description.
The workflow name.
Optionalslug?: stringThe application slug in which this workflow should be created.
The created public workflow.
Delete the specified config.
The application slug.
OptionalconfigId: string
The unique ID of the config.
Optionalopts: ConnectionScoped = {}
Names the connection whose config this acts on.
Delete the specified config field value.
The application slug.
The unique ID of the field.
OptionalworkflowId: string
The unique ID of the workflow.
Optionalopts: ConnectionScoped = {}
Names the connection whose config this acts on.
Delete the specified public workflow.
The workflow ID.
Disconnect the specified application and remove any associated data from Refold.
The application slug.
Optionaltype: AuthType
The authentication type to use. If not provided, it'll remove all the connected accounts.
Optionalopts: ConnectionScoped = {}
Names the connection to revoke. Required where the application holds more than one; the server answers 400 rather than choosing.
Execute the specified public workflow.
The execution payload.
Optionalconfig_id?: stringThe config to execute against.
Optionalconnection_id?: stringThe connection to authenticate the run through. One config_id can span several
connections, so send both to name the config and the credentials.
Optionalpayload?: Record<string, any>The payload to execute the workflow.
Optionalslug?: stringThe application's slug this workflow belongs to.
Optionalsync_execution?: booleanWhether to execute the workflow synchronously.
The workflow id or alias.
Returns the list of enabled applications and their details.
The list of applications.
Returns the application details for the specified application, provided the application is enabled in Refold.
The application slug.
The application details.
Returns the specified config.
The application slug.
OptionalconfigId: string
The unique ID of the config.
OptionalexcludeOptions: boolean
Whether to exclude the options from the fields in the response.
Optionalopts: ConnectionScoped = {}
Names the connection whose config this acts on.
The specified config.
Returns the specified field of the config.
The application slug.
The unique ID of the field.
OptionalworkflowId: string
The unique ID of the workflow.
Optionalpayload: Record<string, unknown>
The payload to be sent in the request body.
Optionalopts: ConnectionScoped = {}
Names the connection whose config this acts on.
The specified config field.
Returns the configs created for the specified application.
The application slug.
Optionalopts: ConnectionScoped = {}
Narrows the result to one connection's configs.
The configs created for the specified application.
Returns the specified workflow execution log.
The execution ID.
The specified execution log.
Returns the workflow execution logs for the linked account.
Optionalparams: GetExecutionsParams = {}
Parameters for filtering and paginating the list of workflow executions.
Any additional filter keys supported by the API.
Optionalend_date?: stringFilter executions that started on or before this ISO 8601 date string.
Optionalexecution_source?: ExecutionSourceFilter by the trigger source that initiated the execution.
Optionalexecution_type?: ExecutionTypeFilter by how the execution was invoked — synchronously or asynchronously.
Optionallimit?: numberOptionalpage?: numberOptionalstart_date?: stringFilter executions that started on or after this ISO 8601 date string.
Optionalstatus?: ExecutionStatusFilter executions by their current status.
Optionalworkflow_id?: stringFilter executions by workflow ID.
Optionalworkflow_name?: stringFilter executions by workflow name (partial match).
The paginated workflow execution logs.
Returns the options for the specified field.
The selected value of the lhs field.
The application slug.
The unique ID of the field.
OptionalworkflowId: string
The unique ID of the workflow, if this is a workflow field.
Optionalopts: ConnectionScoped = {}
Names the connection whose config to resolve against.
The specified rule field's options.
Returns the execution payload for the specified public workflow.
The workflow ID.
The workflow payload response.
Returns the private workflows for the specified application.
Parameters for filtering and paginating the list of workflows.
Any additional filter keys supported by the API.
Optionalend_date?: stringFilter workflows created on or before this ISO 8601 date string.
Optionallimit?: numberOptionalname?: stringFilter workflows by name (partial match).
Optionalpage?: numberOptionalpublished?: booleanFilter by workflow published status. true returns only published workflows, false returns only drafts.
Optionalslug?: stringFilter workflows by the application slug.
Optionalstart_date?: stringFilter workflows created on or after this ISO 8601 date string.
Enables or disables a single workflow within a config, without re-installing the config.
The toggle payload.
The updated list of workflows in the config.
Update the specified config.
The update payload.
The specified config.
Update the specified config field value.
The application slug.
The unique ID of the field.
The new value for the field.
OptionalworkflowId: string
The unique ID of the workflow.
Optionalopts: ConnectionScoped = {}
Names the connection whose config this acts on.
The updated config field.
Refold Frontend SDK