DoptConfig
@dopt/javascript / Exports / DoptConfig
Interface: DoptConfig
Providing this configuration to Dopt allows the the SDK to fetch relevant data from the Dopt blocks API.
Table of contents
Properties
Properties
userId
• userId: undefined
| string
The userId you're fetching block and flows for.
If undefined, Dopt will not initialize.
Instead, it will wait for a configure({ userId })
call
where a userId is passed in.
Defined in
packages/@dopt/javascript/src/dopt.ts:66
groupId
• Optional
groupId: string
An optional groupId for that userId.
Defined in
packages/@dopt/javascript/src/dopt.ts:70
apiKey
• apiKey: string
Your blocks API key.
Defined in
packages/@dopt/javascript/src/dopt.ts:74
logLevel
• Optional
logLevel: LogLevels
Defined in
packages/@dopt/javascript/src/dopt.ts:75
flowVersions
• flowVersions: Record
<string
, number
| "uncommitted"
| "latest"
>
An object containing all flows and versions you'd like to fetch.
The versions can be a number (a fixed version), "uncommitted" which references the uncommitted version in Dopt, or "latest" which references the most recently created version in Dopt.
Remarks
⚠️ Warning ⚠️: Using either "uncommitted" or "latest" will cause updates made in Dopt to be reflected in the provider upon window reload without needing to update or deploy code.
Example
{
"welcome-to-dopt": 3,
"test-flow": "uncommitted",
"feature-announcements": "latest",
};
Defined in
packages/@dopt/javascript/src/dopt.ts:98
optimisticUpdates
• Optional
optimisticUpdates: boolean
A boolean which defines whether complete intents on step blocks should optimistically update the client before hearing back that the change has been committed.
Within Dopt, this defaults to true
unless explicitly set as false
.